JQuery AJAX and XML Issues "No element found"
I am working with JQuery to make some basic AJAX calls to a website that provides XML data and am running into problems retrieving the XML data. <script type="text/javascript" src="jquery.js"></script> <script language="javascript"> <!-- $(document).ready(function(){ $.get('http://localserver/lookup.asp?id=12345', function(d){ }); }); --> </script> When I run this from http://localserver/getdata.html it works. When I copy it
index not working
I have a div with the ID boxes_container that has a number of children divs of class boxes. One of them will have the class active added by some server side code and I'd like to find the index of that. But my code doesn't seem to work. var $active = $('.boxes.active'); var idx = $('#boxes_container').index($active);
Animating overflow hidden text element & event element identification
Hello folks ! I have 2 questions: 1. how can I identify an element gotten from an event, (aka function(event){$(this)}) ? It has no selector property so I cannot identify the element, (I'm using event delegation, with 2 kinds of css classes f.e. "a.something, a.somethingelse", behavior changes according to classes) 2. Animating overflow:hidden; elements(like div and p) which has a certain width, and height: Currently I've established a function that calculates the size of the text(chars) and according
mouseover effect
<style> .member-frame { width:145px; height:100px; border:1px solid #343434; display: inline-block; } .member-cont { width:150px; display: inline-block; margin:0px; } h4 { font-size:10px; font-family:Verdana, Geneva, sans-serif; display:block;} </style> <div id="band-intro"> <div class="member-cont"><div class="member-frame"></div><h4><img src="images/badge.png" />BAND MEMBER ONE</h4></div> <div class="member-cont"><div class="member-frame"></div><h4><img src="images/badge.png"
need help about mouseover()
I'm new on jquery and i just wanna ask why the code below is not working on IE? It works fine FF and other browser. whats wrong with the script? <script type="text/javascript"> $(function(){ $("dl.alist").live('mouseover',function(){ $(this).css('background-color','#ddffbb').mouseout(function(){ this).css('background-color','transparent'); }); }); }); </script>idea is highly appreciated! best regards, aleks
jquery and ajaxcontroltoolkit asp.net editorcontrol can't recieve content with val()
Hello, i am using jquery 1.4.2 and asp.net 3.5 with the microsoft ajaxcontroltoolkit. My Problem is ... i can't recieve the value of the Ajax Editor Control. Its a Textarea behind the scene but its not possible for me to recieve the value of my text. <head runat="server"> <title></title> <script src="jquery-1.4.2.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("#Button1").click(function() { alert($("#Editor1").val());
Replace {appdomain} in href="http://mail.google.com/a/{appdomain}"
well the title is basically it. I am giving the user the ability to enter an app domain and i am using {appdomain} as a placeholder. so i need something like $('#textbox').change(function(){ replace('{appdomain}', $('#textbox').val(); }); the only part i am stuck on is a function like replace() as i dont believe jquery has one. {appdomain] is in links in a div with class of ghap.
jQuery - Plugins not working in loaded content
Short version: I load content from a separate php page into a div in my other page. This is done using .Get I believe. I've taken the plugin from net tuts + http://nettuts.s3.cdn.plus.org/011_jQuerySite/sample/index.htm This is working, however, plugins that are supposed to work with the content that's just arrived aren't. Only when specifying that page and loading that as a whole. Long version: I'm doing a website that's pretty graphics intensive. It's more like an application really, only
Does anyone know how to post an XMLDOM to a web service using JQuery?
I can retrieve an XMLDOM from a web service in JQuery. I can post an XMLDOM to a web service using an HTC, but cannot do it with JQuery. I'm sure someone out there has had this issue before. I just can't find it. I can take the outer XML as a string, encode it, and send it that way, but I would really like to keep it as an XMLDOM object. Thanks.
using buttons inside middle pane to toggle panes
hello, I am very new to jquery and have been playing around with the UI today. What i have spent all day trying to figure out is how to add a button or tab to toggle between the panes which would stick into the middle pane. this is my sample... http://www.justinblayney.com/new/index.php to explain further i created a graphic here of what i want to do http://www.justinblayney.com/new/images/sample.jpg if anyone can point me in the right direction i would appreciate it
php code not interpreted with an ajax call
Hi, When I try this line on a local server or any ajax call (ajax, get, post) $('#requestcontent').load('text.php'); the php code is not interpreted. Only HTML code is visible. text.php : <h1>Title</h1> <?php echo 'Text'; ?> In this case only <h1>Title</h1> is in #requestcontent div. Of course my server is active :) If anyone already found the solution. Thanx Laurent
help with .click and .append
<script> $(document).ready(function(){ $(".qitem").click(function () { $(this).replaceWith('<div class="qitem"><input type="text" name="text" value="" size="30" /></div>'); }); $(".addnew").click(function(){ $(".list").append('<div class="qitem"><li>Click here to write a question</li></div>'); }); }); </script> <div class="question">
Block all actions on a page
hi, i think this is a easy task, but i can't find a solution: i built a application with the jquery-plugin jstree to maniputate a tree stored in a database. all actions like create, move, delete and rename are fire up ajax-calls to php-scripts with mysql-querys. i got it to work, to display a trobber and 'waiting'-text during the ajax-calls, but what i also want to do is "blocking" the site for this time, so that the user HAS TO wait and couldn't click somewhere else. This blocking should be should
Sliding banner that disappears/re-appears on scroll events.
I don't know if this is possible or not, I'm fairly new to jQuery :) I've got jQuery sliding in a div banner at the bottom of the screen when the page loads using: $(document).ready(function(){ $("#slidingbanner").slideToggle("slow"); }); I'd like this banner to slide away again (or fade out or something) when the user starts scrolling the page down and then, when they've finished scrolling, slide back up again from the bottom of the screen after a couple of seconds delay. Is this possible?
Google Maps and jQuery: Don't seem to work together
Hey guys, I'm doing a redesign on a clients website and would love to use some jQuery plugins to make it less dull. One the home page however there is a Google Map with various locations on it that it reads off of a external file. These locations it also places in a list next to the map, which you can click on and it will take you to that location. When i add jQuery to that page simple like: <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> .. the map doesn't even load. So i tried
hover and document.write
Hello, So what i am trying to do is have a <ul> of <li>'s written to my html document on hover of a specific <li> Basically on hover of a Navigation item, the js should write the subNav underneath. The reason i want to use document.write is so that there can be multiple different sub items that appear if a menu item has sub categories. Here is my code, if you need a better explanation please ask asap! <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
Is there a way of simulating a mouseclick in a div from a keypress?
Short, quick version: Is there a way of simulating a mouseclick in a div from a keypress? In other words, if I press 2, I want it to simulate me actually having clicked in the div <div id="jplayer_next2"><a href="#">next</div> Long version (for anyone wondering "WHY?") Using the jplayer jquery plugin: For some reason (and after 2 days I've given up trying to find out) I can't seem to directly call the function which is defined right there on the page: function playListNext() { var index = (playItem+1
Replace this 2-image Flash fade with JQuery?
Is it possible to replace this logo's 2-image fade: http://www.trans-siberiangold.com/company.html ... with a JQuery equivalent? If so, could someone point me in the right direction as I'm new to JQuery. gvim
Load a file and use sortable??
Hi there I'm working on a project and got stuck on this tiny script I load some data from a file and I put in one div: function getloadedfile (fileurl){ $.ajax({ url : fileurl, dataType: "html", success : function (data) { $("#pagemodule_adminpopup").html(data); } }); } In this file I have some items which should be sortable: $(function() { $(".module_menu_move").sortable({ axis : 'y' }); $(".module_menu_move").disableSelection(); }); The sortable only works then I don't load it as a separate file
Function only gets executed once
I have a div with a click event that fires a show('slow')... however if the user clicks on the div multple times the animation plays that many times... is there a way to make it so that the click event is only executable once the animation is complete?... regards to any responders.
Text Reflection
Hello all, How we can show reflection of TEXT in jquery. For example i have a class of h2 code: <h2>My Home Page</h2> now what code will be written in javascript file. thanks
Loading content with css via ajax
Hi there. I've got a basic setup where there's a menu, and on each menu item there's a click function to .load() that pulls the html content from the server and places it in a div. However, even though h1 and li tags etc are styled and the content is dropped into a div on a page that links to the stylesheet, they are not coming out fully styled. I've become aware that .load() can't call full html docs, so no <head> or css etc. The current code is this: $('#home_click').click(function(){$('#ajax_content').load('business_units_content/people_development/index.php')});
Wordpress based jQuery problem
Hello, I am just starting out using php, but im having a problem that i have narrowed down to a jQuery problem for some reason. I manage a website (isset.ualberta.ca/students) and am using wordpress. Whenever i add a plugin called featured content gallery (a jQuery based gallery), i lose the conditional logical tests for displaying widgets. i.e. , i add the plugin, and a widget that isnt supposed to be on the front page that is supposed to be suppressed by the: <?php if(!is_home()): ?> content...
Problem with load order of js file
Hi. I have a big and unusal problem. I'm developing a web app using jquery, jquery ui and a lot of other hand made js. I'm testing it in windows with wamp and works like a charm. Yesterday I try to put on another server (ubuntu distro) and here starts the problems. In the first time I had a lot of errors saying that jquery is not defined. After a quick check I see that that other script that needs jquery are loaded previously that jquery one. For loading the js files I'm using a for cycle in php
Noob code question
Hello! Im currently working on a wordpress page, using the fancybox plugin. However, I did not post in the plugin section course i felt that this had more to do with jquery itself rather than the plugin im using. Im an experienced php programmer, and I do know some basic JS, but I know nothing about jQuery :S I got this code right now: jQuery(thumbnails).addClass("fancybox").attr("rel","fancybox").getTitle(); What this does (I think) Is addoing a class and rel atribute to all my images. What I WANT
help needed
hey all, I'm using the following code to add the zebra effect in a table and to change the row color on mouseover. .mover { background-color:#0099CC; } .trclick { background-color:#00CCCC; } </style> <script type="text/javascript"> function ser(){ $.ajax({ url: 'tableData.action', context: document.body, success: res}); } function res(data){ document.getElementById("res").innerHTML = data; $("#table1 tr:even").css("background-color", "#F4F4F8"); $("#table1 tr:odd").css("background-color",
Adding key value to serialized array
I want to post a form and reload the results $("#shoppingcart").load("/catalog/shoppingcart.php", $("#"+frmId).serializeArray()); This works fine, but I would like to add a key and value to the array. How do I do that?
[jQuery] jQuery Sortables and connectWith going behind second list
Hello, I have two lists that I am trying to connect. They connect as expected and everything works except the following issue. In IE if I drag an item from a list [center] to the list on the right (there are two lists contained in divs) the element from the first list goes behind the elements on the second list. This is without any z-index, and with adding z-index as indicated below. The code I have for both lists is the same: $('#centerlist').sortable({ connectWith: ['#rightlist'], placeholder:
How to set attribute when loaded ?
Hi, i'm trying jquery, and i want do do something .. that seems i cant understand how to do. thats my problem : i've got a page with some link and a div, every link calls this function : function ajax_page(ele,url){ $(ele).load(url); setTimeout('justify()', 300); }the justify function its made by me and resize the div with the right dimensions. now i wanted to load some pages with inside some images that i want to be loaded with fancybox so i've putted this code into the $(function(){ init $(function(){
Is it possible to submit nested objects in jQuery?
Hi all, I've been banging my head on a wall with this problem and I think it's come down to whether or not jQuery can do something for me. I am attempting to save what we call a template. This template is made up of sections. Each section has a series of elements, including an array called children, which contains child sections. The following json is an example of a template (in reality, a template is made up of over 80 of these sections): { "autotextId": 0, "canBeNull": "N", "children": [
Make div panel visible and hidden AND hide div on body click
I have a div tag element and a hide/show button above it. I'm able to handle the hide show of the contents all right via the button, but I want the div to be hidden when someone clicks anywhere else in the document, save inside the div area itself. This functionality is similar to what you see on the sign on panel in twitter.com. Press the sign in, the div sign in panel displays. Press the sign in link OR anywhere else on the document outside the panel. The panel is hidden. What's the
Help Please....File Upload validation
Hello, I am very new to jQuery and i need to transform some javascript to jQuery. I am trying to validate if a file has been attached on an input type=file. I was able to do this with javascript by using: attach=document.getElementById('Q3812').value; and using an if statement to check if attach=="" This code apprantly Does Not work in jQuery. The variable attach(below) is always undefined whether a file has been attached or not. So i am not sure if i have the correct syntax for what I am trying
place $(document).ready(function() in external js
If i have my code inline on the html it functions correctly: $(document).ready(function(){ my code }); if I place the code above in an external js file it doesn't work. How do you exicude the code from an external file.
function evaluation
Hi all: I am loving JQuery and have what I hope is an easy newbie question. I don't know how to control the evaluation of my bound functions. In the code below, I want each of the five anchors to alert with its index. Instead, they are showing the value of the index. How can I get my click function to evaluate that index inside the loop? Know what I mean?? <html> <head> <title>JQ function evaluation primer</title> <script type="text/javascript" src="jquery-1.3.2.js"></script> <script type="text/javascript">
Newbie: how to reset an animation
I have an animation where if you click a link to start it, it runs as expected. If I click any other link it toggles the animation in reverse, just how I planned. But after clicking any other link then going back to the original link that starts the animation, I have to click that link twice to get the animation to run again. Is there something I should be putting in my animation script to tell it to "go back to beginning of script after you play in reverse", or in other words a sort of "reset" so
jQuery.Slideshow only shows 6 images at a time?
Forgive me for a likely noob issue - but I am having one hell of a time customizing SlidShow to show more than 6 images at a time. Here is the development link: http://www.maggiesweb.com/emi/portfolio/bath.htm - there are 12 pictures but only 6 are showing there. Same with http://www.maggiesweb.com/emi/portfolio/kitchen.htm - where is the setting to expand it to show ALL images I specify, not just the first 6?
Modal with auto suggest
Hi, I am brand new to jQuery. So far, so good! I am trying to have an auto suggest input inside a modal. The modal is based on a tutorial at http://www.queness.com/post/77/simple-jquery-modal-window-tutorial The suggest box is performed by a plugin found on this site:http://www.tomcoote.co.uk/jQueryJSONSuggestBox.aspx The auto suggest works on its own, but has problems inside a modal. One question is how to download the data for the auto suggest only after the user clicks and opens the modal?
Detect if datatype is incorrect?
I'm just getting into jquery and was testing to see how I could handle php/mysql errors on my ajax function page. I thought that if I set the datatype to xml and since the error page was html it would throw an error but it doesn't. How can I handle this? Thanks
Select with 248 options causes flicker in .show(500)
Hi all, First, jquery is a awesome tool, and I'm very happy with it. However! I find that with Firefox 3.6.3 and jquery 1.4.2, I am getting flickering in the animation when I call .show(500) on an element that contains a select with 248 options. Taking out most of the options (either using Firebug to delete them from the DOM or by "going to" javascript:alert($("option").addClass("displayNoneClass")) before showing) causes the flickering to go away. Before I go trying to reduce my page source to
Looking for plugin: load() based on link href on page load?
Hello, My goal is to avoid re-inventing the wheel on this one... :D What I would like to do: 1. Links <a ... > on page generated by CMS 2. On page load, use Ajax to .load() content of the link's URL. I have found several plugins, but all of them want you to click on the link. This plugin looks great [1], but it only works when you click the link. This plugin looks like the best option [2], but I am wondering if it work well (or at all) on page load (vs. a click). Question: Do you think option #2
Next Page