each and binding functions
Hi everyone, i'm trying to develop this plugin ( function($) { $.fn.extend({ imageSwapper: function( options ) { /* * some code */ $(this).find('img.image-swapping').each(function(){ $(this).fadeImageSwapped(options); }); } }); }) ( jQuery ); ( function($) { $.fn.extend({ fadeImageSwapped: function( options ) { alert($(this).attr("src")); } }); }) ( jQuery ); The problem is that when i'm calling this $(this).fadeImageSwapped(options); i obtain only one alert. Can anyone help me understand this behaviour?
Event fired an extra time on each subsequent request.
Hi, I'm pretty new to plugin development (stared the weekend) and was wondering if someone could tell me why the following event will occur one more time it did the last time on each subsequent time it's being fired? It's pretty much just opening a modal which will allow the user to create a new record. Upon close, the callback in the client get called that will update the list on the calling page with the new record. Plugin: (function ($) { $.fn.extend({ addCustomService: function
Simple set UI widget
Hi at All I developed a very simple set of UIs that helps to manage AJAX post. look at: http://www.metita.net and use the Login section on right side of the page I tested code for Chrome; FF; IE 7; IE 8 But if some bug occour, please, report to me Vincenzo S.
new searching plugin
i have created this new small plugin for searching and filtering of html elements inside an HTML page: https://github.com/stefanocudini/jquery-finderbox
jQuery plugin review
Hi all, I wanted to ask how can I better structure my code https://github.com/tsevdos/LightsOff on this plugin. The code is running, and I used as a base for my plugin one of Addy's (https://github.com/addyosmani/jquery-plugin-patterns/tree/master/patterns) jQuery plugin patterns, although I didn't really structured the code as I wanted to. Can some please suggest me how to structure/break the code? Do you know any good jQuery plugins in order to see how they work. best regards to all, John
JQuery Cycle $(this) into pager property
There are 3 similar cycle-slideshow with images-pager, but I don`t know write pager property, I need to pager will be into parent $(.slider).cycle({ pager: $(this).find("div.slider-nav") }); I am editing plugin. in buildOptions(...){ buildPager($cont, els,opts); ...///// function buildPager($cont, els, opts) { var $p = $(opts.pager); var parent = $cont.parents(opts.parent); if(opts.pagerSet != undefined && opts.pagerSet == "inner"){ $p = $(parent).find(opts.pager);
Modifying jQuery plugin [URGENT]
I want to modify the Drill Down charts plugin here. I need to make a minor change. Currently when you click on a bar, it automatically zooms in ("drills down"). Instead, I need to make a dropdown menu appear on clicking a bar, from which the user can choose a category to drill down from. The core components would stay the same including the "drill up" function, but I need to create a variety of options from which to "drill down." Does anybody know the easiest way to do this? I need an answer urgently
How to call a function in my plugin from another JS file?
Hello, excuse me for not speaking very well, I'm Brazilian. I need to know if it is possible to call a function in my plugin into another JavaScript file. Thank you.
how do its made? different shape cutting on picture
Hi! I need help :( now I work currently working on a picture gallery but I would like to be added by users images and that must be pentagram :) and I can't What is the correct algorithm? please help me :(
add fadein to jquery validate error messages
How to add fadein() in the jquery validate label error messages? I've tried the following: $("label.error").hide().fadeIn("slow"); $(this).hide().fadeIn(1000); but neither of them work. Can anyone please help me? Thank you. The code I've used: $(document).ready(function(){ $('#my_form').validate({ rules:{ name:{ required: true } }, messages:{ name:{ required: "The field is mandatory !" } } }); $("label.error").hide().fadeIn("slow"); $(this).fadeIn(1000); });
plugin multiple instances with persistent var values?
Hey there, I am developing a plugin that I want to use 3 or 4 times on the same page. The problem I am having is that each instance of the plugin sets an interval using setInterval(...) that I need to be able to clear/pause with; clearInterval(interval-id); and restart. I cant see a way of holding onto the unique interval-ids - i.e. I end up with the interval-id for all instances being the value of the interval-id for the last plugin instance that was created. I understand why this is happening
Image slider with something extra
I am trying to create a slider that has an extra feature to the image transitioning. When an image is shown I would like to have it zoom in a bit. Then after the specified time the images switches to the next one. Any ideas on how I could achieve that? thanks
XML filter is applied to non-XML value
OK I'm a little new to the subject of writing new plug-ins from scratch. I'm trying to write a carousel which works slightly different to other carousels. I've got a basic bit of code called carousel. /* Carousel is responsible for loading the XML file (via ajax calls) specified in the configuration Carousel takes a list of configuration options (optionally) or takes the default init method Carousel also adds scrolling functionality to the div containing the arrows */ (function ($) {
IE problem with Jquery cycle
I'm using the jQuery cycle plugin at http://www.winkletwebdesign.com/index.asp Looks fine except in IE8. The first image scrolls left as it should but then the next image just pops in and doesn't scroll in. Help?
Unable to login to plugin repository
Hi I understand that there were issues last year in accessing the plugin accounts however I am still unable to log into my account. We have a significant update to a project which would be good to release and since we have a number of plugins don't really want to create a new account. Account name: zazar Thanks
Accessing the Cluetip REL url
Newbie question that infers a potentially interesting feature (to some). When I mouseover to invoke a cluetip using, as an example, the html text below, all is well: <p><a class="jt" href="w:/1TUF-WEB/glossary/parsedtextpages/53/53-1/53-1-5.html?Abaddon" rel="w:/1TUF-WEB/glossary/parsedtextpages/53/53-1/53-1-5.html?Abaddon" title="Abaddon">53:1.5</a></p> And, I know I can modify the cluetip (page) result, prior to display, by making changes in jquery.cluetip.js just after the ajaxProcess: (around
JQuery Datepicker - Key events - goals?
I'm trying to ensure my forms are as keyboard-accessible as possible without touching a mouse and I've noticed the datepicker doesn't suit that goal, so I'd like to get an idea of what the JQuery dev team's goals are exactly for the datepicker, and whether I should be focused on writing my modifications to it as a hack for me or a patch for JQuery UI. It's also possible someone will reply saying "That already exists, just pass this option" etc. The 2 issues I see with JQuery UI and how I'd fix them:
Supersized jquery plugin
Hello Everyone. I am not sure if you have seen the supersized plugin but its a great piece of development by a guy called Sam Dunn via build internet. Its got great full screen features for galleries. I have been trying to develop this a little further for myself and for my specific requirements. I am not sure if anyone knows how to create a cue for the images to slide into view with this plugin or not because at he min the slides just slide across right next to each other. Does anyone know how to
Handling DIVs for own effects
hi, now i've a question too, but i think it could be a little discussion. i have a litte function which takes the original dom element and "split" it to many stripes or boxes like: clone element, wrap element with div, place div absolute with smaller width and height to create a raster and then put a clone of the orginal element relative with negative top and left css rules so it should look as the original but splitted in stripes or boxes but when i animate those peaces there are spaces between
plugin doesn't always instantiate
Hi Everyone, I am working on my first plugin called Filmstrip and I can't seem to debug why when you call the plugin, it doesn't always instantiate, therefore rending nothing. As best practice, what should I be doing to ensure that when my plugin is called, all the info that it needs is available and/or always works? - should i create a timer to ensure it has what it needs? - should i include a preloader? any suggestions would be greatly appreciated; i think this link can show you what i mean: http://jquery.marlonvalenzuela.net/filmstrip/
jQuery Cycle - set slide based on current hash upon refresh
Hello, I am using the cycle plugin for an overall navigation. I am happy that it's adding hashes although opon refresh it defaults to the 1st slide. Can we set the index slide to the current hash? Can the current slide based on the hash be viewed based on URL as well? Will this idea fix both those problems? thanks! function setSlide(index) { $('#slider').cycle(index); }
[ Create Own Event for Jqueryplugin problem ]
Dear all, I have code blow My HTML: <div id='container'> <div class='item' id='itemone'> ... </div> <div class='item' id='itemtwo'> ... </div> </div>My Plugin here // My Plugin (function($){ $.fn.myplugin = function(options) { if (this.length > 1){ this.each(function() {$(this).myplugin (options)}); return this; } var elem = $(this); var set = $.extend({ someoption1 : 'option1', someoption2 : 'option2',
Add dots to an image
I need to let a web page user add small dots to an existing image, at locations of the user's choice. Is this capability already out there? To express it differently: The page contains a standard image of a car. The user puts red dots on the car to indicate the locations he's observed scratches or dents. We save the marked-up image by merging the dots with the image and saving it to a new name (or more likley creating dots at the user-supplied dot coordinates). The merging is back-end work, and can
How to call a nested function in jquery plug ins
I've developed a plugin that has a few nested functions. here is code : (function( $ ){ $.fn.myPlugin = function(options) { function applyCorner() { // I want to test this. return true; } function someMethod(){ } }; })( jQuery ); I know I can test them by initiating the plugin, etc. but i want to test/call applyCorner() method alone. Thanks in advance.
Modifying a Plugin
I have just modified one of the pulgins to paginate the tables even after quick search. I want to know if that is already available in a plugin and how can i add it in the open source plugin if its not present. Please answer !!
Need a co-developer on a portion of my cookies plugin
Hello all, I wrote a javascript cookies library back in Nov of 2005 and released it as open source. I've maintained it over the years and added jQuery bindings to it a couple of years ago. While the cookie support works perfectly without jQuery, the bindings let you connect HTML elements to cookies and vice/versa. For example, a form input's value can be stored to cookie by `$( 'input#someInput' ).cookify();` or the input can be filled from cookie by `$( 'input#someInput' ).cookieFill();` This all
Modify options and use it in my jquery plugin methods
Hy all, It's the first time i try to create a jquery plugin using the official Plugins/Authorizing . Please see above a little example of my first test : (function( $ ){ var methods = { init: function( settings ){ // Treatments alert( settings.my_setting1 ); }, function1: function( settings ){ // Treatments alert( settings.my_setting2 ); } } $(this).change(function(
My plugins do not show up when searching
Hi, I've got two plugins in the jQuery plugins directory, "jquery.easie.js" and "zoomooz.js". However, when I try to search for them, I get empty results: http://plugins.jquery.com/search/node/zoomooz http://plugins.jquery.com/search/node/zoom http://plugins.jquery.com/search/node/easie http://plugins.jquery.com/search/node/easings Should I add some more information to the plugins to have the searches working or is this a bug? The plugin pages: http://plugins.jquery.com/project/zoomooz http://plugins.jquery.com/project/easie
Need some thing like this in JQuery
Hi, I need some thing like this http://www.marshillchurch.org/ in JQuery. click images at right side and these can slide vertically click more to slide it. and at right site a video collection with respect to each image / banner. If any body have any idea that how it will be done. Please do reply. Thanks Waseem
understanding the this keyword in jquery.fn
Hello all, In order to get me started writing my own plugins I decided to follow ch.11 of the 'Learning Jquery 1.3' from Karl Swedberg and Jonathan Chaffer. However I got stuck very early with the following piece of code (p.346): html: <style> .this{color:red} .that{color:blue;} .target{font-weight:bold} </style> <ul> <li class="this">Lorem ipsum dolor sit amet</li> <li>Consectetur adipisicing elit</li> <li>Sed do eiusmod tempor incididunt ut labore</li> <li>Magna aliqua</li> <li class="that">Ut
Problem resizing manually width with the mouse
I have a div, i want to resize it with the mouse clicking the right-border. I don't want to use jQuery-UI. So i write my plugin but the function doesn't work. The code is: resizeWidth: function(){ var coord=null; $(this).mousedown(function(e){ coord={ x: e.pageX, dw: $(this).parent("#uz").width(), tw: $(this).parent("uz").children("textarea").width() }; e.preventDefault(); }); $(document).mousemove(function(e){
jQuery toggleText ( Is this right way to write this method)
$(function() { $.fn.toggleText = function(data) { var oldTxt; var newTxt; if($(this).attr('toggletext') == undefined){ oldTxt = $(this).text().trim(); $(this).attr('toggletext',oldTxt); newTxt = $.trim(data); }else{ newTxt = $(this).attr('toggletext').trim(); oldTxt = $(this).text().trim(); $(this).removeAttr('toggletext'); } return (oldTxt ==
Second jQuery plugin, have scoping all messed up
Hi all, I'm writing my second ever plugin, an attempt to refactor the code from http://www.bennadel.com/blog/1803-Creating-A-Bidirectional-Infinite-Scroll-Page-With-jQuery-And-ColdFusion.htm into a proper plugin. I've gotten it to various stages of completion, but after going through a couple of plugin tutorials and best practices, I've managed to completely break it. It can be seen in action at http://www.fylo.net/scroller/ and I've made a fiddle at http://jsfiddle.net/rTE9b/1/ Thanks in advance.
$plugin_function "is not a function"
Hi, I created my first plug-in using the template in the documentation. I don't need any DOM element for it to work, so ideally, I'd like to call it with $.scriptCache('function_name',param) but it throws an error saying $.scriptCache is not a function. While something like $("body").scriptCache('function_name',param) works as intended. What am I doing wrong? I use JQuery 1.5.1 if it changes anything.
Request For Comment: Jquery Idea Exchange Plugin
Hi, The JQuery Idea Exchange is the first jquery plugin created by me. It will allow the users to view ideas, post comments on the ideas, vote for the idea. The code is hosted on http://code.google.com/p/jquery-idea-exchange/. I would like to seek your reviews, comments on the same. Best Regards, Anubhav Bhojne
$(this+" ul not working
I'm pulling my hair out of this one. I have developed a few jquery plugins, but of course the all fail when multiples of them. So to use, 'this' prior to each element call is needed, but I can't get it to work. eg: var Items = $(this+" ul li").size(); will not work. Hope someone can point me in the right direction! Markup and function here: <!-- START OF CHANGER --> <script type="text/javascript" src="/structure/js/scripts/changer/changer.js"></script> <script type="text/javascript"> $(document).ready(
Pre-loading images with style
--2011-07-01-- Added feature to use rel attribute with path and leaving src empty for a small performance gain at the page startup. relase 0.9, 0.9.min with sample files version too --2011-04-05-- Added zip with sample html Added project to plugins page: http://plugins.jquery.com/project/imageCacheLoader --2011-04-04-- We got updates, It's getting better =D Mauricio José Rodrigues joined the project, he works with me here at ValeMais Comunicação, he added the classic options object that is a must
Jquery File Explorer - security and two instances
Hello, I have created a plugin called JQuery File Explorer (maybe I'll change the name later, who knows?) It's designed to mimic Windows Explorer-type operation. I was wondering if anyone would be willing to have a look at the code and address two glaring issues that I have: 1. It seems like something like this would be pretty insecure, so I would need to maybe put something in the ASP backend to prevent someone from arbitrarily changing the location of the root folder via Firebug or something
delay and fadein
Hello, this is the code i am using to make my div delay and fadein, but it does not seem to work. Please help me in correcting thr code. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#a').delay(1000).fadeIn(2200); $('#b').delay(1200).fadeIn(2200);
FadeSlideShow Multiple instances.
Hi All, I am in the process of modifying the fadeslideshow by Pascal Bajorat as I found that it was not capable of supporting multiple slideshows on the page. I am to the point where the i can have multiple slideshows on the page but the Next and prev buttons only effect the last slideshow that is being rendered. My initial thoughts is the array of slideshow items that i create to control the count and fade in/ out effects for the slides is not being associated seperately with each slideshow but
Next Page