[jQuery] Re: show/hide with embed

2009-10-17 Thread ngreenwood6

Yeah that is what I actually ended up doing.

On Oct 17, 6:01 pm, Charlie  wrote:
> instead of hide(0 which is basically display:none,   you could move it off 
> screen. This sort of issue comes up a lot with 
> tabshttp://jqueryui.com/demos/tabs/#Why_does...


[jQuery] Re: what does this selector mean ?

2009-10-17 Thread Michael Geary
$('div',this) is simply a confusing way of writing $(this).find('div'). The
only reason it exists at all is for "historical reasons": it was added to
jQuery before the .find() method existed.

Never use $('div',this) in your code. Always use $(this).find('div')
instead. It is easier to read and faster too.

-Mike

On Tue, Sep 29, 2009 at 4:24 AM, runrunforest  wrote:

>
> Hi,
>
> $('div', this)   what does that mean ?
>


[jQuery] Re: what does this selector mean ?

2009-10-17 Thread Karl Swedberg
It's a little confusing, but the difference is that the "contextual  
selector" is a second argument, whereas the "or selector" is a comma  
within a single argument. So, if we forget about "this" for a moment:


$('.myclass, #myid')
-- matches all elements that have a class of "myclass" or id="myid"
-- both selectors are contained within the same argument (i.e. the  
same set of quotation marks)


$('.myclass', '#myid')
-- matches all elements that have a class of "myclass" and are  
descendants of an element with id="myid"

-- two arguments.


One way to include "this" in the selection would be to use .add(). For  
example:


$(this).add('div');
-- select this and all div elements.

Hope that helps.

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Oct 17, 2009, at 10:40 PM, lampy wrote:



I know Karl's answer is correct, but from the docs (
http://docs.jquery.com/Selectors/multiple#selector1selector2selectorN
) I would've thought the comma meant "select all div elements, and
this".

Is there any documentation that would help me understand this?


On Sep 29, 10:03 pm, MorningZ  wrote:

oops... that'll teach me to try to make sense first thing in the
morning  :-)

Coffee first THEN post

On Sep 29, 9:11 pm, Karl Swedberg  wrote:


On Sep 29, 2009, at 7:33 AM, MorningZ wrote:



Whatever "this" is in that case, it's the context to look for any
 (jQuery will only select 's that are ancestors of  
"this" in

the DOM tree)



Correction: for $('div',this), jQuery will only select s that
are descendants of "this" in the DOM tree.



--Karl




Karl Swedbergwww.englishrules.comwww.learningjquery.com




[jQuery] How to achieve this animation?

2009-10-17 Thread Eric Chen

Hi, this is Eric from Shanghai China, sorry for my bad English.
I am a jQuery Fans.

My site is now under building, the page of the animation is:
http://www.imczy.com/EN/support-me.html

The codes I achieve this animation are as follows:

//like goadddy
$.fn['_fadeOut'] = function(){
  this.css('overflow', 'hidden');
  this.css('padding', '0');
  this.css('border', '0');
  return this.animate({
  height : "hide" , opacity : "0.1" } , 500);
};
$.fn['_fadeIn'] = function(){
  this.css('overflow', '');
  this.css('padding', '');
  this.css('border', '');
  return this.animate({
  height : "show" , opacity : "1" } , 500);
};

However, as you seen, I will have a short animation unsmoothly, can
you give me some more suggestion?

Thank you very much!
Sorry for my Bad English!


[jQuery] Re: what does this selector mean ?

2009-10-17 Thread lampy

I know Karl's answer is correct, but from the docs (
http://docs.jquery.com/Selectors/multiple#selector1selector2selectorN
) I would've thought the comma meant "select all div elements, and
this".

Is there any documentation that would help me understand this?


On Sep 29, 10:03 pm, MorningZ  wrote:
> oops... that'll teach me to try to make sense first thing in the
> morning  :-)
>
> Coffee first THEN post
>
> On Sep 29, 9:11 pm, Karl Swedberg  wrote:
>
> > On Sep 29, 2009, at 7:33 AM, MorningZ wrote:
>
> > > Whatever "this" is in that case, it's the context to look for any
> > >  (jQuery will only select 's that are ancestors of "this" in
> > > the DOM tree)
>
> > Correction: for $('div',this), jQuery will only select s that  
> > are descendants of "this" in the DOM tree.
>
> > --Karl
>
> > 
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: applying effect to certain div.

2009-10-17 Thread Charlie





your code works fine  http://jsbin.com/eqole

must be something in your css

Martijn wrote:

  Hi,

Im trying to get a sliding down div, that pushes another div further
down as it slides. I created the following code. However, the 2nd div
doesnt appear at all. What is the proper way to say only the div with
class "x" should be affected?  The basic tutorial doesnt really cover
this.

"http://www.w3.org/TR/html4/loose.dtd">
 
 
   
   
   
 $(document).ready(function(){

   $(document.body).click(function () {
  if ($("div.divblok1").is(":hidden")) {
$("div.divblok1").slideDown("slow");
  } else {
$("div.divblok1").hide();
  }
});



 });

   
   
 
 
 	click me!


   "http://jquery.com/">jQuery


	Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
	Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
	Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
	Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
	Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla


 

  






[jQuery] Re: How to: Cycle back to beginning of gallery? At my wits end!

2009-10-17 Thread Charlie





the script is working fine in firebug   problem is you have a bunch of
images in markup that don't exist at path you are calling them from

josh wrote:

  Im simply trying to cycle back to the first picture of the gallery. Im
on my 3rd day of trying to figure this out.  I posted a link below.  I
checked the html code multiple times and the images and thumbs are in
order.  But after the 22nd pic, it brings up a broken link.

 The site is not mine, but my client wants me to use it as a
template.  Was originally going to do Flash...Hopeing this is a simple
fix so I can avoid the embaressment!!!

http://napleswebfreelancer.com/d/2

  






[jQuery] Refreshing an element using set of interval

2009-10-17 Thread Julius
Dear all

 I'm trying to refreshin a div content using set of interval, but I don't know 
how to do that in jquery. How I make the code to do this task?

Please help me I am new in jquery. Thx
Sent from my BlackBerry®
powered by Sinyal Kuat INDOSAT

[jQuery] jQuery form plugin

2009-10-17 Thread Boray Eris

http://www.pidizayn.com/virtualsub/jqform

First form is ok. But second one that pulled with jquery not working.
What's wrong?


[jQuery] Cycle plugin: centering images of variable width?

2009-10-17 Thread David Collins

I didn't see this as an option, so I decided to give it a try on my
own.  I was able to add some lines of code (shown with the > in the
margin below) to the jquery.cycle.js script to read in the width of
each image and center the slide within the slideshow container

// set position and zIndex on all the slides

>// read in each image's width and center it wrt the slideshow width
>   $slides.each(function(i){
>   var imgwidth = $(this).attr("width");
>   $(this).css('left', (opts.width-imgwidth)/2);
>   });


$slides.css({position: 'absolute', top:0}).hide().each(function(i)
{  // removed the "top" value since it is being defined above
var z = first ? i >= first ? els.length - (i-first) : first-i :
els.length-i;
$(this).css('z-index', z)
});


This works great for images that are pre-defined in the markup, but
when I use the addSlide option, the newly added slides do not get
modified in the above code.  Any suggestions on where I can put this
chunk of code so that it gets run *after* the slides are added to the
slideshow?  Should I get the img width and define the left position
for each slide during the actual cycle function, or maybe during the
"// reset common props before the next transition" section?

Any help would be appreciated.

Thanks,

-David


[jQuery] FF "needs a moment" to calculate element width()

2009-10-17 Thread David Balažic

Hi!

I have some scripting foo where I add some element dynamically and the
want to query the width of it.

NOTE: The reason I want width is for centering. If anyone knows a way
to center a DIV element without knowing its width, just say so and the
below problem is irrelevant. (same goes for height and vertical
centering)

It is more or less like this:

$(top.document.body).append("");
// inject a LINK element into top.document for a CSS file
then append some stuff into TB_window,
// marker 1
then call  $("#TB_window",top.document).width()


If I put an alert() at "marker 1" before the width() call, I get
different results than without.
It seems Firefox (v3.5.3) takes the opportunity while the alert is
displayed to compute
some stuff, which makes the width() result correct. If I don't use
alert(), then width()
returns s smaller value (about 30% less)  than the real one.

Funny, in IE8 there is no such problem. There the correct width is
reported.

I use JQuery 1.3.2.

I put the entire code at http://pastie.org/658921

it is called from HTML by
a href="#"
onclick="tb_show('#TB_inline?
height=332&width=590&inlineId=lb_content&modal=false',
(this.rel || false),'/stuff/css');return false;"
PopupboxNM /a  (I removed brackets in case they give problems to mail/
web programs)


Regards,
David


[jQuery] Cycle plugin: using the addSlide option for multiple slideshows on the page?

2009-10-17 Thread David Collins

I have a page that has 9 tabs of content, with each tab having its own
slideshow of about 8 images each.  I was hoping to reduce the load
time of the page by only starting with two images per slideshow, and
then using the addSlide option to add the rest.

A few questions:

1. Is this the best way to go about speeding up the page load?
2. Is there an example somewhere of how to make this work?  I used the
code from the demo on the http://jquery.malsup.com/cycle/add.html
page, and inserted some code of my own, but I obviously haven't
wrapped the correct functions with my code because I get *all* of the
images added to the first slideshow instead of to their own respective
slideshows.  Here is my code with some of the redundant sections
removed:

$(function(){
$('.slideshowbox div[id]').cycle({ // 9 matches found
width: 539,
height: 225,
timeout: 5000,
speed: 1000,
before: onBefore
});


var slidesAdded = false;
function onBefore(curr, next, opts) {
// make sure we don't call addSlide before it is defined
if (!opts.addSlide || slidesAdded) return;

$('.slideshowbox div').each(function() {  // for each slideshow 
on
the page
var i = $(this).attr('id');
if(i == "slideshow1") {
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
}
else if(i == "slideshow2") {
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
}

etc...

else if(i == "slideshow9") {
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
opts.addSlide('');
}
});
slidesAdded = true;
};
});


Any advice would be helpful as I am a javascript/jquery novice.

Thanks!

-David


[jQuery] How to: Cycle back to beginning of gallery? At my wits end!

2009-10-17 Thread josh

Im simply trying to cycle back to the first picture of the gallery. Im
on my 3rd day of trying to figure this out.  I posted a link below.  I
checked the html code multiple times and the images and thumbs are in
order.  But after the 22nd pic, it brings up a broken link.

 The site is not mine, but my client wants me to use it as a
template.  Was originally going to do Flash...Hopeing this is a simple
fix so I can avoid the embaressment!!!

http://napleswebfreelancer.com/d/2


[jQuery] applying effect to certain div.

2009-10-17 Thread Martijn

Hi,

Im trying to get a sliding down div, that pushes another div further
down as it slides. I created the following code. However, the 2nd div
doesnt appear at all. What is the proper way to say only the div with
class "x" should be affected?  The basic tutorial doesnt really cover
this.

http://www.w3.org/TR/html4/loose.dtd";>
 
 
   
   
   
 $(document).ready(function(){

   $(document.body).click(function () {
  if ($("div.divblok1").is(":hidden")) {
$("div.divblok1").slideDown("slow");
  } else {
$("div.divblok1").hide();
  }
});



 });

   
   
 
 
click me!


   http://jquery.com/";>jQuery


Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla
Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla
bla


 


[jQuery] AJAX API without XML?

2009-10-17 Thread kidburla

Hi,

I understand that normally when you want to load a page into an area
of the page, you would use the ajax.load function within jQuery's AJAX
API. However what happens if you have an old-fashioned server which
does not support XML over HTTP? In other words it expects to receive
name=value parameters from the client and then returns an HTTPResponse
with just standard HTML in the body and some other headers? Can we
still use the AJAX API? If not, is there some plugin which allows me
to modify the standard AJAX functions to use standard HTTP Request/
Response format (or "AJAH")?


[jQuery] Re: HELP!!! css & content filters

2009-10-17 Thread huntspointer2009

Thanks (Bi Jing),
You offered the best solution, I tried using all of the code that was
offered, but the following code was the only one that it made it work:

$("li:even:odd, li:odd:odd").addClass("test_css");

I also like the fact that it's a minimal amount code, written in one
line.

Thanks to everyone else, you tried to help me, you guys rock.
;)



[jQuery] Re: show/hide with embed

2009-10-17 Thread Charlie





instead of hide(0 which is basically display:none,   you could move it
off screen. This sort of issue comes up a lot with tabs

http://jqueryui.com/demos/tabs/#Why_does...

ngreenwood6 wrote:

  Anyone at all?

On Oct 16, 6:34 pm, ngreenwood6  wrote:
  
  
I tried adding in return false at the end of my function, however that
did not fix the issue. Any other suggestions?

On Oct 16, 8:37 am, rupak mandal  wrote:



  if the problem is reload then add "return false" at the end or the function
  


  On Fri, Oct 16, 2009 at 6:02 PM, ngreenwood6  wrote:
  


  
I tried doing  that as well and it still does the same thing. It must
be changing the display that makes it reload. To test all you have to
do is create a div with embed code and call show/hide on it and you
will see.

  


  
On Oct 16, 3:02 am, Evgeny Bobovik  wrote:


  Try to use this method:

function showEmbed(){
    if($("#test").css('display') == 'block'){
         $("#test").css('display','none');
    } else {
         $("#test").css('display', 'block');
   }}
  
   Gk___
  

  


  

  2009/10/16 ngreenwood6 :
  

  

  
  
  






[jQuery] Re: JSpec and jQuery fadeOut


To add to this:
  I know I can use the callback argument of the fadeOut method.
However, I would like to avoid adding that callback argument to the
method I am testing which calls fadeOut. It seems weird to add a
parameter just so I can test the method.

http://visionmedia.github.com/jspec/ and "Spies" might be key. It
seems that would require a jquery object be passed into the method I
am testing as opposed to the name of the thing I am binding to. In
fact, that may be more flexible and better anyway.

Is there a best approach that JSpec/jQuery users use when testing
something which happens over time like fadeOut() as opposed to hide()?

Thanks.

On Oct 17, 2:06 pm, finneycanhelp  wrote:
> In doing BDD / TDD testing using JSpec, how can one sense/capture that
> jQuery's fadeOut has been called?
>
> Thanks.
> Mike Finney


[jQuery] Re: How to obtain Object (key) names?


The problem with something like the desired approach:

if (option.name == "Option1") {

is that 'name' is a valid key, so if you had an object like

{'name':'john'}

option.name would equal 'john' (same problem if you tried option.key).

Also, though your example only has one key, an object can have mutiple
keys.

Easiest way is just loop through the keys (fast since there's only one
key/value pair in your object):

$.each(JSON.options, function(i, option) {
   for(k in option) {
if(k === 'Option1'){
  // do something
}
   }
});



On Oct 16, 5:41 pm, Frederic Laruelle 
wrote:
> Hi,
>
> I;m looking for a way to obtain key names from a JSON object:
> eg
> "options": [
>                 {"Option1" : ["Value1", "Value2"]},
>                 {"Option2" : ["Value3", "Value4"]},
>                 {"Option3" : ["Value5", "Value6"]}
>                 ]
>
> so, i'd like to consume this JSON in a way similar to this:
> $.each(JSON.options., function(i, option) {
>         if (option.name == "Option1") {
>                        // do something
>                        }
>
> });
>
> Prototype seems to have a keys method which would achieve what i'm
> looking for.
> There are also a few pages which attempt to address the issue with
> JQuery, such as:http://snipplr.com/view/10430/jquery-object-keys/
> However i was only able to retrieve the numerical index of the array
> elements using these methods (vs their name).
>
> Any help appreciated.
>
> Tks!
>
> Fred~


[jQuery] Re: $('a:link') Selector?


A couple things. First off, the syntax you're using won't get you the
anchor's color:

$('a:link',this).css('color');

This is a shortcut for:

$(this).find('a:link').css('color')

which basically means find the anchors inside this anchor. If you want
the anchor's original color, just use:

$(this).css('color')

Getting the color that is set by the CSS pseudo :hover is another
problem. To get that via JavaScript you'd have to loop through the
stylesheets cssRules and do a regex match.

Michael

On Oct 17, 10:59 am, Steven  wrote:
> Hello,
>
> I'm trying to make a basic, "dynamic" link color fader. Since I have
> multiple link colors for different classes and divisions and such, I'm
> trying to make it "dynamic." To do so I need to grab the original
> color and the hover color. Here is my code:
>
> // Fading links
> $('a').hover(
>         // Over
>         function(){
>                 var original_cl = $('a:link',this).css('color');
>                 var fade_cl = $('a:hover',this).css('color');
>                 alert('Original color: '+original_cl+'; Fade color: 
> '+fade_cl);
>         },
>         // Out
>         function(){
>
>         }
> );
>
> Both colors come as undefined; experimentation tells that using
> "a:link" or "a:hover" as the selector is invalid. How can I grab these
> colors in context?
>
> Thanks,
> Steven


[jQuery] locally run ADDRESS BOOK using JQ? UI? suggestions? jquery addressbook plugin?


Hi, after a lot of thought I am seriously thinking about creating a
webpage, sorta like tiddlywiki though really basic and just for
keeping my contacts/addresses/phone-numbers/email addys  in.

So, on first google I found
http://www.asual.com/jquery/address/

you know how it goes though.

I need to find the best solution the first time hopefully so really
looknig for comments / ideas.
Basically I can't code my own so it's either something that works as a
plugin that I can run and enter data into on a locally run html page.

Thank you for reading!


[jQuery] Re: Replace image with SWF onClick


Not onLoad, but onClick.
The behaviour i'm looking for is similar to the one in your link.
Might be interesting for me te look into.

Thanks a bunch!

On 17 okt, 20:45, Sam Sherlock  wrote:
> you want to replace them when the user clicks the anchor tag?
> or replace the anchor tag onload?
>
> http://flowplayer.org/documentation/users-guide.html
>
> 
> - S
>
> 2009/10/17 knal 
>
>
>
> > Hi group,
>
> > I'm trying to achieve something (which doesn't seem to difficult to
> > me) but i can't get it to work;
>
> > I want to embed video's through a swf-videoplayer on my website.
>
> > The idea is that i have (say 750 * 400 px) images wrapped in links.
> > The links point at the videofile. If the user clicks the link, i want
> > to replace the link+image by the swf video with the same dimensions...
>
> > Hope this kind of makes sense.
>
> > Thanks in advance,
> > Knal


[jQuery] JSpec and jQuery fadeOut


In doing BDD / TDD testing using JSpec, how can one sense/capture that
jQuery's fadeOut has been called?

Thanks.
Mike Finney


[jQuery] Re: Replace image with SWF onClick

you want to replace them when the user clicks the anchor tag?
or replace the anchor tag onload?

http://flowplayer.org/documentation/users-guide.html


- S




2009/10/17 knal 

>
> Hi group,
>
> I'm trying to achieve something (which doesn't seem to difficult to
> me) but i can't get it to work;
>
> I want to embed video's through a swf-videoplayer on my website.
>
> The idea is that i have (say 750 * 400 px) images wrapped in links.
> The links point at the videofile. If the user clicks the link, i want
> to replace the link+image by the swf video with the same dimensions...
>
> Hope this kind of makes sense.
>
> Thanks in advance,
> Knal


[jQuery] Re: show/hide with embed


Anyone at all?

On Oct 16, 6:34 pm, ngreenwood6  wrote:
> I tried adding in return false at the end of my function, however that
> did not fix the issue. Any other suggestions?
>
> On Oct 16, 8:37 am, rupak mandal  wrote:
>
> > if the problem is reload then add "return false" at the end or the function
>
> > On Fri, Oct 16, 2009 at 6:02 PM, ngreenwood6  wrote:
>
> > > I tried doing  that as well and it still does the same thing. It must
> > > be changing the display that makes it reload. To test all you have to
> > > do is create a div with embed code and call show/hide on it and you
> > > will see.
>
> > > On Oct 16, 3:02 am, Evgeny Bobovik  wrote:
> > > > Try to use this method:
> > > > 
> > > > function showEmbed(){
> > > >     if($("#test").css('display') == 'block'){
> > > >          $("#test").css('display','none');
> > > >     } else {
> > > >          $("#test").css('display', 'block');
> > > >    }}
>
> > > > 
> > > >    Gk___
>
> > > > 2009/10/16 ngreenwood6 :


[jQuery] $('a:link') Selector?


Hello,

I'm trying to make a basic, "dynamic" link color fader. Since I have
multiple link colors for different classes and divisions and such, I'm
trying to make it "dynamic." To do so I need to grab the original
color and the hover color. Here is my code:

// Fading links
$('a').hover(
// Over
function(){
var original_cl = $('a:link',this).css('color');
var fade_cl = $('a:hover',this).css('color');
alert('Original color: '+original_cl+'; Fade color: '+fade_cl);
},
// Out
function(){

}
);

Both colors come as undefined; experimentation tells that using
"a:link" or "a:hover" as the selector is invalid. How can I grab these
colors in context?

Thanks,
Steven


[jQuery] Replace image with SWF onClick


Hi group,

I'm trying to achieve something (which doesn't seem to difficult to
me) but i can't get it to work;

I want to embed video's through a swf-videoplayer on my website.

The idea is that i have (say 750 * 400 px) images wrapped in links.
The links point at the videofile. If the user clicks the link, i want
to replace the link+image by the swf video with the same dimensions...

Hope this kind of makes sense.

Thanks in advance,
Knal


[jQuery] Re: Get parameters from URL



brian ally wrote:

The google shows several implementations:

http://www.mathias-bank.de/2007/04/21/jquery-plugin-geturlparam-version-2/
http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
http://projects.allmarkedup.com/jquery_url_parser/

On Sat, Oct 17, 2009 at 10:41 AM, ReynierPM  wrote:



Thanks a lot it was a nice documentation.

--
Saludos
ReynierPM


[jQuery] Re: Get parameters from URL


There are several plugins:

http://plugins.jquery.com/project/parseQuery


On Oct 17, 7:41 am, ReynierPM  wrote:
> Hi every:
> It's possible to get values from URL with jQuery like PHP? For example
> suppose you have this URL: form.html?s=ok&val=rperezm. In PHP is simple:
> [code]
>   echo $_GET['s']; // return ok
>   echo $_GET['val']; // return rperezm
> But I don't know if this is possible in Javascript and also with jQuery.
> Can any body guide me on this?
> Cheers and thanks in advance
> --
> ReynierPM


[jQuery] jQuery cookie solution in Liferay


I am unsure of where to start with this one, and so I'm hoping one of
you good people will be able to assist.

I am using Liferay, and on the calendar settings there is a value
called "event-selector". At present when you click to view events, the
default is always the top value "All Events". What I am trying to
achieve is that a cookie will remember the last choice that you
selected for the next 30 days (for example).

I have limited jQuery skills, but wonderful google skills, which led
me to this place!! I'm hoping that somebody will be able to help, or
at least point me in the right direction.

Thanks!

This is the code I grabbed from Firebug:


http://localhost:8080/web/guest/
calendar?
p_p_id=8&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_8_struts_action=
%2Fcalendar
%2Fview&_8_tabs1=week&_8_month=9&_8_day=17&_8_year=2009&_8_eventType='
+ this.value;">
All Events
Anniversary
Appointment
Bill Payment
Birthday
Breakfast
Call
Chat
Class
Club Event
Concert
Dinner
Event
Graduation
Happy Hour
Holiday
Interview
Lunch
Meeting
Movie
Net Event
Other
Party
Performance
Press Release
Reunion
Sports Event
Training
Travel
TV Show
Vacation
Wedding


[jQuery] Re: Get parameters from URL


The google shows several implementations:

http://www.mathias-bank.de/2007/04/21/jquery-plugin-geturlparam-version-2/
http://jquery-howto.blogspot.com/2009/09/get-url-parameters-values-with-jquery.html
http://projects.allmarkedup.com/jquery_url_parser/

On Sat, Oct 17, 2009 at 10:41 AM, ReynierPM  wrote:
>
> Hi every:
> It's possible to get values from URL with jQuery like PHP? For example
> suppose you have this URL: form.html?s=ok&val=rperezm. In PHP is simple:
> [code]
>  echo $_GET['s']; // return ok
>  echo $_GET['val']; // return rperezm
> But I don't know if this is possible in Javascript and also with jQuery. Can
> any body guide me on this?
> Cheers and thanks in advance
> --
> ReynierPM
>


[jQuery] Re: jquery cycle site is down


> the cycle site is down since yesterday, i get a 403 and 404 error, ???


Hosting problems.  Content is temporarily available here:

http://www.malsup.com/jquery/cycle2/

Mike



[jQuery] Get parameters from URL



Hi every:
It's possible to get values from URL with jQuery like PHP? For example 
suppose you have this URL: form.html?s=ok&val=rperezm. In PHP is simple:

[code]
 echo $_GET['s']; // return ok
 echo $_GET['val']; // return rperezm
But I don't know if this is possible in Javascript and also with jQuery. 
Can any body guide me on this?

Cheers and thanks in advance
--
ReynierPM


[jQuery] persistent scroll bar in resizable div



I have a div which is resizable (using ui.resizable.js).

I would like a vertical scrollbar to appear only if the text is
truncated as the div is resized.

If I use a style = overflow-y:scroll, or overflow-y:auto I get the
same result - the scroll bar is Always there, even if the div is far
larger than the content. And there's always a tiny open area at the
bottom of the scroll bar, as though it thinks there's still content
below.

Here's a sample code:



The absence or value of clip seem to have no effect.

Scroll and auto seem to work as expected if the div is not resizable.

Is it even possible to do what I want using the ui.resizable plugin?

If not, is there another resizable plugin which would allow it?

Thanks.


[jQuery] Re: superfish set hover on onload...






I believe you need to adjust your template. "active" class is being
applied to the  Home tag, but your "active-trail" class is
needed on the parent li instead

can do this failry easily also in jQuery adding following:

$(".menu a.active").parent().addClass("active-trail")/// tested this in
firebug and works on "Home"

.wired wrote:

  Hi guys, i am wondering if it's possible to apply the hover class
already when the site is loading. Precisly look at http://www.templatebomb.de/
where the home button should have the class "active" but it's applying
it just after hovering one of the menu points. Sorry for my bad
english, by the way ;)

greetings, .wired

  






[jQuery] Re: IE: call function defined in ajax loaded page


Michael,

Is it possible to provide a link or post some code examples of what
you are trying to do. If it is undefined in IE, it may be caused by
the way you are loading the scripts or the order you have them in.

You might also try putting all of your code inside a document ready
block to make sure nothing is trying to fire too early.

Hope that helps.

-Eric

On Oct 15, 3:04 am, Michael Anckaert 
wrote:
> Hello everyone,
>
> In one of my projects I use simplemodal to show an ajax loaded dialog.
> The HTML page loaded by the ajax call defines a javascript function
> setup_dialog() that I use to initialize some functions specific to
> that page. In the simplemodal callback onShow I call setup_dialog().
>
> This setup works perfectly in Firefox, in IE on the other hand (you
> already know where this is going :)) the function setup_dialog() is
> undefined.
>
> I tried replacing setup_dialog() with the jquery $(document).ready()
> function but to no avail.
>
> Am I trying to do the impossible in IE?
>
> Kind regards,
> Michael


[jQuery] Re: Simple Modal Close Event


If you use the onClose callback, you must call $.modal.close() to
remove the dialog elements from the DOM. If an onClose callback has
been used, calling $.modal.close() will not trigger the callback
again, it can only happen once.

I suggest using the onShow callback to bind your second event based on
"closing" the dialog and then call $.modal.close() from there, which
will trigger the onClose calback (which is really just supposed to be
used for closing animations, etc.).

Hope that helps.

-Eric

On Oct 16, 3:56 am, "biggerandbetterkah...@googlemail.com"
 wrote:
> I'm using the simpleModal plugin to display dialog windows. I have a
> callback on the onclose event which fires another event.
>
> Is it correct that the $.modal.close() does not fire the onclose
> callback. If this is correct is there a way i could workaround this?


[jQuery] Superfish and .htaccess


I've installed and set up Superfish on a Joomla site and it works
great with the exception of 1 issue.

When I'm not using "Search Engine Friendly URLS", it works fine.

When I turn on "Search Engine Friendly URLS" in the Joomla global
settings, and change the htaccess.txt file to .htaccess -- any page
displayed by using the  the drop down menu  messes
up the template by not displaying the shadow separating the left/right
column. Which happens to be a background image in a table.

the page is: http://www.calldesign.net/Joomla/

The last menu item under  loads
the same article as the third menu item horizontally .
The content in the left menu bar is the same for every page on the
site, so nothing there is bumping the image.

So I'm guessing it's a CSS issue...just don't know how to resolve it.

Thanks Mike


[jQuery] Re: Treeview - Custom hyperlink click event


It's not a normal event as its handled by the plugin.

Here is the code im using:

   http://pastie.org/658654



On Oct 12, 1:47 am, Shawn  wrote:
> are you returning false from your event handler?  That *should* stop all
> other event processing.
>
> You could also try to capture the event object (i.e.
> .click(function(theEvent) { });  ) and then make use of the
> .stopPropagation() method.
>
> Neither trick will do you any good if thetreeview'sevent handlers are
> fired before your event though.
>
> Some random thoughts.. Haven't tried any of this.
>
> Shawn
>
> philsturgeon wrote:
> > I am trying to remove the default behaviour from the  within the
> >Treeviewstructure. I want the +/- icons to continue to toggle but
> > when a user clicks on the A I want to fire my own event.
>
> > This event is currently firing fine, but it also fires the toggle
> > behaviour meaning the tree still expands or collapses. Wrong!
>
> >http://pastie.org/650742
>
> > Does anybody know how I can solve this? I tried unbind() and die() on
> > all a's within the tree but that did nothing. Im really stuck on this
> > one! >.<


[jQuery] Re: How to check is the object with the css property?

Here are two options:
$('div').each(function() {
  if ($(this).css('position') == 'absolute') {
//do something with this
  }
});

///

var $divPosAbs = $('div').filter(function() {
  return ($(this).css('position') == 'absolute');
});

//do something with $divPosAbs

- Richard

On Sat, Oct 17, 2009 at 5:33 AM, David .Wu  wrote:

>
> 
> 
>
> $('div').each(function() {
>// How to know the div have position property or not?
> });
>


[jQuery] superfish set hover on onload...


Hi guys, i am wondering if it's possible to apply the hover class
already when the site is loading. Precisly look at http://www.templatebomb.de/
where the home button should have the class "active" but it's applying
it just after hovering one of the menu points. Sorry for my bad
english, by the way ;)

greetings, .wired


[jQuery] jquery cycle site is down


the cycle site is down since yesterday, i get a 403 and 404 error, ???


[jQuery] How to check is the object with the css property?





$('div').each(function() {
// How to know the div have position property or not?
});