return object from plugin
How do you design a plugin such that it returns an object after initialization? var myObj = $("selector").myPluging(); // do something with myObj
Creating a "top of page" ???
jquery.accordian.js is what I'm using. I have a list and using the jquery.accordian.js as a verticle set-up, the list expands past the boundaires of the page. Thus resulting in seeing 3/4 of the disappear. How can I get the link within the "accordian" to go back to the top of the page when clicking on the selected link. If this did not make sense let me know. I need help.
Jquery slider, IE6 problems
For the last 2 days I've been working on a portfolio slider. Its seems to work great on all browsers including IE. except for IE6. the buttons will slide with the slide show itself, instead of staying on there place like they should. It will also not add an extra slide before and after the slide show and that is used to make the slide show continuously. any help appreciated. Link to working example: http://durfoptevallen.nl/jquerySlider/ link to code: http://durfoptevallen.nl/jquerySlider/js/jquery.Sliders.js
Form Validation Plugin Not Working...
I try to validate a simple Form but the Jquery Validation Plugin not woking when I use only Button not The Submit Button. I can not use the Submit button there Because If I use submit Button After Submitting the form It take the Action and goes to Default page while my current form is comes from Ajax. I am very new to Jquery. Please Help its Urgent... I am giving the files here. index.html <html> <head> <script src="jquery.js"> <script="jquery-validate-min.js"> <script="validation.js> </head> <body>
jQuery drop down menus
I am working on jquery plugin for building large menus. You can see a better explanation (if you care) at http://www.danvega.org/blog/index.cfm/2010/2/13/My-first-jQuery-plugin-Big-Ass-Menu. What it boils down to is when you hover over a main menu item the sub menu is shown. <div id="menu"> <ul> <li><a id="home" href="basic.html">Home</a></li> <li> <a id="about" href="#">About</a> <div> About Sub Menu </div> </li> <li> <a id="products" href="#">Products</a> <div> Products Sub Menu </div> </li> <li><a
touch and drag content
I'm interested in finding or making a plug-in that will make certain container elements have some sort of touch and drag capabilities, for use on mobile phones, etc. I'm fairly good with JavaScript but new to jQuery. Any ideas/thoughts?
Disable window scrolling
I'm developing a simple scrollplugin for a project I'm working on. It works perfect, but there is one problem. I use the scrollbars in a pop-up/lightbox container. I use the mousewheel plugin so you can scroll using your mouse. The problem is that not only the div with the scroll plugin is scrolling, but the entire window is scrolling. So I was wondering how I can shut off the window scrolling when the scroll-div is hovered. I know I can change the overflow property of the body to hidden, but that
SimpleModal maxHeight does not seem to work in IE
The below modal call works just fine in FF or any other good browser but when it comes to IE it completely ignores the maxHeight constraint. Any insight is much appreciated. $("#xxx").modal( { autoResize:false, maxHeight:500, minWidth:625, escClose: false, overlayClose: false, dataId: "xxxx", onOpen: function (dialog) { dialog.overlay.fadeIn('slow',
Cycle Plugin Image positioning
I have the following CSS manipulating nested DIVs. It's essentially a horizontal table surrounded by navigation options with the slideshow in the middle. When I load this up, the slideshow appears outside the intended "cell", apparently attached to the upper-left corner of the browser. How do I wrestle this back into the desired "cell"? TIA, Perry <---snip----> #content_gallery { width: 700px; height: 420px; margin-left: 10px; margin-top: 80px; background-color: #62623C; } .container
Autotabindex
Hello all, I submitted a plugin which detects the tabindex and autotabs along according to this when the maxlenth is reached. I would appreciate people trying this plugin, playing with the demo and mainly trying to break it to see if there is anything that needs improving. Give me a shout if you notice anything. http://plugins.jquery.com/project/autotabindex Thanks
How long after adding a plugin does it take to appear in searches?
How long after adding a plugin does it take to appear in searches? I added this earlier today: http://plugins.jquery.com/project/google-web-search
Superfish new functionality
Attached is an ammendment I have made to Superfish, to give a onBeforeHide() functionality. Works in the same way as the onBeforeShow() function. This allows you to have sexy hide effects, eg slideUp(). Hope this helps people and feel free to incorporate it into any future releases of the plugin. S
How do I return a value when using command structure-style plugin design for public methods?
I am using Keith Wood's plugin framework, and I've come across a situation where I would like a public function within my plugin to make a calculated value available to the calling code. For example: alert($("selector").myplugin("add", 1, 1)); I realize that actually returning a value here would break the jquery chain, and I am open to other options, but I'm not sure how to manage it. Thanks!
how can catch Asp TextBox with jquery when the Control has not nay ID or Name ?
hello friends, I am try to catch the asp elements that are used but they have not any Id or Name, But as you know thos elements in run mode change to HTML DOM, please help me.
Jquery slider interacting with text box
I am developing a vertical jquery slider. I am able to fetch the value of slider in a text box. I want to move the slider by typing in the values into the text box. any suggestion. Below is my code <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="js/jquery-ui.min.js"></script> <link href="css/jquery-ui.css" rel="stylesheet" type="text/css"/> </head> <body style="margin:300px;"> <form name="tvfinder-pricerange"> <input type="text"
currentdate + 2 for datepicker
hi im using http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/ for a datepicker but i have some questions i made it already posible - to have an inline input field with the calender - disabled the sundays - start at currentdate but i want the following. people dont go back in time (done), and the startdate has to be 2 days more than the currentdate and sundays not counted. by example; today 8/5 must the startdate be 11/5 (because sundays are not included). another example; on 10/5 has
Broadcast events from my plugin
I have a little plugin that works fairly well for what i need it to do. It has defaults for properties and I let clients override those with their own values. I also have default functionality for some functions and users can also override those to introduce non-default behaviors when needed. The piece I can figure out is how I can provide event broadcasts from within my plugin that calling clients can listen in on and react to. Let me try to clarify - inside of my plugin something happens when a
Public Functions in Plugin
Hi everybody, i have a Question about public functions. My problem is, i cannot acces the function in my plugin: <html> <head> <script type="text/javascript" src="front/js/jquery-1.4.2.js"></script> <script> $(document).ready(function() { (function($) { $.fn.People = function(settings) { var config = { obj: this, name: null, getName: function() { return this.name;
Libraries Conflict
Dears I develop a page, thats contains 2 Jquery libraries, the first one the standred library and other one, a custome library, so when I run the page the effect of standred library not appear. simple code <link type="text/css" href="js/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/ui/ui.core.js"></script> <script type="text/javascript"
adodb time library and jquery flot
I'm having a problem with the jquery flot plugin. on the server side, we create a timestamp via the adodb time library which allows dates which are under the year of 1970 and over 2038. i'm trying to use this timestamps on the client side (jquery flot) but actually i didn't find any solution for that problem. thx for your help guys BR AW
jQuery to play shoutcast stream
Hello I want to know how can i make jQuery to play my shoutcast stream? Any ideas? I have flash now as player but looks like flash may not be the option here soon.
call internal function
Hi, I am tryin to develop some plugin. this is my start point: (function ($) { $.fn.One_vTest = function (options) { var defaults = { isMultiple: false, isInlineAnswer: true, ansReplayHolder: "#ansReply", rightAnswerClass: "rightAns", rightReplyHolder: "#RightReply", wrongReplyHolder: "#WrongReply" } var options = $.extend(defaults, options); return this.each(function () { }); }
[HTML 5 Video] Play event firing twice
Hello everybody, I'm trying to write a jQuery plugin for HTML 5 Video (with fallbacks) and I'm facing a strange problem. The Video Element ( as an HTMLNode) has a method called "play", which I tried to implement in my plugin. The problem is that when I use my plugin's play method, the event is fired twice and this is because ( I think ) the HTML Video Element already has a method called "played". Here's a basic version of the code I used : /* Plugin's code */ jQuery.fn.play = function(fn) {
Animations look strange when browser is zoomed...
Okay I'm not sure if this is a known thing with all javascript animations or not, but my plugins look totally screwed up when the browser is zoomed in (I'm using chrome and zooming using the control button and mouse wheel). You can check it out here bkosborne.com/waterwheelCarousel.php Anyone have similar issues or know what I can do to fix this?
A little bit of help with the variable scope
First of all let me say hello to the entire jQuery community ! Few days ago i tried to create a plugin and then i run into a problem, which i couldn't solve. This is how i would like to call the plugin: Initialization: $(selector).uploader({ // param options }); Setter: $(selector).uploader('option','param', value); Getter: $(selector).uploader('option','param'); The problem: Let's say that we call the function for the following elements: $('a.smth, div.smth').uploader(); // this loads the default
a simple click event doesn't work
I am building my own plugin, but I'm kind of new to this.. At the beginning, I immediately ran into this problem: a simple click event doesn't get fired. Calling the plugin works, like so: $('img').myPlugin();The (very basic) structure of my plugin is like the following piece of code (function($) { $.fn.myPlugin = function() { // call function return this.each(function() { // store element in variable var self = $(this); // bind the click function
plugin to display ics-files in a calendar
hello, I'm new to this forum and I've written my first plugin for jquery. It works well, but I'm not sure, if the plugin-code fits into the recommendations of jquery. It would be great, if someone could have a look at the code and tells me, what I have to change. You can see an example on http://jsicalendar.sourceforge.net/. The javascript code of the extension is here. thanks kai pfeiffer
special event - compare elements
I have a problem with my special event "externalclick". On line 11 I try to comapare if element on which is bind event "externalclick" is same as one from the set of parent elements. If elements are the same it returns false anyway. $.event.special.externalclick = { setup: function(data, namespaces) { var $elem = $(this); $(document).bind('click', $elem, $.event.special.externalclick.handler); }, teardown: function(namespaces) { $(document).unbind('click', $.event.special.externalclick.handler);
js-mindmap PlugIn
Hey Guys, I stumbled upon this mindmap-PlugIn for jquery by Kenneth Kufluk: http://code.google.com/p/js-mindmap/ Since it is published under the MIT/GPL-License, I figured it is okay for me to make additional modifications. I already tried to contact the author of the script, but without access. Maybe I can get in touch with him at some point to share my modifications with him. So far I'm on my own which brings me to my specific problem. I'm trying to add additional nodes to the starting-point mindmap.
Difference of public and private functions.
Hello there, I'm an intermediate jQuery user and I want to build my very first (and hopefully useful) plug in. My question is really simple. When should I use a public and when a private function into the plug in code? They both work well, so why we need them both? ;(function($) { //plugin code... // Private function function privateFunc() { }; // Public function $.fn.plugin.publicFunc = function(){ }; })(jQuery); Thanks in advance, John
Add buttons within plugin, return value
Hi I created a plugin where I use overlay to display yes/no dialog, using the jquery tools overlay tutorial as a guide: http://flowplayer.org/tools/demos/overlay/modal-dialog.html It displays ok first time, after that click on the button will not close the dialog. I add buttons using append() method and remove them using either empty() or remove() method. The problem occurs when the buttons are removed and added again to a <div> container. The other problem is how to return the users choice,
My First Plugin Development
hey guys! I was thinking of developing a plugin which will be super light no deadweight etc modal / popover notice box with text, html (exteranl html or ajaxed), image, images possibly in a slideshow, and embed video the core of the plugin will only consist of text, html, image, ajax then the slideshow and youtube media will be used as addon with including addtl file do you think its useful to create? also the plugin wll be very versatile in terms of settings and position calculation etc based on
Sortable and Selectable together
Hi My question is: i need to mixed sortable & selectable plugin together! but don't work!!! Has a sulotion?
My first plugin: Felxible Forms!
Hello there, I tried developing my first plug in for jQuery. It seems to work all well. However, I'm not that experienced with jQuery and therefore would greatly appreciate any tipps, hints, suggestions and improvements that could be added. All details, including an online-demo you can find here. Looking forward on getting your comments! Thanks Michael
[jQuery] TableSorter Issue: Text with % (percent) in row of table breaks sorting of the column
Hello there, I am having a bizarre problem where if the following occur: There exists a table with the tablesorter js applied e.g. http://tablesorter.com/docs/index.html#Demo There is a text column within the table e.g. Last Name, of above table There is a % (percent) in the first (as specified by html not the js sorting) row of this column e.g. Almighty %...the sorting works for this column only on the first click. After that it appears like it does not work. The text in this column is not percentage,
finding x-nth tr of table (where x is current index of a looping array)
I'm developing a plugin that lets you group table rows (based on "tr.subheader"s) and toggle them "open" or "closed". See here for a working example: http://www.michaelsoutherton.com/sandbox/toggletablegroups/ The toggles work, and it even saves and loads the cookie correctly as well. The only thing I can't get it to do is "open/close" the appropriate table rows when the page loads. Specifically, I'm stuck on line 43 of the test page: $.each(CookieArray, function(index, value) { var CurrentRow
jQuery special events
I wrote a (rather in-depth) article on jQuery special events recently but forgot to link it in the forums, so I'm going to mention it here. I apologize in advance for its length, but I had a lot to say! The jQuery special events API is a fairly flexible system by which you can specify bind and unbind hooks as well as default actions for custom events. In using this API, you can create custom events that do more than just execute bound event handlers when triggered—these “special” events can modify
Public methods that are specific to the instance defined by the selector?
Hi! I'm currently working on the next version of the plugin Smooth Div Scroll and since I have received a lot of requests regarding public methods for controlling different aspects of the plugin, I'm at the moment focusing on that. I have searched the web for all I can find regarding public methods in jQuery plugins and found several useful pages. The problem is that when I implement the functions, they are global, not specific to the instance defined by the selector. With Smooth Div Scroll a user
jQuery Validation email validation not working
Hi I've downloaded the latest version (1.7) and using the milk demo code. In testing it on my form I press the Submit button and it comes up with the unchecked gif and Please enter a valid email address as I left the email field empty. But when I then enter a proper address (my default email address) in the email field the error gif and message don't go away or get replaced by the checked gif ( if it should) I also notice in the demo that the error text disappears but the gif remains, I am am using
Using a variable to define an event listener.
Hello, I've developed an edit-in-place plugin that I'm presently expanding upon to handle data types other than varchar/blob. Relatedly, I'd like to add the ability to specify what event the plugin should listen for (double click to edit, click to edit, hover to edit, etc) I've attempted this: var defaults = { eventType:'dblclick', //etc and then... function editInPlace(thisObj){ $(thisObj).unbind(opts.eventType).opts.eventType(function(e){ makeEditable(thisObj); return false;
Next Page