19
votes
1answer
389 views

Random clothes generator

UPDATED, original code can be found here. Also, my main goal is to not only improve the style of my coding, but also to improve the logic in finding random combinations. As of now it seems way too ...
8
votes
1answer
42k views

Basic Simple Asp.net + jQuery + JSON example

Earlier this year, before I learnt about Code Review StackExchange, I gave this answer in response to a question about how to combine ASP.net, jQuery, and JSON: ...
5
votes
1answer
155 views

Load JSON file into model using Javascript / jQuery (deferred, asynchronous)

As a beginner I am always determined to improve myself. I've got written the following Code using jQuery that is working fine. However, I am sure that there are cleaner ways for achieving the same. ...
5
votes
1answer
84 views

Dynamic toggle system

I'm new to jQuery/JSON and I've build an dynamic toggle system. It work fine, but I'm not sure about my code and I want a better way of building this. Could you please see my code and give ...
5
votes
2answers
4k views

jQuery plugin $(node).toJSON() - convert html form to JS Object

GitHub project repo I've been working on this little function to convert an HTML form into a JSON Object having the same structure of the form. Basically it is intended to be useful in those ...
4
votes
1answer
4k views

How to exactly work with the JSON Object and jQuery, adding info to posts

I have been working with AJAX and JSON for quite some years now, but to be honest I still do not know exactly what all the functionality are, and how to create optimized code for jQuery. So my first ...
4
votes
1answer
6k views

Getting JSON with jQuery and creating lists with click events calling more jQuery and JSON

I have two elements on my page: <ul id="VerticalMenu></ul> <ul id="AccordionMenu"></ul> I'm calling some JSON with jQuery and loading ...
3
votes
2answers
65 views

Find end of $.each() loop

I need to find the end of a loop or the length of the object. Some context on the code: I obtain the txt var from the DOM (that's the only way I've got by now and ...
3
votes
2answers
122 views

jQuery form data code refinement

Could someone please help me make this code as professional as it can be? It works fine, but I feel there's a better way of doing this. I would really appreciate some guidance so I learn to code ...
3
votes
1answer
310 views

JQuery Promise Interface for a (very) simple JSON Parser

I have written a parser function that returns a JQuery Promise. You can see from the code that this is the top level parser and it delegates out to two other more specific parsers. At the minute it ...
2
votes
1answer
72 views

Refactoring a Instagram widget feed function

I've adapted a Instagram widget from this example so that it now appends 8 images to their respective IDs using a Instagram username. I want my widget implementation to be better and more efficient. ...
2
votes
1answer
23 views

Restructuring data received from JSON call

I'm making a JSON call and receiving data and inputting the data received into some HTML. However I don't think this is the best way to return the data. It's seems like a bit of a hack as I'm ...
2
votes
2answers
1k views

Convert JSON to a different format (nested json)

This is really not a question. I was looking up this solution but couldn't find it anywhere. Thought of posting it here so it may save someone's time. Here was my issue: I had a JSON coming from ...
2
votes
0answers
829 views

Data with Handlebars templating function

In my app development, I need to fetch data from backed, and it needs to implement it into an HTML page. I've written the below code for this, but I think it's very lengthy. Can anyone give me ...
2
votes
0answers
573 views

My PHP AJAX bridge to jQuery library [closed]

I've been working on this library for 2 years now and using on many websites with great success. And I decided to make it public, I can assure this is the best jQuery <=> PHP bridge library there ...
1
vote
3answers
215 views

1000+ of JSON objects in my case

I try to make a data of 1000 objects (incress in the feature) My JSON look like... ...
1
vote
2answers
84 views

How to handle JSON's undefined value in a better way?

I'm working on Google Book API to post a book's basic information. I notice that some of the books will always miss a value or two under volumeInfo, like this book ...
1
vote
2answers
90 views

Object iteration and appending to form

In this code, I'm getting the json from backend. Once I find the json availability, I loop and make 5 columns. Once the columns are made, I append after the legend of my form. Can this be improved ...
1
vote
1answer
374 views

How can I animate this foreach ajax call in jquery?

I have created an app in codeigniter that fetches some json data via ajax and displays it on the page. What i am trying to achieve is to load in a div per fan that is essentially just a box ...
1
vote
0answers
43 views

Generate HTML from JSON (most efficient way in jQuery)

I have to generate a lot of tables from different jsonfiles (up to 20 tables per page). Because it's a lot of data, I really want to keep loading speed in mind. I know it's better to use a non jQuery ...
1
vote
0answers
50 views

How to indent a jQuery 2.0.3 $.ajax? [closed]

I use jQuery 2.0.3 and my IDE can't format ("auto-indent") this structure, but when I used JSPretty, I now have an indentation that I think is right. ...
1
vote
1answer
107 views

my first jquery/json

This is my first use of jquery and json so would be grateful for any feedback please. Background - this is on a job listing site and it has a Linkedin apply button plugin - this provides for a ...
0
votes
2answers
135 views

More Efficient Javascript indexOf query

There is an e-commerce site that I'm working on that has thousands of pages in it (mostly product pages). I've got some jQuery that I'm running on about 1300 of these products. Only specific products ...
-1
votes
1answer
698 views

ASP.NET MVC 4 Shopping Cart - Cannot update shopping car items using JQuery , Ajax, jSON, jGrid [closed]

I have this code in a C# MVC 4 VS2012 project. I need to be able to update the shopping cart with jSON data using JQuery/AJAX, i'm using jqGrid to display the data and pulling the shopping cart items ...