Bootstrap Sidebar menu and Sidebar navigation

I’m using bootstrap and it just happen that I wanted to create a responsive website that’s why push me through to use bootstrap. What I want to do is something like on the photo. (NOTE: not the entire page but only the sidebar with the icons.) That’s exactly what I want on my sidebar. I’d […]

Javascript “$” meaning before a variable or namespace

Anybody knows what is the meaning of the $ sign before an object attribute. For example: pages.$page I’ve seen in some javascript codes and I’m not sure if it using some kind of framework. I’ve used something like this (this.$el) to access to cached element in Backbone. Thanks in advance!

How do I save a model with attribute of type 'date' in Ember.js?

I’m trying to save an object containing a date attribute in Ember.js. After calling createRecord() on the store, the new object is represented on the page, but the date attribute disappears from the page upon calling save(). All other attribute types on the model do not exhibit this appear-then-disappear behavior. Here is some example code: […]

how to get value multiple tags in javascript using the id?

I want to get the name of the two <p> elements in my html file using id after the button is clicked. but in my code, when I clicked the button, i it only outputs “print”. How can I do this? This is my HTML code: <p id=”name” name=”print”>hey</p> <p id=”name” name=”this”>hey</p> <button id=”btn11″>test11</button> This […]

Why doesn't this if statement work as expected?

This question already has an answer here: Why does !new Boolean(false) equals false in JavaScript? 2 answers

Clone elements in angularjs

I need to duplicate some input fields in order to handle data from clients. I have done it with jQuery http://jsfiddle.net/m7R3f/1/ HTML: <fieldset id=”fields-list”> <div class=”pure-g entry”> <div class=”pure-u-1-5″> <input type=”text” class=”pure-input-1″ id=”input-1″ name=”input-1″> </div> <div class=”pure-u-1-5″> <input type=”text” class=”pure-input-1″ id=”date” name=”date”> </div> <div class=”pure-u-1-5″> <input type=”text” class=”pure-input-1″ id=”input-2″ name=”input-2″> </div> </fieldset> <button id=”add”>Add</button> JS […]

Select/detect the changed elements in d3.js?

The example looks like this: a=[1,2,3,4,5]; svg.selectAll(“rect”).data(a) a[1]=10; a[4]=50; svg.selectAll(“rect”).data(a) The second and the fifth elements of a are changed. And I want to ONLY select these two elements and set their color as red. However, I don’t know how to do that, or in other words, select these changed element in d3.js. (As I […]

Disable zoom in browser using jquery / javascript?

I would like to block the user from using anyway to zoom the website content. eg. ctrl + scroll/ select in the browser option. Are there any way to disable the zoom function in browser with the use of jquert/ js? Thanks

Encrypting data in POST

I want to create a authentication mechanism in which the client side is JavaScript and it fetches the password and username from the client and post it to the CGI Perl script. The problem is that the username and password is free text. I want to make it encrypted or hashed but at the CGI […]

“this” is not working with .find() in a .each()?

I am trying to access an object using this inside an .each() and want to perform .find() with it but in console it says .find is undefined function. data=$(data); $(“tr”, data).each(function(){ var est = this.find(“.estname a”).html; }); I have also tried this: data=$(data); $(“tr”, data).each(function(){ var est = $(this).find(“.estname a”).html; }); In console it shows […]