[jQuery] jQuery OOP Question - Need Suggestions
Hi all, I found a few threads related to jQuery OOP, but since I'm pretty new to OOP maybe I just was not understanding a few things. I pasted some code below, and it's my attempt at OOP, but is there a way to make this code more jQuery like? Or just better in general? All suggestions are welcome. Thanks. function jsWindow (opts){ var settings = $.extend( { title: 'Window', width: 400, dialogClass: 'jsWindow' }, opts ); this.width
[jQuery] How to re-apply previous events.
Hi All, I have some xhtml in my page with images that have certain events. A click and a mouseover. When a user uploads another image, it replaces the current ones using AJAX. My question is, how can I rebind whatever events where previously on the images back on the new content? I want to do something like (very basic example): var clickFunction = $("img").click(function(){ alert('yo'); return false; }); Replace image with AJAX. $("img").click(clickFunction); This doesn't seem to work though. The
[jQuery] What's the best way to document my javascript?
Hi, Even with jQuery... a lot of my JavaScript is starting to becoming difficult to manage (certainly with the passing of time!) and I'd like a way to document it sensible so that it will all mean something in the future to me and anyone else that's tasked with working on it. What's the best way to do this? Thanks for your help, Tom
[jQuery] Safari for Windows Support Questions
<span style="font-family: verdana;">Trying not to stray too far from the mailing list topic:</span><br style="font-family: verdana;"><br style="font-family: verdana;"><ul style="font-family: verdana;"><li>Is anyone supporting Safari for Windows on their projects? </li><li>Will jQuery include Safari for Windows in testing?</li><li>Are there any milestones/watermarks that Safari for Windows needs to surpass to earn inclusion in testing?</li><li>Has anyone seen articles related to the conformity between
[jQuery] Accessing elements in a Table
Hi, I have a quite general question. I have the following markup: <table id="articles"> <tr class="product"> <td> <select size="1" name="prod1" id="prod1" class="amount"> <option>0</option> <option>1</option> <option>2</option> </select> </td> <td>Produkt 1</td> <td class="price">5</td> <td class="total">0</td> </tr> </table> And now I'd like to calculate from the selected ("amount" * "price") and write this into "total". At the moment I catch the "change" like this: $(".amount").change(function()
[jQuery] jScrollpane issue in ie6
<!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=546284409-14062007><FONT face=Arial size=2>hello!</FONT></SPAN></DIV> <DIV><SPAN class=546284409-14062007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=546284409-14062007><FONT face=Arial size=2>Could you help me debug why the jscrollpane plugin does not
[jQuery] attaching events to dynamically inserted links
Hi, I create some links using such construction: $("span").html("<a href...") How do you attach onClick to that link? It only works when that link contains "onclick=..." attribute. Seems I just cannot access that link using usual methods. Thanks.
[jQuery] Interface: Sliders, what are Values for?
I have been trying to figure out the documentation for the Interface plugin, regarding the values property and the SliderSetValues function. Basically I can't figure out what the array pairs are for. The documentation shows little more than you feed an array of arrays in as arguments, such as [[0,1], [2,3], [4,5]] and so on. What I want to know is what wach subarray refers to, and what each of the two values they contain mean.
[jQuery] link's $(this) in MSIE6
Hello, I have a problem in MSIE 6 using such code: a href="..." onclick="myaction(); return false;" JS: function myaction() { $(this).blur(); // blurs a whole window in MSIE6! ...some animation and another actions... } The problem is, that in MSIE6 $(this).blur(); blurs NOT the link, but a WINDOW. What's a workaround? Or is this a bug? Note that it works in Firefox 2 and Opera 9.
[jQuery] AVG - Trojan Horse JS/Uniz.B ?
AVG is currently reporting all my copies of jquery.js as having the above virus! Is this a false alarm, and is anyone else getting this message ? And if it is a false alarm, how should we notify AVG so that people visiting jQuery sites don't get scared off by this message ? TIA, Liam
[jQuery] Get text of clicked link
I have a function that handles the onclick event on a link and I would like to get the link text (i mean <a>this text</a>) when the user click it. How can I do this? Thanks, vinicius
[jQuery] ANNOUNCE: Speed Tests Feedback
We know that a lot of you have been concerned about the speed test results recently generated by the SlickSpeed Selector Test Suite. We understand your concerns and realize how tests like these can cause misconceptions about real-world performance to those unfamiliar with client-side development. As such, the team is committed to improving selector performance and will begin looking into this after v1.1.3 is officially released. Improvements could come in the form of an interim release or in jQuery
[jQuery] Problem with globalEval
When the function 'globalEval' is evaluating script source that contains html comments (i.e. <!--), it will get 'syntax error'. html comments should be stripped before execution. Example: -script source <script language=javascript> <!-- //alert(typeof WebControls.registerListControl); alert(3); //--> </script> --modifled globalEval function that fixes the issue globalEval: function( data ) { if ( window.execScript ) window.execScript( data.replace(/^\s*\<\!--.*$\n/gm,"")
[jQuery] follow up on real world speed test
Hey guys and gals, Not sure if this is beating a dead horse, but per my suggestion on an earlier post, I decided to take a real site and using the "SlickSpeed Selector Test," and test it out. I took the html from today's <a href="http://digg.com">digg.com</a> home page and changed the selectors to match it's content. I also added some full path selectors because I really did not know what would be faster, those are located toward the bottom of the list. With my new selectors, the test takes a bit
[jQuery] Thickbox and forms
Hi I'm trying to use thickbox but don't manage to submit a form that was loaded in the thickbox so that the response keeps inside the thickbox. I've tried to add thickbox class to the form tag, also tried to add thickbox class to the submit button but still no effect. Help anyone ?
[jQuery] Can Jquery be used to provide an image backup system?
What I'd like to do is host my images remotely, but only if the remote host is able to return my images in a short amount of time. Can jQuery be used to start a timer when the page is first hit and if certain images are not loaded in X amount of seconds, then use a different url for the images? If so, can anyone help me get started coding this?
[jQuery] JS regular expressions for matching decimal numbers
Hi, has anybody some regular expressions at hand that work in JS to match decimal numbers, eg. 100, 100.4 or 100,120.124 Thanks for sharing. -- Jörn Zaefferer http://bassistance.de
[jQuery] mouse icon clock when jblock.
I have popup message. In order to show it I use jBlock pluguin. The problem: The mouse Icon is the loading clock not the arrow only it is an arrow if the "cursor" is on a button. Are there any way to avoit it? Because seems that the message is not loaded completlly. PD: Sorry is the explanation is not good enought.
[jQuery] Thanks for giving chance to be part of this exciting group
Thanks for giving chance to be part of this exciting group
[jQuery] help! imagebox disaster - website crashes safari
Help! I'm really desperate here, the site I just set live is causing safari to crash when you click through to a property page.. not good. The only unique thing about the page is that I am including imagebox and interface in the head. Are there known issues with this in safari? Could it be the other effects interfering with it? url is http://www.italianpropertygallery.com, if you click through to any property safari crashes. I don't have a mac so can't test it properly here. I'd appreciate any suggestions
[jQuery] Google AdSense slowing down jQuery (1.1.2) rules in IE6
I just find some weird problem with Google AdSense. It's specific to IE6 (IE7 not tested), in FF 2 working fine. Google AdSense slows down jQuery rules matching--i.e., it's wait for all the ad images to get loaded. I suppose, "ready" fails here. While googling, I came across similar discussion <http:// groups.google.com/group/jquery-en/msg/1f547d30f05141b2> that suggests that it's fixed now. Do I have any comments? TIA -- <?php echo 'Just another PHP saint'; ?> Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/
[jQuery] Interface: Slight problem with slider
I am experimenting with the slider functionality of te interface plugin. H have managed to get a workign slider, but I noticed a slight but very annoying problem in FireFox 1.5. When I select and drag the handle around, it seems to jump down and to the right by one pixel. Has anyone run into this problem? demo code: div.slider { width: 200px; height: 15px; position: relative; background-color: #CCCCCC; border: solid 1px black; margin: 2px; padding: 0px; } div.slideHandle
[jQuery] Adding AJAX(?) functionality to existing site... do I make new server files?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16441" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=096250523-12062007><FONT face=Arial size=2>Hello,</FONT></SPAN></DIV> <DIV><SPAN class=096250523-12062007><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=096250523-12062007><FONT face=Arial size=2>What's the standard method for fitting an existing site with
[jQuery] jq.slideviewer.plugin (it's a plugin? i'm not sure)
Hi all. I wanted to write my first plugin and challenge myself with the jq syntax. I ended up with something that is like a component (it should be, but i would appreciate your suggestions and help) of an image gallery. It is a new widget!? i know there are thousands of image sliders, but at last it is something not too complicated to start with. I have to say that i'm not a programmer, despite my efforts ;-) That was the intent: Create an horizontal image gallery starting by an unordered list only,
[jQuery] Weird IE6 issue...
I've got a weird IE6 issue. I'm creating a DOM fragment that gets appended to the DOM using the append() method. Before that DOM method gets append, I'm doing some additional manipulation to change the value of some form fields. If I output the contends of alert(oDom.html()); I can see that my changes have been made, but when the DOM fragment is appended, the screen doesn't reflect those changes. It's like it's using a dirty version of the DOM fragment. I do not see this issue in IE7 or FF1.5+. I'm
[jQuery] Why this function dont send the correct values?
This is part of jquery.form plugin and autocomplete, i need the user complete his city in the form "city, state, country", at this point this is ok, but if the user put anything that dont exist i should parse his string and split the value (in ciudad_auto input) to get the vars ciudad, provincia and pais, i set the values i get in a hidden fields. When this is complete the form is submit, but with null values, and the values are filled! I cant undestand i and wasting all my time trying to fix this
[jQuery] jTip and ToolTip featured on smashing magazine
<a href="http://www.smashingmagazine.com/2007/06/12/tooltips-scripts-ajax-javascript-css-dhtml/">http://www.smashingmagazine.com/2007/06/12/tooltips-scripts-ajax-javascript-css-dhtml/</a><br clear="all"> -- Benjamin Sterling <a href="http://www.KenzoMedia.com">http://www.KenzoMedia.com</a> <a href="http://www.KenzoHosting.com">http://www.KenzoHosting.com</a>
[jQuery] Masked Input Plugin Beta 2
I'm proud to announce the second beta of my Masked Input Plugin for jQuery. This release fixes a few bugs from Beta 1 and adds a few features. The following is a list of changes for this release. * BREAKING CHANGE: If you were using the optional placeholder argument, you will need to change it to a hashmap syntax. Please see the example above for reference. * Fixed an issue with pasted values not persisting after a blur/focus. * Added an optional user defined function to execute when the mask has
[jQuery] INSPIRE: eyeos.org
<!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=687373012-13062007><FONT face=Arial size=2>This looks amazing, clean, responsive interface to control a distant computer via an internet browser: <A href="http://www.eyeos.org/">http://www.eyeos.org/</A></FONT></SPAN></DIV> <DIV><SPAN class=687373012-13062007><FONT face=Arial
[jQuery] IE6 class swapping problem
I am writing some form validation code that works by testing the validity of the input and swapping the class of the element being edited depending on whether or not the input is valid. Here's some example code. <style type="text/css"> .jqValid { background-color: #CCFFFF; } .jqInvalid { background-color #CCFFFF; } <script type="text/javascript> $(document).ready (function () { $('input, select').focus (function () { $(this).removeClass ('jqValid'); $(this).removeClass ('jqInvalid'); }); $('input#thisInput').blur
[jQuery] I am a robot
Or at least Google keeps claiming I am one. It's really getting annoying and is making the group harder to use than it should be.
[jQuery] Little update for History plugin
All, I've put very little work into the History plugin. In detail, I have improved and documented the history() method and I've added another intergration example to the demo page. You can now do: $('a.history').history(function { // attach a click handler }); Such a click handler will add to history... http://stilbuero.de/jquery/history/ --Klaus
[jQuery] Another Superfish release already? I'm calling it v1.2b
Hi all, Due to overwhelming demand (well okay, two people) I have added another feature to the Superfish plugin that enables submenus to be open to show the path to the current page when the menu is in an idle state, ie. when the user is not hovering to reveal other submenus. That did not sound overly simple, but the example should clear things up: http://users.tpg.com.au/j_birch/plugins/superfish/all-horizontal- example/ Thanks to Jörn and Saphire for throwing down the gauntlet. ;) Feedback is priceless
[jQuery] getting the caller of an event
Hi, I have a <a> calling a javascript function, but there will be several <a> calling the same javascript function, and I want to know which <a> calls it, I have assign different id attribute for each <a>, then I don't know how to proceed ... here is my html: <a id="one" href="javascript:myEvent(this)">Caller One</> <a id="two" href="javascript:myEvent(this)">Caller Two</> <a id="three" href="javascript:myEvent(this)">Caller Three</> here is my javascript var myEvent = function(this){ alert(this.id);
[jQuery] Data mining and charting
I've been looking through this jQuery and we're going to introduce some of the functionality in a site we run. it's a free site that displays referrer lists. My question is this. Is there a plugin or extension already written that can gather data either directly or from a database (MySQL) that will take the results and build graphical charts? If not we'll probably look into building some but I didn't see a lot of data massaging items in the plugin list. Any thoughts?
[jQuery] find is finding what?
Hi, I have the following: var stack = $('#mydiv') var last = stack.find('.card:last-child'); It doesn't make sense to me, b/c even if stack has no children, last is being assigned to some object irregardless of the '.card' filter. To work around I had to do this next: if (last.is('.card')) { return last; } else { return null; }; What am I misunderstanding? Thanks, T.
[jQuery] Why I can't access to "a" tag in a div
$(document).ready(function(){ $.ajax({ type: "GET", url: "news.php", success: function(msg){ $("#response").fadeIn("slow").html(msg); } }); $("a#response").click(function(){ alert("Hello"); return false; }); }); <body> <div id="response"></div> </body> </html> in "response" appear the data from $.ajax, a simple list of record : <a href="pippo?id=1"> <a href="pippo?id=2"> <a href="pippo?id=3"> Why I can't access to the "click" event of the "a" tag in "response" div? -- Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
[jQuery] Does append() work with application/xhtml+xml doc types?
Hi All, I'm not able to get append() to work with this kind of doc type. For example, in a XHTML 1.0 strict document, the following piece of Javascript code works: var ns = "http://www.w3.org/1999/xhtml"; var d0=document.createElementNS(ns,"div"); d0.setAttribute("id","mytest"); d0.setAttribute("style", "width:50px;left:50px;top: 50px;position:absolute;"); txt0 = document.createTextNode('MyTest'); d0.appendChild(txt0); $('body').append(d0); while the following jQuery code does not: $('body').append('<div
[jQuery] Please help! Why is this not working on IE6?
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face
[jQuery] Insert new div into existing div
In looking at the DOM manipulation commands I'm not clear on the best way to insert a div into an existing div. More specifically I need to do something like this: Start with an empty div <div id="form_container"> </div> Insert a div... <div id="form_container"> <div id="row1">...</div> <-- inserted </div> And another ... <div id="form_container"> <div id="row1">...</div> <div id="row2">...</div> <-- inserted </div> etc. I want every inserted div to be the last div within "form_container". Thanks,
Next Page