Google maps and jquery
Yep, your worst nightmare - another newbie :) Ok, I've attached an html file (won't let me attach a js file so I'll add that end the end of this post). Currently the map opens ok in the html file at the proper location. If you look below the map you will see a button that says "show markers". This pulls data from an xml file and this also works great. When I add more coordinates to the xml file it expands the map to show all markers when I press the "show markers" button. The html for the button
[MOVED] Core Engine Questions
I am a jquery newbie. We automated a site recently and several jquery's came to using a core engine of jquery 1.3.2 What does the core engine do? Should one core be OK for all jquery's? I also have two cores associated with the site as there is a module I rebuilt because it came to us not keyboard accessible. When I tried to use one base core, but the functionality didn't work. So far I haven't had a problem. Thank you in advance Nancy Johnson
jQuery code for treemenu doesn't work as it´s supposed to! Please help ASAP...
Hello, I have been interested of creating a treemenu with a template found att http://www.dynamicdrive.com/dynamicindex1/treeview/index.htm and the one I was looking forward of making was the demo #3... I have downloaded all files, edited the CSS file for the menus design and style, I have also created a .js file for the jQuery code setting up the functions I want available with my menu, unfortunality I ran into som difficulties forcing me to change this code which made it harder to understand for
How refresh div when click in a link ???
Hi, I am new in Jquery, what is the best thing to do with jquery for this senario : I have a page when loaded it populates a div from a database : <div> data1 --------- remove link data2 --------- remove link data3 --------- remove link </div> 1) when I click remove link ,I want to refresh the above div. thanks, your help is appreciated.
calling jquery function from within existing js function
i'm trying to call a jquery function from within an existing javascript function - is this possible ? i have the following : function function_name { if ( 1 = 2) { $.blockUI({ message: $('#disclaimer') }); } }but this doesn't seem to work. i have tested the following code outside of the existing js and it works fine : $(function() { $.blockUI({ message: $('#disclaimer') }); }); can someone point me in the right direction
I am trying to create a small application that needs to be hosted from the user's local file system.
I am trying to create a small application that needs to be hosted from the user's local file system. This application is to be distributed to several of my colleagues (total 5). I have no IT support thus, I cannot use a database or serve-side scripting. The application is constrained to Windows and IE6. At first, I thought this would be an easy task -- I was so wrong! I have several questions hopefully I can get pointed to the right direction. I will be using a very basic tab plugin -- Only 2 tabs:
Wrapping a html tag with an additional html tag.
I would like to use JS to grab all images and make them links. <img class="GrabMe" src="./X.jpg" alt="Alternate Text"/> into <a rel="Image" href="./X.jpg" title="Alternate Text" > <img class="GrabMe" src="./X.jpg" alt="Alternate Text"/> </a> Can someone help me understand how to do this for every img.GrabMe? I really don't understand how to wrap a tag with another tag. Thank you so very much in advance.
Slideshow doesn't fade in IE
Hello, I'm a newbie in jQuery land. I use a nice slideshow-script from Richard York The first issue is that it doesn't fade in and out in Explorer. In Firefox it works fine. Second, after a while the whole slideshow is messing up. Here is the link to my site var $$ = $.fn; $$.extend({ SplitID : function() { return this.attr('id').split('-').pop(); }, Slideshow : { Ready : function() { $('td.thumbnail') .hover( function() { $(this).addClass('thumbnail_hover');
How to keep things displayed onmouseout
Hi, I am trying to build this interface where I have some icons on the page. When user hovers mouse on one, it displays a corresponding section with some menu options (icons) - that I need to hide if user goes over another icon (and display this icons corresponding menu options. The problem is - I also need to keep a section visible if mouse pointer is on it. But since I am using onmouseout, as soon as I try to move mouse and click on a menu option, it disappears. Here's my code: <img
Beginnersquestion: How to select value between span tags
Hi, Can anybody tell me how to select a value between span-tags. The current HTML code looks like <div id="myid"> <span>somevalue</span> </div> And jQuery looks like: $('.myid').dblclick(function() { var title = $(this).val('span'); }); But that doesn't work :( I just want the 'var title' use somewhere in the jquery function. Thx!
.css() returning blank string in FF & Chrome but "undefined" in IE
Using jQuery v1.4.2, Firefox 3.6.6, Chrome 4.1, IE 6,7,8. I'm using jQuery .css() function to get the value of the css attribute "background". The attribute has not previously been assigned a value (either in script or style sheet). e.g. alert($(this).css("background")); In Firefox and Chrome, the return value is an empty string (""). However in IE 6,7,8, the return value is "undefined". It also makes the following statement impossible: alert($(this).css("background").indexOf("somepic.gif")); Because
Detect that the user clicked on browser's stop button
Hi, I understand that I can use the unload event to detect that a user has clicked on a link or submit button. But suppose the user is not willing to wait long enough for the server to respond and clicks on stop. Is there a way to detect that? Thanks and regards, Roland
Trying to dynamically add radio button + handler to my form on a button click, what am I doing wrong?
I am trying to produce a web form to allow wedding guests to RSVP. The form allows them to enter a name and select from a radio button whether they will be attending or not. If they select the "yes" radio button then a further pair of radio buttons are displayed for their meal preference. They can then click a submit button or they can click another button to add another line for another guest which operates in exactly the same way. I've almost got this working, but it seems that the checkbox change
Can someone help a Noob with Jquery and Cookies and Blooger
Hi, I was wondering if someone could help me please. On my Blogger Blog I have this code in the template <b:if cond='data:blog.pageType == "index"'> <b:else/> <p><data:post.body/></p> </b:if> This code basically shows the body of the blog post only when it's on an individual blog page. You can see an example here www.spoilertv.com When you are on the homepage only the post title is displayed. Clicking on the title gives you the full post. What I would like to do is to give the reader of
How can a slide push another slide??
Hello, i'm working on a particular example in the following link which is really helpful : http://vidasp.net/tinydemos/overlapping.html. I would like to know if it is easy to change the animation in the previous example. In that example a slide overlaps the other slide (cool!). I would like to add a new animation (pushing) I would like each slide to push another slide and not overlapping each other. I saw another example in the internet in the following link http://www.webappers.com/2007/09/05/smooth-and-clean-fastfind-menu-jquery-plugin/
Using TAB to change focus - is there a better way than this..
One thing that irks me is lazy/un-optimised scripting which slows down my browser. The jQuery API home page is an example of this! Go to http://api.jquery.com Press the TAB key and notice that the "focus box" moves from one function to the next. But why is it so incredibly slow? I'm working on a similar sort of page at the moment, and I'd like to know if there's a better - quicker - way of doing this than the API page exhibits, or if I should forget trying to do it. I'd rather present my data a different
using single quote in jquery
Hi i am having problem while using single quotes in jquery. I am assigning a value to a textbox. if that value contains single quote it is not working. I am using this code in C# code behind file. string sScript = "$().ready(function() {" + "$('#" + txtNameTextBox.ClientID + "').val('" + sName+ "'); " + "});"; sName may contain any string including single quote. for ex: sName="Test'Test" Even i tried using Test\'Test (escape sequence) it
Help me with prev();
Hi dudes. Someone help me with this code: var iconesObrigatorios = $("img[id$='_icone']"); iconesObrigatorios.each ( function() { var idLabel = jQuery(this).attr('id'); idLabel = idLabel.substr(0,idLabel.indexOf('_icone', 0) ); idLabel = idLabel.replace(/:/g, '\\:'); // i guess the error is here!!! $('#' + idLabel).parents('span.p_AFRequired').prev(this).append(this) $(this).css('float','right'); } ) and the html code is: <td
Simple jQuery
What wrong with this code? I want to make something like http://www.nimpkish.com/blog/simple-javascript-image-gallery <head> <style> #images_full img, #images_thumbnails img {padding: 3px; border: 1px solid #CCC;} #images_thumbnails img {margin: 4px;} </style> </head> <body> <script src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script> $('#images_thumbnails a').click()function(){ var newImageSrc = $(this).attr('href'); $('#images_full img').attr({'src': newImageSrc }); return false;
Update value of input inside hidden div
Hi all, I'm new to Javascript and jQuery, but trying to learn fast. Any pointers are appreciated! I've got a select box that, when you choose any option besides #5, it changes the value of a related input box from 0 to 1. This works great except when I hide() the div that wraps this input box. My overall goal is to have the input (and surrounding div) hidden via hide(), and then update this input box when a select is changed. Here is my code: $(document).ready(function(){ $("div#edit-qty-56-wrapper").hide();
Conditional Toggle / Newbie
All, Thanks so much for the help in advance. I'm a newb in the js/jquery realm so I apologize in advance. I'm trying to develop a script that will show/hide form buttons based on the users input (checkbox, radio button, etc). This is taking place within a modal and there will be default previous/next buttons at the bottom right of each modal, but based on the users interaction, they could/will trigger different buttons to shown and the the previous/next buttons to disappear. I have the modal developed
When MUST I use ; to indicate the end of the JS statement in jQuery?
Hello all, For the following two snippets, they can all pass Firefox. However, I would like to know the rule of thumb when I have to use ; to indicate the end of JS statements. Thank you (function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text') .attr('readonly',readonly); } })(jQuery); /////////////////////////////////// (function($){ $.fn.setReadOnly = function(readonly) { return this.filter('input:text') .attr('readonly',readonly); }; })(jQuery);
Href in output code causing $getJson() function to try to load up a file with href in url
Hi, I'm using the following code (simplified version) to call a Json file, parse it and on each iteration, create a div with an ID of "tab". I'm using this with jQuery UI .tab() to create a listing with entries which have three tabs. Anyhow, the principle seems to work except that when I examine what's happening behind the scenes using Firefox console, I see that each href in the html code produced is causing the Json function to re-fire using the href as it's url target. Seems really strange behaviour
Detecting change to a textarea when change not initiated by user
I'm using a text area to display textual updates to a user from the server. I'm inserting the text at the bottom of the textarea and need to set the scrollbar to the bottom of the textarea after every update. The problem is that the onChange event only fires if the user actually changes something in the text area, not if it is changed by an ajax update. Does anyone know of a way to detect if there has been an update to a textarea that was NOT triggered by a user?
Problem with ajax functions callback and json
I have strange behaviour on ajax callback functions, lately I had a similar problem about which I posted which mysterioulsy went away, it just started working. Now I am trying to get something done and have the same issue again. I have this php function getdeck.php which returns an array: getdeck.php: <? $name = $_GET['name']; echo file($name); ?> Now if I do: $.get('getdeck.php', { name: 'Celtic' }, function(data) { alert('hi world'); }); I get the alert, but if I try the json datatype: $.get('getdeck.php',
noob question: get(0) doesn't work ??
I'm writing a plugin, and I simply can't get get(0) to return the first object, even though the object array is not empty .. what the hell am I doing wrong? Take a look at this code: jQuery.fn.myPlugin = function(options) { //alert ("inside plugin"); this.each(function() { var testit = jQuery(this).parent(); //OK // OK: var testA = jQuery(testit).children("someclass"); // returns 2 elements in my case console.log(testA); // OK // Doesn't work:
Can a click handler be used multiple times?
I have an img which I use as a button to initiate an ajax interaction with the server. I have attached the following click handler to it: var current_editor = new Editor("maintext", "main", "index"); $(function() { $("#edit_button").click( function(event) { current_editor.open(); }); }); This works exactly as I expect it to ... once! How do I set this up so that the user can click on this button a second time and open the editor? I run this on FireFox with Firebug active. My code runs without
Using slide panels
I am implementing the following example into a project I'm working on... Simple Slide Panel When clicking Slide Panel, the panel pushes everything down. How do you modify it so that instead of pushing everything down, it just slides down over the top of everything else?
ADD and SAVE Buttons
Need help using JQuery to ADD new dosage and SAVE any updates. I have attached the relevant files in a zip folder. Thanks in advance.
how to get next slide instead of scrolling in this?
I am using this plugin in wordpress http://www.iwebix.de/front-slider-wordpress-plugin-demo/ As you can see in the demo above, the left and right arrow buttons are the controls for scrolling the thumbnails. i have already changed these lines to change mouse over/out to onclick event u.onmouseover=new Function('SLIDE.scroll.init("'+this.thumbs+'",-1,'+this.scrollSpeed+')'); u.onmouseout=r.onmouseout=new Function('SLIDE.scroll.cl("'+this.thumbs+'")'); r.onmouseover=new Function('SLIDE.scroll.init("'+this.thumbs+'",1,'+this.scrollSpeed+')');
Slight problem with this accordion script
Hi All, I'm just getting into jQuery, and am attempting to build a navigation system which has a horizontal sub-navigation inside a standard vertical one. I was having all sorts of issues with just getting the sub-navigation to show/hide, but am finally beyond that. The only thing now, is that it isn't acting like an accordion at all! Upon opening, all the sub-navigation items open up, but when clicking any of the main navigation links, it starts to act like an accordion, but I can also completely
Finding size AFTER object is resized
http://jqueryui.com/demos/resizable/ How can you program an "alert" for the object width and height AFTER it's been resized? <style type="text/css"> #resizable { width: 150px; height: 150px; padding: 0.5em; } #resizable h3 { text-align: center; margin: 0; } </style> <script type="text/javascript"> $(function() { $("#resizable").resizable(); }); </script> <div class="demo"> <div id="resizable" class="ui-widget-content"> <h3 class="ui-widget-header">Resizable</h3> </div> </div><!-- End demo --> <div
reload parent page after modal onsubmit
Hi, first post and jQuery noob here. I have a modal and would like to know how to go about reloading the parent page once the submit button of the modal is clicked. Thanks.
Basic Question
I have the following jquery: $(document).ready(function() { $.get('news.xml', function(d){ $('#right').append('<h2 class="header">Blackbaud news</h2>'); $('#right').append('<ul />'); $(d).find('post').each(function(){ var $post = $(this); var description = $post.find('description').text(); var pagename = $post.find('pagename').text() var html = '<li>' + description + '</li>'; html += '<li class="more"><a
using tabs but use full url on click
HI HI i am new to JQuery and php i have done more php than Jquery though i only started using it as from yesterday and liking it alot. I have my site and it contains the Smooth gallery plugin (if your aware of it). But it seems to be giving me issues. I am using the tabs of JQuery however it wont load some content how i want it to unless i put for example #template or #motd..... Is there a way i can make it pull out the full URL when a tab is clicked rather than nothing?? e.g. www.mysite.co.uk/#tab1
conflicht between "pretty photo" and "easy slider"
i have been added 2 scripts in one page in my website and portfolio. "pretty photo" from here http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/ and "easy slider" from here http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider but when i put them in one page they don't work together. the easy slider work and the pretty photo stop. and when i remove the easy slider codes entry in the header the pretty photo work and easy slider stop. i really don't
How to calculate X and Y of a div?
Hi, I want to calculate X and Y of a div, but I get an infinite loop, can you tell me please what's the problem with my code? Left = Obj.offset().left; while(Obj.offsetParent()!=null) { ObjParent = Obj.offsetParent(); Left += ObjParent.offset().left; Obj = ObjParent; }What do you think?
jquery - javascript usage
I'm putting together an app that has few pages. I'm using an ajax call to popluate a div with 'sub pages'. Each of the sub pages has its own jquery / javascript stuff . As I navigate between and return to pages what (if anything) do I need to clean up behind me. I tend to use this kind of syntax in each page to act as a kind of namespace for function calling etc var edit = { init:function() { $("#actSave").unbind("click").click(function() { if (edit.validation()) {
check visibility element
hi. i'm newbie on jquery i have a problem like $(document).ready(function(){ $("dd:not(:first)").hide(); $("dt a").click(function(){ $("dd:visible").slideUp("slow"); $(this).parents().next().slideDown("slow"); }); }); my code always call when i click "dt a" but i dont want like this. i want like that if i click element visible don't do anything. my code call when i click element "dt a" unvisible.
.load() acting....oddly
So I have SUPER basic block of code and it is not acting as I thought it should. I'm just about to start messing with .load and doing a bit of testing before i move into allowing a PHP script to fill in content, but it doesn't appear to be working. So here we go: <html> <head> nonsense </head> <body> some html </body </html> The above should be loaded pretty easily by: $('#target').load('test.html'); However I was getting nothing. So I filled in #target with some jibberish and reloaded. Which
Next Page