[jQuery] Something changed from 1.2.2 to 1.3.2 with hashes
Hi everyone, I have the following problem with the latest jQuery version. Thanks already to anyone wanting to help me. With jQuery 1.2.2 I could get a targets hash like this: var $target = $(this.hash); Sometimes, people use just href="#" to get to the top of page and not href="#header" (or similar). Hence, if it was just a #, I considered it to have an undefined target. Now to check whether the hash is undefined or not, I used the following: var $defined = $target.length; Now if the hash was undefined,
Refer to Object's property inside $.each()
function JGallery(){ this.name="defaultGallery"; this.images=[{//some JSON here}] this.render=function(){ $.each(this.images, function(imageIndex,image){ //i want append div with id of the name property of jgallery class $("<div></div>").appendTo("#container").attr("id",this.name); ); } I've tried to debug it in firebug, but I guess there is a problem with the scope of the 'this'. The 'this' in //i want append
thumbs up/down or yes/no rating
HI, I would like to create a thumbs up/down or yes/no like rating using jquery and php/mysql. I want to show two images and then when clicked, would like to display "thanks" and then store the value along with the page id(from the url) in the mysql db. Rating can be allowed only once for that id from one ip. I am assuming i can set a cookie or store the ip address and validate if that ip and the page id is already there. Pleae help me out with some tutorial or other guidance. thanks
[jQuery] IE Issue :: sorry attached attachement
<div class="gmail_quote">Hi Jack, I downloaded JQuery 1.3.2 and jquery.min jquery.colorbox-min jquery.colorbox and colorbox-ie.css colorbox.css i am only using below two scripts for modal popup <script type="text/javascript" src="Includes/Js/JqueryJs/jquery.min.js"></script> <script type="text/javascript" src="Includes/Js/JqueryJs/jquery.colorbox.js"></script> and function calling is $(document).ready(function(){ var addvalue=$("#hdnUrl").val(); $("a[href='"+ addvalue +"']").colorbox({width:"500px",
[jQuery] hoverIntent mouseover on page load
I'm using hoverIntent to trigger flyout submenus. Works well, but I'd like to trigger the submenu from the mouse position when a new page is loaded. So, for example, your mouse hovers over a link in the main menu, and the display of the corresponding submenu has been triggered. If you then click on the link you're hovering over, when the new page is loaded the menu (and submenu) should ideally come up in the same state. Presently the page comes up uninitialized, and in fact you need to pull the mouse
[jQuery] [autocomplete] change ?q= to predefined param name or get field value for extraParams call
Is there a way to change the ?q= parameter name to something that was predefined by the JSON emmitter? For example, Lotus Domino expects the querystring to be of the form "?Startkey=... ". Alternately, I can put that query in the extraParams call, but how do I populate the value portion of extraParam? Is there a(n efficient) way for me to accomplish what the autocompleter is accomplishing internally with its lastWord($input.val()) call?
[jQuery] [Validate]: Exception thrown by validator.
We recently did an update on our website, http://www.equanet.co.uk with a design refresh and an update to the library of javascript. We upgraded jQuery to 1.3.2, the validator to 1.5.1 and various other libraries and plugins to their latest version. Doing this seems to have broken the validator, when an invalid value is entered an error class is still added to fields, but an error message doesn't appear in the accompanying label anymore. Worse, submitting invalid forms is no longer blocked. According
Need help with string join
Hello, I have this so far, $(function (){ var checkIt = $('.myMessage').append( $('.myInputst').map(function (){ return $(this).val(); }).get().join(", ") ); $('.myOutput').append(checkIt); }); which takes the value from 2 form fields and joins them into a string. Which outputs the following: 4561, 1, 3345, 3, 3300, 1, 444, 2, 5567, 1 Is there any way that I can adjust the code to output a string like this: 4561,1;3345,3;3300,1;444,2;5567,1; Any help would be much appreciated,
[jQuery] [treeview] No event on node after add node.
Hello, I'm french, sorry for my English, thank you google translation! ;) I'd like to make ajax calls to load sub-nodes in my treeview. I have the following tree: Tree HTML : <ul id="tree"> <li id="1"><span>Item 1</span></li> <li id="2"><span id="item-2">Item 2</span></li> <li id="3"><span>Item 3</span></li> </ul> Method JS : $("span[id]").click(function() { var toto = $(this).parent(); if (toto.find(">ul").length == 0) { var id = $(this).attr("id").substring("item-".length); $.post("/Export/GetChildItem",
[jQuery] Jquery plugin validation remote option
$(document).ready(function() { var valprod = $("#frmProduct").validate({ onkeyup:false, rules: { txtProduct:{ required: true, minlength: 4, productCheck: true } } }); valprod.resetForm(); }); jQuery.validator.addMethod('productCheck', function(productname) { var postURL = "product/confirm_prod"; $.ajax({ cache:false, async:false, type: "POST", data: "txtProduct=" + productname, url: postURL, success: function(msg) { result = (msg=='TRUE') ? true : false; }, }); return result; }, 'Record Found' );
[jQuery] .autoComplete/.autocomplete is not a function
Good day! I am using jQuery 1.3.2 with the autocomplete 1.2.5 plugin, however, I keep on getting "$(#id_here).autcomplete is not a function" error. Here's my code: <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript" src="jquery.bgiframe.js"></script> <script type="text/javascript" src="jquery.auto-complete-1.2.5.js"></ script> <script type="text/javascript"> var data = "prod_list.php"; $(document).ready(function(){
[jQuery] search by (Filter by name,age,date ) any plugin in jquery
<br clear="all">Hi all , My requirement is search by filter , So is there any search with selected option plugin , Also can u please tell <select name="cmd_select_category" id="cmd_select_category"> <option value="any">Any word</option> <option value="date">Date</option> <option value="age">Age</option> <option value="subject">subject</option> </select> <input type="text" name="txt_search" id="txt_search" > <input type="submit" value="Search" onClick = "search_keyword('cmd_select_category','txt_search')">
Draggables not working
I have set up draggables on a test site and although the class ui-draggable has been added, they can't be moved. *link removed* I have tried updating jquery ui and changing which container is draggable with no success.
Window Width in Chrome changing within Plugin
Hi Guys I have created a plugin which i have cut down to the bare bones of a plugin (i.e. no functionality, just the structure) to debug this issue and it still exists. It deals with resizing divs and bases this on the document's width. The problem is that the documents reported width is reduced by 17px from its actual width and thus doesnt size the divs correctly. I have put in alerts to find out where the problem occurs: Before "ready" function: 1780px (correct width) Inside the "ready" function:
[jQuery] adding $("<script>") node actually runs the script - correct behavior?
If I have a node that isn't in the DOM, and then I add a script to it, then it is actually executed. Example Expected behavior : s variable contains the string "<script>alert('hi') </script>". Observed behavior : alert box pop up and s contains "" <script> var s = $("<span/>").append($("<script/>").text("alert('hi')")).html() <script> You can see it running here : http://paulisageek.com/tmp/jquery-script.html Am I doing something wrong? Can I not write javascript from within jquery?
[jQuery] non-recursive find?
Hi, I parse XML with JQuery and my XML looks like this: <record> <NodeType_1> <NodeType_2/> </NodeType_1> <NodeType_2> <NodeType_3/> </NodeType_2> <NodeType_4/> </record> I need to group first level of nodes by their types according certain rules. So I have now something like this: Nodes_A = $(xml).children().find("NodeType_2,NodeType_4"); Nodes_B = $(xml).children().find("NodeType_1,NodeType_5"); The problem is that find is recursive and I only need the first level. Is there a way to do this with
[jQuery] Negate a validation checkbox
Hi all, I have checkbox that if the user check it, the near tetxbox is no more required. In the "normal" case, I have: myTextbox: { required: "#myCheckbox:checked" }, How can I negate this? Simply speaking, get the tetxbox no required if the checkbox is checked. Thanks in advance. Luigi
[jQuery] problems with ajaxSubmit and files when file(s) not selected
Hi, I am kind of successfully uploading files using ajaxForm/ajaxSubmit and POST. My form has a file input (I am actually using jquery.MultiFile.js) and some text inputs e.g. <input type="file" maxlength="1" class="multi" id="image" name="image" accept="gif|jpg|jpeg"/> <label for="fax" class="label">Fax:</label> <input type="text" size="50" maxlength="50" name="fax" id="fax" class = "input-box"/> Here is some code javascript (tried to fiddle with sent data -> beforeSubmit - no success): $('#frm_submit_btn').click(function()
[jQuery] jqModal hash undefined
Hi, I'm having problems with hash $("a.iwmodal").live("click",function(event){ event.preventDefault(); var target = $("#infowindow"); target.jqm({ ajax: $(this).attr("href"), trigger: $(this), modal: true, overlay: 60, onLoad: modal_options, onHide: function(hash) { hash.w.fadeOut("200",function(){ hash.o.remove(); target.html(""); });
[jQuery] Can't get JQuery to work, Pls Help
Hi I'm using Eclispse for a small project and trying out Jquery for the first time. I have downloaded the jquery-1.3.2.min.js file and reference it as i should in my page, However the script does not seem to work and I get a firebug error '$ is not defined'. The jquery-1.3.2.min.js file is in the same directory as as my webpage. This is the following code I'm trying to run. <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD
[jQuery] is it possible to add elements to validate on fly? [validate]
My form has multiple elements like Name[] , which added via AJAX call. And I want to add them to validation check. How can I do it?
[jQuery] Javascript error on IE
Hi, I got the following error when I render the page using jquery-1.3.2.min.js Line: 20 Char: 2424 Error: Exception thrown and not caught Code: 0 URL: ... I then replaced it with jquery-1.3.2.source.js and the exception was thrown at: Sizzle.filter = function(expr, set, inplace, not){ <snip> // Improper expression if ( expr == old ) { if ( anyFound == null ) { throw "Syntax error, unrecognized expression: " + expr; } else { break; } } <snip> } Any ideas? -Aaron
[jQuery] Exclude single <td> from whole <tr>
I found a good solution to make a complete table row clickable: <tr link="/folder/here.php">..... $("tr[link]").bind("click", function(){ var link = $(this).attr("link"); window.location.href = link; }); Only problem in my case: My tbale has as first <td> a checkbox to select my products. How can I change the jquery above to exclude a <td> containing a <input type="checkbox"....>? Is there a way? Thanks!!
[jQuery] Border around every character?
Hi, I would like to put a border around every character in sentence... Is there an optimal way to do this with jQuery? I have an ideas as to how to do it (involves generating spans), but I would love to hear tips from the pros!!! Thanks! :) M
How to initially position a draggable
Hi, I have a div which I have made draggable. The div only appears once a button is clicked. Depending on how the user has scrolled the page, if the button is near the bottom of the page, the div is appearing below that. I'd like to be able to always set an iniitial start position of the div so it's in the middle of the page, similar to how it seems the dialog boxes are. Is there an easy way to do this? Thanks, Steve
[jQuery] Best book to learn jQuery?
Just wondering what your opinions are on the best book out there, for a beginner, to learn jQuery? I know HTML and CSS well enough, but have no javascript knowledge. Thanks
jQuery .ajax nightmare
Hi all, speaking from the tongue of the inexperience. Environment: ASP.NET MVC Method: Access list of objects thru controller (returned JSON format). I've got 5000 records and a custom grid made in jQuery. Using .ajax method of jQuery works fine for me, but when my paging is done and do the testing of it. It seems to me that everything stops at exactly the tenth page (size 50 items per page). Here is my ajax calling scripts in jQuery: var execute = function() { $.ajax({
[jQuery] JQuery Slide Panel
I want to use a sliding panel at the top of my page. I can do that, but I also want to include inside that panel an interactive Google Map. I can do the code to get it there, but it doesn't work quite right. The map loads but there are pieces of it that are flaky or not there. The map seems to work, it just doesn't display properly. Does anyone know how I can work around that? -- View this message in context: http://www.nabble.com/JQuery-Slide-Panel-tp23616858s27240p23616858.html Sent from the jQuery
[jQuery] can't set body in open.window("some-page.php") in FireFox
Trying to set the body of a document opened with window.open as follows: print-preview.php: <!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> <title></title> <style type="text/css" media="all"> @import url("/css/reports.css"); </style> <style type="text/css" media="print"> @import url("/css/print.css"); </style> </head> <body></body> </html> jquery: $("#print-preview").click( function()
[jQuery] 2 Dynamically Ajax Loading jCarousel on the Same Page?
Hi Guys, I was wondering whether anyone could provide an example or some code how to get 2 dynamically ajax loading jcarousel on the same page? There is a static example - http://sorgalla.com/jcarousel/ - but this is straight forward. Wondering if anyone can assist with how it would be done for 2 dynamically ajax loading ? Thanks
Accordion quesiton
I was wondering if it's possible to have an accordion with say 5 different main menu links all with five different colors and have the corresponding sub menu items of those 5 be the same color as the main menu. all while keeping the hex value on while you're in that section.
[jQuery] jQuery cool down timer to simulate a World of Warcraft style action button icon.
Does anyone know of a plugin to simulate a World of Warcraft style action button icon's cool down timer? If no plugin can someone point me in the right direction on to accomplish this? I am very new to jQuery and JavaScript, but I am familiar with general programming. For those who are not familiar with WOW the action bars are the icons along the bottom of the screen that you can activate to use different abilities. When one is activated it kind of "grays-out" the button with an translucent overlay
Draggable after Ajax
So I'm pretty much doing this tutorial: http://yensdesign.com/2008/12/how-to-load-content-via-ajax-in-jquery/ But the new content that's loaded in needs to be draggable. I looked at the stickie post that said Livequery might be able to solve this, but I don't really know how to code it. If Livequery is the way to go with this, could someone help with the syntax, and if it's not, point me in the right direction? Here's my drag function (I can post more of my code, html, etc if necessary): $('#sword,
[jQuery] Web dev problem face to face with JAVA J2EE Dev's
Hi all, my problem is quite, I have to admit it, confusing. My client has a couple of JAVA hardcore coders, but obviously none of them understands the concept of ajax (not so hardcore now, huh ? ...). As myself am not confident with the JAVA/J2EE/STRUTS concepts, I'm trying to find out a way to explain to them what I need as an output from a request for Jquery to work with. In simple words, what do they need to output for my client-side Jquery scripts to understand, and how do they format server's
[jQuery] Move element to parent div
I'm trying to move a set of divs into their parent elements. Currently I'm using: jQuery('.mydiv').each(function(){ jQuery(this).prependTo ('.mydivcontainer').remove(); }); this works somehow, but the problem is that all elements on the page with class .mydiv are inserted into each .mydivcontainer element. to avoid this, I tried prepending .mydiv to its parent; jQuery('.mydiv').each(function(){ jQuery(this).prependTo(jQuery (this).parent('.mydivcontainer')).remove(); }); but for some weird reason
[jQuery] Jquery slideshow help
Hi, I'm hoping someone can help with this (seemingly simple) project! My test page is up at http://tinne.pair.com/ong/jqtest/index4.html http://tinne.pair.com/ong/jqtest/index4.html The desired behavior: there are six "rotating" images, that are just supposed to cross-fade over one another (all these images in my test say "Machining. Re-imagined" across the bottom). Additionally, there are six "mouseover" images, one for each link at the bottom of the image. When a user mouses over one of these,
[jQuery] XSLT problem in JQuery
Hi I am using jquery xslt plugin and the problem I am having is that when I perform xslt i.e $('#outputDiv').xslt('PPPoE.xml','PPPoE.xsl'); </b> the browser continues execution of the lines following this line(ie xslt line) and when the execution is finished it displays the xslt result. I want that the xslt to be performed at the time of call and not at the last, since eqCol() method is called and it adjusts the height of #rightCol making the output half visible. I can set the height of #outputDiv
jquery menu on Rollover instead of click
I can't seem to figure out how to properly change my dropdown menu to work on rollover instead of on Click. When I change this to .hover I get a yo yo effect. Could you guys point me in the right direction? sample: http://www.creativemagma.com/whitney <script type="text/javascript" src="scripts/js.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("li.amenu").hover(function () { $(".active").removeClass("active"); $(this).addClass("active");
how to target id of div that was clicked
Hi there, I have a func: $('div.tabnav ul.tabNavigation a').click(function () { this.hash e.t.c //Is there a way to find out the name of the div or jquery id that was clicked. E.G so I can go ( in pseudo ) if(nameofelemtnclicked == "one") { getelemtbyid(thename).style.display='none'; } }
Selecting <p>'s after each <h3> (for an accordio
Hi, First time here, thx for helping me out! For a redesigned website we started to use accordions instead of long pages of text. Our current html: <div id="content"> <div id="flash" style="border: medium none ; position: relative;"></div> <h1>Reisinformatie</h1> <div> <h3>Title</h3> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin pellentesque, est ut venenatis aliquam, lorem quam porttitor ligula, eget ultrices velit dui sed quam. Praesent vehicula placerat lectus.
Next Page