I'm trying to add an active class (i.e. class="active") to the appropriate menu list item based upon the page it is on once the page loads. Below is my menu as it stands right now. I've tried every snippet of code I could find in th...
Using jQuery 2.1, Meyer's 2.0 CSS reset script, targeting IE9+ and modern browsers.  I've made two overlapping divs. I'm listening to mouseover and mouseout events on both of them. Fiddle: http://jsfiddle.net/vbkjL/1/  Expected behaviour:...
i was rounding off the value to .25,.50,.75 and .00 in the javascript. and the code is as below.  function roundOff(obj) {     //alert(document.getElementById("sample").value);     var val=obj.value;     var newValue;      var floorValue = Ma...
I was asking myself this question. Is Set a hashed collection in JavaScript?  For example, Set.prototype.has will iterate the entire Set or do its implementations use an internal hash table to locate an item within the collection?...
//Global Scope "use strict"; //1 function A() {     "use strict"; //2     function innerA() {         "use strict"; //3     } }   I was just wondering:      Is doing use strict at //1 is enough or do we have to be explicit at...
I'm following a tutorial for integer Angular JS on a RoR project.  In my controller js files i've got this:  raffle.coffee  # Place all the behaviors and hooks related to the matching controller here. # All this logic will automatically be av...
Is there an easy way to drag a google maps marker outside the map area onto another html dom element.  I have tried allot of things and looks like the only way is to hack through and create a duplicate marker in jquery and just have it hover over the...
I would like display something more meaningful that animated gif while users upload file to my web application. What possibilities do I have?   Edit: I am using .Net but I don't mind if somebody shows me platform agnostic version....
I'm new to Angular and I'm trying to do some DOM calculations and manipulations from Directive using jQuery. What I've got however is wrong height of my element. In my case the element is something like container - so the height almost al...
I am trying to use Rangy in my Google Chrome extension, but I keep on receiving the error "Module 'WrappedSelection' not supported". This is a bare-bones extension so I have not implemented any code in this project other then Rangy....
I want to popup selectedDate on Date Select   I used a solution from previous post :  get selected date from fullcalendar jquery  this is my jsfiddle  http://jsfiddle.net/100thgear/h9cc6/  My Code (No Error on Firebug)  $(document).ready(function() {...
Im trying to make a popup div (when a text-box value changes) and it can be closed (visibility: none) by clicking anywhere outside the div. Similar to Google suggestion drop-down.   How can I know weather the mouse click has happened inside the div o...
Having a problem trying to sort a JSON object. Basically, people can add products in any random order to our order form, but the order it shows in the summary needs to be how we want them to be positioned (not the order they select them), so thats wh...
I have a generic handler that I call using this very basic js code:       var formData = new FormData();      formData.append("fileId", this.model.get("id"));      xhr = new XMLHttpRequest();      xhr.open('POST', '/generi...
I have a simple PHP file which loads a file from my server, base64 encodes it and echoes it out.  Then I have a simple HTML page that uses jQuery to fetch this file, base64 decode it and do a checksum test. The checksum test is not working.  I md5...
i have a search field in which the user enters a letter and the ajax script in the background performs a search. The results are displayed live in a ul-li list. The user can click on the li which class is 'search_list_item'. After the click t...
Does that document means that future javascript proxy implementations would not have Proxy.createFunction and I will not be able to create a proxy which could be called as a function?  http://people.mozilla.org/~jorendorff/es6-draft.html#sec-reflect-...
I'm trying to use Leaflet.js to display a map inside a tabbed panel from Twitter Bootstrap, but is behaving in a strange way:   When I click on the tab containing the panel there is a gray layer on top of the map. If I drag and move the map I get...
I am using a web templates which is use jquery image gallery or other etc. I want to convert this template to angularjs structure. I make some partial html pages like slider.html or contact.html and its controller. when i call partial html to index ,...
I'm trying to replace all text in between tags and I want to know the fastest way of doing so.   An example would be trying to replace all text with the arbitrary string helloWorld, so that this:   <div>     <div>         RandomText1...
I am writing a Selenium test case where one of the steps is to upload a file via Dropzone.js.  (As Selenium can run Javascript in the browser, so if it can be done programmatically in Javascript that would be fine too.)  I want to avoid going all the...
I want to create a metronome using setInterval. I want to be able to reach high bpms like 300 bpm. Even if the file is short enough to be played as many times as it's needed, it will hiccup very easily. Furthermore, many browsers have issues with...
var c = 1;  function myFunction(){     c = 2;     var c = 4;     console.log(c); }  console.log(c); myFunction(); console.log(c);   Why is the last console.log spitting out 1? Here is how it is supposed to work in my brain:  var c = 1; // create glob...
I am trying to post an array to my server. But I have difficulties in doing it properly.   The array I am trying to post, is an array of objects which is dynamically structured, thus I don't know it's length.  To be more precise, my array is...
I have an app, and inside the app is a signup for and login form.  With the signup form, when the user creates an account, they are automatically logged in.  With the login form, the user can also login (obviously).  I have two controllers: one for t...
Fixed position does not work for my use case because it is fixed to the browser window and you can get in a state where the text is off your screen to the right and you can not get to it. Anyways, I have attempted to use absolute positioning and then...
I am wondering how to do the following- I have the following data:  dta = {        "fielddata": {            "text1": "4B030C2E-3D53-4DF8-A3535EF377B45DE5",            "text2": "Unlabeled"        } }   Which I...
How can I open a new tab using javascript without switching to the new tab? For example, when a user clicks on a link a new tab is to be opened, but the user should stay on the current tab....
I am calling a function db.transaction with following code:      db.transaction(createSheetDB, function(){alert("Sheet creation error!")}, function(){alert("Sheet created!")});   The function createSheetDB is a callback function which...
Hi i am trying to build an crud app using the mean stack. On load the express application successfully retrieves the "contactlist" collection from the database. However when attempting to post to "/api/contacts"... an error 500 is rec...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.