About cloning
This is one of these situations where I could read the jQuery API and find out for myself how cloning works, but I find it more satisfying to ask here on this forum and get a good answer from you guys :-) So, given this jQuery object... $object1 = $("#someElement"); .... what is the difference between this... $object2 = $object1.clone(); ... and this ... $object2 = $($object1); ? -- Šime Vidas http://www.w3viewer.com
ajax load() method..
hi, why are there no examples here, http://api.jquery.com/load/ of load() method being used with 'post' method.. what exaclty is syntax for sending data to the server with this method.. thank you..
Get the names of pictures of a folder in remote.. just with JS!!
hi dears, I want to use jquery or js code to do the following work: get the list of files of a folder (files are pictures) that the folder is in remote.. and get the names of those pictures and store them in an array.. to create dynamically img element in page. can javascript do that? without using of a backend language( web server) Thanks alot, shahrzad
.val() problem
I'm trying to set input values with jquery with this code. Code: <a href="#ArtistUpdateBox" rel="facebox" onclick="$('#usingerID').val('{$Singers.id}'); $('#usingerName').val('{$Singers.name}'); $('#usingerGender').val('{$Singers.gender}');"><img src="{$url}images/edit.png" alt="Edit" /></a>which should fill in the values of this code. Code: <div id="ArtistUpdateBox" style="display:none;"> <form id="updateSinger" name="updateSinger" method="post" action="./manage?artists"> <input
Advanced search/remove object in array question
I have a pretty large number of objects "usrSession" I store them in my ArrayCollection usrSessionCollection. I'M looking for a function that returns the latest userSessions added with a unique userID. So something like this: 1. search the usrSessionCollection and only return one userSessions per userID. 2. When it has returned x number of userSessions then deleted them from the usrSessionCollection I'M stuck - would really love some code that can help me with that. function ArrayCollection() { var
Using Jquery to Select Unique Cells from Table
What I need to do is count the number of unique cells in a given table Under a Certain Table Header. It's a list of phone numbers, I would like to print how many UNIQUE Phone numbers there are. I can count how many rows there are for a total number but I need to be able to compair the cells and see which are unique and output that number. This Prints total number of rows. var callFrom = $('.calltable tr').find('td:nth-child(3)'); $('#callfrom').html(callFrom); <div id="callfrom"></div> Using
Problem with .offset() and IE6/IE7
Our application has a floating DIV that contains a change password form. The DIV is animated to "roll down" and "roll up". This all works just fine, however on IE6 and IE7, we have the dreaded problem of buttons bleeding through from underneath the DIV. We decided to use the old trick of positioning an IFRAME behind the DIV in order to fix the problem. So the code looks like this: $('iframe.pwdiframe').offset($('div.pwdchangemain').offset()); In FF and IE8, this positions the IFRAME correctly (I
Help with disabling submit button on message submit with Chrome/Safari
I have a form that has TinyMCE and uses jQuery Validation plugin to validate not only the form fields but also the textarea that TinyMCE has taken over. This works in IE and Firefox but for some reason Chrome and Safari get stuck on the disabled and the form is not submitted. Here is a copy of the Javascript if you have any advice: tinyMCE.init({ // General options mode : "textareas", theme : "advanced", theme_advanced_layout_manager : "SimpleLayout", theme_advanced_toolbar_align : "left",
How to run jquery 1.4.2 qunit tests?
I am only been able to find 1.3.2 jquery.com/test But I am interested in 1.4.2 test, specifically AJAX testing since I can't get ajax GET/POST requests to work using 1.4.2 on IE8 (it works fine in FF and Safari)
How to detect when Flash has keyboard focus?
I'm trying to build basic keyboard controls into a site that uses JW Player for video. I have jQuery using keypress() to detect the space bar and pass an instruction on to the player, which works well. When the user clicks the player, a JW Player plugin takes over and handles keypresses. This system works in Firefox and Safari, but unfortunately in Chrome and IE, jQuery still processes the keyboard even when Flash has been given focus. Is there a way to detect when Flash has keyboard focus, so
Way to simplify this?
So, I've got this code working....however, it just looks awfully verbose. I'm sure there's a way to refactor but not coming up with anything that works. Suggestions? $("#search").click(function(){ $("#available").remove(); if ($('#district-search').attr('checked')) { $.get("urlhere", function(data){ $('#select-holder').html(data); }); } if ($('#teacher-search').attr('checked')) {
Using Jquery to overcome CSS support across browser
Hello there, I am quite under the impression that I can make any CSS property work across the browser ( By that I mean IE6 ) using jquery. So I wrote this, $(document).ready(function(){ $("Your Selector name").css({'min-width' : '500px'}); }); I guess I have written it right. Am I under wrong impression? I mean if it supports Opacity property, it might as well support min-width & min-height. Replies welcome.
Dynamically load data driven html page
So here is my problem...I've been banging my head against the wall for days with this one. How do you send data through the URL (i.e. http://www.somepage.com/page.html?key=1) to be handled by a script in page.html, where page.html processes the data and dynamically displays the data in a modal. I can get the script to execute without trying to display in a modal, but as soon as I attempt to display in a modal, all I get is the static HTML without the jquery dynamic html. I know some code should
The problem with the tag <noindex>
<a id="code">LINK</a> <noindex id="noindex"> <textarea rows="3" style="width:390px" readonly="readonly" > </noindex> $(document).ready(function() { $("#code").click(function() { $('#noindex').hide(); }) })For Internet Explorer browsers not working this example. Why?
natural .height() of an element with set height and overflow hidden
Trying to get the height of an element whose height is specified in the CSS. So I am trying to animate the height of an item, where I have: <img id="myButton" src="myimage.jpg" /> <div id="myDiv" style="height:50px;overflow:hidden"> asdklf as;df asdf asdf asdf asdf asdf asdf </div> Now I the height specified to start with so that I can toggle it with a button. However, I would like to animate this so that the height gets animated from "height:50px;" to "height:auto;" Any ideas on how to do this?
Talbots catelogue - jquery?
Dear Experts, Am completely new at all this. A friend helped me get mediabox working, so am feeling impowered....lol... If one goes to: http://www1.talbots.com/online/ecatalog/catalog.jsp?sku=021juneBook&catheader=June+Book Is this catelogue powered by jquery, or is it clear where one would get such code, or buy such code? We would like such a catelogue on our site. Noticed that in the code, lists jquery connections. What do you think? Thanks so much, Hope
AJAX call unable to access localhost
Hello there. I'm pulling data from a database using a RESTlet server, and using Flot to produce a graph. My problem is that whenever I make the following AJAX call, I get an "Access to restricted URI denied" error on Firefox. On Internet Explorer I have other problems, but I can tell by my server logs that at least the AJAX call happens, which is more than I can say for Firefox. $.ajax( { url: 'http://localhost:8182/', dataType: 'json', success: function(series) { data = [series];
AJAX call using post. Upon success I want to display the PHP page within a div.
Hi everyone, I have a standard form and upon the user submitting it, I send the information to a PHP page via jQuery and the $.ajax with a POST type. Upon success I can get the code to display a div containing static content like "Data Collected" but I would like to instead display dynamic content via the div. Here is the code I am using along with the three different types of success: functions I tried. Again, only the static content works. HTML <div class="container"> <form id="submit" method="post"
Help using two jQuery scripts on the same page
Hi there. I'd be eternally thankful if someone can help me out. On my company's website, I've made use of Lightbox using jQuery, as well as an image carousel using jQuery. Alone, both scripts work fine. However, when I use them both on the same page, I encounter a silly-yet-important issue: Lightbox believes there are three times more images than there are. For instance, if I have a carousel with 10 images, when I click on a thumbnail, the image pops up and in the lower left corner, it will say "Image
li function over text
I want to develop a tag to tip (li functions over text) as it appears in the website http://rankings.ft.com/businessschoolrankings/global-mba-rankings. The text which appears when we roll over text in the colums. I don't know if there is any other functionality that can be used other that jquery for this. I would have about 20 of these appearing in a single webpage. I beleive that if we use jquery the website will become extremley slow to open. Can anybody help? Thanks, Priya
Drag and Drop on mobile?
This is not really a specific question but more a discussion. I did drag and drop app using jquery-ui, and it doesn't work on mobile devices. I can't find very much about this when I google. Is this my fault or does it just plain not work? Does any type of drag 'n' drop work on any mobile device and if so how? Is there something you have to do to make it work on mobile? I'm a total mobile virgin. Thanks.
Get HTML from an iframe
Hello there, I have an iframe loading external page. I want to get the HTML of this iframe onclick-button event. But since the page that is loaded in the iframe is an external page, I get the following error: FIrefox: Permission denied for <file://> to get property HTMLDocument.getElementById from "External Page Link" Chrome: Domains, protocols and ports must match. It would be a great help if anyone could guide me how I can get the HTML from an iframe that loads an external page. Thanks, Moiz
Accordion Menu Problems!
I followed a video tutorial to build a simple accordion menu...the only thing is that the code is somehow wrong. I keep getting a message that there is a syntax error in the code from my editor...Any suggestions? // JavaScript Document $(document).ready(function() { $("div.services_info").hide() { $("div.services_title").click(function() { $("div.services_info").slideUp("slow"); $(this).next("div.services_info:hidden").slideDown("slow"); }); });
Populate a dynamic dropdown list based on Another dynamic Drop down selection
PHP/Javascript/Jquery. Could any one help me out on how to populate a dropdown based on Another dropdown selection. This all should be a dynamic. Eg: I have two text boxes one is TechID and other is JOB ID. When I start typing Tech ID it suggests me the list of IDs which start with the input string i have put in Tech textbox. When i select the Tech ID the jobs associated to that Tech ID should be displayed in JOB ID text box as a dropdown list. Thanks Dilip
jquery Ajax problem. Can't have a working html input image.
Hi, I currently have a problem. I use jquery ajax to grab html code from a php file. This html code contains a input image that I use as a icon that when clicked should use a ajax jquery call and grab new html and inject it in the same place. The current problem is that when I inject the html from the ajax call the input image won't work. When you click on it I see a error in the firefox bug debugger that says function name () is not defined. Yet in that same html code that been injected does have
Initializing Jquery from PHP page -- Please Help
Dear All, I am glad i found this forum as i have been pulling my hair out i am very new to jquery and trying something which just seems impossible at this time so i thought i will ask for help from the professionals. My question might sound silly but i have no working knowledge of jquery but hey cant be rocket science . Ok this is what i am trying to do : I have a Test wholesale website called www.Fashioncocktail.co.uk/CW The ecom portal is runnign zencart (php). Wat i am trying to achieve is when
looking for SlideDeck alternative
Hi all, I'm looking for a valid and free alternative to the SlideDeck plugin that you can find here I'm not expert enough to reproduce it by myself Thank you
Jquery ListNav: Using numbered lists
Thanks to the ListNav plugin - http://www.ihwy.com/labs/jquery-listnav-plugin.aspx, I have been using it effectively for alphabetical list. I would like to extend it to use with ordered lists, eg to lists by year. Has anyone tried doing this? I would appreciate if someone could suggest how I should implement this. Thanks S
$.Ajax won't initiate success function
I'm trying to make a function that loops through an XML file to display the data on a page. However when I try to load the file, the $.Ajax function breaks and nothing happens. $(document).ready( function(){ $.ajax({ url:"portfolio.xml", type:"POST", dataType:"xml", success:loadData, error:function(msg){ alert(msg); } }); });That shouldn't be breaking, but I don't know what's happening.
JQuery calls JavaScript function?
Newby here... // I have a static div block. // I want to call a JS function when the block is clicked.. //JS myJSfunction... //JQuery $(document).ready(function(){ <-- added $('#imyStaticBlock').click(function(){ myJSfunction(); }); }); <-- added <div ID="myStaticBlock">CLICK</div> Who can set me straight on this? Thanks
jQuery doesn't work
Hi, I've got a problem, i'm using jQuery but it doesn't work and I don't know why, here is my code <head> <script src="prototype.js" type="text/javascript"></script> <script src="jquery.js" type="text/javascript"></script> <script src="jquery.dataTables.js" type="text/javascript" ></script> <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function() { alert('document ready'); CreateTable(); }); function CreateTable(){ var oTable = jQuery('#example').dataTable({
JQuery validation, doesn't work for me.
Using JQuery validation plugin, it will work in css, class='required", but I use method to validate, it will not work. The coding is below. It will skip the validation and go to server. Any bug is here ? function saveNew(){ $("#my_form").validate({ errorLabelContainer: $("#RegisterErrors"), rules: { scope: { required: true } }, messages: {scope: "scope is required" } }); $("#my_form").submit(); } <div id="RegisterErrors"
How can I break current action?
Hey, I wrote 2 events functions: $('.imageItem').mouseover(function() { $(this).fadeTo('fast', 1); }); $('.imageItem').mouseout(function() { $(this).fadeTo('fast', 0.8); }); when the user mouse over on .imageItem its going 1 transparent and when he out its going 0.8 transparent, its work and everything go well, but i got problem, when im going in-out-in-out-in-out its make the effects one by one and doesnt break the current fadeTo and show the last one.. how can I set
Looking for plugin to display date sensitive TEXT
Here's what I need, I've searched, and don't find it yet... I have a "poem of the week" page- I would like a plug in which checks the date on page load, then goes and gets the TEXT (the poem) for that week and displays it in the indicated div. Would be good if it has a place to store the snippets of text (poems) for one year- so 52 snippets of text. Possible? Anyone know of anything like that in operation? thanks JSC, Boulder
Multiple IDs
Hi everyone, I have a "printer view" page which displays an html-generated list of questions and answers to them. However, the html entities that contain each question have multiple IDs because the same question may appear more than once based on different selections chosen. Can I use .data() to extract the IDs and append a _1 or something to each repeated ID? How would one solve this issue best? Thanks, Eggers
jquery.filter with a large array - SLOW, please help
Hello people, I have an array of tr elements each uniquely identified by their id. This array could be potentially very large (e.g, thousands in length) var elem = $(tradePosTableNodes).filter('#'+id)[0]; It appears that when the filter function is called it takes a few good seconds and it also blocks the entire browser. This happens when I have a list of ids i want their elements retrieved. For example a scenario would be, An array of 500 ids whose elements are stored in the tr array and need to
Load data into form fields
I'm looking for a solution almost like this: http://www.w3schools.com/PHP/php_ajax_database.asp But instead of fetch the data as html into a div would I like to only have the db-data and put that into form fields that already exits at the page. And it will be more then one column data/form field.
variable div height problem in IE
Basically I have a div id 'register_stretcher' and within this div I have a dropdown select control. If the user chooses the option 'Other', the 'Other' text input field appears. For this to display correctly the 'register_stretcher' div needs to be extended in height by 30px. What I do first of all is get the initial height of the 'register_stretcher' div (this is created dynamically). then depending on what option is selected by the user, the div is resized accordingly. Not sure what I have done
Simple Accordian CSS problems
I picked up some simple JQuery code for an accordian menu. Here is the page it is working on: http://www.inboundlogistics.com/digital/ The links in the accordian work fine but the other links on the page shift 20px left and adopt the focus style of ul#menu li ul li a when clicked. I thought this was a simple CSS problem but now I think it might be a Jquery problem since it only effects links when I click them. I also tried making an <a> class for the links inside the <li> tags but that didn't work.
help: selector
Hi there, How can I select the a's in the below code? Thank you in advance. <div id="commentbox"> <div class="boxheading"></div> <p style="height:223px; overflow:auto"> <div > <p> <a> </a> <a> </a> </p> </div> </p> </div><!--COMMENT BOX-->
Next Page