Jquery fade only one item of a class in

I just tried making a script that fades in a tooltip when you hover a link, image etc.. Everything works fine except the actual fading in of only one tooltip at a time. If it was not clear what i mean: I want to hover an image and show a tooltip right above the image, […]

How to add random number id inside div class

This question already has an answer here: Randomize numbers with jQuery? 6 answers

Angularjs uses data-src automatically – want to use jquery.unveil.js

i what LazyLoading images with Unveil inside an Angular app. Unveil uses the real Image URL in data-src and can’t use a custom “data attribute” like data-unveil. The Problem is that Angular is automatically converting “data-src” to “src”. WTF! <script src=”https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js”></script> <div ng-app> <ul> <li>Angular uses data-src as src attribute</li> <li ng-repeat=”foo in [‘Photo A’, […]

Why focus on textbox is not set inside a twitter-bootstrap modal (popup) by AngularJS

I have been trying to implement what suggested here and other similar solution How to set focus on input field? PLUNKER my code with non-working autofocus. HTML <body ng-controller=’userNameController’> <button class=”btn” id=”enterUsernameBtn” href=”#userNameModal” role=”button” class=”btn” data-toggle=”modal” title=”Enter Username” ng-click=”focusInput=true”>Enter Username</button> <!– UserName Modal –> <div id=”userNameModal” class=”modal hide fade” tabindex=”-1″ role=”dialog” aria-labelledby=”userNameModalLabel” aria-hidden=”true”> <div class=”modal-header”> […]

How to keep font size always 150% after page refresh or open page again?

I’ve create two button which allow users to change the font size of texts in my webpage.It’s work nice, but after refresh or reopen the page the font size always back to the normal size. So how to keep font size always 150% after page refresh or reopen? Here is my jQuery code: $(document).ready(function() { […]

Draw a square in javascript using canvas

I am using the following code to draw a square. I am new to javascript. Can anyone please tell me what’s wrong with the following code? It doesn’t draw an exact/correct square. The side/length of the square must be the one that is longer between x & y. I think there are some dimension issues. […]

PhantomJS' includeJs is not executed

I’m new to phantomJS and this is what I tried so far: var page = require(‘webpage’).create(); console.log(‘The default user agent is ‘ + page.settings.userAgent); page.settings.userAgent = ‘SpecialAgent’; page.open(‘http://google.com’, function (status) { if (status !== ‘success’) { console.log( ‘Unable to access network’ ); } else { console.log( ‘Opened ok’ ); page.includeJs( ‘http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js’, function() { console.log( ‘include […]

Template engine for node.js

I would like to know the best template engine for node.js. Currently I’m using jade engine with node.js. The confusion arise after reading this https://github.com/baryshev/template-benchmark Please suggest me the best Thanks.

Twitter bootstrap – show modal by clicking on a link

I’m using twitter bootstrap. I want modal to be shown by clicking on a link using javascript. $(“#my-link-id”).click($(this).modal()); However, the code above causes an error of Uncaught Error: HIERARCHY_REQUEST_ERR: DOM Exception 3 What did I do wrong?

Understanding JavaScript OOP

ok, this is really my first time doing my first class with javaScript, I have studied to use JQuery so much for months so its not really not hard me to teach. In this code I will be asking a lot of questions.. ok this is the code my first javascript class window.myclass = function(){ […]