[Cross-Domain iFrame] || How to close the iframe from within the iframe
Hello I create a plugin to show another page into my page by the usage of iFrame. What I do is to create an iFrame, resize it to the "Web Site A" document size and then load into the iframe a page from the "Web Site B" came from another domain. Then I like to add a controll into the "Web Site B" that will allow the user to close the iframe and then to be able to see again the "Web Site A". How can I do that. I don't wan't to add this functionality into the plugin, just I like to know how I can close
Dynamic resizing while constraining proportions.
I really enjoy mobile and touch devices because they effectively present everything in the viewport in a manner that's sized appropriately to the visitor's resolution (with the option to subsequently zoom in/out). I hate that desktop browsers don't particularly do this natively without a boatload of CSS (% and em declarations), and even then it's difficult to specify appropriate proportions for fixed-ratio elements (e.g. images, video) I've been working on a fullscreen image gallery that scales appropriately,
calling one method in 2 ways
Hey, I've been working on a plug-in which detects weather an element is within the users current view-pane. The problem is that I want to use it like this: $('#randomSelector').isOnScreen(); and like this $.isOnScreen({left:200, top:200, width:200, height:200}); but I can't figure out how to write the plugin so the method is defined only one, i've got around it so far by defining it twice. link to plug-in: http://plugins.jquery.com/project/isOnScreen demo: http://spectrum.0sites.net/demos/isOnScreen/isOnScreen_Demo.html
Exposing various Video API's in one concise way
After looking around for a while for a bare javascript program that just exposes the means to play a video without adding any platform specific controls/api I couldn't find any. The idea is that the different plugins expose the exact same video API so that a player plugin can be written to leverage these plugins. I really want to keep these plugins small and not chunk them all together in one big plugin. What I got at the moment is playback of videos using 3 different technologies but all with the
Refresh Twitter API every 15 seconds
I was successful in installing the TWITTER API script, but I can't figure out how to make the script refresh with the latest tweets without refreshing the entire page. Can I also include a fade in and fade oiut? Anyone done this? Many thanks. Erik Here is my script: <script src="/src/jquery/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="/src/jquery/jquery.jtwitter.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ // Get
[SOLVED] When creating a plugin, how do you make it so you can call it with more than one config
I'm currently creating a plugin that you call on elements and it modifies the elements in some way. What I'm trying to do is make it so that you can call it more than once on different elements, each with their own config and options. So far, my plugin works great on one element, but the next time I call it on an element, both of the elements use the second one's config. I'm wondering what exactly in the plugin allows this to happen. Here's some of the code: (function($) { _jCInit = true; $.jClone
Coders here me out!
I am developing sites for which validation is a must, so is speed. Wrt to jquery it validates. BUT those of you who writes plugins please take notice: Before publishing, run your code through The Online Lint giving you the opportunity to fix bugs. Why is this important?... Well, if the code isn't up to par then using the YUI compressor will make a mambo jumbo out of the code, and the intended function will break! At the moment I am trying to find plugins for corners and shadows that do validate.
Star Ratings Inline?
Hi all, I have a series of controls I want to put inline. A few links and a star rating plugin. I've tried mighty hard to get this done in a CSS-ey way, but so far no luck and I'm not sure where to go next. The line would look something like this: <div id="actions"> <span class="action"><a href="http://www.facebook.com/share.php">share</a></span> <span id="myrating_main"> <?php $checked = round($myRating * 2); for ($i = 1; $i <= 10; $i++) { ?><input name="star2"
clarification...
I think I mislead in my previous question. The app is not getting pages; it is refreshing the contents of a div. So, anything created will persist unless explicitely destroyed. Sorry & Thanks.
Ideas on how to make direction-aware scrolling div?
Sorry for the confusing title.. but what I'm looking for is something similar to the scroll follow plugin, but have it detect which direction the user was scrolling. If something like this already exists, even better. But if not, I'll try to make a plugin myself. The point is when the div that follows the scrolling is taller than the window it's in. In a situation like this, I want the bottom of the div to peg to the bottom of the window when I'm scrolling down, but have it peg to the top when
Variables scope and when to use the $ sign
Hey guys, I am trying to understand variable scoping in jQuery a bit more. What has always confused me is why some developers use the $ sign. when declaring variables and why some dont. For example function($){ function plugin(el, options) { this.defaults = { }; this.$opts = $.extend({},this.defaults,options); this.$el = $(el); this.$arr = []; this.$group; this.$index; }; .... on to functions OR function($){ function plugin(el,
Using "jQuery" in a plugin name
Hi All, originally I wanted to email the jQuery project, but it doesn't seem there's something like a team email address. I was pointed to the forums. May "jQuery" be used in the name of a 3rd party plugin? There's an upcoming project which makes a tighter connection between jQuery and OpenLayers. The plan is to be an official OSGeo in the future. As many people show interested I really expect it taking off after FOSS4G in September. Before that I'd like to make sure that the name "geojquery" (not
Interval for each element
Hello, At the moment i got this: http://lutrasoft.nl/jQuery/textScroller/ But now i create a interval with the call of a function that does a each for each of my elements. But as you can see it got some lag. Because it moves all on each inteval. What i want is a interval for each element. So i got 3 elements i need 3 intervals. So they can move smoothly. The problem is if i call the function in the .each on the init. The function will only be called by the last element in the array. Example is at
how can i submit my new jQuery plugin "Image follow mouse move" for people free to use ?
I have developing a jQuery plugin "Image follow mouse move", and I want to submit to here for people to free use and test, how can I do it ? Thanks,
jQuery UI multicomplete widget, based on autocomplete
Hey, I've written an multicomplete widget that extends the autocomplete widget and allows it to have multiple values separated with a comma. My post about it can be seen here and the source code here. I would love to get some feedback, especially regarding to what I did with _trigger and _initSource, as I'm not too satisfied with it but couldn't find a better solution. Are there any better ways to do that? Thanks!
modifiying jquery plugins to add ontopic events
so basically i have a jquery plugin here which i want to modify. i already added a new option but i don't know how to add a new event to this since it seems to be lacking those as of this moment thanks for the reply. also i'm a noob at creating plugins or even jquery so please be nice. thanks
problems with selectors on this
I want to use the :first selector on this but something is wrong because the action is done on the html tag. Example: <html> <head><script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript"> (function($) { $.fn.myplugin = function() { $(this+":first").addClass("firstparent"); $(this+":last").addClass("lastparent"); return this.each(function() { $(this).children(":first").addClass("firstchild"); $(this).children(":last").addClass("lastchild");
Autocomplete with SQL'statement "%"
When you use the SQL'statement "%" in the autocomplete, The list generated doesn't have the word searched marked in bold, because the autocomplete'function isn't prepared for this. I did a adaptation to work with the the SQL'statement "%" that I will show below: Original Function: $.Autocompleter.defaults={inputClass:"ac_input", ... highlight:function(value,term){ return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),
Was: genFx is not defined, Now: Toggle visibility property with default Effects methods
Line 5922 defines the genFx function that looks to be in the global scope (window.genFx), but when I try to access it I get the error "genFx is not defined". I'm trying to define a show/hide/toggle alternative by overwriting the original jQuery functions. Each one uses 'this.animate();' which uses genFx. The reason in need to overwrite the originals is they do not alter the 'visibility' css property. Screenreaders do not fully ignore an element unless it's visibility set to hidden and my project
cluetip stops radiobuttons from working
Hi there, I am using cluetip to display additional information about form input. Part of the forms are radiobutton groups. To make cluetip work for a complete group I wrapped all input elements (incl. labels) with a span that contains the tooltip data plus a custom class to select. This works great, except for radiobuttons (haven't checked checkboxes yet). It looks like the click event is swallowed or something. Weird thing is that I can see the 'animation' of the radiobutton being clicked. Only
Changing options after plugin used
So I want my plugin to be able to change it's options AFTER the plugin has been used on an element. Something like this: $("elem").plugin.options.someOption="something" This is how my plugin is set up: $.fn.fileSelect=function(options,callback){ var defaults={ dir : '/', exts : 'php', phpFile : 'get_files.php' }; return this.each(function(){ var opts=$.extend({}, defaults, options); //plugin code
Plugin with multiple CSS selectors
Hi! I made this little plugin to make elements grow to match there container size. It looks like this: (function($){ $.fn.spaceWidths = function(options) { var parent_width = $(this).parent().width(); var childs = 0; var child_count = $(this).size(); this.each(function(){ childs = childs + $(this).width(); }); var difference = parent_width - childs; var add_padding = Math.floor(difference / child_count / 2); return this.each(function(){ $(this).css({ 'padding-right': add_padding, 'padding-left':
cant access anymore to my plugins.jquery.com account
I don't know if this is the right place where to post my problem, anyway I'm a jquery developer ad I used to post all my plugins (http://pupunzi.com) to the jquery.plugins repository. Today I had to update one of my plugin state but I had a surprise; I can't access anymore to my account; it says: The username pupunzi has not been activated or is blocked. What should I do to recover the account? And why it happens? Thnx, Matteo Bicocchi (pupunzi)
simulate click on checkbox in msie
I was having problems getting a click simulation to work correctly in any MSIE browser. I was using the jquery.simulate.js plug-in since that is what the ui test suites are using. Regardless of simulation mechanism this problem is still around. I'm looking for idea or suggestions. here is a link to the simulate plugin git, http://github.com/jquery/jquery-ui/blob/master/tests/jquery.simulate.js dispatchEvent: function(el, type, evt) { if ( $.browser.msie && type === 'click' && el.type ===
bind events overwriting themselves when called more than once through a jquery plugin
Here is my function. $.fn.textReplace = function(options) { var defaults = { text: "enter text" }; var options = $.extend(defaults, options); return this.each(function() { obj = $(this); if(obj.val() == '') { obj.val(options.text); } else { options.text = obj.val(); } obj.bind({ focus: function() { if(obj.val() == options.text) { obj.val(""); } }, focusout: function()
jQuery Documentation Format
This is a very candid question. Can someone in the jQuery core team elaborate on the choice of the documentation format in jQuery source code ? I mean, it seems to be not standardize (doesn't use special tags or specific comments) with JSdoc or other format. Why such a choice ?
Light Box Auto Image Resize
Hi, I am using jQuery Lightbox Version 0.5 author Warren Krewenki, For me auto resize works fine, My problem now what ever auto image its displaying, I want to increase the size of the Image, Where I have to make change, Or How can I change, Thanks in advance.
Halftone Navigation: queue
I want to create something similar to flash with halftone navigation script . you can see the script here... http://tutorialzine.com/2010/01/halftone-navigation-menu-jquery-css/ I want to queue two shapes in this script. i.e. If I hover Home I get one shape that shape goes away and other shape appear. I want it to make like flash Intro so that function runs with just load event with two three shapes queued up. MY Try: I tried the normal way putting draw('house'); draw('wrench'); But it didn't worked
Call and storing a plugin from a variable or string
I need to store a plugin as a variable or a string to be called later. I feel like I am missing something really simple. here is a sample test I was trying. $.fn.echo = function (s) { $(this).each(function () { $(this).html(s); }); return this; }; $.fn.callMethod = function (m, v) { $(this).each(function () { $(this).m(v); }); return this; }; $(document).ready(function () { $('body').append($('<div/>').echo('hello'));
Plugin callback functions: Return $(this) or this?
Hi, In my plugin, I wrote a private method to handle callbacks: function _call_back($_fun, $_obj) { if ($.isFunction($_fun)) { $_fun.call($_obj); } }; In the guts of my plugin, there are times where I have easy access to "this": $foo.animate(..., function(){ _call_back(settings.callback1, this); }); But, there are other situations where $(this) is easier to return: $foo = $var.filter(':eq(' + index + ')'); _call_back(settings.callback2, $foo); When it comes to coding,
Faces motion around mouse movement
HI everybody, i just see a flash animation, that i wonder implement with jquery. Someone can tell me if it is possible? this is the link of the animation: http://www.wearehughes.com/People.html it's sooo cool! Regards, Nicola
Ann: jQuery-xPubSub - publish/subscribe for jQuery
Hello. I just put up a pub/sub plugin on GitHub. The code is at: http://github.com/chakrit/jquery-xpubsub alongs with a README and 2 demo pages. It provides $.publish and $.subscribe and also a $.connect, for a quick glance-over-the-code of what it can do for you please see http://github.com/chakrit/jquery-xpubsub/blob/master/test-mvc.js .. If you guys have a few minutes, I'd love your feedback. Thanks!
Fixed positioning for ipad/iphone (e.g. popup windows)
http://doctyper.com/stuff/iphone/fixed/fixed-positioning.zip http://doctyper.com/stuff/iphone/fixed/ That webpage uses uses nearly 400 lines of plain javascript to make a row of icons stay at the same position of the screen (well it jumps to the top if you scroll the view up or something) It doesn't work on other devices though such as PC's. It would be good if jqModal or some other plugin could be modified to also be compatible with ipads/iphones. At the moment normal plugins including http://www.sohtanaka.com/web-design/examples/modal-window/
Swf files with jquery
So I am using the the smooth scrolling function on a website I am building. The client is wanting to put multiple swf files on the page. Is there a way to attach the navigation buttons to activate the certain swf files? Any suggestions? Thanks!
lib378js port
Hello everybody, It's a year or so since I started using JQuery and I'm very happy with it. A long time ago I wrote this javascript port (mostly as a technology demo) of a tiny but effective C library I developed for embedded systems. The lib is aimed at predictive text input, more or less like some cellphones' t9. Maybe It kind of overlaps autocompletion plugin features, supporting reduced keyboard input. See project page: http://sourceforge.net/projects/lib378/ and js demo: http://lib378.sourceforge.net/lib378js/demo.html
jQuery-ZenCoding A New Templating Engine
Hello all, I have developed a plugin for jQuery which I hope others will find as a useful templating engine. This is based on the core idea of the ZenCoding project which is to take a css search string and convert it to html. My project expands upon this idea by expanding the syntax so that dynamic content, events, and data can be embedded into the newly created element itself. If this sounds useful, please feel free to try it out, fork it, report bugs, etc at www.github.com/zodoz/jquery-ZenCoding.
[jQuery UI] prevent from calling a constructor more than once time?
Hello everyone! This is my first post on this forum. :) I'm creating my own lightbox. Underlying markup has following pattern: If a picture doesn't belong to a gallery simply use: <a href="link_to_image" title="optional_title><img src="optional_image" /></a> If you want images constitute a gallery, you simply add common gallery name, following the pattern (changable in options), e.q "lb_galleryName". "lb_" prefix as I mentioned is configurable, you can change it if you like. So, if you want 3 images
How to use two tabs with two different screen?
i have two seperate screens.i need these two sep. screens to be into two tabs .Eg: if i click weekly link should move on weekly tab with weekly content and if i click on daily tab should populate daily values.But application is using ominis at back end.Jquery,JS,Ajax at front end. If i try to add tab in any one screen and try to get other value?how to proceed pls suggest
acceptable to use $.event.add ?
Does anyone know if the $.event.add and $.event.remove functions in the jQuery core are intended to be used outside the core? I realize I can accomplish the same thing with bind/unbind... $(element).bind('eventName', handler); $.event.add(element, 'eventName', handler); However in some cases I have no need for the other things $(element) would provide. If both statements above are exactly the same in terms of efficiency, or if the $.event object is not intended for use outside of the core, then
Help needed with image rotation.
I'm trying to do something that appeared simple at the outset. Just set up an image with a Prev | Next links that will hide the selected image and fadein the next. It works fine until it gets to the end, I can't get it to select the first image when it reaches the end. The strange thing is it works in reverse by scrolling through them with the Prev button. Any help would be appreciated, heres the script and correspondent HTML: HTML: <script type="text/javascript" src="scripts/projectresize.js"></script>
Next Page