JQuery :: Manipulation Is Not Happening?
Aug 6, 2010jQuery('div#primary').attr('width', '300'); I am manipulating html file. I am doing the above. But It is not updating the html file with the new width.
View 2 RepliesjQuery('div#primary').attr('width', '300'); I am manipulating html file. I am doing the above. But It is not updating the html file with the new width.
View 2 RepliesI want to make a kind of slideshow with picture and text.The script at this moment:
$(document).ready(function () {
$("#BildLeiste0").show(2000).delay(8000).hide(2000);
$("#BildLeiste1").show(2000).delay(8000).hide(2000);
If I run the site, both animations run at the same time. I would like to achieve, that the animation atBildLeiste0 runs first and after it is completed the animationtBildLeiste1should start.If this runs the way I want, I want to make the script flexible from 2 two 6 animations and finally generate it so that it runs in an infinite loop.This is one of the first jquery-codes
I have a text box where a user can press enter, tab (keypress) or click out of it (focusout) and an action happens. The box then gets removed. The problem is, the user presses enter, but that event is fired and then as the text box is removed the focus out is firing again.
How do I prevent removing the text box from firing the focusout action? I can remove the action totally but the text box could be returned to the document later.
I have a problem that suprisingly (not) only affects IE.
I have a hover/mouseover event when a users cursor enters a div, but because there is text inside my div IE is replaying the event if I hover in/out of the area that has text even though it is in the same div.
This is what I have:
Code:
$('.reason-1').mouseover(function(){
$('#first-r').stop(true, true).fadeIn(600);
$('#first-r-info').stop(true, true).delay(400).fadeIn(800);
[Code].....
how can I stop IE playing the action again if the user is still inside the same list element?
I've got the below function that works perfectly fine in FF, but it acts like nothing is happening in IE 8. I've tried the no cache option, my own url random addition and numerous variations.
View 2 Replies View RelatedI've been working on a multi-level drop down menu. It is already finished but while making it I encountered a problem that I'd like to find a solution for.
In the code, I clearly seperated the Model, View and Controller parts. The View part basically works with a single redraw-function. It clears the HTML of the complete drop-down menu and redraws it by recreating the needed DIV elements and adding them back to the webpage. The Controller part is a simple state machine that has transitions on onmouseover, onmouseout and onclick events.
In practice, when the mouse was moved over or out of some menuitem, the menu would be redrawn. The redraw function would first remove the complete menu from the HTML dom, and then re-insert the elements of the changed menu. Each of these elements contains a onmouseover and onmouseout argument.
The problem is as follows: in every redraw, when the menu is removed a onmouseout event is triggered, and when the menu is re-created a onmouseover event (in FFox). In IE, for some reason only a onmouseout event is triggered. This made my state machine think that the user actually moved the mouse pointer out of the menu element. Therefore the menu would go bananas and collapse!
The best way to solve this seems to simply ignore all of the user inputs during the redraw funtion for, say, 5 milliseconds during the redraw. However, in pratice, when the user moves the mouse very quickly the state machine 'misses' a mouseout event and the menu doesn't disappear as it should.
My question now is: does anybody know a neat way to prevent these 'ghost' events from happening while rebuilding the page, without interfering with the 'real' events?
I'm trying to echo a php variable to my javascript function but nothing is happening.Basically this php page displays bunch of records with a radio button next to each record. So when the radio button is clicked it would open that record in a new window that is clicked.
<input type='radio' name='option' value='$ctr' id='$ctr' onClick="edit_record('<?php echo $ctr ?>')">
<script type="text/javascript">
function edit_record(){[code]....
How to change the CSS to add a tag with the append(), after(), ... or html() ?
$('#one').html('<div id="two">test</div>');
$('#two').css('color', 'red'); // doesn't work
I have
<p class="govnocms" id="111">mother</p>
<p class="govnocms" id="222">mother</p>
<p class="govnocms" id="333">mother</p>
[code]....
I am currently creeating a navigation, am am a bit stuck with the navigation.[code]So there should be a new <ul> after every third list element in the sub-menu.[code]
View 2 Replies View Relatedwe have a piece of code which does some XML manipulation and it broke in IE (at least 7) between jQuery 1.5 and 1.6.At this link is the chunk of code running on 1.5.2:[URL]and at this link is the same exact code on 1.6.1 and erroring in IE: [URL]On the second link, IE is reporting an error down in jQuery for invalid number of arguments to a method. The second alert never shows.
View 1 Replies View RelatedI have set up a disclaimer page for our public access PCs at our Libraries which has the following function:
function breach() {
alert("Proceeding beyond these Conditions is..................... If you have read the Conditions, scroll to the bottom and press the 'Yes I
agree' button.")
window.location="disclaim.htm"
and then in the body tag I have onunload=breach()
This works fine for all websites entered into the address bar except if
you enter www.google.com
What it is supposed to do is bring up the prompt and when you click on the OK button it will go back to the disclaimer page. They should only be able to get to the web by clicking on the 'Yes I
agree' button at the bottom of the disclaimer page. Does anyone out there know why google doesn't fire up the disclaim.htm page like all the other sites? It is very frustrating.
I am trying to use Jquery as an XML tool to transform xml data other than the DOM.
This works very well and i can change my xml data.
Now i want back my whole xml that i just transform and this is where there is a problem !
$(xml).find('#id').html('some text').parent.parent.parent ... is not a good way
I read something about the defaultContext but it seems risky / hazardous.
Needed fonction would be $(xml).find('#id').html('some text').getRoot().html(); or something like that.
I built an IE-only function that modifies the DOM to create a custom container with rounded corners and some shading at the top. It only gets called when the browser is IE and its version is < 9. It takes the following block:
And turns it into this:
The UI looks identical to FF, which uses the CSS3 attributes to create the rounded box. HOWEVER, in IE8, I can no longer access the embedded <input> element (which does not change). I'm trying to get the value of the <input> tag with the ID of "username" by doing this:
When I disable my DOM manipulation code so that in IE, it remains an ugly, square box, I can get the value of the <input> element with no problem. Once I manipulate the DOM, IE always returns the empty string while FF and Opera work perfectly.
I need to do multi DOM manipulation into a page without reload it (something like: when i click on a thum in another part load a photo with a specific text, if i click on this text load another photo).
I use a js like:
First page loading everything goes good.... but when i fall into MY_CODE1, i can't execute MY_CODE2 anymore.....
I need this iframe for a facebook tab, since they changed the width to 520px. The original page in the iframe is 700px wide, and I've changed a few CSS properties using the frameReady plugin. It's works just fine, but trouble starts, when i'm navigating the target site, the CSS properties I've changed goes back to the original settings.
This is my code:
<script>
$.frameReady( function() {
$("#gmap-auto1map-gmap0").css("width", "520px");
$(".views-view-grid").css("width", "520px");
[code]....
Try clicking any of the 'view on map' links, then you'll see where I'm getting at.
How could I work around this? Can I make it apply the script every time something new loads into the iframe?
I manipulate XML with jQuery with no problem in all browseres but not in Internet Explorer. I serched bug-fix and I found "metadata.js" but still not working in my Internet Explorer 7.It's just too nice to manipulate XML with jQuery...As a matter of fact... a simple example of extracting some data:Script page:
<!DOCTYPE html PUBLIC "-//W3C// DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
[code]....
Code works perfectly in all browsers except IE (Internet Explorer - "failing forever". Good job MS )
I got my code for adding my table ( HTML manipulation )But the problem is, that if u click an empty row, it need to change letter from S to Z ( and empty ( space ) So, i actually don't know how i can use those multiple's, so i started scripting from just an space to ... it didn't work.. but i was sure my script works, so i used it on other page .. and it worked ... here is my code
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){ ;
$("button").click(function(){ ;[code].....
I would like to display a series of smaller foreground images on top of a
larger background image and possibly even control the position of the
smaller images dynamically. Is this possible? If so what is the syntax for
placing the small images on top of the large one.
I am attempting to pass two user inputs into one variable (text, not array) to pass through my credit card company.
What I have done it two "onchange" scripts so that when the customer enters their information the script runs it does a search and replace on "name" for there name and "number" for their number. However!! If they change their name (or number) a second time the search and replace will fail as it will no longer find "name". Therefore I though some sort of RegX facilitated where I prefix their name with a hypen i.e. '-'.
Is it possible to use regX in this way in Javascript? Can anyone provide advise or a link?
Alternatively, am I making this a lot harder than it needs to be!? i.e. could I do an onSubmit instead to change it? I have tried this, however it didn't seem to work.
I've written several scripts that have "while" blocks which increment a
date by one day if the date does not match one of a group of dates.
However, sometimes it apparently steps out out the while loop even
though my condition isn't met. Will work for a few loops then steps out
often.
Are there javascript "date" issues? I have also noticed different
results between Firefox and Internet Explorer.
New to javascript and still getting my head around strings...
Consider the following line of code...
var path = location.pathname;
....after execution, the variable "path" contains something like
"file:///C:/Documents%20and%20Settings/user/Desktop/Test/fileread.htm"
How do I parse this down to "C:Documents and SettingsuserDesktopTest"
....or at least to "C:/Documents%20and%20Settings/user/Desktop/Test"
Is there a better function to retrieve the source folder containing the
current HTML document?
I need to know the path to the current folder to reference other files in
the same directory using a FileSystemObject.
This is a personal problem (he he) - not for work or school. I have tried to avoid adding Javascript to the things I need to learn but now I find myself needing to use it. I have several textareas in a form. I found (on this forum) a short piece of code (function) that will clear a textarea. It works just fine as long as I hard code the textarea name. I would like to use this one function and pass to it the name or Id of the text area I want to clear.
[Code]...
I want a script to receive a time in the 24 hour time format HH:mm (e.g. 18:30) and remove 15 minutes from it.The problem is that if the time inputted was 00:00, then how do I get to 23:45?
I'm sure it's easy if you're in the know.I can do this with PHP, but not with JS.I just need the function / basic line of code that does this. I can work out how to call it etc. myself.
I'm trying to write some javascript code that will swap two rows in a
table, in an attempt to provide users with an easy and visual way to
manually change the order of the listed items in a table.
The sample code works as it should in IE, and switches the two rows
nicely.
In Mozilla however it fails the first time, but for some odd reason it
works fine afterwards.
Mozilla doesn't seem to be removing the duplicated node the first time,
which makes it appear as if an extra node is inserted into the table
(which is actualy the case), but on subsequent attempts, it seems to be
removing the duplicated node perfectly... Code:
I've two different frames and I want dynamically read the value's with a for loop in a different frame by object name. See my code example:
alert(top.frames['hiddenframe'].contexthiddenform.afkorting.value);
this works.
Now I want to make the field name (afkorting) dynamically
strName = (top.frames['hiddenframe'].document.contexthiddenform.elements[i].name);
alert(top.frames['hiddenframe'].document.contexthiddenform. + strName + .value);
This construction isn't working. The variable strName gets the name of the object (i.e. afkorting) but the alert doesn't work. Has somebody an idea what I'am doing wrong?