[jQuery] Re: Question about jQuery effects and append method

2007-06-05 Thread radzio

Thanks a lot jqModal is what I was trying to do. I don't how I didn't
see in on Google. Thanks again Karl.

--radzio

On 5 Cze, 05:21, Karl Swedberg [EMAIL PROTECTED] wrote:
 If you just want it to appear when you click a link, then you
 probably don't want to append it to the body on document.ready. Put
 that in a click handler instead. Anyway, I threw together a page for
 you:

 http://test.learningjquery.com/create-window.html

 Is that the kind of thing you're looking for?

 Also, you might want to take a look at the jQuery plugins page
 (docs.jquery.com/Plugins) for a more robust implementation of this
 sort of thing -- more along the lines of the prototype example you
 pointed to. Here is one plugin that might interest you:

 http://dev.iceburg.net/jquery/jqModal/

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Jun 4, 2007, at 4:54 PM, radzio wrote:



  Unfortunately it doesn't work too. However it's a bit better but still
  I have this problem :/ I simply want to generate js window by clicking
  link   something like this -http://prototype-window.xilinus.com/
  but a bit more simply ;-). But I couldn't jump over problem I
  described earlier ;/. It's strange because in the Firefox DOM
  Inspector I can see created divs but I can't use them with jQuery ;/.
  Btw thanks Karl for help ;-)

  --Radzio
  On 4 Cze, 19:39, Karl Swedberg [EMAIL PROTECTED] wrote:
  A good place to start here would be to wrap your DOM elements in $(),
  so it would look like this:

  var htmlW = $('div id='+windowId+' class=windowdiv
  class=windowTopdiv class=windowTopContentWindow example/
  divimg src=images/window_min.jpg class=windowMin /img
  src=images/window_max.jpg class=windowMax /img src=images/
  window_close.jpg class=windowClose //divdiv
  class=windowBottomdiv class=windowBottomContentnbsp;/div/
  divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
  divimg src=images/window_resize.gif class=windowResize //
  div');

  then call your createWindow function within document.ready:

  $(document).ready(createWindow);

  --Karl
  _
  Karl Swedbergwww.englishrules.comwww.learningjquery.com

  On Jun 4, 2007, at 12:34 PM, radzio wrote:

  Hi!
  I'm making js script which allows to create div floating windows. I
  want to use jQuery + interface but I met with difficulties. I create
  html code with js:
  function createWindow()
  {
 var windowId = '#test';
 var htmlW = 'div id='+windowId+' class=windowdiv
  class=windowTopdiv class=windowTopContentWindow example/
  divimg src=images/window_min.jpg class=windowMin /img
  src=images/window_max.jpg class=windowMax /img src=images/
  window_close.jpg class=windowClose //divdiv
  class=windowBottomdiv class=windowBottomContentnbsp;/div/
  divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/
  p/
  divimg src=images/window_resize.gif class=windowResize //
  div';

 $(htmlW).appendTo(body);
 if($(windowId).css('display') == 'none') {
 $(windowId).DropInRight(1000);
 }
  }

  Unfortunately it doesn't work ;/ I read about $(document).ready
  (http://docs.jquery.com/Tutorials:Introducing_%24%28document%
  29.ready
  %28%29) and ... Is there any chance to generate html code in js then
  append it to body and add effects etc. to it?



[jQuery] Re: Question about jQuery effects and append method

2007-06-05 Thread Karl Swedberg
:-) right. that's because I was just dropping in radzio's code. I  
didn't mean for it to work perfectly on my server, just to give him  
something he could copy and paste.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jun 4, 2007, at 11:37 PM, John Farrar wrote:


In IE7 it had broken graphic links.

Karl Swedberg wrote:
If you just want it to appear when you click a link, then you  
probably don't want to append it to the body on document.ready.  
Put that in a click handler instead. Anyway, I threw together a  
page for you:


http://test.learningjquery.com/create-window.html

Is that the kind of thing you're looking for?

Also, you might want to take a look at the jQuery plugins page  
(docs.jquery.com/Plugins) for a more robust implementation of this  
sort of thing -- more along the lines of the prototype example you  
pointed to. Here is one plugin that might interest you:


http://dev.iceburg.net/jquery/jqModal/


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jun 4, 2007, at 4:54 PM, radzio wrote:






[jQuery] Re: Question about jQuery effects and append method

2007-06-04 Thread Karl Swedberg
A good place to start here would be to wrap your DOM elements in $(),  
so it would look like this:


var htmlW = $('div id='+windowId+' class=windowdiv  
class=windowTopdiv class=windowTopContentWindow example/ 
divimg src=images/window_min.jpg class=windowMin /img  
src=images/window_max.jpg class=windowMax /img src=images/
window_close.jpg class=windowClose //divdiv  
class=windowBottomdiv class=windowBottomContentnbsp;/div/ 
divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/ 
divimg src=images/window_resize.gif class=windowResize //div');



then call your createWindow function within document.ready:

$(document).ready(createWindow);


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jun 4, 2007, at 12:34 PM, radzio wrote:



Hi!
I'm making js script which allows to create div floating windows. I
want to use jQuery + interface but I met with difficulties. I create
html code with js:
function createWindow()
{
var windowId = '#test';
var htmlW = 'div id='+windowId+' class=windowdiv
class=windowTopdiv class=windowTopContentWindow example/
divimg src=images/window_min.jpg class=windowMin /img
src=images/window_max.jpg class=windowMax /img src=images/
window_close.jpg class=windowClose //divdiv
class=windowBottomdiv class=windowBottomContentnbsp;/div/
divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
divimg src=images/window_resize.gif class=windowResize //
div';

$(htmlW).appendTo(body);
if($(windowId).css('display') == 'none') {
$(windowId).DropInRight(1000);
}
}

Unfortunately it doesn't work ;/ I read about $(document).ready
(http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready
%28%29) and ... Is there any chance to generate html code in js then
append it to body and add effects etc. to it?





[jQuery] Re: Question about jQuery effects and append method

2007-06-04 Thread radzio

Unfortunately it doesn't work too. However it's a bit better but still
I have this problem :/ I simply want to generate js window by clicking
link   something like this - http://prototype-window.xilinus.com/
but a bit more simply ;-). But I couldn't jump over problem I
described earlier ;/. It's strange because in the Firefox DOM
Inspector I can see created divs but I can't use them with jQuery ;/.
Btw thanks Karl for help ;-)


--Radzio
On 4 Cze, 19:39, Karl Swedberg [EMAIL PROTECTED] wrote:
 A good place to start here would be to wrap your DOM elements in $(),
 so it would look like this:

 var htmlW = $('div id='+windowId+' class=windowdiv
 class=windowTopdiv class=windowTopContentWindow example/
 divimg src=images/window_min.jpg class=windowMin /img
 src=images/window_max.jpg class=windowMax /img src=images/
 window_close.jpg class=windowClose //divdiv
 class=windowBottomdiv class=windowBottomContentnbsp;/div/
 divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
 divimg src=images/window_resize.gif class=windowResize //div');

 then call your createWindow function within document.ready:

 $(document).ready(createWindow);

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Jun 4, 2007, at 12:34 PM, radzio wrote:



  Hi!
  I'm making js script which allows to create div floating windows. I
  want to use jQuery + interface but I met with difficulties. I create
  html code with js:
  function createWindow()
  {
 var windowId = '#test';
 var htmlW = 'div id='+windowId+' class=windowdiv
  class=windowTopdiv class=windowTopContentWindow example/
  divimg src=images/window_min.jpg class=windowMin /img
  src=images/window_max.jpg class=windowMax /img src=images/
  window_close.jpg class=windowClose //divdiv
  class=windowBottomdiv class=windowBottomContentnbsp;/div/
  divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
  divimg src=images/window_resize.gif class=windowResize //
  div';

 $(htmlW).appendTo(body);
 if($(windowId).css('display') == 'none') {
 $(windowId).DropInRight(1000);
 }
  }

  Unfortunately it doesn't work ;/ I read about $(document).ready
  (http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready
  %28%29) and ... Is there any chance to generate html code in js then
  append it to body and add effects etc. to it?



[jQuery] Re: Question about jQuery effects and append method

2007-06-04 Thread Erik Beeson


What about it isn't working? This simple example works fine for me:

$(document).ready(function() {
 $('body').append('div id=testThis is the test./div');
 $('#test').bind('click', function() { alert('This is from a test event'); });
});

--Erik

On 6/4/07, radzio [EMAIL PROTECTED] wrote:


Unfortunately it doesn't work too. However it's a bit better but still
I have this problem :/ I simply want to generate js window by clicking
link   something like this - http://prototype-window.xilinus.com/
but a bit more simply ;-). But I couldn't jump over problem I
described earlier ;/. It's strange because in the Firefox DOM
Inspector I can see created divs but I can't use them with jQuery ;/.
Btw thanks Karl for help ;-)


--Radzio
On 4 Cze, 19:39, Karl Swedberg [EMAIL PROTECTED] wrote:
 A good place to start here would be to wrap your DOM elements in $(),
 so it would look like this:

 var htmlW = $('div id='+windowId+' class=windowdiv
 class=windowTopdiv class=windowTopContentWindow example/
 divimg src=images/window_min.jpg class=windowMin /img
 src=images/window_max.jpg class=windowMax /img src=images/
 window_close.jpg class=windowClose //divdiv
 class=windowBottomdiv class=windowBottomContentnbsp;/div/
 divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
 divimg src=images/window_resize.gif class=windowResize //div');

 then call your createWindow function within document.ready:

 $(document).ready(createWindow);

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Jun 4, 2007, at 12:34 PM, radzio wrote:



  Hi!
  I'm making js script which allows to create div floating windows. I
  want to use jQuery + interface but I met with difficulties. I create
  html code with js:
  function createWindow()
  {
 var windowId = '#test';
 var htmlW = 'div id='+windowId+' class=windowdiv
  class=windowTopdiv class=windowTopContentWindow example/
  divimg src=images/window_min.jpg class=windowMin /img
  src=images/window_max.jpg class=windowMax /img src=images/
  window_close.jpg class=windowClose //divdiv
  class=windowBottomdiv class=windowBottomContentnbsp;/div/
  divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
  divimg src=images/window_resize.gif class=windowResize //
  div';

 $(htmlW).appendTo(body);
 if($(windowId).css('display') == 'none') {
 $(windowId).DropInRight(1000);
 }
  }

  Unfortunately it doesn't work ;/ I read about $(document).ready
  (http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready
  %28%29) and ... Is there any chance to generate html code in js then
  append it to body and add effects etc. to it?




[jQuery] Re: Question about jQuery effects and append method

2007-06-04 Thread Karl Swedberg
If you just want it to appear when you click a link, then you  
probably don't want to append it to the body on document.ready. Put  
that in a click handler instead. Anyway, I threw together a page for  
you:


http://test.learningjquery.com/create-window.html

Is that the kind of thing you're looking for?

Also, you might want to take a look at the jQuery plugins page  
(docs.jquery.com/Plugins) for a more robust implementation of this  
sort of thing -- more along the lines of the prototype example you  
pointed to. Here is one plugin that might interest you:


http://dev.iceburg.net/jquery/jqModal/


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jun 4, 2007, at 4:54 PM, radzio wrote:



Unfortunately it doesn't work too. However it's a bit better but still
I have this problem :/ I simply want to generate js window by clicking
link   something like this - http://prototype-window.xilinus.com/
but a bit more simply ;-). But I couldn't jump over problem I
described earlier ;/. It's strange because in the Firefox DOM
Inspector I can see created divs but I can't use them with jQuery ;/.
Btw thanks Karl for help ;-)


--Radzio
On 4 Cze, 19:39, Karl Swedberg [EMAIL PROTECTED] wrote:

A good place to start here would be to wrap your DOM elements in $(),
so it would look like this:

var htmlW = $('div id='+windowId+' class=windowdiv
class=windowTopdiv class=windowTopContentWindow example/
divimg src=images/window_min.jpg class=windowMin /img
src=images/window_max.jpg class=windowMax /img src=images/
window_close.jpg class=windowClose //divdiv
class=windowBottomdiv class=windowBottomContentnbsp;/div/
divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/p/
divimg src=images/window_resize.gif class=windowResize // 
div');


then call your createWindow function within document.ready:

$(document).ready(createWindow);

--Karl
_
Karl Swedbergwww.englishrules.comwww.learningjquery.com

On Jun 4, 2007, at 12:34 PM, radzio wrote:




Hi!
I'm making js script which allows to create div floating windows. I
want to use jQuery + interface but I met with difficulties. I create
html code with js:
function createWindow()
{
   var windowId = '#test';
   var htmlW = 'div id='+windowId+' class=windowdiv
class=windowTopdiv class=windowTopContentWindow example/
divimg src=images/window_min.jpg class=windowMin /img
src=images/window_max.jpg class=windowMax /img src=images/
window_close.jpg class=windowClose //divdiv
class=windowBottomdiv class=windowBottomContentnbsp;/div/
divdiv class=windowContentpbla 1/ppbla 2/ppbla 3/ 
p/

divimg src=images/window_resize.gif class=windowResize //
div';



   $(htmlW).appendTo(body);
   if($(windowId).css('display') == 'none') {
   $(windowId).DropInRight(1000);
   }
}



Unfortunately it doesn't work ;/ I read about $(document).ready
(http://docs.jquery.com/Tutorials:Introducing_%24%28document% 
29.ready

%28%29) and ... Is there any chance to generate html code in js then
append it to body and add effects etc. to it?






[jQuery] Re: Question about jQuery effects and append method

2007-06-04 Thread John Farrar
In IE7 it had broken graphic links.

Karl Swedberg wrote:
 If you just want it to appear when you click a link, then you probably 
 don't want to append it to the body on document.ready. Put that in a 
 click handler instead. Anyway, I threw together a page for you:

 http://test.learningjquery.com/create-window.html

 Is that the kind of thing you're looking for? 

 Also, you might want to take a look at the jQuery plugins page 
 (docs.jquery.com/Plugins) for a more robust implementation of this 
 sort of thing -- more along the lines of the prototype example you 
 pointed to. Here is one plugin that might interest you:

 http://dev.iceburg.net/jquery/jqModal/


 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com



 On Jun 4, 2007, at 4:54 PM, radzio wrote: