Showing posts with label jquery-plugins. Show all posts
Showing posts with label jquery-plugins. Show all posts

Sunday, May 27, 2012

jQuery Grid Recommendations


What are the most recommended jQuery grid plugins out there? I've been messing around with Flexigrid which seems to be fairly decent. Are there any other noteworthy ones out there I should be looking at?

jQuery $.ajax(), $.post sending "OPTIONS' as REQUEST_METHOD in Firefox


Having trouble with what I thought was a relatively simple jQuery plugin...

Thursday, May 3, 2012

Jquery plugins occupy the same function name -> conflict


I've ran into a problem using jquery expose plugin alongside Masked Input plugin. The problem is they both occupy $.mask function which leads to conflict. But I vitally need this two plugins to work together. I would rename $.mask in one of them to... let's say, $.msk , but in this case I'll always need to remember it and if I want to upgrade to new version, I will rename again.

Which jQuery plugin design pattern should I use?


I need to build a jQuery plugin that would return a single instance per selector id. The plugin should and will only be used on elements with id (not possible to use selector that matches many elements), so it should be used like this:

Tuesday, April 17, 2012

Thursday, April 12, 2012

Non-ajax GET/POST using jQuery (plugin?)


This is one of those situations where I feel like I'm missing a crucial keyword to find the answer on Google...

Sunday, April 8, 2012

JQuery Templates - too much recursion



I am using jquery templates to generate a tree structure to later display as a treeview of sections and items.





The structure of data looks like this, where each section has items and sections and each item can have more sections:







section

items

item

sections

item

sections

sections

section

sections

items



...and so on







My templates then recursively call each other:







<script id="my-item-tmpl" type="text/x-jquery-tmpl">

<li>

<span>${text}</span>

<ul>

{{each sections}}

{{tmpl($value) "sectionTmpl"}}

{{/each}}

</ul>

</li>

</script>



<script id="my-section-tmpl" type="text/x-jquery-tmpl">

<li>

<span>${text}</span>

<ul>

{{each items}}

{{tmpl($value) "itemTmpl"}}

{{/each}}



{{each sections}}

{{tmpl($value) "sectionTmpl"}}

{{/each}}

</ul>

</li>

</script>









$("#my-item-tmpl").template('itemTmpl');

$("#my-section-tmpl").template('sectionTmpl');





$.tmpl('sectionTmpl', { section }).appendTo(this);







I am finding however with around 4 levels into the structure I receive a "too much recursion " error in my console.





Is this just a limitation of the jQuery Template engine?





Edit:





I've resolved this by removing the {{each}} and replacing it with a {{tmpl}} call. The {{each}} was not needed. I have also wrapped each {{tmpl}} call in an {{if}} to ensure the collection exists.



Source: Tips4all

Thursday, April 5, 2012

jQuery Plugins vs UI vs some alternative


I've been building a web app using jQuery as much as possible. Every time I need to add some new feature, I usually search for a jQuery plugin that does what I need, then I integrated it into my web app. Of course after a while this application becomes very cluttered with all these "random" plugins from different authors, each one having different coding style, naming convention, etc. I would really prefer to use one uniform UI library or framework. I am looking at jQuery UI, but frankly I am not impressed. Although jQuery Tools ( http://flowplayer.org/tools/download.html ) looks kind of nice. Does anyone have any experience with any of these?

Friday, February 17, 2012

div not scrolling properly with slimScroll plugin


I am using the slimScroll plugin for jQuery by Piotr Rochala

Using jquery.calculation.js with dynamically added form fields


I'm creating a form with dynamically added fields and would like to sum all added fields. So far I have the following code, but it only sums the first row:

Wednesday, January 18, 2012

Suggestion required for jQuery emoticons plugins


What are the good jQuery emoticons plugins which can be used for creating a mobile sms like interface on a webpage

Is there a jQuery time/calendar plugin for manipulating dates?


I need to work with dates, adding/subtracting hours and days. With the JavaScript date object this is a bit difficult, since there is only get/set and no add method.