Questions tagged [javascript-framework]

A JavaScript framework is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies.

A framework is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications, especially for and other web-centric technologies.

1006 questions
879
votes
45 answers

What is the difference between React Native and React?

I have started to learn React out of curiosity and wanted to know the difference between React and React Native - though could not find a satisfactory answer using Google. React and React Native seems to have the same format. Do they have completely…
shiva kumar
  • 10,194
  • 4
  • 20
  • 24
585
votes
7 answers

AngularJS passing data to $http.get request

I have a function which does a http POST request. The code is specified below. This works fine. $http({ url: user.update_path, method: "POST", data: {user_id: user.id, draft: true} }); I have another function for http GET and I want to…
Chubby Boy
  • 30,362
  • 18
  • 45
  • 47
395
votes
4 answers

Difference between the 'controller', 'link' and 'compile' functions when defining a directive

Some places seem to use the controller function for directive logic and others use link. The tabs example on the angular homepage uses controller for one and link for another directive. What is the difference between the two?
261
votes
21 answers

Angular JS break ForEach

I have an angular foreach loop and i want to break from loop if i match a value. The following code does not work. angular.forEach([0,1,2], function(count){ if(count == 1){ break; } }); How can i get this?
Chubby Boy
  • 30,362
  • 18
  • 45
  • 47
252
votes
18 answers

jQuery: Check if div with certain class name exists

Using jQuery I'm programmatically generating a bunch of div's like this:
Some Text1
Some Text2
Somewhere else in my code I need to detect if these DIVs exist. The…
avatar
  • 10,735
  • 15
  • 58
  • 80
200
votes
3 answers

AngularJs ReferenceError: $http is not defined

I have the following Angular function: $scope.updateStatus = function(user) { $http({ url: user.update_path, method: "POST", data: {user_id: user.id, draft: true} }); }; But whenever this function is called, I…
Chubby Boy
  • 30,362
  • 18
  • 45
  • 47
193
votes
20 answers

How to create a jQuery plugin with methods?

I'm trying to write a jQuery plugin that will provide additional functions/methods to the object that calls it. All the tutorials I read online (have been browsing for the past 2 hours) include, at the most, how to add options, but not additional…
Yuval Karmi
  • 24,847
  • 38
  • 116
  • 172
186
votes
5 answers

What are the real-world strengths and weaknesses of the many frameworks based on backbone.js?

Hope that someone can share their experience with some of the latest emerging backbone.js variants out there. I have some good experience with backbone/underscore/require in several projects and I will like to take the next step towards more…
danikoren
  • 3,641
  • 7
  • 29
  • 32
137
votes
13 answers

Error: 10 $digest() iterations reached. Aborting! with dynamic sortby predicate

I have the following code which repeats and displays the name of the user and his score:
Chubby Boy
  • 30,362
  • 18
  • 45
  • 47
116
votes
8 answers

What is the need of JSF, when UI can be achieved with JavaScript libraries such as jQuery and AngularJS

I was reading about JSF that its a UI framework and provides some UI components. But how is it better or different from number of components that are available from jQueryUI, AngularJS, ExtJS, or even plain HTML, CSS and JavaScript. Why should…
sushil bharwani
  • 27,522
  • 29
  • 88
  • 122
105
votes
7 answers

Get epoch for a specific date using Javascript

How do I convert 07/26/2010 to a UNIX timestamp using Javascript?
Asim Zaidi
  • 23,590
  • 46
  • 125
  • 213
100
votes
4 answers

How to get an element by its href in jquery?

I want to get an element by its href attribute in jquery or javascript. Is that possible?
eos87
  • 7,511
  • 11
  • 44
  • 73
93
votes
3 answers

how to select all class except the clicked element in JQuery?

I have a website developed on Drupal. I use a module called collapsiblock (it is basicly a JQuery plugin) to achieve accordion like effect. It is working fine with me (although it is in Beta). But I want to modify it so that when the user clicks on…
86
votes
1 answer

Ways to save Backbone.js model data?

I am more into front end development and have recently started exploring Backbone.js into my app. I want to persist the model data to the server. Could you please explain me the various way to save the Model data (using json format). I am using Java…
testndtv
  • 43,898
  • 91
  • 265
  • 396
86
votes
8 answers

Coffeescript --- How to create a self-initiating anonymous function?

How to write this in coffeescript? f = (function(){ // something })(); Thanks for any tips :)
user537339
  • 1,771
  • 2
  • 13
  • 19
1
2 3
67 68