[jQuery] Dynamic mailto: link.
Hello Guys, I have a 'mailto' link the emails of which I want to be dynamic based on a bunch of checkboxes. So lets say my markup looks like this: <input type="checkbox" name="UserEmails" value="someone@something.org" /> <input type="checkbox" name="UserEmails" value="someone@another.com" /
[jQuery] Javascript search library
I have a collection of DIVs (or a JSON array). Is there a javascript library that can search through a JSON array and return a collection of matched elements, and support advanced search with boolean operator? Thanks Khai
[jQuery] Cross domain call using JQuery
Hi, We are developing an application where it needs to make a call to other web site. I am getting security exception when i tried to call it using JSON. Could you please guide us? Thanks.
[jQuery] Current item child index ?
Hi folks Just wondering if there's a quick/shorthand way of doing this: I'm doing a navigation system where I want clickable items but I want to put the "current item number" in a footer, e.g. Any ideas of a quick way (without using each) to get "CURRENTSTEPNUMBER" ? Basically the reverse of nth-child ? CODE OUTLINE (IF IT HELPS) : <script> $("#stepsList li").click(function() { // load stepContent ===> not a problem $("#stepFooter").html("Viewing step "+CURRENTSTEPNUMBER+" of "+$("#stepsList li").length);
[jQuery] How do I extract XML CDATA?
I'm trying to display the description field from an RSS feed that I don't control -- the RSS feed inserts the contents as CDATA... <?xml version="1.0" encoding="UTF-8"?> <channel> ... <description><![CDATA[Has Chancellor Palpatine given the go ahead to execute Order 66 or is the TomTom lawsuit about nothing more than GPS?]]></description> ... </channel> If I remove the CDATA notation, the code below populates $summary with the contents: var $summary = $('<div></div>') .html($('description', this).text());
Moveable table columns
Before I try to put it together myself, I was wondering if anyone knew of a plugin to allow the columns of a table to be rearranged.
[jQuery] JQGrid Grid as subgrid not calling server-side program
I have been trying to get a grid as a subgrid to work for about a week now. When I click the plus sign in a row, I can see (via firebug) that the code relative to the subgrid gets run, but the server program doesn't. It's like it never calls the server-side program. If someone could take a look at my code to see what's wrong with it, I would appreciate it. $(document).ready(function() { var columnNames = ['Warehouse','Quantity','Value']; var columnModel = [ {name:'id', resizable:false, index:'id',
[jQuery] sorting w/ a hyperlink
Hi, I have a page where I've implemented the jquery function. Please check out here: http://www.grad.uiuc.edu/eep/srop/faculty/faculty_search_results.cfm?... My question, is how to make the 'Full Name' column sort by the Full Name value instead of the value of the URL hyperlink which is what I believe it's doing now. Here's the code I use to call the function: <script type="text/javascript"> $(function() { $("#myTable").tablesorter({sortList:[[0,0],[1,0], [2,0]], widgets: ['zebra']}); }); </script>
[jQuery] draggable events not working with 1.3.2 version
This code works with 1.2.6 version but not on 1.3.2. The UI library is the same on both tries. No errors are reported in the firebug console. Anybody got any idea? <script src="js/jquery-1.2.6.min.js" type="text/javascript" ></script> <script src="js/jquery-ui-personalized-1.5.3.js" type="text/ javascript" ></script> <script type="text/javascript"> $(document).ready( function(){ $("#test").draggable( { start: function( ev, ui){ $("#response").html("start");
[jQuery] jcarousellite slide widths issue
Hello all! I was wondering if anyone could shed some light on a problem I'm facing? I'm using Ganeshji Marwaha's jcarousellite to create a slide show of three (possibly more later) definition lists for client contact details. Each DL contains three contacts. Each DL is held within an LI which is a child of an UL which is a child of the containing DIV. eg1: <div id="carousel"> <ul> <li> <dl> <dt class="h1" title="Contact NAME AND DETAILS"><img src="/images/
[jQuery] Animate using relative %
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'> <html> <head> <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'> <style>BODY{font:10pt Tahoma, Verdana, sans-serif;}</style> </head> <body> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CA8EF4%7E1.JES%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if
[jQuery] Form Plugin ajax
Hi! I have a form and i submit it with the Form Plugin via ajax. My problem is that i have some inputs which are loaded on an action via ajax. When i submit the form the inputs which are loaded later will not be submitted. Has anyone any idea? Thanks a lot!
[jQuery] Web Based Inventory
Hello Members. I have designed Web Based Inventory System in ASP, I want suggestion and replies from experts about this sytem. For demo please visit www.thetimesoft.com. I am waiting your reply. Thanks
[jQuery] jQuery Form Plugin Ajax Problem
Hi. I have a form and i submit it with: $("#form_ajax").ajaxSubmit(); My problem is that some of the inputs are loaded on an action via ajax. When i submit the form the inputs which are loaded later are not submitted. Has anyone any idea? Thanks a lot!
[jQuery] Trying to change CSS values for .ui-tabs but....
I can change the properties that I need to change except the <a> color of the clicked tab. I've tried many combos, here is what I have. /* Tabs ----------------------------------*/ .ui-tabs {padding: .2em;} .ui-tabs .ui-tabs-nav { padding: .2em .2em 0 .2em; position: relative;background-image: url(/images/blackgradient.jpg);} .ui-tabs .ui-tabs-nav li { float: left; border-bottom: 0 !important; margin: 0 .2em -1px 0; padding: 0; list-style: none; background-image: url(/images/blackgradient.jpg); }
body css
Why doesn't the alert show #FF0000 (in fact it shows nothing): <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Dummy HTML Page</title> <script type="text/javascript" src="./Javascript/jquery-1.3.2.js">/script> <script type="text/javascript"> $(document).ready(function(){ alert($('body').css('border-color')); }); </script> <style type="text/CSS"> body
[jQuery] How do I translate this in jQuery?
<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 http-equiv=Content-Type content="text/html; charset=us-ascii"> <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
animate stop() resets css properties
I’m new to jQuery so this may be a simple fix. Maybe I can’t find a solution because it’s so elementary. I want to show and hide a UL (class=â€
[jQuery] varXy.find(':text') or $(varXy).find(':text')
<!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.2900.5726" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=777524309-05032009>Hi there</SPAN></FONT></DIV> <DIV><FONT face=Arial size=2><SPAN class=777524309-05032009></SPAN></FONT> </DIV> <DIV><FONT face=Arial size=2><SPAN class=777524309-05032009>thats an easy one for you ;-)</SPAN></FONT></DIV> <DIV><FONT
[jQuery] Need to insert an element in DIV at position X Y
Hi! I am trying to create a webpage where users can insert a pin (div) in between the text using context menu. My problem is that i do not know how to insert at the exact position. Using Dom's I can arrive only to the nearest DIV but a DIV contains a lot of text and the PIN has to be position close to the text. I can obtain the position of the mouse click using pageX and pageY but dont know how to insert an element at that position. I tried insertAfter, prepend, append but not getting the desired
[jQuery] Several star ratings on one page
Hello, I have a listing page with lots of items each having a rating using http://www.fyneworks.com/jquery/star-rating/. The first star rating works great but all the others on the page have issues with removing the hover class. I have found out that the reason for this is they all have the same name (although in different forms). Does anyone know of a fix? Dave.
[jQuery] nothing working in ie
hi, im relatively new in jquery and although my script works fine in chrome and firefox nothing seems to work in ie. i've used a couple of debuggers in ie and they both point to my document.ready() line. i've searched for trailing commas which i know can cause errors but didnt find any this is the script in the page $(document).ready(function() { $('.menu,.submenu').hover( function() { var fade = $(this); if(fade.is(".active")){ }
[jQuery] [validate] remote option needs "name" attribute, can't validate XHTML
Hi, using jquery validate plugin seems that I can't avoid to use the "name" attribute in the text field for the captcha. Actually the validate plugin's remote method allows to send custom data, adding a "data" object: remote:{ url:"captcha_ck.php", type: "post", data:{ security_code: function() { return jQuery("#security_code").val(); }
[jQuery] How to use anchor text as title attribute?
I want to generate title attributes from existing anchor text, e.g. <a href="foo.html">Foo Foo</a> becomes <a href="foo.html" title="Foo Foo">Foo Foo</a> The code below works in FF3 with Firebug reporting no errors, but Safari reports a parsing error. IE is no go. $('a').attr('title' , function() $(this).text()); adding curly brackets clears the parsing error in Safari but doesn't function in any browser. $('a').attr('title' , function() { $(this).text() } ); I must be missing something simple here.
[jQuery] script element added with XMLHTTPRequest
I added a script element with jQuery as <code> $j('<script type="text/javascript" src="http://domain.com/script.js"></ script>').appendTo("body"); </code> It adds the file correctly, however it uses AJAX or XHR to get the file and it adds _=1323131546 (some number, I guess to disable caching) to query the script. Is there anyway to disable this, ie call it normally as for other elements eg link (for css). ?
[jQuery] function executing twice
Hi there, Just getting started with javascript and jquery on a site im developing, however i cant figure a way around a function executing repeatedly. I have some code to open all links with rel='lesson' in a new window $('a[rel="lesson"]').click( function() { window.open(this.href, "_blank", "channelmode=0, directories=0, fullscreen=0, height=820, left=0, location=0, menubar=0, resizeable=1, scrollbars=0, status=1, titlebar=1, toolbar=0, top=0, width=1044"); return false; }); Now this works fine,
Underscore problem
Hi! I have the following codes: $("#Answers[0]_AnswerDescription").val("Teste"); document.getElementById("Answers[0]_AnswerDescription").value = Teste"; The Jquery code doesn't work, the js one does. Anyone know why? Many thanks!
Access Event object
Hi if i bind mousemove with anonymous function then i can access the event object by receiving it as a parameter to the anonymous function var pageCoords; $("#somediv").bind('mousemove', function(e){ //the event object here is 'e' pageCoords = "( " + e.pageX + ", " + e.pageY + " )"; }); but what if i do this $("#somediv").bind('mousemove', somefunc); function somefunc() { //how i can get event object here? //for example i want to do event.stopPropagation(); } how i can access the
[jQuery] ajaxError, global vs local event
Hi everybody, while I was writing my heavy-ajax-loaded app I noticed that while I can subscribe to local ajaxError events simply by specifing this within my $.ajax() settings object: 'error': function (XMLHttpRequest, textStatus, errorThrown) { // typically only one of textStatus or errorThrown // will have info this; // the options for this ajax request } (http://docs.jquery.com/Ajax/jQuery.ajax#options) I can't do quite the same with a global ajaxError, altought the documentation says: ajaxError
[jQuery] how to add callback in the $.ajax ?
Hi, can i have callback function on the $.ajax ? I don't want to use async since it will block the browser ... so can i use callback instead ? I would like to have function that return json like this function getGoodsDetail(id,member){ var result ; $.ajax({ type: "POST", url : "/goods/detail/", data : "id="+id, dataType: "json", async:false, success : function(data){ var price = 0 ; if(member == 'Y'){ price = data.priceMember ; }else{ price = data.priceNonMember; } // I want to return data to user
[jQuery] missing ; before statement
I worked and begged on IRC all do to get this code: <script language="javascript" type="text/javascript"> $(document).ready(function(){ $.fn.addTocHandler = function ( ) { $("#toc").change (function () { $("#book").load("/beta/catalog/extras/class_data.php? products_id=1&chapter_id=" + $(this).val(), function(){ $(this).addTocHandler().fadeIn(); }); }); return this; }); if(undefined===window.chapterList){
[jQuery] jquery .data() not sure if I'm using this properly
I'm trying to figure out how to set and retrieve data without putting it into a class, element, or anything else visible, and in the dom. My site is integrating Facebook connect, and sometimes if a user hasn't logged in, I bring them to the login, but I'm trying to remember what function would have run if they were logged in so that I can call that after they login. currently i set the data like this [code] jQuery('ul#otherLogin').data('selectForLogin','getTracked'); [/code] i then later try to get
[jQuery] [jQuery Sifr Plugin]
This is the one by Jonathan Neal. I first found and tried to use this plugin with jQuery 1.3 and it was a no-go. I couldn't figure out why it didn't work, until I backed up to jQuery 1.2.6. Just in case someone else runs into this, I thought I'd mention it here. I have submitted a note to Jonathon. http://jquery.thewikies.com/sifr/
[jQuery] html data in IE
I've been struggling with IE for a few days now, and looking through the HTML check in debugbar, it shows that IE would throw an error on every .html('<div>....</div>'), so I took any place where I had the html defined within the html(). I put the html into a javascript variable, and then it told me that the closing / was an invalid character. So I commented those out with \/. My question is, should I have done this? I can still back out of it, though it doesn't appear to be causing any problems
Uploading image into a mysql library?
Hi, as you will see from my user account, I am a noob, so please be patient with me here. This is conected to my table question I just asked. I have a mysql database with php5 to address it. I am urently working on a form to create/update entries in this database which aside from text lines include image files. Would you recommend uploading the image file directly into the mysql database or just storing the relative link to the image file there and storing the file itself in some designated folder
[jQuery] Exception errors when using validation rules
Hi everyone, i'm getting a weird exception with 1.3.1 please see the video link to watch what happens. http://screencast.com/t/4Ih9rhKwZP and if you don't watch the video i'm doing an ajax submit but it's refreshing the page and throwing the error exception: [Exception... "'Syntax error, unrecognized expression: [@for='license']' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no] jquery var container =
Best practice for tables with sorting/filtering?
Hi all, I have to set up a table of information that has to be both sortable and subject to filtering. Sort of like the first example on this page: http://www.javascripttoolbox.com/lib/table/ What bugs me a little is that this solution seems to be out of active development and also I'd like to minimize size bloat and conflicting code issues and stick to jquery as much as possible. Anyone have a suggestion for this? I've looked into the Ext library which is very pretty but seems extremely slow with
[jQuery] jquery validation with added method
i've added this to the top of my page jQuery.validator.addMethod("pCode", function(value) { // Addon method for validating postal codes. Valid formats are (X1X 1X1) or (X1X1X1) or (X1X-1X1). return value.match(/^[a-zA-Z][0-9][a-zA-Z](-| )?[0-9][a-zA-Z] [0-9]$/); }, 'Please enter a valid postal code'); pCode works great. But when I try to put a conditional statement like this: $(myself).find("form").validate({ rules: { postalCode:
[jQuery] [Cluetip] Anchor text as title
At present I'm triggering Cluetip thus, with Cluetip using the anchor title attributes for tip titles: <a id="content-1" href="#content-1" rel="#content-1" title="Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore</a> Is there a way to skip the title attribute and instead use the anchor text for the Cluetip title? i.e. <a id="content-1" href="#content-1" rel="#content-1" >Duis aute irure dolor
More than one DIV
I'm having troubles with a div tag. I want the second tag to show an alert when I hover it - but it's not happening. Any ideas? <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function() { $("body").append('<div id="divOne">A</div>'); $("#divOne").mouseover(function() { $("#divTwo").remove(); $("body").append('<div id="divTwo">B</div>'); }); $("#divTwo").mouseover(function() { alert("alert!"); }); }); </script>
Next Page