[jQuery] rails problem with 1.2
So I have this code to unobtrusively add dynamic delete links to my page. $(document).ready(function(){ $('.delete').click(ajaxDelete) }); function ajaxDelete(){ $.ajax({ type: "POST", data: {_method: "delete"}, url: this.href, dataType: "script", beforeSend: function(xhr) { confirm('are you sure?'); xhr.setRequestHeader("Accept", "text/javascript"); } }); return false; } But upon updating from 1.1.4 to 1.2 it breaks, even with the compatibilty plugin. The links just break. It seems that rails isn't
[jQuery] Question to experts on jQuery.
Is JavaScript: var img = new Image(); img.src = "1.jpg"; var width = img.width; var height = img.height; It is necessary for preliminary loading image and, the main thing, for preliminary definition width and height. How same to represent on jQuery? In advance thanks, Alexander
[jQuery] Assistance needed with jQuery star rating script
Hi, I'm trying to implement this star rating script on a site: http://sandbox.wilstuckey.com/jquery-ratings/ I've got everything working like it should (I think), but I've got three concerns. What I've done is removed the "delete" button so now I've simply got 5 stars. 1. The script seems to make all every rating start out at 3.5 stars. What can I do to make the script display no rating (grayed out stars) until a star has been clicked by a user? 2. When I click on a star, it remembers the rating
[jQuery] Assistance needed with a jQuery star rating script
Hi, I'm trying to implement this star rating script on a site: http://sandbox.wilstuckey.com/jquery-ratings/ I've got everything working like it should (I think), but I've got three concerns. What I've done is removed the "delete" button so now I've simply got 5 stars. 1. The script seems to make all every rating start out at 3.5 stars. What can I do to make the script display no rating (grayed out stars) until a star has been clicked by a user? 2. When I click on a star, it remembers the rating
[jQuery] Assistance need with a jQuery star rating script
Hi, I'm trying to implement this star rating script on a site: http://sandbox.wilstuckey.com/jquery-ratings/ I've got everything working like it should (I think), but I've got three concerns. What I've done is removed the "delete" button so now I've simply got 5 stars. 1. The script seems to make all every rating start out at 3.5 stars. What can I do to make the script display no rating (grayed out stars) until a star has been clicked by a user? 2. When I click on a star, it remembers the rating
[jQuery] Need a little assistance with a star rating jquery script
Hi, I'm trying to implement this star rating script on a site: http://sandbox.wilstuckey.com/jquery-ratings/ I've got everything working like it should (I think), but I've got three concerns. 1. The script seems to make all rating start out at 3.5. What can I do to make the script display no rating until a star has been clicked by a user? 2. When I click on a star, it remembers the rating I chose. Once I click refresh, the rating goes back to 3.5 stars. How can I make the rating "stick" if you will
[jQuery] show/hide FAQ - simplify my code?
http://www.mredesign.com/demos/jquery-show-hide/#thedemo got it working just the way I wanted (thanks, Glen!) I wrote out these rules long hand as I went through the creation/learning process, but I am sure there are several ways I could compact this to fewer lines. Anybody want to have a shot at simplifying / combining rules, just for the sake of example? The code for my setup is below the demo on that same page Only a few weeks in and I am really digging the power of jQuery... and the community
[jQuery] newbie question
Hi for all. First, excuse my english ;) I'm starting to use JQuery, and I feel that will help me a lot. I build a class that can help anyone to make tabs without troubles, but I think it most be improved, and that is the ideal place to do that. So by the way, is there anyway to send that code for you? Thanks, Marcio
[jQuery] Loading image with $.get()?
I'm working on a sample gallery viewer app with 3 panes. Left = gallery listing, middle = album listing, and the far right = image viewer. I'm loading in the contents of each using jQuery. I've finally gotten to the far right one and I'm trying to load in the image using a get() call and it's not working. In Firefox I get the following error: [Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"
[jQuery] MooTools $events expando workaround
There was a recent flurry of emails on the list discussing a conflict with the use of MooTools in conjunction with jQuery. When MooTools released v1.1, they renamed their events expando to $events, thus conflicting instantly with jQuery. Well, Brazilian developer Alexandre Magno (http://blog.alexandremagno.net/) came up with a novel and quite simple solution to get around this issue; rename the $event expando in Mootools! "I found a solution that works perfectly. Im the live example that we need
[jQuery] [Site Submission]: nbc.com
<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Looks like nbc.com is heavily into the jQuery love now, using 1.1.4.1 on their site. Looks like they're using Interface and Mike Alsup's Media plugin, and Klaus Hartl's cookie plugin. Also, pulling in some data with $.ajax, doing some accordion stuff, etc.. They could be using the <DIV><BR class="khtml-block-placeholder"></DIV><DIV>This line appears in <A href="http://www.nbc.com/assets/js/global/nbc.com.js">http://www.nbc.com/assets/js/global/nbc.com.js</A>
[jQuery] problems with passing a value via ajax
Hi, I'm pretty new to this ajax, but have been trying to get it to work with ajax. What I'm trying to do is pass a value to a php script from a link and return it. So far, I can do that with the text of the link, but I can't seem to get how to pass either the string, or the id value.... <script type="text/javascript"> $(document).ready(function() { $('#action_link a').click(function() { $('#action_link').ajaxStart(function() { $(this).html("loading").hide(); $(this).html("loading").fadeIn('slow');
[jQuery] Alert not working
I just started learning jQuery. Could any one help me? I was following the jQuery tutorial, and the first one does not work. It is supposed to come up alert with Thanks fo visiting!. But it just go to a website without alert. <html> <head> <script type="text/javascript" src="jquery-1.2.1.js"></script> <script type="text/javascript"> // Your code goes here $("a").click(function(){ alert("Thanks for visiting!"); }); </script> </head> <body> <a href="http://jquery.com/">jQuery</a> </body> </html>
[jQuery] ANNOUCE: Easing Plugin Updated
Made some changes to the easing plugin, it now contains all of the Penner equations and has name changes for the easing types. I've done a compatibility plugin to ease the transition, but felt keeping the names consistent with the original equations was the way to go. http://gsgd.co.uk/sandbox/jquery/easing/ It also now properly doesn't overwrite the standard equations... Thanks, George. http://gsgd.co.uk/
[jQuery] Scope and Visibility from Callback
I want to create a 'closed' object (sorry, not sure what the right term is), e.g. var myObj = { foo : function() { $("#myLink").click(function(){ // How can I call the bar() method from here? What I would // really like to be able to do is call... // this.bar(); // But this doesn't work. // // The only way I can resolve it is by calling... // myObj.bar(); // Which doesn't make this class very flexible }); }, bar : function(){ } }; As indicated above, I want to be able to call another method in the
[jQuery] editing superfish dropdown menu css
Hi, I am trying to edit the css file, but no matter how I edit it it seems the changes doesn't reflect, is there something I should do first? Thanks james
[jQuery] Animating scrollLeft
Is there a way to take this scrolling functionality and use it as a plugin? I can't seem to find out where the functions for scrolling the page are in this example: http://docs.jquery.com/JQuery_1.2_Roadmap#Animating_scrollLeft.2FscrollTop Any help would be much appreciated
[jQuery] Dynamically Highlighted table rows
Hi I am a newbie in jquery. I want to know how to change table row color dynamically. Like i have to display result from the database. And there is a field in the database price. I have to show red color which rows price color is greater than 100.So how can i do this? is there any better plugin for doing this ? Thanks Saidur Rahman
[jQuery] jScrollpane - Occasionaly runs in IE? (init/load problem)
Hey all, LOVING jScrollpane at the moment, here is a page I'm working on. http://cressaid.brettjamesonline.com/bvci/plastek/products1.html The right area with the grey box is a scrollpane which will have a bunch of different things in it. If you view it in firefox, you'll see that the grey scroll bar comes up, works great :) However, on Internet explorer 6, the jScrollpane does not load... I get an error about an exception being not handled. But, the really, really hard to diagnose part? if I reload
[jQuery] JQuery AJAX with .NET - Limitations
I noticed the following problem in using jquery AJAX with .NET: NOTE: I don't have the below problems if I use AjaxPro, just wanted to do the same with JQuery. Is this is possible, or should I just stick with AjaxPro. 1) Cannot return a Datatable to the callback function [AjaxPro.AjaxMethod()] public System.Data.DataTable GetTestCaseById(int Id) { objTestCase.TestCaseCode = Id; return objTestCase.GetTestCaseById(objTestCase).Tables[0]; } var ResDataTable=Bubya.TestCase.GetTestCaseById(Id).value;
[jQuery] noob: input field focus help
I tried the following code, and I don't get the cursor to blink in input text field. Any idea why is that? <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('input[@type="text"]')[0].focus(); });
[jQuery] jQuery newsgroups? (nntp)
Is there an NNTP jQuery group out there somewhere? Are there any other forums or discussion groups other than this one, with equal or higher traffic? I find rapid-fire user groups to be the best possible asset for my way of deciphering new stuff... and I'm soaking up jQuery as fast as time will allow!
[jQuery] Noob click-change-click question re. parent class rules
I've been going through various tutorials and demos of jQuery, and finding my way fairly well, at least with the basics. To work my way through a few concepts , I put up a quick demo of a show/hide Faq-type system http://www.mredesign.com/demos/jquery-show-hide/ but as I did so, I had a question about changing classes that I'm hoping someone here can explain In this demo, I initially had any sibling element as clickable - so that any other element inside the 'offDiv' or 'onDiv' container would work
[jQuery] firebug error: $ is not defined
I just got the Learning jQuery book from amazon delivered yesterday. I am trying out the first chapter. When add the alice.js on the html file and open it into the browser, I get this error in firebug: $ is no defined my alice.js file has the following content: $(document).ready(function() { $('.poem-stanza').addClass('emphasized'); }); any suggestions to fix it and emphasize is not working as claimed by the book (no boxes..etc)?
[jQuery] $("#id").get() vs getElementByID()
Hello, This works when calling an external javascript library: var doodad = document.getElementById("plasma"); Drag.init( doodad ); And this doesn't: var doodad = $("#plasma").get(); Drag.init( doodad ); They both return [object HTMLDivElement] Am I missing something? Thanks, ml
[jQuery] Problem with binding mouseout to only parent div
I've got a menu that does the basic <a> links and shows a sub menu of divs with nested <ul><li>'s and other text dynamically with css and javascript. I'm migrating it over to jquery, and have it all working perfectly except for one thing. I am trying to get the menu to jump back to the tab that corresponds to the current page upon mouseout of the menu's parent div. My code is basically this: <div id="menuholder"> <div id="menu"> <div id="toptabs"> <a.. <a.. <a..
[jQuery] jscrollpane plugin problem
Hi, Kevin. We are using your plugin for a ul with news. Each new show by default the title and an abstract with a button to display the invisible part. This ul has a scroll pane. But, when the invisible part of one new is show and then the ul increase it height, the scroll pane doesn't change it height, and the new text overflow the ul, but below it. Is there a simple way to inform the scrollpane to refresh the height of the content inside it? or we have to recreate it? Thanks in advance Guillermo
[jQuery] jQ SqueezeBox - Expand All?
Hi, I thought I'd ask before digging and (poorly) hacking through the source - is there a way to get Jörn's Squeezebox plugin to 'expand all' with a single toggle? Sorta like the treeview on his API browser. We're using it for a folded FAQ page but want users to be able to expand all and use on page searching. Thank you, Will
[jQuery] Ajax Idea: Would like some feedback
I develop a tchat in ajax and needed to save some space in the json that comes back from the server, so instead of sending messages like [Name:Value,Name:Value,......] which can get quite big if you return a collection of 50-100 users with lots of info, i wanted something more like [Value,Value,Value] but still be able to acess the object in a normal way, and came up with this: <!-- start code --> //Simulate the json object var ref_data = {value:[["Marcel",31,"Paris"],["Karl", 15,"Germany"]],ref:["Name","Age","City"]};
Can I change the height of a div (not hide / show)
Hi All, If I have a div with a specific height: <div id="maingraphic" style="height:200px"> </div> Can I use jquery (perhaps .animate?) to toggle the height of that div from 200px to 450px, and then (upon a different click) back down to 200px? Thanks very much in advance!
[jQuery] Snippet of calculation between two date/time
HI, I know that I'm on jQuery's discussion list, but I'm tired of search for this. What i would like to know is if someone have a snippet of calculation between two complete dates (year,month,day,hour,minutes and seconds) Regards
[jQuery] Superfish Menu Problems - white space
Hello, I'm new to Suckerfish (and thus superfish) dropdown menus. I think I've got them figured out for the most part, but there's still one problem that bugs me. http://generationstudio.net/gbc/superdd/ When you hover over Our Ministries, parts of that image "disappear" and just leave blank space. How can I make it so there is no white space between our ministries and Bus Ministry, but also so it doesn't overlap? Thanks, Ryura
[jQuery] Forms with asp.net
Hi, Did anybody has tried jquery forms with asp.net? -- Sharique
[jQuery] Obscure ie6 error when appending iframe
Hey all, When trying to create an iframe on the fly and append it into the dom, I'm getting an error in IE6: "Expected ':'" (that's a colon). Works fine in FF of course. The basic code: var i = $("<iframe src='" + el.id + "' name='panelframe' id='panelframe'></iframe>"); $("#paneldiv").append(i); When I comment out the append part, it works fine, so it's not a problem creating the iframe node, just appending it. Anyone have a clue? Googling didn't turn up much. I'm afraid it might be a security concern,
[jQuery] Question about jScrollPane - full body scroll
In looking at the code for the full body scroll. I can not seem to understand one part of it. I am actually doing a couple of scroll panes in a page, that resize based on the window size, and am using the full body scroll as an example. I can not figure out what is going on in the line with the *** in front of it. Does anyone know what this is doing? Or how I would us it on a named div? $(function() { // this initialises the demo scollpanes on the page. $('#pane3').jScrollPane();
[jQuery] Speed issues when using jQuery on webapp
We've been using jQuery (1.2 since its release) with a webapp we're building, and it's all been plain-sailing, until now. We've got a table which uses livegrid to load in new rows. 2 out of the 4 columns contain elements which have events bound using livequery (so any new rows also get bound). When we get to more than say 20 rows, the app sees serious degredation in speed on FF (untested elsewhere), rendering it pretty-much unusable. Has anyone else come across similar issues? Are there any common
[jQuery] jshArea - JavaScript Hacking Area
Hello! Can I load the jQuery library in my jshArea? What is the best way? (thanks) Background: type this code in your browser address bar: javascript:function fun(){ var win = window.open(document.location); win.document.write("<html><head><title>jshArea - JavaScript Hacking Area by Davide Rognoni</title></head><body><form><textarea id='jshArea' cols='80' rows='18'>alert(opener)</textarea> <input type='button' value='eval jshArea' onclick='javascript:eval(document.getElementById(\"jshArea \").value)'></form></body></html>")
[jQuery] ajaxCFC and CF8
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;}
[jQuery] jqMultiselect extended
Some more modifications to the handy "jqMultiSelects" plugin by rob.desbois (http://code.google.com/p/jqmultiselects/) An additional optional parameter to define the mode as one of 'move' (the default, old behavior), 'copy', or 'remove' Created to allow duplication in the destination select box. An additional function "moveSelect" to move options up and down in a select box. Pass two paramters: id of select box, and either 'up' or 'down'. This function handles multiple selects, moving the selected
[jQuery] live query
Hi Im adding an element to Dom on fly, I then want to add an action to that element, i've tried live query but it is adding the action to ALL elements not just the one i referenced.: This is being added to: <h1><span>Clothing / Accessories »<a id="1_12" rel="sec" href="javascript:;">Tailoring</a></span></h1> which works fine, now im referencing the rel="sec" and adding an action the the click event: $(function() { $("a[@rel='sec']").livequery(function(){ $(this).bind('click',function(){
Next Page