[jQuery] Animate percentage?
This works: $('#selectedFormat').animate({marginLeft:50}, 500); this does't: $('#selectedFormat').animate({marginLeft:25%}, 500); nor does this: $('#selectedFormat').animate({marginLeft:'25%'}, 500); how do I animate something on a percentage?
[jQuery] FadeTo getting a little crazy
Hi everyone, I have recently started using jQuery on a few of my sites. It seems to work perfectly for internet explorer and safari, but mozilla firefox seems to always be a little funny. My most recent problem - can be seen here <http:// www.cafenation.com.au/products.php/medium-roast-freshly-roasted-coffee> There are different issues with both Mac and Windows. Lets look at the mac issue first. Firefox 2.0.0.6 - when you mouse over the 'Related products' div down the bottom, it calls (via hover)
[jQuery] ruby style string manipulation
Sick and tired of string manipulation in javascript ? I was.... Try this nice little function : $s = function(s) { p = s.replace(/#{/g, "' + eval(").replace(/}/g, ") + '") p = "'" + p + "'" return eval(p) } OK it's not exactly bullet-proof, but it's the concept that counts here. So now you can do : a="Jonah" b=30 $s("#{a} is #{b} years old") ==> "Jonah is 30 years old" Obviously any stray '#{' and '}' sequences will break it...
[jQuery] Is there a way for scroll to anchor(without interface.js plug-in)?
Is there a way for scrolling to anchor(without interface.js plug-in)? I don't want to use interface.js plug-in. Because it's huge size for one function. xD Thanks.
[jQuery] add a print event to jquery: possible ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=468131614-01082007><FONT face=Arial size=2>hello friends!</FONT></SPAN></DIV> <DIV><SPAN class=468131614-01082007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=468131614-01082007><FONT face=Arial size=2>question: is it possible to catch the print event via
[jQuery] using jqModal - problem with executing jqm with triggers loaded in via AJAX
hello, just when i thought i had a grip on executing jquery functions from content that was loaded via ajax and added to the dom dynamically, i have this issue with jqModal. i'm trying to open a modal window from code that was loaded in via Javascript. so i use the following, this works on most of my code ... but this is weird, it will not fire but will trigger the alert. i tried it without - trigger: '.triggerit' - and that doesn't work either. now, if the content that triggers the jqmodal is already
[jQuery] [NEWS] VERY COOL Bookmarklet Element Inspector
Ajaxian is reporting about a very neat and cool bookmarklet, XRay, that helps you visually get information about specific elements on your page. The site best describes its functionality as "a free cross browser tool (a bookmarklet) that lets you see the box model in action for any element, letting you see beneath the skin of any web page. Just click the XRAY button to instantly answer those vital questions: where is the top and left of this element? how big is each margin? how big is the padding?
[jQuery] Attach pre-defined events to loaded dom elements?
Hi all I have a document with some links with a certain class. When loaded, some events are attached to these links. I'm then using $().load() to grab a HTML fragment and append it to the DOM. Inside this HTML fragment are more links with aforementioned class. Is there a way I can globally attach the relevant events to the newly loaded dom elements without being specific? I'm trying to move this code into a plugin.
[jQuery] IE misinterpreting HTTP status code 204 as 1223
I've come across some strange behavior in IE7. Sometimes when an XmlHttpRequest receives a 204 (No Content) HTTP status code on the response, IE sets the XmlHttpRequest object's status property to 1223. In my code, this seems to be happening when my server is returning a 204 from a PUT request - IE seems to be handling the 204 from a DELETE request okay. Anyhow, jQuery's httpSuccess function is (quite understandably) interpreting the 1223 response as a failure. I tacked on another condition to the
[jQuery] WYSIWYG Editing with Form Plugin
Hi all, I'm having a heck of a time getting either tinymce or fckeditor to load via ajax and then be submitted with mikes awesome form plugin. Anybody got these to successfully work? Here my code that loads and binds the textarea and form. function LoadFunctions() { $("#Funcs").load('/Admin.scpc?&Prog=Funcs&UserId='+$.cookie('scpc') +'&NoCache='+new Date().getTime(), function(data){ $('.FuncItems').click(function(){ $("#FuncDetails").load('/Admin.scpc?&Prog=FuncDetails&Type='+$
[jQuery] Why do both ajaxError and ajaxSuccess fire if the request fails or is a success?
I was wondering why this code was giving me the error _and_ parsing my XML: function getXML () { $.ajax({ dataType: "xml", error: errorMessage("The data could not be loaded."), success: function (msg){parseXML(msg);}, timeout: 10000, url: xmlUrl }); }; when I read (from John himself I believe) that both error and success are fired if the request fails or is successful. Can somebody explain the logic here? Have I just
[jQuery] A little different edit in place. (use a link to initiate the edit)
Hey, The subject might be a little strange but i didn't know how to put it.. What i want to try is making a piece of text with a "Edit" link next to it. now i don't want the text to initiate the "edit in place" when you click on it (so that's just edit in place) but i want ti initiate it when i click on the link "Edit". So i guess that can be called "Edit on link click" Here is a screenshot where i'm trying to get it to work: http://img508.imageshack.us/img508/2213/editonlinkclickmq2.png I hope someone
[jQuery] Plugin's method called chained with selector or not?
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi everyone,<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am writing little plugins for helping me in my developments. Everything's ok, and easy to do, but now I'm face to face with a little problem.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I've a plugin's method like this:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[CODE]</DIV><DIV><SPAN class="Apple-tab-span"
[jQuery] jQuery Maps 1.3 released with Yahoo! Maps Support
Hey folks, I'm happy to announce today that I have released version 1.3 of the jQuery Maps Plugin (http://code.google.com/p/jmaps/). This includes some cleanup of code regarding the Google Maps API, and add's several new features. Changelog: * Added support for creating Yahoo! Maps, can create Map, Satallite or Hybrid. Check out available options below * Added support for creating points on Yahoo! maps. * Added support for creating Polylines on Yahoo! maps. * Added support for GeoRSS files on both
[jQuery] Know if an element is focused
Hi, I've got an hover() and a focus() effect that affect the same element. Both add / remove the same CSS to/from the element. So I need to know if the current element is focused so that hover doesn't make anything if the element has the focus. How can I know if the element has the focus? Thank you! Regards, A Mele
[jQuery] [NEWS] jQuery-Powered AjaxRain.com Writeup on Mashable
jQuery-Powered AjaxRain.com, which has to have the most comprehensive listing of Ajax/JS/DOM controls on the Internet, got a nice writeup on Mashable. http://mashable.com/2007/07/30/ajaxrain/ Congrats Archana!! Rey
[jQuery] Adobe AIR question - keypress?
OK, so Adobe AIR is built on the WebKit engine, same as Safari. Which, I think, means screwy keypress handling. If I change my bind() to the keydown, it works fine, although I have to keep hitting it over and over to register the event. My question is, does anybody successfully handle keypresses in Safari (and, I assume by extension, in AIR)? If so, how?! Thanks! -Toby
[jQuery] New Plugin Pages
Any chance you lovely developers of the new plugin site could either: Fix the 'Browse by Date' or Remove 'Browse by Date' as an option. as it doesn't work. Please.
[jQuery] How to animate percentage?
how do I make something like this: $('#element').animate({marginLeft:25}, 500); by percent, instead of 25 pixels?
[jQuery] [ANNOUNCE] New jQuery using Site: jingproject.com
Just had this site http://www.jingproject.com/ emailed to me, and apart from it being a fantastic looking tool, it uses jquery :)
[jQuery] An autocomplete that is able to insert a hidden id based upon the ID of a returned element?
Hello every, I am new from prototype and am trying to change my methods to jQuery. What I want to do is very familiar to me with prototype, but confuses me when trying to do it with jQ :P I have spent the past 3 hours playing around with the autocomplete plugins on the site, and read their documentation as well, and nothing seems to fit my needs. What I need is to somehow retrieve the id of the selected item WITHOUT showing it, like I saw in Dan G. Switzer's plugin. The interface plugin felt bloated,
[jQuery] Slightly OT: Google Maps API & "Permission denied to call method XMLHttpRequest.open"
Here is my issue: The js I use on the following page works great using jquery, jqmaps and the google maps API to load up a map: http://dev.c21hull.com/listings/map.htm?listing_id=GL-9027 Now, I want to load teh map in a modal window via an AJAX call so I use jqmodal. When you click "mapit" the modal window loads (I know the close btn doesn't do anything yet) and the AJAX request is returned nicely, but when the map tries to load within the content that was just returned I get a "Permission denied
[jQuery] jqModal help: multiple triggers, different ajax url's
I have a page on which I've hidden a div for use as an adaptable modal window: <div id="modal" class="jqmWindow"> <div class="modalTop"> <div class="jqmClose"> ../images/btn/btn_close.gif </div> </div> <div class="target"></div> </div> I have 2 different types of triggers, for which I want to load 2 different urls into the jqModal 'target'... let's call them: .typeA ----> this.htm .typeB ----> that.htm I can get either of these to work, but not both at the same time: $('#modal').jqm({ajax:
[jQuery] FadeIn effect not working on all image
At this url http://www.archea.it/architetti/index.php/home/progetto/1 i have a fadeIn effect on a image... al work but the fade effect not exapnad on all image but only on a frame of it... at the bottom the image is not fade but hide/show... What is my error? Thank you Please excuse my very bad english....
[jQuery] click and no reacion
Helllo I have code like this: [code] <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script language="javascript"> <!-- $(function(){ $("#b").click( function() { $("h2").append('<a href="#" id="a">hellooooo</a>'); } ); $("#a").click( function() { alert("aaaaa"); } ); }); //-->
[jQuery] The JS/jquery version of PHP's array_unique
PHP developers will all know about the array_unique() function which removes duplicate values from an array. Up until today, we've been using the following function to replicate this function in Javascript function array_unique(arr) { var newArray = []; var existingItems = {}; var prefix = String(Math.random() * 9e9); for (var ii = 0; ii < arr.length; ++ii) { if (!existingItems[prefix + arr[ii]]) { newArray.push(arr[ii]); existingItems[prefix
[jQuery] load() and .ajax How can I do to not freeze my page?
Hi Folks I am trying understand load() and $.ajax When I insert this code. $('#loadContent').click(function(){ $("#myid").load("<a href="http://localhost/final/myajax.php"> http://localhost/final/myajax.php</a>"); }); My php file run a query and return a DOM (because I saved my DOM into my MySql, "caching") The problem is this function load() freeze my page (few seconds) Works but freeze. I read a lot about AJAX theory and I know that I need set in my Javascript XMLHttpRequest to true to
[jQuery] ..selector bug..
i think i've come across a tiny bug in jquery 1.1.3.1, $('textarea[@maxlength]) return an empty array, although there is such a textarea in the dom.. also $('textarea').attr('maxlength') returns nothing also.. this worked before in 1.1.2 ... and i know this is invalid xhtml, but we had a need for such a thing in the backend, to limit the number of chars users can input.. dennis.
[jQuery] ContextMenu hidden under dropdown lists
I am using the ContextMenu plugin on a page that has a lot of dropdown lists (html selects), and when the context menu is popped up, it always appears underneath the dropdown lists... I know the reason why it is doing this, and I'm asking the following question: Is there a workaround for this problem? If not, is anybody working on a context menu that will always appear on top of all other input controls? Thanks. -- View this message in context: http://www.nabble.com/ContextMenu-hidden-under-dropdown-lists-tf4181823s15494.html#a11889281
[jQuery] Elements strip for horizontal scroller
This is (probably) more a CSS problem than it is a jQuery problem but you guys are a lot more helpful than the guys on CodingForums so I thought I'd try here first. There is some jQuery stuff involved too I want to build a dialog that displays a collection of products for comparison. Each product will get it's own div. What I need for these divs to scroll horizontally one div at a time when the user manipulates the left and right scrolling buttons. My first idea was to simply have an overflow:hidden
[jQuery] Override $.tooltip.update()?
I have already checked this thread <http://groups.google.com/group/ jquery-en/msg/c1ccc42639128398> to see if a plugin can be extended? (but it doesn't seem to be). I'm just jumping here to see if any hack or way is invented in the meantime. I just want to override the update() method of jquery.tooltip plugin-- so that I'll have different positioning scheme for the title (currently the title is appearing by the mouse position, but I'd like it to appear based on the element -- as it's overlapping/partially
[jQuery] removeClass error
Error: b.className has no properties Source File: http://mymachine/javascripts/jQuery/jquery.pack.js Line: 11 this occurs when I do this: var doc = $(this); function checkIt(){ $(doc).removeClass('RedText'); } it also occurs when I do this: function checkIt(){ $(this).removeClass('RedText'); }
[jQuery] problem with object and attachevent
hi, in the code below: how do I get the function showText to see the object button bb? all I get in the alert is "undef" please help :(:(:(:(:( <html> <head> <script lnguage="javascript"> function startHere() { var mt = new ttt(); document.body.appendChild(mt._contentDiv); } function ttt() { this.name='myTest'; this.bb = document.createElement('button'); this.bb.innerText = 'Click Me'; this.bb.attachEvent('onclick', this.showText); this._contentDiv = document.createElement("div"); this._contentDiv.appendChild(this.bb);
[jQuery] [ANNOUNCEMENT] jqShuffle plugin (alpha)
I wanted to announce my first plug-in called jqShuffle. It is in alpha right now, because I know there a better ways of doing some of the stuff I want to do. The url for script and some very basic demos: <a href="http://www.benjaminsterling.com/experiments/jqShuffle/"> http://www.benjaminsterling.com/experiments/jqShuffle/</a> Currently tested in IE6, IE7, FF2 (mac and pc). Any and all feedback welcomed. Tips on making the code better will be greatly appreciated.<br clear="all"> -- Benjamin Sterling
[jQuery] Cycle Plugin and z-index
Hi, I'm using M. Alsup's Cycle plugin to transition between a series of images. This is working as expected, but I'm having problems getting an additional image to appear "above" them, at a higher z-index. I've tried giving both elements a fixed z-index, and by using a transparent slide I'm able to verify that the overlay is being positioned correctly, but it seems like something is interfering with the normal z-index rules. Any ideas? HTML: <div id="picwrapper"> <img src="images/overlay.png" alt=""
[jQuery] Image gallery onload issue
Hi folks I'm sure someone must know the answer to this; When making an image gallery, and you want to preload the next image before swapping it in, IE will not load the image if it has already cached it. I have got around this before by using a random number; var newSrc = ''+newSrc+'?ran='+randomnumber+''; var nextImg = new Image(); nextImg.src = newSrc; But I have never been happy with this. Does anyone know a better way to work around this cache problem? cheers, steve
[jQuery] Text Box readonly
I am writing a small script at the moment that requires a text box to be readonly for a period of time and once that time is up then I want to remove the readonly attribute, is there a way to allow this to happen after a duration of time has passed or after an event has happened. jQuery(document).ready(function($) { $("input").attr("readonly", "readonly"); $("input").removeAttr("readonly"); }); not sure how to delay the removeAttr event for a duration of time as I can only find a delay in the effects
[jQuery] traversing DOM question
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=312145708-31072007><FONT face=Arial size=2>hello friends,</FONT></SPAN></DIV> <DIV><SPAN class=312145708-31072007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=312145708-31072007><FONT face=Arial size=2> a quickie: In my table, each table row contains
[jQuery] Layout Panels?
Hi! Are there any layout panels for Jquery? Examples are(http://extjs.com/ deploy/ext/docs/index.html)? Thanks!
[jQuery] "please wait"-box only if delayed response
How can I make my #wait container show only if there is a delay in the response. Let's say that I only want to show it if there is no response within 2 seconds. This is my current code, which often cause the wait box to show and then hide, quickly - which looks odd to the user: $(document).ready(function(){ // show wait-box $('#wait').css({opacity: 0}).animate({ opacity: 1 }, 3000); // load content $('#content').load('content.php', function() { $('#wait').hide(); }); }); Kia
Next Page