My App.component which calls a init method in my user service. ngOnInit(){ this.init(true).then(data => { console.log("OnInit Called") }) } User.service returns a promise which in turn calls the account.init init = (isRegistered) => { retu
I want to add/remove CSS classes just like jQuery's $('#element').addClass('new_class') and removeClass(). Does AngularJS offer a native solution that doesn't require jQuery or jQLite? Our main developer says he's going to remove jQuery for performan
I am creating multiple HTML elements. Elements have different properties. I would like to get the property name, and the its value using index. var elements = [ {"type":"div","className":"items","id":"
I want to make an auto adaptation or generation of days of year, from Gregorian to Hijri. I mean that you want to select or write the year as example: select 2015: Get all the days of 2015 in Gregorian and then its convert to Hijrim and present the l
Why doesn't lodash result method return the default value in this case? Arguments object (Object): The object to query. key (string): The key of the property to resolve. [defaultValue] (*): The value returned if the property value resolves to undefin
I am new to DOJO and I am using DOJO 1.5.0 version. I want to create dynamic checkboxes by iterating JSONArray in DOJO. This dynamic creation will be done on a particular event like when we selecting some combo-box value. For example consider below J
I have a php function that has an array of all of these interest selections for users to choose from. I populate that data like so in a table: foreach($interests as $key=>$value){ ?> <input type="checkbox" name="targetInterests&quo
I would like to play a mp3 soundtrack on my website, and manipulate the speed of the soundtrack by a percentage using a slider. I'm wondering how this could be done with only HTML(5) and JavaScript. I haven't been able to find any examples or tutoria
I have the following JSON returned from a PHP script var data ={ "first thing" :["1","2"], "second thing" :["5","7"], "third thing" :["8","2"] }; I know that I can a
I have a blog style layout in a cms so there are multiple instances of these divs. This is the structure: <div class="sfpostContent"> <p>Some text</p> random text <p>Some text</p> <div class="sfpostsList-img
I have following HTML scippet for a button: HTML: <div class="Clear" title="Clear"> <div class="ClearButton"> <button id="reset" type="reset" title="Clear Photos"> </button&g
I got this working but I need a default page showing before you choose one, how do I do this? Also is it possible to hide the page files? So it will not show when you View Source. <script src="http://code.jquery.com/jquery-1.4.min.js" type=&q
I'm trying to draw a rotating 3D coordinate system using Three.js. I want the axes to have some thickness, which so far I have accomplished using LineBasicMaterial's linewidth parameter. The following code works for me since I am not on Windows: var
How do I put the place mark on google maps? The code below shows only particular location but I want to add my custom place mark image on google maps. <!DOCTYPE html> <html> <head> <script src="http://maps.googleapis.com/maps/api
I have these two functions that creates a new string in the correct format (mm-dd-yyyy) but right now it seems to not work so well... when I input the date 31-03-2013 which is a valid date, it comes out with 04-01-2013 as in the first of the month af
This question already has an answer here: How do I pass JSF managed bean properties to a JavaScript function? 3 answers Can anyone tell me how to get the managed bean property value inside the javascript method something like function fonction1() { v
I'm new in web programming and I really need your help. I have a form with several radio buttons and I want to insert them into mysql through an ajax post. I can do it for a single button but for more than one I don't have idea how to do it. This is
I am trying to make a bar chart and the bar animates from top to bottom right now, but I want it to animate from bottom to top. How do I get it go from bottom to top? CSS .bar { width:50px; height:250px; list-style-type:none; } .bar p { background-co
Background: I'm making a facebook wall-alike page, which will have many posts and you should be able to comment every post. And these textboxes, where you post type your comment in, should resize as in Facebook. I have this code so far. It works but
I have a website with a photo gallery and i want the plus one button to point to the photo page and not to the gallery itself, meaning that i will need to change it dynamically when the user flips through images. What would be the proper way of doing
I've been developing in javascript for a few months and I have been using $(document).ready(function(){ at the beginning of all my scripts. I've noticed other folks don't use this in their scripts but I can't seem to get mine working without it. I'd
I am a jquery newbie and have been adding alert timestamps into my html file to find what lines of code are making things slow. I have found the main bottleneck and am looking for help to know how to change these 2 lines to be faster. My html file ha
I have an Ext.form.Select that I want to update it's label dynamically when it's value changes. Simple as it sounds, it refuses to work: var musicInCarInput = new Ext.form.Select({ options: [ {text: "Yes", value: "yes"}, {text: "M
I have a text box in a form. I have given style="width: 370px;" While browsing in Firefox its alignment is correct with all other fields in this form. But in IE It's need to increase little more. i.e. 380px. SO how I will give the width to that
So, I have 3 variables being passed in: stats (JSON object, shown below) place_type (string, either "US" or "State") factor (string) I have another variable, answer, whose value depends on the other variables. For example, if place_typ
I'm looking to make a website that slowly fades in to hide the loading of the images. Now I've managed to get some javascript that does the fade in but it starts immediatly when the page loads so you still see the individual elements loading when you
I know W3C just publish their draft version of Web Notification to notify user. So, there is no browser that implement this method in their current or latest build browser. Web Notifications Overview After I search a lot of webs for finding all possi
I want to insert text field values to database using javascript jQuery AJAX call to C# server method. Problem is that AJAX call run successfully but C# is not updating the database. What could be the reason? Please reply soon. ASP code is giving belo
Does jQuery - or one of it's plugins - have equivalent functionality to the YUI StyleSheet Utility? "The StyleSheet Utility is capable of creating new stylesheets from scratch as well as modifying the existing stylesheets held as properties of elemen
Can any one tell me how can i implement a auto slider/scroller in my web page. The slider should show dynamic data from a database. (Ex : Hot jobs tab in the plipl.com site's home page (www.plipl.com) . Is there any easy way to do this with jQuery ?T