retrieve the selected value of a combo select
hi! I have to retrieve the selected value of a combo (select) In the page there are 2-3 dynamically generated select with the same class $ ('select.inputboxattrib') and belong to different forms but when i do idatt = jQuery ('select.inputboxattrib'). val (), alert (idatt); it shows me the value of the first select, even if I selected the second one I tried with $ (this). val (); but when I insert it does not work anymore maybe becouse there is Each but otherwise nothing at all please give me a
How and where do I publish 2 developed plugins on the website "www.jquery.com" ?
hello, How and where do I publish 2 developed plugins on the website "www.jquery.com" ? I'd would like jquery user's can download free my plugins. thank,
"FOCUSIN" and "FOCUSOUT" functions, doesn't work in the developing plugin
hello, i created a plugin to erase the value in the input text or password with the focus in, and insert the default value with the focus out, if there is not value in the input. it doesn't work into focusin and focusout functions, why ? thank for help. here is the code : (function($) { $.fn.focusInputValue = function() { var $$ = $(this); var selector = $('input:text, input:password, textarea'); $$.focusin( function() { alert('IN'); $(this).attr('value',
jquery validator show correct inputs
I'm using the jquery validation plugin and I'm wondering if there's a way to display text if the input is acceptable. for example: if there's a username text box and there's an error, it says "there's an error here" but if there's no error and there's something in there it says "great!" or something a long those lines. anybody know if this is possible with this plugin?
Problem with 'object undefined' in custom facebook newsfeed plugin
Hi I'm writing a plugin to retrieve the news feed from facebook. I'm getting the expected results from facebook but my plugin gives a 'undefined object' error even when its not rendering anything. Could someone please look at my code and maybe give me a pointer where the error(s) are? // JavaScript Document (function($){ $.fn.fbFeed = function(options){ var opts ={ username: 'exiledscot1', count: 5, refresh_interval: null }; if(options){$.extend(opts,options);}
jSlide Related Pages
Hi guys, I've developed a new plugin which uses animation to show related pages on a website when you scroll down the page. The plugin works great in firefox but when I tested it in IE7 it seems to have a width issue. Any ideas?!?!? Official Plugin Page: http://plugins.jquery.com/project/jSlideRelatedPages You can see it in action here: http://www.jquery4u.com/plugins/jsliderelatedpages/ Thanks in advance Sam
A method inside the plugin
Hi, I cant remember how to put a method inside the plugin. Eg (function( $ ){ $.fn.myPlugin = function(options) { var defaults = { }; var options = $.extend( defaults, options ); var that = this; return this.each(function() { .... someelement.onclick(function() { that.method(this); }); }, method = function(el) { console.log(el); } })(jQuery); Gives me a d is undefined
Internal Functionality Events
I was thinking it would be a good idea if you could bind events to the internal jQuery functionality. So I'm planning on making a plugin out of this idea. So I would like your opinions on this if there is anyone that tried this before. Any comments about potential benefits, pitfalls, possible additions... are welcome. This is an example of how a binding would work: function test() { //must not change content using append //potential disaster //$(this).append('something') would make
Contextual Auto-escaping for JQuery Templates
I would like to try and make jquery templates more resistant to XSS attacks by looking at the context in which ${} appear and using that to choose an appropriate escaping directive. I have a simple demo that doesn't handle branching or loops at http://js-quasis-libraries-and-repl.googlecode.com/svn/trunk/index.html that you can play with. Try choosing one of the "Safe HTML" examples from the dropdown at the top-right. I'd like to make that work with jquery template syntax, handle {{if}}, {{each}},
Problem with closures
Hi there folks, started developing a jquery widget which takes all form elements and turns them into jquery style elements. When I trigger mousenter (line 8-11) and after that blur (line12-15), variable "hover123123" (chose stupid name to make sure i don't use it anywhere) in blur event doesn't change (stays false). However if I uncomment line 1 and comment line 7 (define hover123123 as global) it changes. Any thoughts on why my variable doesn't change when it's a local variable? Thx in advance Here
DateTime Picker Help!
Hey guys, I've got a modified date-time picker.. I've added a time picker to date picker.. I got a question/problem.. I've done everything i can but i couldn't change the day which is the first time of the week.. Weeks start with Sunday defaultly but in my country(TURKEY) it's starting with Monday.. Is there anybody know how to change that? Demonstration: http://onur.ws/date2 thanx.
this.each needed for *every* plugin?
Hi Apologies if this question is a little basic... The standard pattern for plugin development seems to involve this.each(function(){...plugin code...})in order that each element in the jQuery collection may be operated on. In this net.tutsplus tutorial this pattern is used, but within the loop, elements with IDs are created. (I think I've seen this elsewhere). Is there not a contradiction here? A follow-on question is, if you a have a situation where it only makes sense for your plugin to be called
Extend a widget, with an event handler
Say I want to extend the dialog widget to log to console when the "focus" event is triggered. What is the proper way to do this? $.widget("my.loggeddialog", $.ui.dialog, { // what? }); This is what I tried: http://pastehtml.com/view/1dk326v.html $.widget("my.loggeddialog", $.ui.dialog, { _create: function() { $.ui.dialog.prototype._create.apply(this, arguments); this.widget().focus(function() { console.log("dialog focus"); }); } }); But is doesn't
Would it be possible to write a jQuery plugin that automatically applied the necessary IE6 fixes to a standards compliant DOM?
The gap between IE6 and standards is fairly well understood. We all apply the usual hacks. Isn't it also possble to simply include a jQuery plugin that detects IE6 and irons them all out automatically. It could even recognise existing IE6 hacks and handle them. It's not a glamourous job, but whoever did this would be a rock star. IE6 isn't going away. Why not just fix it with jQuery.
Sharing settings across methods in namespaced jQuery plugin
I'm writing a plugin and following the jQuery documentation's recommended practicehttp://docs.jquery.com/Plugins/Authoring when it comes to namespacing and multiple methods. My init() takes care of merging default and custom settings using $.extend() however I can not figure out how to make those options available outside of the init() method. Say that call and initialize my plugin using $("a").myplugin({debug:false}); how can I reference the debug property later when I call $("a").myplugin("someMethod")?
Trouble with error placement jquery validate
I have several different fieldsets in a long form each one structured slightly differently. I have one that I can't get the error message to show up HTML: <form> <fieldset id="Initial> <div class="section"> <h3>Do you wish to add <span>Market Depth,</span> the ability to view <span>Nasdaq Level II data</span> and <span>futures market depth?</span></h3> <span class="row"><label><input type="checkbox" name="MKDPT" id="MKDPT">Add Market Depth</label></span>
Updating Pluging to work with 1.5+ & namespace issues
I've been maintaining a plugin for a couple years (Orange-J). One of the first things I did was to implement a supporting 'clone' function... with jQuery 1.5's implementation of the clone() function chaos ensued. There are a few other utility functions I've written to support OJ's main focuses (browser side templating and keystroke behaviors). I'm wondering if there's a standardized way for a plugin to implement it's own namespace for functions and methods ex $oj.clone(obj) $('#someid').oj.snippet('<somehtml>',
Multiple options of Datepicker with dynamic date selection
Hi, I am using datepicker multiple times on one page and want to be able to control the date range of each input dynamically and not rely on the hard coded javascript. $( "#datepicker_1" ).datepicker({ minDate: -0, maxDate: "+2M +0D", dateFormat: 'dd/mm/yy' }); so looking to pass the variables from the input field to the javascript, variable to be changed dynamically are minDate and maxDate is this possible? Thanks.
Howdo I get the current element within $.ajax's success function?
Hi all, I'm following the jquery official guide on developing plugins and I run into this situation where I need to retrieve the data associated with the current element and I don't know how do that. I will post a shortened and simplified version of my code below, hopefully some experts out there can shed some light on me I need to access the current element $this inside my success function which is defined in var opts, however this seems to be impossible. I want to at least try to get which element
Plugin namespace and img.load function
I'm wrapping up some simple image carousel functions I've put together into a plugin and I'm having some problems when the plugin is invoked by 2 objects on the page. It seems to be a problem with the namespace and I can't work out why it isn't working. I've simplified the code as much as I can. Can anyone tell me why this outputs the right speed variables: (function($){ $.fn.initCarousel = function(options) { var defaults = { speed: 4000 }; // var opts = $.extend(defaults,
Developing plugin that isn't altering existing elements
Hi all I am new to jQuery plugin dev (but have been coding in JS and using jQuery for years). I read the primer on developing plugins (http://docs.jquery.com/Plugins/Authoring). It's a great intro, and got the basics across well. The problem I am having is that the plugin I want to develop is not centered around an existing element in the DOM. For the most part, it will be creating new elements on the fly for the user to interact with. So, onto the question: What is the best way of setting up
What does this mean in jQuery? [Code from jquery.validate.js]
When I browse the jQuery plugin jquery.validate's code, I find a section like " (function($){...})(jQuery); ". What dose this code mean in jQuery and are there some reasons to build a plugin like that? Thanks.
Can effects be added to jQuery Cycle Plugin?
I would very much like to have an image flip effect option within jQuery Cycle. I have in mind something like the effect produced by jQuery jFlip plugin but this does not cycle. Is this idea a possibility? Thanks anyway for two great plugins.
Defining methods for a plugin
I'm not very confortable with the proposed solution to add methods to a plugin. According to http://docs.jquery.com/Plugins/Authoring, you should use the pattern .plugin("method", options). Why not creating a generic api plugin to be able to use this structure: var api = $(...).plugin().api(); api.method(options); The generic api plugin should just return this.data('api'), and the plugin developer would be responsible of setting this.data('api', methods) when necessary. Regards, G.
Custom rule into jQ.validate's 'rules' obj breaks validation on submit
When I add a custom validator to the jQuery validator's rules collection, it breaks the validation that is supposed to happen when I click the submit button. When the submit button is clicked and no form item, input nor select has been visited (made active, then blurred), the submit handler doesn't catch the validation errors and shows no error messages, but submits the form instead. If I remove the custom rule, it works, i.e. if I remove lines 4-12 inclusive, in listing 1, the error messages for
Some Methods
I am creating with many different functions into one, example: Walk, run Each of these is a function, let's assume for a human. He walks or runs. I want to make whoever is using the plugin to decide what he wants to do, example: $ ('# human').MyPlugin('run'); note: I do not know if it would be like that: MyPlugin('run'); How do I put several functions in my plugin? Iwould have to to use methods ? Thanks ;)
How to find out how many times my plugin has been downloaded
H everyone, I have created the horizontal tree plugin a few months ago and now that my knowledge has grown even more i am thinking of now doing an update to the plugin. Before i do this i would like to see how many people have actually downloaded the plugin. Can someone point me in the direction to find out this info. Thanks. Steve.
Interesting behaviour when passing objects in as options to a widget
I've just come across an odd affect in a widget I'm coding up. I've worked around it, but would be grateful if anyone has a better approach / can explain why this is (or should be) occuring. Basically, I'm passing a self referencing object into the options property of the widget: e.g. var obj1 = {Name: 'child' ...etc} var obj2 = {Name: 'parent', child: obj1, childArray: [obj1] ...etc } $("#flowTreeDraggableBackground").flowTree( { flowableObjectTree: obj2 } ); The problem I have is that obj2.child
Looking for input - Contextual Encoding for jQuery
Heya all - I have created a new plugin to enable jQuery developers to use contextual encoding in their rich client applications. I am an Application Security Engineer, project leader for the Enterprise Security API (Java and Javascript) and projects committee member at OWASP. This is an area that has been called out time and again as a problem child, something that there isn't an easy answer to. So I have written a plugin to try and solve this problem, and I am reaching out to the community of plugin
Counter that creates div
I'm using a jquery div slider for displaying image galleries. But I have to add those galleries all manually. To automate this, I have a scripts that generates thumbnails of bigger images. Then I use another jquery script to display the bigger images when a thumbnail is clicked. It lacks only one thing. I need some counter that counts images or li lines and creates a div when a specific amount is reached. For example: when I have more than 20 images (say 25), the counter detects it and creates a
Smoothen up jQuery iviewer
Hi! I downloaded the jQuery plugin iviewer http://test.dpetroff.ru/jquery.iviewer/test/ and I wonder if any of you guys have any idea of how to make this script run smoother? You know smooth zoom and pan effects. Kind regards, Karl
Jquery not defined while having 200OK on .js
<script type="text/javascript" > jQuery.noConflict(); jQuery(document).ready(function () { jQuery(function (jQuery) { var jQuerydestLang; var jQuerydestLang = null; jQuery.translate(function () { jQuery.fn.translateTo = function (destLang) { jQuery('body').translate('english', destLang, { async: true, not: ' #ctl00_Menu1_ctl02_HyperLink2 ,#HyperLink9 ,#HyperLink10 ,#HyperLink11
how about a no-frills table plugin with fixed header, vertical scrollbar, and pagination?
There are some good non-jquery table scripts out there, such as TinyTable V3 and others. There are also some impressive jQuery grid plugins, and then a handful of plugins for tables that have one useful feature only. What I'm hoping someone builds is a jquery table plugin that does not exert styling control in the way Flexigrid or jqGrid does, and that offers the following: (1) sorting (2) pagination (3) fixed header (4) vertical scrollbar (horizontal not allowed) TinyTable (non-jQuery) by Michael
Mask last 4 digits
I am trying to hide the last 4 digits of an account number. The account number lengths vary. The code I am trying to develop is not working correctly. Does anyone have any suggestions? Thanks Code is below: $('input:text[name=accountNumber]').change(function(e) { var lastFourDigit = ""; var mask = ""; var oldlength = "" ; var newlength = ""; if($('#accountNumber')){ $('#hdnAccountNumber').val($('#accountNumber').val()); if($('#accountNumber').val().length
Disable() Enable() for anchor tags
I have designed a toolbar that uses anchor tags (<a>) with click events assocated with each one. I want to build a JQuery plug-in that allows me to easily enable and disable certain anchor tags in my toolbar with syntax similar to this... $("#aDelete").linkbutton("disable"); These things would have to happen in the "disable" event: 1) The CSS class would have to change to a "disabled" class to change the look of the button. 2) The current event stack (especially the "click" event) would have
Pagination plugin creation, .data trouble
Hello, I m doing my first plug-in with jQuery, I'm building a pagination one. I want it to be used for more than one pagination on the same page (maybe not useful for a pagination, but I need to learn how to use a plug-in on several item in a page with different params for each items.) I want to ad as a param the area to update, that's work, but I can't lets those data to be available at any time. I'm trying to link those with .data() on the pagination div. When I do the first click, it work, the
Issue with the jQuery pagination
I'm working on a page that has pagination and 3 different types of sorting. When the page is loaded, the pagination works fine, but, when i go to page 2 and then i choose one ordenation, the page 2 remains as index. The itens of page are inside of lists and divs tags. here's the code: <script> var quantItens; var hide; var paginated; function pageselectCallback(page_index, jq){ var order = document.getElementById('order').value; var new_content = jQuery('#Searchresult
input ip address control
Hello, i have developed my first plugin and i would like some comments please. thank http://code.google.com/p/jquery-input-ip-address-control/
a simple input textbox filtering plugin
Hi everyone. i've developed a simple textbox filter plugin. because creatin accounts is forbidden i'm unable to add it to plugins section. so i'm addin it here the forum section. /* * TextFilter - jQuery plugin for key filtering input boxes * * it's either works with regular expression or character list * you pass filter expression as parameter or add an attribute named "textfilter" in your input type=text * for prohibiting matched characters start with minus(-) or allowing matched ones start with
dynamic clock plugin
I've written some javascript for a dynamic clock that updates every second on some websites that I manage, and I thought I'd try turning into a jQuery plugin to make it easier to share and to integrate into jQuery enabled websites. There are already some clock plugins out there but from what I see, they all take the time from the client computer's system time. I wanted one instead that could take any timestamp and start updating from there, so you could pass in a timestamp from the server using a
Next Page