checkbox can't be checked when hide() show() has....[SOLVED]
I'm trying to make a collapsible menu with form tagis inside of it. This is the html markup without any javascript/jquery, consisting of a nested <li> inside a <ul> <html> <head> <title>test</title> </head> <body> <form> <ul> <li>test list <ul> <li>test list <table> <tr> <td><input type="checkbox">test checkbox</td> </tr> </table> </li> </ul> </li> </ul> </form> </body> </html> The checkbox works fine, but when I add the jquery code from "jquery in action"
change table row class
Hello guys, I have a table with alternate css. When "remove" link is clicked on any row, I want to reset the CSS. I tried to loop through all the rows in my table and call a "removeClass" and "addClass" but I get an error message saying this method is not supported. Can someone please tell me how I can do this? This is what I have so far: var i = 1; var rows = $("#tblContractLabor").find("tbody > tr").get(); $.each(rows, function(index, row) { // write code to reset css. how??? } )
[jQuery] modify pagination plugin to support ability to input page
I need a paginator similar to pagination for tablesorter or jqGrid where a user can input the page number they want to view. Issue is that the data is not in a table, so I cannot use these plugins. Ideally I'm wondering if anyone has found a way to modify the pagination plugin http://d-scribe.de/webtools/jquery-pagination/demo/demo_options.htm to support this. I am able to get it to display the current page in an input field but i cannot figure out how to get it to paginate to an inputed page number.
[jQuery] Superfish: automatically expand 3rd-level menu?
I have a 3-level menu using JQuery-Superfish. I would like to hover over the top-level menu item and have BOTH the 2nd and 3rd-level menus open automatically. Any ideas?
[jQuery] data is posted only once
Hi There I got some elements here. <a href="#" id="p_12" class="pager"></a> <a href="#" id="p_13" class="pager"></a> jquery: $(function() { $('a.pager').click(function() { var currentpage = $(this).attr('id'); $.ajax({ url: 'php/pager.php', type: 'POST', data: 'currentpage=' + currentpage, success: function(result) { $('div.response').remove(); $('div#pContent').append('<div
[jQuery] General question regarding speed
I am trying to figure the best way to maximize performance with data returned from ASP pages. Option one - return data in an HTML table. Let the host page's css format the table. Option two - return json data from the asp page and let the browser drop the data into a table and still let the host page do the final formatting. I guess the question is where the faster/least amount of processing time and transport of data is used. Other items of note - the application is an intranet where all users will
[jQuery] Changing the ID of a cloned table row
Am getting bloody from beating my head against the wall. I just want to be able to change the id of a table row that is cloned and appended to a table. This shouldn't be so hard, no? Here's what I've tried: function addTableRow(table) { var clonedRow = jQuery(table + " tr:last").clone().attr({ id: '13' }) ; jQuery(table).append(clonedRow); return true; } OR function addTableRow(table) { var clonedRow = jQuery(table + " tr:last").clone(); jQuery(clonedRow).attr("id", "13"); //yes,
[jQuery] jQuery Tutorial
I'm just getting to know jQuery. The basic tutorial (http:// docs.jquery.com/Tutorials:How_jQuery_Works ) fails to mention that $ is used as a shortcut for jQuery. Things would have made much more sense the first time I read through it if this had been mentioned. I'm used to $ preceding a variable name as in PHP. A different use of $ was confusing and need not have been if it were explained in the first place. I offer this input that you might improve the tutorial. --Nathan Shaskin Compliance Publishing
[jQuery] Wouldn't inArray() be more intuitive if called arrayPosition()?
I was about to use inArray (http://docs.jquery.com/Utilities/ jQuery.inArray) to determine if an element was in an array or not, but I realized I can't use it as a true/false response since it returns the position (and could return 0 if the element was found in position 0 - returns -1 if not found). I was expecting something with the same functionality as the PHP function in_array (http://us3.php.net/ in_array) I know it's a minor point but wouldn't it be more intuitive if called arrayPosition? with
[jQuery] Validation plugin: combine functions with strings on remote error
I'm using the validation plugin to validate a field remotely. The validation portion works great, but I've got a question about the error message if the validation fails. I discovered that you can pass a function rather than a plain string as seen below in the remote key. The problem is that when I do this, I lose the ability to display a string of my choosing. Does anyone know how to accomplish both? messages: { pagealias: { required: 'Page alias is required', remote: function(){
[jQuery] Validate plugin not working
Sorry I couldn't wait for my other post to showup, so I made a typo: <html> <head> <title>jQuery Validation test</title> <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="js/jquery-validate/ jquery.validate.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#poesForm").validate({ rules : { name: { required : true } } }); }); </script> </head> <body> <form id="poesForm"> <input type="text" id="name" class="required"
jQuery session with jquery-json
Hi all, I'm quite new to jQuery and I want to use one plugin, the jquery-json: http://code.google.com/p/jquery-json/ I'm attaching the js like this: <script type="text/javascript" src="jquery.json-1.3.js"></script> And after that I'm doing the code below: myfun = function(){ var thing = {plugin: 'jquery-json', version: 1.3}; var encoded = $.toJSON(thing); //'{"plugin": "jquery-json", "version": 1.3}' var name = $.evalJSON(encoded).plugin; //"jquery-json" var version = $.evalJSON(encoded).version;
[jQuery] Newbie Question: get id from A tag
Hello, I am not good at js. I want to get the id from "A" tag. E.g. <a href="/comment.php" class="clickme" id="1234">link</a> I need the value "1234" from the code above, but dont know how to do it. Please help. Thanks.
[jQuery] New jQuery DomBuilder with Chain Functionality and JSON Style
I just released a first milestone of HSJN, the "Html Snippet Javascript Notation" system for storing HTML snippets in a JSON-esque format. The parser is a straightforward jQuery DOM Builder, with support for custom attributes, styles, and neatest of all, jQuery chains. (Yup, you can put jQuery function calls inside of HTML snippets, meaning you can put in one simple object an entire jQuery Tabs widget!) Check the project out here: http://code.google.com/p/hsjn/ I'd love to hear some feedback on it!
[jQuery] jQuery validation and captcha in a form
dear all, i'm trying to implement the captcha in a form where i'm using jquery validation and also custom validation methods. this is the code i have so far: jQuery.validator.addMethod("Captcha", Function(value, element) { jQuery.get("/functions/app/CaptchaAjax/captcha.asp? validateCaptchaCode=" + jQuery("#captchacode").val() + "", function (data){ if (data == 1) return true; }); return this.required(element) || true; }); the problem i have so far is that: if i get out from the jQuery.get
[jQuery] Half star rating plugin query | looking curvalue:3.5 to show 3 and half stars by default
Hi All, Just a quick question related to Ritesh star plugin which suits our need. Can we have curvalue:3.5 to show 3 and half stars out of 5 in rating ('', {maxvalue:5, curvalue:3.5}); Just wanted to show half star instead of increment value, which we have right now in this plugin. Not worried about hover and all, just wanted to show the star rating so not looking for any other advance star rating plugin to show the stars. Quick help should be appreciated. Thanks Mohammed Arif
[jQuery] Alert on click of class alerts n amount of times (n = amount of same class in doc).
I'm listening to some generated elements in an iframe. These elements are given the class 'wp_sl'. I need to, when an element with this class is clicked, do some work with it. However, say I have generated 3 elements with the class 'wp_sl': ---- el_1, el_2, el_3 ---- Using the code below, if I click on the first element, I will be given an alert 3 times. If I click on the second, 2 times. And on the third, I will be alerted 1 time. I'm unsure why this is happening, because I can do the same outside
[jQuery] JQuery
jQuery (English) jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages. jQuery is designed to change the way that you write JavaScript. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ http://www.organismsgenome.webs.com/ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[jQuery] Jquery Media plugin - fails in ie
I'm not sure if this is a problem with the media plugin (malsup.com) or with swfobject, but in IE only, and only with flash content, there is a runtime error when the <a> tags are inside tags. So this below will work for the .wmv file but fall down on the flv. <a class="video" href="video/secondary-assessment-effective- questioning.wmv">Effective Questioning (from Teachers' TV)</a> <a href="video/test-flv.flv" class="video">Test flv video</a> The jquery is simply: $(document).ready(function()
[jQuery] Superfish: automatically expand 3rd-level menu?
Hello, I have a 3-level menu using Superfish. I would like to hover over the top-level menu item and have BOTH the 2nd and 3rd-level menus open automatically. Any ideas? Thanks in advance! Jon
[jQuery] A question About jQuery
Hi, I am doing a master thesis about Javascript ajax frameworks, and I have a question about jQuery framework, and need your answer please. As I read, jQuery is not a new creation, but it is a new implementation of existing frameworks like Prototype and Moo.fx. is that true? if yes, Prototype alone is about 127 KB in size, so , How is jQuery only 118 KB? or it does not include everything from Prototype (In addition to Moo.fx). I hope you have time to answer my questions. Thanks alot, Greetings,
[jQuery] ie6 scrollbar
hi, i got some kind of pop-up banner which animates in the screen after the page loaded. if you scroll up or down it will animate back on the position it has to be. if you click on "close" it moves out of the screen. well actually i just animate the height of it so it doesn't really move out or in but nevermind. my problem now is: if i scrolled around and close the banner afterwards the page gets "longer". i don't know why but i can scroll way down under the page where nothing is. this sucks. i hope
[jQuery] Array of Check Boxes
I'm not exactly sure the best way of asking this, so please let me know if I need to expand. I have a LARGE form. The form is broken up into a bunch of pieces. Basically, the user comes to the site and gets about 26 check boxes. They can check 1 box or all 26. Depending on how many boxes are checked is what other parts of the form to load. So there are 20 other sections of the form that the user could possibly have to fill out. What I am trying to do is figure out how to load these sections. First
[jQuery] [JQuery][Validate][Metadata] Custom error message.
Hello. I have code like this: <INPUT TYPE="CHECKBOX" id="suffix_{0}" NAME="suffix[]" value="{1}" validate="required:true,minlength:2"> I'm using Validate with Metadata. How can I add custom validating error message for this field? Thanks in advance.
[jQuery] Suggestion on solution for array to new html content
Hi all, Ive been exploring various solutions for the following and was interested to hear other opinions: From AJAX call: "[{content: 'some html 1', data: 'some data 1'}, {content: 'some html 2', data: 'some data 2'}, ... , {content: 'some html N', data: 'some data N'}]" Desired: Take the array from above, wrap the content values in a div and then attach the data to the div. After this, set the new divs to be the content of another element. My first thought was to put the array through a map: $.map(ARRAY,
[jQuery] Google Calendar-style table cell selection
Hello, I'm looking to mimick the row-selection technique used by Google in the week-view of their Calendaring app. It's not my goal to replicate it, I just want to do the date selection in a similar way. After studying the calendar with Firebug, I noticed that they seem to use a HTML table, with a TR element and several TD elements. The first TD element contains the time DIVs (00:00 - 23:00) with a height of say 100px. The second TD contains the half-time DIVs (00:00, 00:30, 01:00, etcetera) with
[jQuery] [autocomplete] Bug on line 184
We discovered that when the auto complete values contain commas and you are not using the multiple input mode, the result would not show up in the input box (actually it would but it would be removed before you could tell if you were not stepping through the code). We discovered that on line 184 there is the following $.each(trimWords($input.val()), function(i, value) { request(value, findValueCallback, findValueCallback); }); However, trimWords in any other case is preceded by an if statement checking
[jQuery] tablesorter - Force Null / Empty Cells to the Bottom?
Good Morning / Afternoon / Evening, Using the tableSorter does anyone know if it's possible to all ways force null / empty / 0 Digit cells to always be at the bottom, The solution I have is to have additional columns with either 0/1 for ASC / DEC Sorts and sorting on that first. But I need a more elegant way, I'm sure it's possible but I have tried everything I can think off. Any help is appreacited TIA Kev
[jQuery] access :hover css properties of an element via jquery
hello! imagine i style the :hover pseudo-class of an element via css: .myitem{ background-color:green; } .myitem:hover{ background-color:red } Is it possible to retrieve the background-color property of the elemnent's :hover class via jquery? i tried the obvious : http://jsbin.com/idudi/edit $(function(){ var temp = $('#myitem:hover').css('background-color'); alert("color is "+temp); }); But that didn't work. It returns the default state.
How to disable div?
I've been searching online for some tips on disabling a div in jquery but I cant see to find anything that works. I am sure I am doing something wrong. What I've tried: $(".photoContainer").attr("disabled", "disabled"); $(".photoContainer").attr("disabled", "true); not sure why its not working any help would be great! here is the div I am trying to disable: <div class="photoContainer"> <img src="images/copy_written/2.jpg" class="cover"/> </div> My javascript: $(function mainPhotoInit() { $('.view').click(function()
[jQuery] Opacity Distortion in Internet Explorer after fadeOut, fadeIn
Please kindly assist me in solving this. After I apply a fadeOut in Internet Explorer, when I fadeIn again, the item has lesser opacity and this doesn't look good. How do I solve this please. (I use I.E. 7 and most of the clients I program for use I.E. 6)
Accordion sliding speed?
I'm trying to use the latest accordion 1.7.1 and I was wondering how to adjust how fast it slides. http://docs.jquery.com/UI/Accordion I'm using jquery-1.3.2.min.js and jquery-ui-1.7.1.custom.min.js with: jQuery("#mainaccordion").accordion({ collapsible: true, header: "p" }); Anyone know how to simply make it slide slower? Thanks.
[jQuery] Problem with jcarousel ( how to enable multiple columns )
Hi , I have problem related to jcarousel multiple columns. right now there's only one column showing. I need 3 columns to be displayed . Demo site: <a href="http://sorgalla.com/projects/jcarousel/examples/static_vertical.html">http://sorgalla.com/projects/jcarousel/examples/static_vertical.html</a>... How do i add one more column to display the pictures. ? Can anyone help me plss... Thanks in advance Cheers ! Sagy
[jQuery] With IE8 out, how do you test for IE6?
I say that friday that IE8 was released so I downloaded it to check it out. I am happy that they did seemed to do at least a few right right and it seem very easy to test for IE8 and IE7 in the IE8 browser (which is very nice). However, after i installed IE8, Multiple IE stopped render correctly (I use Multiple IE to test for IE6 and this is only at work since I have yet to find a way to run IE6 on Vista at home). Do you guys have any tips/tricks for properly test IE8/7/6 On Vista and XP? I am almost
[jQuery] jcarousel display problem
hi, i'm new here and i'm new using javascript and jquery. I hope you can help me. I'm trying to build a webpage with the following 3 jquery components: - jQuery Accordion Menu (http://www.michaeljacobdavis.com/tutorials/ statesavingaccordion.html) - jCarousel (http://sorgalla.com/jcarousel/) - Shadowbox.js (http://mjijackson.com/shadowbox/index.html) It is a bit hard for me to describe the problem. The best is you look at this page with my stage of development: http://www.projekt360.de/09/index.php
Create loop for btn and change image source in jquery
Hello everyone, I was wondering if anyone could help me out with this problem. I created a photogallery using XHTML strict and jQuery. When the users choose view image I fadeIn a div and I need to replace the placeholder img with the full size image. this is the div that hidden and fades in when I click that part works great. <!-- Main Feature --> <div id="mainPhoto"> <div id="closeWin"> images/blk_skin/close_btn.gif </div> <div id="imgContainer"> images/copy_written/lrg/1.jpg </div> </div> <!--
[jQuery] Will resize the jquery ui 1.5.3 at 1.7.1 of knobTheme how to use?
Will resize the jquery ui 1.5.3 at 1.7.1 of knobTheme how to use?
[jQuery] [Superfish] - Issue happened in IE 7 when integrated Superfish menu into Liferay
Dear, I've integrated Superfish menu into Liferay.it run ok in Firefox but occur an issue when I run on IE 7. I enclose my demo of issue http://www.5giay.vn/picture.php?albumid=3911&pictureid=22491 Anyone can help me solve this issue? Thanks in advance Best regard.
[jQuery] [localscrol] How do I get attributes of clicked link
I am need to get the attributes of the click link because I need to perform an event based on the id of the link. Basically the has is used to scroll to a section. I then want to use the additional information to cause an ajax load Thanks Kevin
[jQuery] [autocomplete] Data Array
Hello, I am attempting to use the autocomplete plugin to allow users to pick a text value from an input box and have the db id of that value populated to a hidden field that can then be posted back to the application. I have this working fine with a url data source, but am confused how to do it with a JS array. Here is what I have: $("#suggest").autocomplete("/dev/autotest.php") .result(function (evt, data, formatted) { $("#sugghidden").val(data[1]); }); Again, this works fine as autotest.php returns
Next Page