I am wanting to select a set piece of html and and replace it with another piece of html.I've used the replaceWith command but I don't think I've written the script correctly to select the piece of html as it breaks the script.
Looking at the sample code below, if you click the same link over and over, I get the desired result / animation of the revealed div. If however you click 'link 2' then any link except 'link 2' the animation is different. What do I need to change in my logic to always get the desired result despite which link was clicked?
I've been using this little bit of code to show a div when the user rolls over a link: $('a#eventspopupbtn').mouseover(function() {$('#menu').hide('fast'); $('#eventspopup').show('fast'); return false; }); I have been trying to extend this bit of code so that there is a short delay built inso that if the user rolls over the link by mistake or 'just passing through' the div is not displayed. I tried using setTimeout but couldn't get that working (unfortunately, I can't share that with you because I lost the code).
Working on creating my own plugin and realized that I would very likely end up doing this again in the future. Unfortunately, I have an extremely short memory when writing code. I frequently have to re-read the code I've created the day prior so I can get back on track with what I was doing. As such, I'm a fervent commenter in my code.
So, I'm creating a jQuery plugin framework with comments for everything that's going on in the framework to prevent my brain from having to re-learn everything in a month or so when I do another one.
Plugin-savvy folks to take a look at this code and help me fill in the blanks and make corrections to those places where I'm way off base. As you'll likely notice rather quickly, this is taken from the jQuery plugin tooltip construct found here: [url]
First of all, sorry for my other post, my first post didn't go through, I didn't get the chance to read the message, so posted again I've got this code:
Code:
var currentURL = event.target.browserWindow.activeTab.url; if (currentURL) event.target.browserWindow.activeTab.url = 'http://www.google.com';
I want to show some message in a box when the mouse is over a button (examples: undo, save, open, ecc ) like in some interface. I don't want to display the mesage in an alert window.
I've been tasked with fixing a problem on a site that I didn't develop, but in a nutshell somebody wrote a little Javascript that appears to only be working in IE. I'm not sure why...would anybody be kind enough to have a quick look?Page in question is: http://www.thomastonauction.com/newA...eSignature.phpThe script not working is in the head of that page, and looks like this:Code:<!--this appears to be the script that is called when users click the "submit to thomaston auction" button,which should trigger an email containing the bid info. to "auction@kajav.com" and open a printable copy of the bid in a new window ("newAbsenteePrintForm.php")-->
<script language="JavaScript" type="text/JavaScript"> function openPrintForm(sid) {
I am using a simple javascript slide show. The actual width of it is fine, but the scrolling part is messed up, it's suppose to start at the very right and scroll all the way left. Instead it scrolls in like a 150px area and repeats. How can I get the picture to scroll the entire length?[code]...
anyone know of a good method or run JavaScript programs locally without the web server piece? For example. I use jQuery, and develop in FF initially. Sometimes I will get a JS in error, something like Invalid Argument line 12 in jQueryThat tells me nothing. Which script is causing the error? Who knows. It's a pain as I'm sure many are aware. Aside from removing one script at a time, and clearing your cache all the time, is there a better method to pinpoint errors?
I'm trying to make a quick and dirty mp3 player that plays whatever mp3 is in the URL, for example [url] would open the SWF mp3 player (I chose this one for its simplicity[url]) and play that song. However, nothing I've tried works. Could someone take a look at my code ? Please note that downloading the mp3 through newwindow() works perfectly.
I am coding a page that has 6 buttons on it, from which one is the correct button (the target). I want to try and implement the following:
1) when a wrong button is clicked, the file "wrong.mp3" is played. It is less than a second long.
2) when the correct button is click, the file "right.mp3" is played. It too is less than a second long. The page then redirects/reloads. This is the code that I can't seem to get to work:
I need help with a code that will generate a random number or integer (from 1-9). Does anybody know of a short random generator without having to import anything?
I must be missing something, is there not an easy way to validate inline?
For example, I have a required text input that is given focus on page load, I would like for it to throw an error if the user moves to the next field w/o entering any data.
I am developing a web-application using ASP.NET 3.5,javascript,ajax I have a form with two textboxes with ID's firstname and lastname. Both of them have the attribute runat="server". When the user types, I use AJAX to request the possible names. For example if the user types an 'a' in the textbox with ID firstname the textbox will trigger a javascript function that uses AJAX to get the first person in the database wich firstname starts with an 'a'. The callback function recieves this firstname and fills it in in the textbox. When i do this the content of the textbox will be the requested name and the cursor is at the end of the textbox. This prevents the user of continuing typing the rest of the name. Is it possible to select a part of the text in a textbox?
How do I create random 15 letter/number piece of text that is composed of letter and numbers jumbled together then automatically place that in a field? This is all of course activated by a link.