Accessing text
Current implementation of .text() does not give to access the text value of a node EXCLUDING the text value of its children. Suggestion is to implement a new method, i.e. .nodeText(), that would allow accessing or changing the text of selected node(s) only, leaving children intact. Effectively, the method would operate on: $(this)[0].firstChild.textContent;
JQuery Plugin for "Sign in with Twitter" and / or "Facebook Connect"
It would be great if there's a JQuery Plugin for Sign in With Twitter and Facebook Connect. Like a widget that you could add on your website to access Twitter or Facebook API's and OAuth features with PHP as the server side scripting language. Example Plugin:
Feature request: <ul>,<li> for Autocomplete
Not sure if this is the right place for a feature request. It would be good if the Autocomplete widget would accept HTML as input in the following form: <ul> <li data-value="optional value0"> Some text to describe the value with HTML markup. </li> <li data-value="optional value1"> More HTML </li> </ul> The benefit of this format over JSON is that it's easier to produce, you don't have to escape any characters, it's easier to view and debug, and it's easier to see what you're doing
Submission portal abuse
Wasn't sure the best place to report this... http://plugins.jquery.com/project/samedayloans The jQuery plugin portal clearly has spam abuse in it. A report abuse feature on this page would be the expected solution.
Mocking and Stubbing
Hi, I mean when writing tests in some time you will need some mocking and stubbing for tests. I searched for a mock and stub things for QUnit and can't found it, so, I developed one: http://github.com/bitzesty/qunit-mock It supports simple mocking (expect a number of calls in a function) and stubbing. It automatic removes all mocking and stubbing after current tests (to archive this I need to make some around functions on window.test and window.asyncTest methods), it supports mocking async. For future
Here are some tutorials to get started with jQuery.
Hi All, I have written some tutorials to get started with jquery. http://railsguru.org/tag/jquery/ Please give your valuable feedback on the same. Thanks, Pankaj www.railsguru.org
suggestion: ultimate type for jquery
I made this, probably fastest and most accurate, type detection function http://gist.github.com/204554
Validation jQuery plugin ( remove label )
Hello to the community! About jquery.validate.js, it'd be nice to have a settable option for the appearance of the label element. I hacked a bit the code to do that. I used a new option ( errorDisplay ) which you can set true of false if you need the label element or not. The hacked code is $.extend($.validator, { defaults: { messages: {}, groups: {}, rules: {}, errorClass: "error", validClass: "valid", errorElement: "label", errorDisplay:
Resolving syntax inconsistency between .animate() and .fadeTo()
Not only does the name .fadeTo() logically suggest that the first parameter should be the opacity value to fade to (it's actually the second parameter, the duration comes first), it's also inconsistent with .animate() which takes the form .animate({properties}, duration) that one would naturally expect. Ideally I'd like to see the .fadeTo() function/effect (and any others which are similarly counter-intuitive with regard to parameter order) revised so that the parameter order becomes as one would
Accordion CRUD with ajax
I would like to request added functionality to accordion, where it has an option to add buttons like "show, edit and remove" and other optional buttons for CRUD porposes. Wherein show would slide down the original information, while edit will ajax to the edit form page and remove would just remove that item, but has a method like remoteAjax so to update the database on delete.
Auto-initializing widgets
I've created a base widget class for my own widgets to extend which allows them to auto-initialize and I thought it might be of interest to others. The concept is each widget registers a selector which it auto-initializes against, and options can be declared in the HTML. Example: ============================ --jquery.ui.foo.js $.widget("ui.foo", { register: "div.ui-foo", // elements matching this selector will initialize with the foo widget options: { bar: false // because bar is
Themes more granular, for further usage.
The UI themes work great for all the controls they use but if you want to style a table or some custom html it gets tricky, sometimes you want the border of one class but background of another. I would like to see themes with granular classes example classes below. This would allow the developer to style none jquery ui elements for more cohesive look. ui-border: (whatever the default border color is for the theme, usually the one declared in .ui-widget-content) ui-default-background ui-hover-background
Expose now()
I realize that the logic in the private `now()` function is incredibly simple, but I'm wondering if it could be exposed as $.now() ... I find myself replicating it frequently (in plugins, page-init scripts, etc), and that doesn't seem very DRY. Seeing as how it's already in the core, just not exposed, it shouldn't impact the filesize of the core.
Icon to run individual test
Currently, if I want to run a specific test I have to double-click on the title of the test. While this works, there have been a number of occasions where I double-click, but the test closes and then I end up opening one the wrong one. I small icon to click on would be much simpler and prevent this from happening. Essentially, what I tend to do is if I see a failure in one of my tests, I open the test to view the results, either fix or add some debugging to figure out what is going on, and then
UI tabs from fieldsets
Hey guys, In my understanding the semantics of <fieldset>s in forms are in fact what tabs are trying to express visually: sets of logically related fields with their associated content like help texts and media. Then when I try to visually organize a complex form as tabs, it's pretty frustrating that, instead just being able to use the so natural and semantical <fieldset>s right away, you need to write some additional markup that doesn't entirely express the original semantics/intent of field-sets.
Autocomplete and bold highlight
I've gone from the Jorn autocomplete plugin to the jQuery UI autocomplete plugin. Not sure why, because I liked Jorn's plugin but it feels better to use jQuery UI. Here's my hack to make the searched for work highlit. $('#id_q').autocomplete({ source: function(request, response) { $.ajax({ url: AUTOCOMPLETE_URL, dataType: 'json', data: { q: request.term }, success: function(data) { response($.map(data, function(item) { return {label:
Error for load DropDownList
i have problem in my code for load one dropdown list. my code is down. function TrazComarcaSelec(tribunal) { //alert("Função Chamada" + tribunal); var url = "ajaxTrazComarca.asp?trn=" + tribunal; try { // alert(url); $.get(url, function(xml) { // alert("Função sendo executada"); $("#loadCom").show('show'); var xml2 = $("tribunais", xml); var com = $("#ComarcaBB"); com.empty(); xml2.find("Comarcas").each(function()
Show ver. on api.jquery.com?
I think a useful addition to the already mind-blowing api.jquery.com could be to show the current release somewhere subtle (i.e. mirror p.jq-version on jquery.com). Maybe in div#jq-interiorNavigation? Could link to homepage for easy download.
jquery ui custom bundles
Currently after downloading a bundle I need to go through and remove all the stuff I don't want. When building a custom bundle it would be nice if you could specify if you want to include the demos or no demos,minified files,unminimized, or both, and if you want to combine or not.
datepicker - reverse year range order
Hello, I needed to reverse year range order when changeYear option was true. I've implemented an easy solution. In jquery.ui.datepicker.js's _generateMonthYearHeader method, just change: for (; year <= endYear; year++) { html += '<option value="' + year + '"' + (year == drawYear ? ' selected="selected"' : '') + '>' + year + '</option>'; } for var reverseYearRange = this._get(inst, 'reverseYearRange');
Dynamic height of autocomplete menu and some other notes
Hi ! I'm very-very fresh user of jQuery and jQuery UI. So excuse me if I'm inventing the wheel and my solutions may be made in "conventional" way. I like the idea of setting the max menu height in the CSS. But the problem is that when the list became small, the menu div is not resized and looks not so aesthetic. To solve this I've created two CSS classes, that looks like this: .ui-autocomplete-scroll { height: 200px; overflow-y: scroll; } .ui-autocomplete-noscroll { overflow-y: auto; } and
Relative animation with multiplication
I was trying to use the core animation to reduce a set of elements in size and I think it would be nice to have a token that does multiplication. For example: $(selector).animate({ width : '*=0.8', height : '*=0.8', fontSize : '*=0.8' }, 1000, function() { // callback }); The above code would reduce the object's height, width and font size by 80%. I'm a novice programmer (I still have to learn how to unit test) so I didn't want to fork github, but I put together this code for possible
Superfish Ease Out
It's a bit jarring the way that the sub menu disappears, given how it so nicely eases in (assuming one has it set that way). It would be nice if the plugin also supported easing out when the user leaves the menu. I tried using onHide, but that's AFTER the ul has closed, so I can't attach animation there. Just an idea.
media queries - jquery image resize
Hi Guys, I got inspired by @ppk's post about media queries and javascript plus everyone elses media queries blogs and thought how about adding a bit a of code so that if the device is a certain size (480px wide perhaps) then add '-mobile' to the images so that it'll download smaller images for the web. I posted it on stackoverflow with two bits of code I found that needed almagamating into one and @craftedpixels came to my rescue with this code - $(document).ready(function() { if ((screen.width<=960)
Add SVG support verification do jQuery.support
Hi, I found that there is no SVG support checking to jQuery.support. Initially I though it would be a true/false matter, to differentiate between IE and everyone else. This is not true though, as Firefox and Opera have their preferred method of displaying SVG, and WebKit has their own. Firefox likes to display SVG from an <object> tag, Webkit likes better href'ing it in the <img> tag. IE does not support it at all, but can be coerced to it with the svgweb toolkit. This uses yet another, different
JQuery Dimensions should have a method to return the scrollbar size
I recently posted this on StackOverflow and thought I could share it. I originally found it on Alexandre Gomes site, but modified it and implemented it for JQuery. It works in Chrome and FF and should work in IE as well, but I cannot test it in all browsers. jQuery.getScrollBarSize = function() { var inner = $('<p></p>').css({ 'width':'100%', 'height':'100%' }); var outer = $('<div></div>').css({ 'position':'absolute', 'width':'100px', 'height':'100px',
Extending Dialog Buttons Option
Has there been any thought to developing Dialog Buttons - Primary, Secondary, Disabled? I did not find a use for setting the priority of a button, the proposed implementation below was created to apply additional styles. Thoughts? Current buttons : { "publish" : function() { }, "preview" : function() { } "cancel" : function() { } } Proposed buttons : { "publish" : function() { //support current functionality }, "preview" : { click : function() { }
Draggable Dialog : dragging handle
Hi, I was looking for a way to allow dragging by elements inside the dialog content, because i didn't want to use the dialog title bar. I first tried to add elements with ui-dialog-titlebar class (and skin them so that it doesn't look like a tittlebar) but it didn't work. I looked to the ui-dialog js code and actually the 'cancel' option has 'ui-dialog-content' class (meaning nothing in the dialog content can be a draggable handle). The solution i chose to this is to set the draggable options of
Writing a jQuery bookmarklet
Hey guys, I've just posted a new article on my blog which describes how I recently went about developing a bookmarklet in jQuery. Please have a look, comment, and share if you like it! Thanks, John. http://johnhamelink.com
Validate plugin and number validation
I find that the number validation is not considering numbers starting and ending in decimals as valid numbers eg: .12 and 12.0 are not valid yet 0.12 and 12.0 are. I found that this can be 'fixed' by editing the number regex from this: ^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$ to this ^-?(?:\d*|\d{1,3}(?:,\d{3})+)(?:\.\d*)?$ Could this be made the standard number validation? Or is there a better way of overiding the number validation than hacking the jquery.vlidate.min.js file? Finally can any one
.attr and value of undefined attributes
I have a suggestion based on the assumption, which I think is correct but feel free to prove me wrong, that the .attr() method returns "undefined" in two different cases: 1) when the attribute is actually not present in the dom element 2) when it is present but it has no value, think for example <input type="text" disabled/> which I not is not standard HTML but I've seen it pretty often... wouldn't it be better to return undefined only in the first case, and return null in the second case? In this
$.delegate - support for multiple bindings
According to the API documentation, $.delegate supports an eventType string containing different events, but there is only one handler parameter. I propose that you add an option to send multiple handlers in one call - something like this: $(".myComponent") .delegate( ".myButton", { click: function(e){ }, hover: function(e) { } } )
HTMLCollections and chaining
Quick question on the internals of jQuery and how it works with HTMLCollection objects and chaining. If I write... $('div').bind('click', function(i){...}).bind('focus', function(.){...}).yada(function(){...});...the HTMLCollection of divs is walked through for each method right? As interacting with HTMLCollections is costly, would there be an appreciable speed gain to practise a pattern such as the following whenever working with HTMLCollections? var $divs = $('div'), i = 0, singleDiv; for (;singleDiv =
jQuery.load and PHP's Header() redirect.
Hello All,I came across the problem of headers when porting an application to jQuery. The header call gives an error and halts the process due to headers already sent error, and after a while of Google searching I didn't really come up with much but a few people asking the question with no real answers. (at least none that suited me) So, how do you handle a load that your PHP may try to redirect with a header call?? Well, here is what I did...I duplicated the standard load function and created
How to combat cross-domain POST Problems using jQuery
Hey guys! I thought I'd post a link to an article I wrote about how I overcame the grand old problem of POSTing cross-domain using jQuery (or any javascript lib, for that matter). Take a look here and tell me what you think :) http://www.johnhamelink.com/2010/07/combat-crossdomain-post-problems-ajax/
Order UI Dialog buttons (enhancement request)
Problem: UI Dialog buttons order depends on CSS theme settings, and when button style sets "float:right" buttons line up in reverse order. Solution: Wrap all buttons in a <div style="float:right"> (or whatever float type is defined for buttons) and set "float:left" for the buttons themselves. Unfortunately, this may require changing not only UI Dialog code, but UI CSS framework as well. Until it is done, here is a patch which can be applied on the fly to any existing dialog. /** * Make dialog buttons
can the jquery range slider have descriptions within slider panel
can the jquery range slider have descriptions within slider panel as in the example below(it is in dojo) http://tobias.klpstn.com/dojo1.1/dojox/form/tests/test_RangeSlider.html
Passing functions to options in jQuery UI
It would be nice if I could pass a function as an option when using jQuery UI, like I can in jQuery 1.4 with the .val() method. For example: $(":button, :submit, :reset").button({ icons: { primary: function (element) { return findIconClass(element); } } }); (where findIconClass() returns any 'ui-icon-*' css classes on the element)
tabs: allow negative indexes
while looking at the tabs code, I noticed that it is currently using the numeric value -1 to identify that no tab is selected. a few points in the code special-case -1 in the index. But, arrays can work with negative indexes. With very little effort the code can be made to accept negative arrays. This would cause the code: $('#tabs').tabs('select',-1); To select the last tab. I propose to stop special-casing -1, otherwise negative indexes aren't possible. My primary candidate to special-case
Form to upload images, input text and submit to designated titles
Hello everyone, I am interested to know if it is possible to create a jQuery plugin to do the following: Sign up/Sign in (using Facebook, Twitter, etc...) Open a form with multiple options, including: Upload image (resized to thumbnail and linked to open larger image) Enter title using drop menu (Country name, location, etc.) Enter description of image (140 characters or less) User star rating Submit User then submits form and the data gets transferred under specific country or region title. Maybe
Next Page