Drag & Drop Help
I have a pretty demanding use-case for D&D, and I'm not sure jQuery offers what i need, but maybe it does and the examples don't seem to be show-casing it. My application requires the use of 30+ D&D components on any given page. So, it needs to be pretty performant and not sluggish, like a lot of D&D libraries are. Also, I find that i need a few features that only YUI 3.0 provides, like drag constraints (like invisible boxes). What I have not found in any library is snapping, like when you move stuff
Now $.load() is suddenly acting differently?!
I have been doing the following for MONTHS without a problem, now it is suddenly not working anymore, what the? Link: <a onclick="readPage('http://www.mysite.com/jquery_work.php?a=register','registerCont');" style="cursor:pointer;">Sign Up</a>Jquery function: function readPage(keyPage,container) { $(function() { $("#"+container).load(keyPage); }); }Not even this is working! This is nuts.. <a onclick="readPage('jquery_work.php?a=register','registerCont');" style="cursor:pointer;">Sign
Hiding css when javascript disabled.
Hello, I am trying to make submenus still display when javascript is disabled. I have the following css style that shows a submenu when hovered: #nav li:hover ul, #nav li.over ul { display:inline; } How would I go about setting this to "display:none" when javascript is enabled? Thanks.
jquery dynamic select doesn't submit values
I have a form that includes three select boxes. The first one is categories, and selecting a category from it will populate the variables multi-select box with values specific to the selected category. Selecting variables and then clicking "add selected" will populate the target select box will those variables. The problem is, print_r shows that the values in the target select box aren't passed upon submit, and I don't understand why... Below is the code, and help is really appreciated Here's the
Selector working only on one element.
I'm trying to create a new <div class="line"> when an <input type="text"> contained in the last <div class="line"> loses focus. But new div blocks are created only when the an <input type="text"> in the first<div class="line"> loses focus. Please I need help urgently. Thanks. This is my code: <script type="text/javascript"> $(function() { $(':text:last').blur(function() { $('<div class="line"><span>data: </span><input type="text"/></div>') .appendTo($('#lineStack'));
how to popup from down to up from ...
Hi I have created a footer bar which is visible on ll pages like we have in facebook, on that bar, I have one link when i click on this link a popup must be appear from that link to upside I have one div tag of 200X200 px that should be appear Regards, ASIF
Why does height( value ) does not work?
Hi, I'm brand spanking new to jquery. After having used yui 3.0 for awhile, I was fed up of their auto-sandbox model. It just made it too difficult to create a multi-tier architecture for a large web application. I like the fact that jquery doesn't make this impossible by adding it's own sandbox. This is actually a good feature! Please don't change it! Anyway, I am having trouble getting some basic stuff working, so please don't tell me this is a bad sign! The one thing YUI 3.0 has going for it is
Using var passed to function to reference an object
I have just started using the data functions in jQuery for keeping track of a few items on the client. The user can click on links, which call a function that updates the display and stored data value. I am storing data as a set of columns, named c1, c2, c3 etc. I update the relevant column like this function UpdateCol(column) { if(column=='c1') $(#db).data.c1 = "1" if(column=='c2') $(#db).data.c2 = "1" ..... } The above works, but is ugly. As I want the system to be expandable, I would
RadioButton post data
Hi guys I have some radio buttons and do a jquery post on click. Something like this: $.post("method", { value: value }, function(data) { alert(data); }); the value data does have the correct result, but my problem is the page doesn't refresh to that data. Can someone please let me know the correct way to handle this ? Thanks !
Locate and grab RSS Feed link from other site
I want to find an rss link on a page (not "local", from another website) and grab that rss feed, display it in my site. If it needs further explanation just ask and ill try to be clearer.. So far i've found this code: var link_elements = $('link[type="application/rss+xml"]'); I dont really know what the code above does but ive gotten that suggestion from someone.. P.S. The site im grabbing an RSS feed from only has 1 rss link on the website, not multple..
calculating a mark
I'm making a page that calculates a mark before I submit the data to the database. It involves 8 <select> pulldowns. Each time I add a number I'm trying to get this Jquery code to display a percentage. The first one works but when I add any subsequent mark the display div shows NaN. Any help would be appreciated. Here is my Javascript. $('select').change(function() { var arr_mark = $('#arr_mark').val(); var head_mark = $('#head_mark').val(); var solo1_mark = $('#solo1_mark').val(); var solo2_mark
XUL, jQuery.ready, 1.3.2 vs 1.4.x
I have used jQuery successfully in XUL applications for some time. Recently I updated from using jQuery 1.3.2 to 1.4.2. This broke behaviors that correspond with the window.onload event. The following code executes successfully in 1.3.2 but not in 1.4.2: $( document ).ready( function() { alert('test'); } ); This issue originates from the following code within the jQuery.ready function which is present in jQuery 1.4.x but not in 1.3.2: // Make sure body exists, at least, in case IE gets a little
ajaxSubmit rename filename during upload
Hi, I would like to know if it's possible to change the filename of a file during upload of a file. For instance if a user uploads a file named "foo.png" i would like to change the filename before uploading it to "bar.png". I was looking at the beforeSerialize() and beforeSubmit() callbacks, but i can't really make up on how to do such a thing. Anyone that knows how todo such a thing, or if it's even possible at all? grts Arthur
Help animate for IE8
I have a website http://www.agenciafire.com.br/index3.php that the menu is 260px with the distance from the top of the lightbox that resets this distance to zero up to the menu and content is shown in div. what happens is that it works in FF, safari, chrome, IE7 on the 8 so that it does not work, I tried to put the module in the cod and compatibility did not work, I tried everything. aguem have some light to give me. embrace all
Variables in click handler
When using variables in click handlers, is there a way to use the value of the variable when the handler was set instead of run? For example: var links = new Array; for (i = 0; i < 5; i++) { links[i] = document.createElement('span'); $("body").append(links[i]); $(links[i]).text("Click here!"); $(links[i]).click(function() { alert(i); }); }All five of the "Click here!" create an alert with the number 5, which was the last value i was. How can I have each click function use the value
image popup(like lightbox) with imagemap/tooltips on it
Hello ! I am having a few problems and hope someone can point me towards the rigth direction. Basically I want to display an image on a webpage with an imagemap like functionality applied to it, meaning if the user would move his mouse over various parts of the image a tooltip would appear with a description text in it like in http://de.selfhtml.org/html/grafiken/anzeige/img_usemap.htm (the image is actually a table and I want to display descriptions when the user moves his mouse over the various
[SOLVED] Add class to two anchors when either is clicked
Hekko All, I have two sets of paging links on my pages that need to be updated when one is clicked. i.e if page 3 at the top is clicked it gets the class 'currentPage' applied, but how do I het this to happen to the paging links at the bottom of the page? Both sets of links are held in a div with class 'paging' all anchors in these divs have the same class 'ajaxpaging' and each has its own id corresponding to its page. The bottom paging links have 'b-' preceding the number. here is my jQuery:
How can I select the last visible element in a div?
I have a page with various elements, some visible, some invisible, as they become visible depending on user input. I am looking to select the visible elements, then within that collection, get the last element in the flow and manipulate it. This is proving quite hard to do...
Ajax call from a form loaded through ajax (chaining)
Hello, I was expecting the below scenario common, but couldn't find much help online. I have a form loaded through Ajax (say, create entity form). It is loaded through a button click (load) event $("#bt-create").click(function(){ $ ('#pid').load('/controller/vehicleModel/create3'); return false; }); the response (a form) is written in to the pid element. The name and id of the form is ajax-form, and the submit event is attached to an
How to detect click outside of my popup window??
Hi all I have been working on this problem all day. I have several pictures on a page. When a user clicks it, a popup window will show up a series of pictures. Inside the popup window, there is a close icon to turn of the popup. Besides, if the user clicks outside of the popup, the popup will turn off as well. Here is what I have so far.The closed icon inside the popup works fine but I can't get "the click outside of the popup" to work. I would really appreciate it if someone would help me about
Newbie: Add up form fields by class?
Hi, I'm new to Jquery and am trying to make this page work properly. http://lilbosheep.com/members/pickupB.php It's an order page. I was trying to do it with Javascript ... I know Jquery can do it much more easily, but I'm stuck. I need to update each row's quantity field (.eachItemTotal) when an image (+/- , .priceTableBtn) is clicked. Then it will multiply .eachItemTotal by its cost (hidden field, #item1_cost, #item2_cost, etc. into hidden field #item1_total, #item2_total, class .eachItemTotal)
Combination of more than one jQuery version within an application
Hi, I have an application developed using jQuery1.2.3 and I currently have issues with printing a pre-defined area of a page within the application. I found the solution in the jQuery Plugin - PrintArea but it's not compattible with jQuery 1.2.x. The introduction of PrintArea and jQuery 1.3.2 to my app throws errors like "exception thrown and not caught - jQuery1.3.2.js" and "object does not support this property or method - on the line where I'm calling the printArea function". What's the way out
pass a variable (which is a number) to the :gt(index) pseudo-selector ?
Hello, I am trying to pass a variable (which is a number) to the :gt(index) pseudo-selector. var thisParentIndex = $(this).parent().index(); //get the index of parent console.log(thisParentIndex); $(this).parent().parent().find('div.line:gt(' + thisParentIndex + ')').hide();this does not appear to work... Any ideas as to what I am doing wrong? I am pulling my hair out :P cheers, Greg
How do i autoplay a slideshow?
Hi, I have a slideshow that works by clicking on the arrows and it goes to the next slide. How do i make it autoplay? Thanks in advance.
"Back" button breaks "mouseout" event ... what to do?
Hello - I have bound the "mouseover" and "mouseout" events to an element to swap the background image and create a rollover effect. It works well, except that the image region also contains a link. When the user clicks the link, they navigate to the new page. If they move the mouse, and then click the browser's "Back" button, the original page appears - but with the rollover image still showing because "mouseout" was never called, even though the cursor is no longer over the element. Any suggestions
Scripts in load() - change from 1.3 to 1.4?
Hi, I have a setup where I load html using .load() into a dialog. This html includes (document ready) scripts. The scripts were executed and everything worked fine with version 1.3.2/ui-1.7. I am now using 1.4.2/ui-1.8. The scripts are no longer executed. Why this change? What can I do to have inline scripts executed when loading the html fragment via ajax? Edit: Seems related to http://forum.jquery.com/topic/jquery-stopped-loading-script-in-1-4-2 This is quite a problem, and currently prevents
assign data from $.getJSON() to global variable
Hello, I am developing a jQuery application and I need to get a parameter from one getJSON request, then use it in another. Here's a code example that of course is not working: var ipAddr; jQuery(function() { // request IP address $.getJSON("http://jsonip.appspot.com?callback=?", function(data) { ipAddr = data.ip; }); getJSON("http://api.website.com/request?api_token=xxxxxx&IP=" +ipAddr+"&callback=?", function(data) { /* do something here */ ................................................................I
how to not follow right now an URL ?
Hello, i'm using a modal popup plugin : i binded the popup each time i click on a link with a certain class. I find out how to not follow right now the URL using e.preventDefault(); in order to make the popup appears. But in the popup displayed there are only information, so i want when the user click on OK in the popup to follow the URL he first click on. I know it's pretty basic but i don't know how to do :P Thanks
Selecting one block in a collection
I have a structure of similar blocks - all containig a clickable image - each identified by a unique hidden index I want to find the value of that index when clicking on the image The code is something like : <div class="bloc"> <p class="enTete"> <img class="modif" src="monImage"> <input type="hidden" value="1" /> </p> <div class="content"> Contenu </div> </div> <!-- End bloc 1 --> <div class="bloc"> <p class="enTete"> <img class="modif"
Event handler isn't called (or isn't attached)
Hi, on this site here: http://wwwu.edu.uni-klu.ac.at/pgraeml/index.php I have two subsites (Content1 and Content2) which I call via the menu on the left side. The problem is, that I cannot load the sites in domReady directly. I don't know why and I've search a long time, but unfortunately, I do not find the error. Content1 works (it is called with onclick): <a href="#" id="content1" onclick="loadSite('content1');">Content 1</a> Content2 does not work (it is call within domReady): $('#content2').click(function(){
iframe capture mousedown event
Hi, I am working for quite some time now on the following problem: I'd like to execute some code when a user clicks inside an iframe (content on same domain). The following call works so far: $("#iframeID").contents().find("body").doSomeStuff(); When the user clicks on a link within that frame, the frame posts back (2. site is being displayed)....from this time on the above mentioned call does not work anymore. The code is located outside, so it should not touch anything. The strange thing is, that
Update from version 1.7.2. to version 1.8.
Hi, I have a problem
Really want to use jquery in my rails project, but does not work as per docs.
I am using Rails, Prototype, and Scriptalicious. I want to add jQuery support to my app, so I downloaded and included all of the proper js. I added PrettyPhoto as a test. The page loads fine. I click on a link and Prettyphoto runs with no error. I then click on a Prototype helper link. Once I do that the first time, PrettyPhoto (and I assume ANY jQuery constructs) stop working. I have tried: jRails Noconflict reordering the order of the load of the js files Nothing works: either the prototype breaks
Why is my last hide() instantaneous?
I'm making a couple of text boxes appear and fly in from the left, one after another to nest on top of one another. That works fine. Then, I want them to both fadeout by hiding the containing div of both. Except my hide() is instantaneous. They just blink out instead of fading. I've also tried fadeOut and slideUp, which also have no delay. Any idea why I can't get a delay on the last hide? tks. <style> .box {width:30%;padding:3px;border:5px outset black;position:absolute;background-color:lightyellow;}
isFunction( ) error in IE8
Attached is a document showing a screen shot from debugging a problem in IE8. Possibly this falls under the disclaimer that functions like "alert(...)" are not guaranteed to be caught, but this seems like a pretty straight forward test. I read in an object to the variable "obj". The element "E" of "obj" contains a function. In Chrome and Firefox, this is interpreted correctly as a function, and all works as expected. In IE, however, the element "E" is read in to a "[Methods]" array as seen in the
slideToggle - more efficient way to write?
Here's my test page:http://circleatseven.com/projects/_Design_Assets/Snippets/Jquery/jcarousel/index.html .. While this page works just fine.. I know this isn;t the most efficient way to do this. I have written individual functions to toggle each of the 12 buttons in the carousel... So, if I want to add more items to that carousel - I then have to add more code like so: $('a.linkone').click(function() { $('.one').slideToggle(400); $(".linkone").addClass("current"); }); $('a.linktwo').click(function()
Uncaught TypeError: Cannot read property 'guid' of undefined
I have the following JQuery code: $("#menu-247 > a, #menu-213 > a, #menu-214 > a, #menu-215 > a, #menu-216 > a, #menu-218 > a, #menu-219 > a").addClass("mainLevel"); /*$(".mainLevel").each(function (i) { $(this).before('<div id="' + $(this).parent().attr("id") + '-behind"> </div>'); $(this).prev().css({ width: $(this).css("width"), height: $(this).css("height"), position: "absolute", top: "0", left: $(this).parent().css("left"), zIndex: "5",
filter list based upon nested div
Hello, I have a list set up like the following - <ul> <li> <div id='name'></div> <div id='filterField'></div> <div id='somefield'></div> </li> <li> ..etcI would like to filter list based upon the value of the filterField item above. Does anyone know how I can do that? Thanks for any thoughts.
Preventing anchor jump?
You know how when you visit http://site.com/page.html#test1 your browser jumps to #test1 automatically? Not talking about when you open page.html and THEN click an anchor to #test1. I mean typing the anchor explicitly at the end of the url before even visiting page.html. How do you prevent that jump? Just a sample scenario, to make sure I'm being extra clear: 1) User goes to http://google.com 2) User types in address bar http://site.com/page.html#test1 3) BAM! User gets a jump to whenever #test1
traversing/selecting an element in nested iframe/framesets
I am trying to manipulate the DOM of a page that is nested in both an iframe and an old frameset. To preserve backward compatibility I can't just modify all the frameset pages to do my manipulation there. So within my tester page I'm able to add an event handler to the iframe to kick off when it's ready, but then I need to do the same on the headerframe in the frameset page, but I can't quite figure out the syntax to do that. Then in that event handler I simply want to make the <p> tag disappear.
Next Page