[jQuery] Functions
I have some code seperated by script: $(document).ready(function(){ code in here.... function thisismyfunction(){ } }); then later on i have $(document).ready(function(){ thisismyfunction() }); code in here with a call to the function above, but because its seperated it will not call the above function is there a way I can reference the a function outside in another declaration etc many thanks si
jQuery doesn't see updated links
JQuery ajax works great from the original page load. Click the links from 2 menus and it will keep fetching data forever, great. But the new data it load also has links, and these are not seen by jQuery, which I need to have (the original links will still continue to work). links are like "<li ><a href = index.php?category=page&pageid=14> FURNITURE SALE </a> </li> " this. jQuery is jQuery('body li' ).click(function(){ and typical ajax Anybody? Thanks
[jQuery] help for tooltip
<div dir="ltr"><div>hello dears ,</div> <div>how can i make same as this tooltip :</div> <div><a href="http://www.alriyadh.com/">http://www.alriyadh.com/</a></div> <div> </div> <div>see this page at the top , in the above - left side </div> <div> </div> <div>plz help me </div> <div>regards<br clear="all"></div> <div></div> -- Eng. Nader Dasuqi Project Manager +9665339217533 </div>
[jQuery] jQuery Cache and AJAX question
I store a jQuery object ($remove=$(’img.remove’);) in global space at document(ready). Later in the script, I use an AJAX get call which removes one of the images with that class and reloads the div container. The reload has a callback function which needs the number of elements with the 'remove' class ($(’img.remove’).length). In the callback function, should I code $remove.length or $ ('img.remove').length? Is $remove and $('img.remove') equivalent since the DOM changed since I stored the original
[jQuery] [validate] Beginners question. How to pass data from remote file to jQuery.format
I'd like to learn how data is passed form one file to another and then displaying at when an error occurs. I have this php script that checks if an domain really exist phpfile: check_domain.php list($userName, $hostName) = split("@", $request); // Function to check whether a given hostName is a valid email // domain address. function myCheckDNSRR($hostName, $recType = '') { if(!empty($hostName)) { if( $recType == '' ) $recType = "MX"; exec("nslookup -type=$recType $hostName",
html() and clone() causing problems in IE
I am aware that IE provides bad HTML from the innerHTML property of a DOM element but when I duplicate a hidden template layer in my page and add the clone to the page IE is showing some of the input tag's inner contents within the text input area. Please see the attached screen shot. The code doing this is as follows: // Create a copy of the template to be used for this form var form = $('#templates > '+o.template).clone(); var placeHolder = target.children(o.placeHolderSelector); if(placeHolder)
[jQuery] same effect on multiple objects with same id
I basically have several buttons that are created dynamically via a db, so I can have 1 to 40 etc. now at the moment I give each one a unique id and a hover code in the loops. see below: loops goes here.. <img src="button.jpg" alt="button" border="0" id="myButton<?= $newCode ?>" /> $(document).ready(function(){ $("#myButton<?=$newCode ?>").hover( function () { $(this).fadeTo('fast', .50); }, function () { $(this).fadeTo('fast', 1.0); } ); }); end loop this works fine but gives me a lot of jquery
[jQuery] How to know if div opened or closed
Hello everybody !!! I'm opening and closing a div and I would like to know if at a precise moment this div is opened or closed. Something like : $(div).isOpened() = "true" Thanks in advance
Got a problem, anyway to make this code more efficient
Hello guys, I started learning jQuery today and i have a problem already! Surprise lol. Basically, i want a different <p> text to show whenever a user hovers over a link inside a <li> tag. I found a solution, kind of, but it looks a bit long and was wondering if there was anyway to shorten it. I've had to give each list item link and each <p> tag a different ID to show the different text. $(document).ready(function(){ $("li a#one").hover(function () { $("p#1").show("slow");}, function
[jQuery] Can jQuery parse XML locally?
Ok, perhaps that's a provocative subject line, but it is my basic question. I'm testing jQuery's capacity for parsing XML files, and have immediately hit the error: Access to restricted URI denied" code: "1012 This came simply from replicating the example at http://www.xml.com/pub/a/2007/10/10/jquery-and-xml.html and running it locally via File|Open (no server). If I run the code on Apache (http:// www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jquery_xml1.html) it works fine. A search for the error
[jQuery] jQuery cycle plugin help
I have been using jQuery cycle plugin for a banned with some content that fades in and out in a slideshow sort of thing but I would like to be able to div individually. Rather than saying all instances of #projects become a slide, i would like #project_img, #project_title and #project_description to all be separate, yet i want them all to be look like theyre in sync. I would also want the pause on hover to work for the entire parent div #projects so each div stops fading in/out. If anyone took the
[jQuery] Functions
I have soem code that is seperated. $(document).ready(function(){ });
[jQuery] Drag and drop Issues, fit my drop!?
Hello guys.. I have recently installed Drag And Drop, and its great, but i stumbled into a problem. Okay the deal is, i got 12 drop divs, and atm 7 drag object, they are the same size. But i want the drag object to fit my drop object on drop, i have been trying everything for MANY hours, but with no luck! I am new at Jquery, so there might be something i missed, ive been playing alot with positioning but its not working! If you need to see the project you can check my site on http://www.patterdale.dk/paradise/inventory.php
[jQuery] jQuery's code first line (function(){・・・・・
Hi everyone Know I try to study javascript using jQuery code,but first I do not know why jQuery start with (function(){.... What is "(" function? Why using (function(){ start jQuery? Thanks in advance. Wang Suya
[jQuery] Front page Slider
<div>hello dears . how can i make same as this : </div> <div><a href="http://www.aljazeera.net/Portal/Aspx/GetSiteNews.aspx?SummaryPagePath=/Portal/DefaultSummaryPage&SectionName=MainStories&MainStoryXsl=true">http://www.aljazeera.net/Portal/Aspx/GetSiteNews.aspx?SummaryPagePath=/Portal/DefaultSummaryPage&SectionName=MainStories&MainStoryXsl=true</a></div> <div> </div> <div>regards.<br clear="all"></div> <div></div> -- Eng. Nader Dasuqi Project Manager +9665339217533
[jQuery] jQuery virtual keyboard
Hello.... I googled around for an onscreen keyboard that I could use as part of a touch screen application, and came across... http://designshack.co.uk/tutorials/creating-a-virtual-jquery-keyboard ....which is very nearly perfect for what I want. However, I need the keyboard to stay visible and be in a specific position. Do I really need to be using jQuery? Can anyone suggest other examples? Thanks AMWJ
[jQuery] How to get option's position
if I have a menu, how to get the position of the option after I select one of it? for example, if I choose b, and the position should b 2. <select> <option>a</option> <option>b</option> <option>c</option> </select>
[jQuery] How can I move a div around the screen?
Hello everyone!! I'm new here!!! I'm starting to know how many advantages has JQuery for developers. I'm trying some experiments, and the other day I saw the "iGoogle" interface, where users can move the gadgets around the screen, and this stuff liked me very much. That's why I want to ask to the community if anybody knows if there is some plugin or library in JQuery to do the same effects and allows the programmer to move a div from one point of the screen to another one and fix it. Thank you!!
[jQuery] a mortgage and refinance calculator built in jquery
please check out this unified mortgage calculator http://www.mookal.com it's build on jquery, flot, etc. Requires no hits to the server at all, 100% ajax. all advises are welcome. thanks!
[jQuery] Selecting previous element
How do I apply a class to the previous element that's being hovered? Basically the opposite to the following CSS selector: #mynav li.current + li { background:black; } Which would make the li next to the one with a class of 'current' have a black background. Effectively something like: #mynav li.current - li { background:black; } Which would do the same, but to the element immediately before this one. This is impossible with CSS, how would I select it using jQuery? Many thanks, Alex
[jQuery] [autocomplete] populating multiple inputs
Hi All, I just spent more time finding the right plug-in than getting it to work. jQuery is becoming an amazing and mature resource for web developers! I'm writing this post in hopes that the next "me" who comes along trying to get autocomplete working will find the info. Be sure to download the plug-in from http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ Big thanks to Jörn for this plug-in!! Since I had problems finding sample working code, I thought I would share some: I'm writing
[jQuery] Random Image from Array
I have some image URLs stored in an array. I then want to be able to print out one of those image URLs randomly on page load. What would be the best method to do this in jQuery? My array looks like: var theImages = new Array() theImages[1] = 'http://www.puc.edu/__data/assets/image/0014/16007/ visual_arts1.jpg' theImages[2] = 'http://www.puc.edu/__data/assets/image/0015/16008/ visual_arts2.jpg' theImages[3] = 'http://www.puc.edu/__data/assets/image/0017/16208/ visual_arts3.jpg' theImages[4] = 'http://www.puc.edu/__data/assets/image/0018/19035/
[jQuery] a scrollable dynamic pane... how to jquery this?
hi, brand new to the group, very little experience with jquery or js... i'm familiar though about how to repurpose stuff i've seen... anyways, my website, http://killtheliterate.com , needs to have a scrollable pane ontop of the right hand column... a way to display images that link to other things... and because the page is resizable, i was thinking that instead of using the jquery slider, which seems to call for a fixed width, i could but arrows on either side of the pane that scroll to a next
[jQuery] click event firing twice in Firefox
Hi all, I've got a really pesky issue. For some reason, Firefox (both version 2 and 3) is firing multiple click events on checkbox elements. This isn't happening in IE, Chrome, or Safari. I'm using event delegation, in the form of a plugin that looks like this: (function($) { $.fn.delegate = function(eventType, rules) { var i = 0; return this.bind(eventType, function(e) { var target = $(e.target); for (var selector in rules) { if (target.is(selector))
[jQuery] Superfish menu hide -- error in hideSuperfishUl()
Hi, My menu items don't actually open a new page, so I took the href attribute out of the link. When someone clicks on a menu item, I want the menu to disappear. I read all the threads about this (too old to reply to on Google Groups). I get errors when trying to call hideSuperfishUl() In Safari: Syntax error, unrecognized expression: . at superfish.js, line 104, which is (along with line 105) as follows: var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not (not).removeClass(o.hoverClass)
new to jquery, stuck with menu
Hi every one, First of all, let me tell you i'm very very new to javascript and jquery so if i make a mess with the code, please understand! Also i speak in spanish so if i have a bad writing or doesn't make much sense in some phrases....thats the reason! I'm making some kind of menu but i'm having some issues.... here i paste some html <li><span>servicios</span> <div class="subbtns"> <div> <a href="" title=""><span>» Branding</span></a>
question on using the $() factory function
I want to pass a parameter to the factory function that gets child "ul"s from "this" so like $(this > ul). this obviously doesnt work since one is an object and the other is a string. Whats the best way to express this? here is my code which obviously doesnt work. var li_list_level1 = $('.level1'); li_list_level1.bind('mouseover', function(){ clearTimeout(t); resetSubmenus("level1"); $(this > ul).addClass('over'); });
[jQuery] listmenu plugin: content jumps
Hi With the following code the content jumps at page load, just press f5. Can this be prevented? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link rel="stylesheet" type="text/css" href="css/listmenu.css" /> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.listmenu.js"></
[jQuery] html() and clone() causing problems in IE
I am aware that IE provides bad HTML from the innerHTML property of a DOM element but when I duplicate a hidden template layer in my page and add the clone to the page IE is showing some of the input tag's inner contents within the text input area. Please see the attached screen shot. http://www.nabble.com/file/p23931280/Screenshot.jpg The code doing this is as follows: // Create a copy of the template to be used for this form var form = $('#templates > '+o.template).clone(); var placeHolder = target.children(o.placeHolderSelector);
[jQuery] jQuery Cookie Plugin
Hey guys, I'm working on a project where I am using the jquery plugin that Klaus made. The cookie works very well with the exception that when the user closes the browser the cookie expires. I've been trying to figure out how I can set the var for expiry so that this doesn't happen but I am at a loss. Any advice?
[jQuery] listmenu plugin: UL being shown unformated before listmenu() call
Hi Had a problem with the ul being shown unformated before the list got handled by $('#mylist).listmenu();. Solved this by adding #mylist {display:none;} in my css file and then <script type="text/javascript"> $(function(){ $('#mylist').listmenu(); $('#mylist').css("display","block"); }); </script> It works ok, but maybe you could consider adding this so it would be handled automatically by listmenu. Cheers
[jQuery] How can I move a div around the screen like iGoogle?
Hello everyone!! I'm new here!!! I'm starting to know how many advantages has JQuery for developers. I'm trying some experiments, and the other day I saw the "iGoogle" interface, where users can move the gadgets around the screen, and this stuff liked me very much. That's why I want to ask to the community if anybody knows if there is some plugin or library in JQuery to do the same effects and allows the programmer to move a div from one point of the screen to another one and fix it. Thank you!!
[jQuery] jQuery expander plug-in doubt!
Hi, Is my first approach to JQuery and I will like to know if it is possible in the expander plug in to contract the first expaned text when you want to expand a new one. The idea is just to have one expanded text, is it possible? Thanks emasso
My Animate() callbacks execute before the animation is finis
Hi! I'm animating a sliding panel but my callback executes right away when you click the slider link. This is the code: $(document).ready(function(){ var stat = 0; // Event Binding $("#top-panel a.login").click(function(){ if (!stat) { $("#top-panel").animate({ "top": "0px" }, { "duration": "slow", "easing": "swing" }, $("#top-panel a.login").addClass("panel-down")) stat = 1; } else { $("#top-panel").animate({
[jQuery] adding script that uses older jquery
hello! i'm trying to add a script to my page but there seems to be a conflict jquery. <script src="js/jquery.js" type="text/javascript"></script> <script type="text/javascript" src="js/interface/ jquery.shoutbox.js"></script> <script type="text/javascript" src="js/interface/interface.js"></ script> <link rel="stylesheet" type="text/css" href="css/shoutbox.css" media="all" /> is it possible to use two versions of jquery in the same page?
[jQuery] Window Explorer like tree
Hi, Is there any plugin with the help of which we can have windows explorer like tree struture with Jquery ? There will be a tree pattern of folders and files on the left side and whenever an user clicks on an folder the internal files should show on the right panel as well. Please help Thanks
HTML additions - rebuild DOM?
I'm using the jquery html() function to rewrite a div with page links (1, 2, 3, etc.) The problem is that if I rewrite this div, the elements no longer fire in jquery. When I outright print <li><a href="#">1</a></li> in the source code, jquery notices clicks on 'li a' ... once I have rewritten this div with generated html from within jQuery, these firings no longer function. Is there a way to force a rescan of the dom? Or is there another solution? I haven't tried it yet but what about onclick? I
[jQuery] [validate] multiple labels per form element
I've found the Validate plugin to be really useful, but one issue I have is the label markup that the plugin generates to contain the validation message. Since forms should have label markup associated with the field description (e.g. "First name"), this means that you end up with two labels associated with each field. The W3C allows multiple labels per form element, but unfortunately many screen readers apparently can't cope with this. See: http://www.456bereastreet.com/archive/200809/multiple_form_labels_and_screen_readers/
[jQuery] Superfish IE6 and IE7 failures
I'm having two issues with Superfish in IE6 and IE7: 1. It doesn't work at all in IE6, though it appears from other posts that this is to be expected. Is there any way for it to degrade more gracefully and have some functionality? 2. In IE7 the menus show up fine but disappear instantly when the mouse leaves the top level menu item. Not sure what to do at this point. Here's the link: http://www.jeremyschultz.com/client/orchardplace/website/beta/ Jeremy
[jQuery] Mouse cursor changing on animation
Hi, I've created a carousel widget on http://www.getpersonas.com/ (under 'Featured Personas' and 'Featured Designers'). Every now and then when the arrow navigation images are clicked, the mouse returns to the default arrow from a hand. (note: when you are at the end of the carousel, the mouse will change to an arrow). This is not supposed to happen, if I move the cursor away from the navigation arrow and back over, it changes back to a hand as intended. It should stay a hand until the end of the
Next Page