[jQuery] Trouble in Table sorter
Hi, I am using table sorter for sorting my table. My table has a numeric value like 0, 1.5, etc. and it also has text like 'No data available'. When desc sorting, it generated 1.5, 0, and "No data~~", but when asc order, it generated 0, "No Data~~", 1.5. Anybody knows the reason? If so, please show me a example. I use tablesorter 2.0.5 version. Thank you in advance.
Function Optimization w/ jQuery
Hey, I've been reading the jQuery documentation and trying to improve this function and its siblings, however I'm running into all sorts of syntactical problems when I make changes past this point. For example, I know there is a better way to write document.getElementById(id).style.display = 'block'; and alternatives to the conditionals I used, but any attempts I make just seem to break it. Any insight into this issue would be appreciated, thanks! showTab: function(o) { if (currentTab)
[jQuery] MultiSelect Name Problem
Hi, I'm a newbie to Jquery. I wrote the following function for multi select var quantity =0; $("#parameters").click(function () { var qty = 0; $("#parameters option:selected").each(function () { qty = qty+1; }); $("#qty").val(qty); return qty; }) and the multi select list box with the following code <select name='parameters' id='parameters' multiple='multiple' > <option value='2' >value2</option> <option value='1' >value1</option> <option value='3' >value3</option> </select> This
[jQuery] tabs postback problem
Hi all, i am beginner on jquery framework.I want to use jquery tabs script and i did.But on my form i click my postback button tabs reloaded.My button in 3. tab and reloaded 1 after postback How resolve this problem?
[jQuery] Using jquery to construct menus like nbc.com
I'm trying to utilize jquery to construct a menu structure that is similar to what you see at fox.com and nbc.com. Basically I have a menu that is a ul list, with each li selector given it's own id. Below I have a div container for each menu item, which are set to be hidden by jquery upon load. I've been the mousever/mouseout actions to trigger turning each div container on/off, but the problems I'm encountering with this are 1) it works when hovering over the main menu selection, but not when the
[jQuery] tabindex for beginners
Hello I finally managed to make jquery work for me. I want to set all "input" tabindex to -1 (not selectable by tab key). This is what I wrote (taken from the source of an example) <script type="text/javascript"> $(document).ready(function() { // set tabs $(':input').each(function(i, e) { alert("<" + this.id + ">"+ " TABINDEX= <" + $(this).attr ('tabindex') + ">" ); $(this).attr('tabindex', -1); alert("TABINDEX AFTER = <" + $(this).attr('tabindex') + ">"); }) }); </script> The 1st alert shows me
[jQuery] table striping performance with livequery
Hi all, ive just started using jQuery, and also the livequery plugin I set up jQuery to automatically stripe a table, and also do a mouseover to highlight the current row. This works nicely, but I wanted to use it inside of a tabset which loads its pages dynamically To do this I started using livequery to bind the events after the tab is loaded. Ive noticed the performance of the row mouseover row highlight is now pretty poor, and wondered if Im doing something wrong? Pretty trivial code.... $(document).ready(function()
[jQuery] jQuery Game Attempt
Hi all, We've attempted to write a game in jQuery and learnt a lot doing it. We started with a base of gameQuery (http://gamequery.onaluf.org/) which makes most of the collisions/sounds etc possible. http://www.vertigo-project.com/projects/redline-game -- any opinions / suggestions welcome. One issue we've been having is with performance - older computers struggle with the scrolling and we get pauses etc - any performance tips would be welcome! Thanks Dave
[jQuery] get all children and subchildren
how would you write the code to get all children and sub-children that are of class menu_head and menu_body? example this would be my html <p id="header2" class="menu_head">Header-2 <div id="header2_menubody" class="menu_body"> <div id="pane" class="menu_list"> <p id="submenu" class="menu_head">Sub-Menu <div id="submenu_menubody" class="menu_body"> <a id="submenu_sublink1" href="#">Sub Link-1</a> <a id="submenu_sublink2"
[jQuery] jQuery XHR problems with safari 3.2
Ok, I've tried a number of grids including flexigrid, and jqgrid, and both fail to load via ajax, and json... I know things are next to impossible to troubleshoot, but the developer menu stuff shows error on line 2699 of jquery-1.2.6.js and the error is permission denied. Both grids worked flawless in chrome, ie, ff but safari on mac broke. Any ideas?
[jQuery] ajax post variable error in safari/chrome
I know this is kinda weird, and I can't seem to find where the issue is. i've been working on a tag cloud for my site hearwhere.com and everything works from FF/IE, but safari and chrome won't let me pass a multi-word variable into my query. You can test it out at http://zifimusic.com/v3 The single word genres from the tag cloud work no problem, but the multi-words (like 'folk rock') always return 0 results in Safari/ Chrome but return a number of results in FF/IE. I've output the query and copied
[jQuery] form field change to hide and show page elements
I am new to jquery and am having a hard time figuring out this problem. I want to hide certain table rows containing form fields when a page loads and only show them when the rel value in a select option equals the rel value of the table row. The first part is simple $(function(){ $("tr[rel]").hide(); }); The rest I'm not sure about. I tried this: $("select").change(function () { $(("tr[rel]").val() == ("select").val()).("tr[rel]").show(); }); but nothing happened when the select fields were
[jQuery] jcarousel extension suggestion
I've some pages which have quite a lot of content and the client wants some kind of "loading animation" to be displayed while the page loads. I fiddled around with a few ideas but wasn't very happy with the results. I realised that it'd be best to just extend jCarousel to allow it to hide the widget and display a "loading" image until the page has entirely loaded. This might be particularly helpful if you're using jCarousel in conjunction with Thickbox and the content for that is all inline but hidden.
something like wait();
hi there. i have code: $('div.adv-form') .slideUp(75) .prev('a').removeClass('adv-open'); what i need to do, that rule: .prev('a').removeClass('adv-open'); was start only when .slideUp(75) will finished? tnx u
Problem with functions and objects
Hello, i'm having a problem when i try to pass a object to a function the code is: var $tr = $(this).parent().parent().parent(); $.post("url.php", function($tr) { $tr.remove(); } But it just don't works, i think the solution is not hard, but i just try all that i know and nothing. Thanks for the help and sorry for the poor english
[jQuery] Replacing document.getElementById()
Hi, I'm trying change all instances of "document.getElementById()" with the jQuery's DOM traversal syntax, however it breaks it everytime. A simple example is this function: rm: function(){ var m = document.getElementById('discountMonth'); if(m) m.selectedIndex = 0; } If I change "document.getElementById('discountMonth');" to "$ ('#discountMonth');" or any variation of that it breaks.(I tried single and double quotes as well as attempting to get the element by class and so forth with no luck). The
[jQuery] get top most parent
hi, i am stumped so i am posting it here. no luck searching google for many hours this is my html code <div id="firstpane" class="menu_list"> <!--Code for menu starts here--
[jQuery] Best way yo get the type of matched elements
Hello, I have a simple problem - what is the best syntax / way to get the DOM type of a matched element? I am unable to find this in the docs... Example: <div class="aaa">Some Text</div> <span class="aaa">Span Text</div> <form> <input type="button" class="aaa" /> </form> How can I get the types of matched elements - $(this).val().type - below - reports "undefined" - but I would like to get "div", "span", "button", etc: $(".aaa").each(function() { alert($(this).val().type); }); Thanks in advance for
[jQuery] UI tabs with embedded layered images?
Hi all, I've created a tabbed interface using the jQuery UI Tabs plug-in. Very easy and cool. Now I'm trying to do this in *each* tab: 1) Create a set of checkboxes that, when each is checked, will superimpose transparent images (different z-indexes) on top of each other. Multiple checkboxes need to be active at the same time. Changing tabs changes the different images. 2) Possibly create a "zoom-in/zoom-out/pan" feature on top of each image. 3) This whole interface must be self-contained and be
[jQuery] What I am I doing wrong? This should be quick.
// when the mouse is hovering over the category link $("#menu li a[id]").hover(function(){ // hide the default image and description $(".js_off").fadeOut("fast"); // display the slide show section whose class matches the category link's id var cat=$(this).attr('id'); $("div.slideshow."+ cat +".ns").fadeIn("fast"); // when the mouse leaves that category link },function(){ //hide the class $(".slideshow").fadeOut("fast"); // display the default image $(".js_off").fadeIn("fast");
Help with Accessible News Slider using jquery
I am new with Jquery and found this script "Accessible News Slider " Online that uses Jquery to display scrolling content, developed by reindel. I have implemented it on my site and works well but I need to have four items show at once and not just two (4 items arranged 2 by 2). Is there anyone who can assist me?... The link to the script is here : http://www.reindel.com/accessible_news_slider/
[jQuery] How can i do Image rollover with simple gamma change?
I would like to have an image rollover with just basic gamma change to highlight an image...can this be done with basic jquery?
[jQuery] Callback on $.Post not firing
This is driving me loopy. Simple post, trying to get a result back from the server. Heck even copied it from the documentation and the callback just will not fire, but the post works fine: var answer = confirm("Delete Selected?"); if (answer){ $.post("test.php", { name: "test" }, function(data){ alert("popped off!"); alert(data.name); // John console.log(data.time); // 2pm }, "json"); } PHP: <?php echo json_encode(array("name"=>"John","time"=>"2pm"));
[jQuery] [validate] adding different class for only 1 error element?
Hi, i would like adding all errors the call .inlineError ... Simply done with $("#UserAddForm").validate({ errorClass: "inlineError" } }); Is it possible adding to one Element the class .error, all others .inlineError ? Regards, AxlF
[jQuery] Converting javascript to a jquery plugin
Hi, I was asked to convert some javascript into a jquery plugin. I've followed the documentation for authoring a plugin at http://docs.jquery.com/Plugins/Authoring I've also followed other instructions found on the web. Currently I have my code working with respect to this, but largely the javascript code is still exactly the same. I was wondering if there was more I could do with jQuery with respect to this code. here it is... (function($) { var tabHighlightClass = 'tabon'; var currentTab = 'hotel';
[jQuery] Is my style of writing jQuery plugin correct?
Codes... jQuery.test = function(val) { jQuery.test.foo = function() { alert( "foo" + jQuery.test.bar() ); }; jQuery.test.bar = function() { return "bar" +val; }; jQuery(document).ready(function() { jQuery.test.foo(); }); }; // To use <script> jQuery.test("Tom"); </script> Is my style of writing jQuery plugin correct? Thanks for comments...
[jQuery] Capturing Tab and enter key at document level using JQuery
Hi, Could anyone of you suggest the best way to capture tab and enter key at document level using JQuery? Thanks in advance for your help
[jQuery] jquery tablesorter and exclude <a href from sort
Hello, I have just started to use the jquery tablesorter and really like it. Since I'm really new to jquery can someone tell me if there is a parser or something that will allow me to sort a column which has "<a href..." in it. Thanks, tom Example... <td><a href="index.cfm?groupinfo=#name#"><img src="images/info.png" height="16" width="16" align="texttop"></a>#name#</td>
[jQuery] .click vs. .bind
Hey All, What is the main difference between using .bind() and .click(), when I was reading up, it was mentioning it removes event bubbling? Thanks, Ryan
[jQuery] Design question
Hello Everyone, I am new to jquery and am using it in a project to develop a PHP based Mysql report generator. My question is not 100% jquery but more on application design? I have a bunch of list items that I can drag and drop (thanks to jquery) on to a workspace - on dropping I create a <TH></TH> elelment with the value of the list item and an image which has a .click() attached with a call back to a remove(). - This all works as expected and really demonstrates how after just a couple of hours
[jQuery] Click off a div and have it disappear
Hi guys, Since this is my first post I thought I'd introduce myself - I'm Mike, working on a web startup in London. We're using jQuery (because it's awesome!) for all of our JS needs. However, I'm having a bit of a problem with creating a clickable menu. In particular, I'm trying to open a menu pane by clicking on a graphic (a button). After the button graphic is clicked, it is replaced and then an additional div is added below which contains a ul element, with the child li elements. I want the menu
Splitter Plugin resize objects
Hi, looking for help with the JQuery splitter plugin. I have a div that is split into two DIVs - just like the demo on his webpage http://methvin.com/jquery/splitter/ The top DIV has an HTML Object that is a Flash movie (a Flex datagrid) The object resizes left and right fine, but not up and down. In fact it maintains the full height - so the vertical of the div is not resizing. Any ideas? Am I missing something simple here? Thanks in advance!
[jQuery] next() in a function
I'm having some trouble with next() and after reading through the posts I don't think it's similar to what has already been posted. The ideal behavior that I'd like is for the (which is hidden at first) to be shown when the anchor tag above it is clicked. There is some extra behavior also through toggle, which adds a class on the first click, and removes on second click. Any help would be appreciated-- here's my script: <script type="text/javascript"> $(document).ready(function() { $("a.closed").toggle(
[jQuery] jeditable - Tabbing between jeditable elements
I am using the jeditable plugin with autocomplete and its working perfectly. (Thanks Mike!) I would also like to have the ability to "tab" from one jeditable element to another jeditable element. It is possible to tab between text inputs in forms and I would like to have this analogous behavior with jeditable elements. My approach is as follows: 1. In the element callback of the declaration of a jeditable custom input: add a keyPress handler to recognize the tab (keyCode == 9) keypress. Add tab_target
[jQuery] Problem using jqUnit
Hi to all, I am trying to develop some code using jqUnit to test-drive things, and I am running on a strange problem: jqUnit.triggerEvent does not work as expected, it does not fire a click() handler that is installed outside of the test's code block. Full code, HTML + 2 JS files, help and comments greatly appreciated, Insitu <html> <head> <title>Construction d'un diaporama</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/
[jQuery] Repositioning a Google Gadget
Hi, I don't believe this is strictly a jq issue, but I'm hoping someone can help. I'm using the Fish Gadget (http://abowman.com/google-modules/fish/) within a wiki based CMS, and need to reposition the gadget from one HTML element to another. If I directly reposition the gadget using what appears to be the gadgets base class "ig-reset", then everything works. If I try to reposition using a surrounding wrapper, then the iframe used by the gadget seems to take over. Unfortunately I need the flexibility
[jQuery] CSRF best practice
As per this article - http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx Older browsers can override array processing in JS and process JSON even though it's nothing to do with their site. I was thinking that prepending the JSON fragment with one char that made it invalid JSON, would do the trick. In my client app, I'd strip the single char .. $.get("path/to/my/service", { }, function(data) { data = data.substr(1,data.length); if (data.ERROR != true) { for (var i =
[jQuery] file uploads and progress monitoring
Hello, I am looking for a cross browser solution to file upload with commons file upload. With the commons file upload, one may also make a progress meter. I have used forms plugin and got a hold of xhr object. I can cancel the download at anytime. How can I monitor the result of the ajax post while the post is being made? by specifing a target: '#progressDir' I can get the result after the post is done, but I have found no other solutions. Best Regards, -C.B.
[jQuery] clueTip send header with Ajax request
Hi all. I am implementing clueTip and have it working just fine using an Ajax call. However, when all is said and done, the Ajax call will be hitting a web service that requires a custom authentication header. I have set up my jQuery global ajax options to send the header on all requests. jQuery.ajaxSetup({ beforeSend: function(xhr) { xhr.setRequestHeader("customAuthHeader", "customAuthHeaderValue");} }); However, it does not appear that clueTip recognizes these global options (ideally, it probably
[jQuery] Why doesn't code execute when Drop Down is changed or Button clicked.
I've been trying to figure out why when I click the button nothing happens...Can someone shed me some light on this example? <html> <head> <script src="jquery-1.2.6.min.js"></script> <script > function init(){ alert('one'); alert('two'); }; $(init); $("#lstRace").change( alert('three'); ); $("#clickMe").click( alert('four'); ); </script> </head> <body> Hello <select id="lstRace" name="lstRace" > <option value="1">Test</option> <option value="2"/>Test3</option> <option
Next Page