[jQuery] Re: missing ) after argument list SOLVED
I do not know why, but using single quotes instead of doubles did solve my problem! See the difference: $testReplace2 = div id='pos1-0'img name='pos1-0' src='test.gif' height='50' width='50' border='0' alt='white_pawn'/img/div; $testReplace2 = 'div id=pos1-0img name=pos1-0 src=test.gif height=50 width=50 border=0 alt=white_pawn/img/div';
[jQuery] Animate just works once?
Hi all I am testing a msn-look-a-like message box. So, when a message to a user is needed, the message-box shows up and disapears like a msn-message. The first time it works very well! But.starting it for a next time, there is no animation, the messagebox comes up right away, while after a few seconds it does disappears the msn-way! So my question is, what am i doing wrong?? I have tried several solutions (see code below) but none of them solves my problem! Thanks in advance for any hints! !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head script src=jquery/jquery-1.3.2.min.js/script script $(document).ready(function(){ $(#go1).click(function(){ // showing up textblock (animated msn-look) $(#block1).animate( { height:200px }, { queue:true, duration: 3000 } ) // waiting time: .animate( { borderLeftWidth:1px},3000 ) // disapearing textblock (animated msn-look) .slideUp(1000); // reset something, else next time showing up isn't animated, // while disappearing the msn-way still does?? //$this.css( { height:0px } ); // does not solve the problem //$this.css( { height:0px},5000 ); // does not solve the problem //.hide(5000) // does not solve the problem //.animate( { height:0px},5000 ) // does not solve the problem // new approach: // does not solve the problem //.slideUp(3000, function () { //$this.css( {height:0px}); }); // this does not solve the problem too: //$(#block1).css( {height:0px}); }); /script stylediv { position: absolute; display:none; background-color:#bca; width:200px; height:1.1em; text-align:center; border:2px solid red; margin:3px; font-size:14px; right: 0px; bottom:0px } button { font-size:10px; } /style /head body button id=go1Show message msn-look/button div id=block1msn-look msg.../div /body /html
[jQuery] UI replacing background image after resizing, how??
Hi all, i have a resizable (grid 50) div with a background image. When i resize, i want to change my background image, like: bg400.png for bg350.png. But how do i detect the new heigth/width and how do i replace the background image? Thanks in advance for any answer!
[jQuery] How to resize div for new content with load?
Hi all, i use a menu for loading new content inside a content div, so far so good. Most of the time i have to load a big table, which is higher then the content div. In this case the footer div does not go down, my content div does not resize his height and goes through the middel of my table. Not sure if this is a jquery issue or a css issue Menu code: $('.sub li a').click(function(){ // test alert //alert(clicked on sub item..); var toLoad = $(this).attr('href'); // test alert //alert(content to load: + toLoad); $('#content').hide('normal',loadContent); $('#load').remove(); $('#wrapper').append('span id=loadLOADING.../span'); $('#load').fadeIn('normal'); function loadContent() { $('#content').load(toLoad,'',showNewContent()) } function showNewContent() { $('#content').show('normal',hideLoader()); } function hideLoader() { $('#load').fadeOut('normal'); } return false; });// end of menu This are the div's: div id=contentwrapper div id=contentcolumn div class=innertube div id=contentInitial Content... /div !-- Einde div content -- /div !-- Einde div innertube -- /div !-- Einde div content column -- /div !-- Einde div contentwrapper -- And CSS: #contentwrapper{ float: left; width: 100%; } #contentcolumn{ margin-right: 200px; /*Set right margin to RightColumnWidth*/ } .innertube{ margin: 10px; /*Margins for inner DIV inside each column (to provide padding)*/ margin-top: 0; } no css for content div. How do i specify and change the height of the content div?
[jQuery] How to grab the filename (src attribute) of an image?
Hi all, how do i grab the filename of an image? Situation now: i use normal javascript when clicking on an image and just inserted some jquery to post gamedata to update a gamepage with the help of the taconite plugin (returns xml-data), so far so good. I just miss one item = i need the filename (src attribute of the image) of the image on which was clicked, ut just can't figure out how to grab it. Thanks in advance for your help.
[jQuery] Re: How to grab the filename (src attribute) of an image?
Thanks for the answers, i see some daylight now, but i already have a normal onclick event on the image, triggering my normal js function: squareClicked(row,col,isEmpty) { // my other normal js function // with jquery : showing message div // my jquery post to taconite plugin page, processing gamedata and returning xml data to update gamepage // with jquery: hiding message div. } Where and how do i implement var fileName = $(this).attr('src'); This is the javascript link: a href='JavaScript:squareClicked(a,b, true)'img src='images/ test.gif/a
[jQuery] How to move an image to another div??
Hi all, i cant find a way to move an image from one div to another. I only found UI but that all works with mouseclicks?? What already works: when i click on an image, i use the taconite plugin, for processing game results (great plugin) and returning xml data so i can update some content (text). The only way i can update the game page, is refreshing the page, so retrieving, including the renewed one, all data again. waste of resources and certainly not a nice thing to view. What i am looking for, is a method i really can see the image moving to his destination div, without the need to click on it again. ( the first time is to select the image, secondly click on the destination div. This second click, triggers the ajax call to process the gamedata and should also nicely upgrade the on screen view. I can't figured it out with UI. Somebody any hints for me? Thanks in advance for helping me out.