Re: [jQuery] superfish joomla

2010-02-27 Thread Charlie




Try removing the window.load function, it makes no sense to bind the
different menu functions to different page load events


jQuery.noConflict();
jQuery(function($){ // this is document ready 

$("ul.sf-menu").superfish({hoverClass:'sfHover',
pathClass:'active', pathLevels:0, delay:800, animation:
{opacity:'show'}, speed:'def', autoArrows:0, dropShadows:1}) 
jQuery("ul.sf-menu").superfish_width_mod({ vertical:0,
menuWidth:'100%', equalWidth:
0, resizeSeps:0, resizeSubMenus:0 }) 
jQuery.event.special.hover.delay = 100;
jQuery.event.special.hover.speed = 100;
});// end document ready


Eddie wrote:

  Hello all at jquery group, superfish menu in joomla works fantastic
but it gives an error in IE8 and my client hates it! the "done, but
with errors" this is the errordoes anyone know how to fix it!!
Best,
Chris



Message: Object doesn't support this property or method
Line: 48
Char: 35
Code: 0
URI: http://www.rallybrc.co.uk/


this is the code around line 48:

jQuery.noConflict();
jQuery(function($){ $("ul.sf-menu").superfish({hoverClass:'sfHover',
pathClass:'active', pathLevels:0, delay:800, animation:
{opacity:'show'}, speed:'def', autoArrows:0, dropShadows:1}) });
jQuery(window).load( function() { jQuery("ul.sf-
menu").superfish_width_mod({ vertical:0, menuWidth:'100%', equalWidth:
0, resizeSeps:0, resizeSubMenus:0 }) })
jQuery.event.special.hover.delay = 100;
jQuery.event.special.hover.speed = 100;

  /script



  






Re: [jQuery] Superfish - Only works on home page, not site Pages

2010-01-21 Thread Charlie




are you using abslolute or relative url's for source files? if relative
probably have to switch to absolute

initialsbr wrote:

  I'm not sure what's wrong. I'm building a site in Wordpress. I
followed the directions on the Superfish site and things look good on
the home page but then the HTML just shows up on the site Pages. Any
help? Suggestions?

Thanks!

  





Re: [jQuery] Superfish - Different colors for each menu column

2010-01-21 Thread Charlie




if you need a different background for each class hover likely have to
build a series like following

.sf-menu li.green:hover, .sf-menu li.green.sfHover,
.sf-menu li.green a:focus, .sf-menu li.green a:hover, .sf-menu li.green a:active {
	background:		#CFDEFF;
	outline:		0;
}


PTwatch wrote:

  I'm trying to come up with an approach to assign a different color scheme for 
each main group (column).

ie:
ul class="sf-menu sf-vertical"
   li
	 # Menu1 
   /li	
   li class="red" 
   #a Menu2 
 ul 
li class="red"
	 #aa Menu2-subitem1 
	/li
   li class="red"
	 #aa Menu2-subitem2 
	/li
  /ul 
/li
/ul   

and 

Superfish.css is:

.
.
.
.sf-menu li {
	background:		#BDD2FF;
}
.sf-menu li.green {
	background:		#00AA00;
	}
.sf-menu li.red {
	background:		#AA;
	}

.sf-menu li li {
	background:		#AABDE6;
}
.sf-menu li li.green {
	background:		#00AA00;
}
.sf-menu li li li {
	background:		#9AAEDB;
}

BUT HOW DO I use class of green or red here?
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
	background:		#CFDEFF;
	outline:		0;
}



Any help is appreciated


  





Re: [jQuery] Re: Superfish - Arrows don't display on dropdown

2010-01-18 Thread Charlie




without seeing a link it sounds like path problems. Use firebug Net tab
to see if everything is loading

initialsbr wrote:

  Also, it appears that the menu works fine on the home page but not on
any of the individual pages. Any suggestions there?

On Jan 17, 7:57pm, initialsbr luke.kirkl...@gmail.com wrote:
  
  
I'm really excited to use this bu the arrows aren't displaying on my
menu. Here's the code I've got in the head...

link rel="stylesheet" type="text/css" media="screen" href="" /

script type="text/_javascript_" src=""/
script
script type="text/_javascript_" src=""/script
script type="text/_javascript_" src=""/script

script type="text/_javascript_"

  $(document).ready(function(){
$("ul.sf-menu").supersubs({
  minWidth:  12,
  maxWidth:  27,
  extraWidth: 1,
autoArrows: true,

}).superfish();

  });

/script

Here's what I've got in the body...

div id="menu"

ul class="sf-menu"

li class="current"
a href="" class="moz-txt-link-rfc2396E" href="http://localhost:/claykirkland/">"http://localhost:/claykirkland/"home/a
/li

li
a href="" class="moz-txt-link-rfc2396E" href="http://localhost:/claykirkland/bio/">"http://localhost:/claykirkland/bio/"bio/a
ul
lia href=""musical/a/li
lia href=""personal/a/li
/ul
/li

li class="current"
a href="" class="moz-txt-link-rfc2396E" href="http://localhost:/claykirkland/events/">"http://localhost:/claykirkland/events/"events/a
/li

li class="current"
a href="" class="moz-txt-link-rfc2396E" href="http://localhost:/claykirkland/music/">"http://localhost:/claykirkland/music/"music/a
/li

li class="current"
a href="" class="moz-txt-link-rfc2396E" href="http://localhost:/claykirkland/photos/">"http://localhost:/claykirkland/photos/"photos/a
/li

li
a href="" class="moz-txt-link-rfc2396E" href="http://localhost:/claykirkland/bio/">"http://localhost:/claykirkland/bio/"shop/a
ul
lia href=""checkout/a/li
lia href=""menu item/a/li
/ul
/li

/ul

/div

In the css I show that the images at...

http://localhost:/claykirkland/superfish/images/

I'm building this using MAMP and Wordpress on my computer. I don't get
it. Everything else works great.

Help!
  





Re: [jQuery] Re: Mega menu, but the good one.

2010-01-17 Thread Charlie




superfish is fairly easy to program using the onBeforeShow option.
Using jQuery css functions you can make position changes to subs. There
is a bit of a mystique about "mega menus" . Reality of using UL LI
structure is you can put multiple columns inside an LI using most
block level container elements.(div,ol,ul..etc)

Here's a usage example used on a vertical menu that aligns all subs
with top of main menu instead of the top of the parent li:

   var menuOffset=$('ul.sf-menu').offset().top;
  
   $('ul.sf-menu').superfish({
autoArrows: true,
onBeforeShow: function(){ 
 var offset=$(this).parent().offset().top
 $(this).css("top",(menuOffset-offset))
}

   });


Michal wrote:

  no one?

On 14 jan, 11:46, Michal greatmedia...@gmail.com wrote:
  
  
I came across quite some examples of the so called "mega menu". But
there just doesnt seem to be 1 version that rules them all.

What i really would need is a auto calculate size in the menu just
like on;http://shop.puma.com. There menu does not go outside the
wrapper.

Is there anyone who has seen something like this.

  
  
  





Re: [jQuery] Once I've downloaded it...

2010-01-15 Thread Charlie Griefer
I'd read the Getting Started section at http://docs.jquery.com/Main_Page .

On Fri, Jan 15, 2010 at 9:06 AM, Jerry je...@jerrysweet.com wrote:

 I'm a newbie and have been informed that I need to become familiar
 with jQuery.  I have downloaded it from the download page.  What do I
 do with it, now?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: Superfish - Function request: Supporting JQuery UI Theme

2010-01-15 Thread Charlie




you can use jQuery UI css to skin other elements such as a menu. Add
the applicable classes to menu and volia
http://jqueryui.com/docs/Theming/API

Josh wrote:

  That would be a really useful feature.  I've just finished
implementing a UI with a graphic designer and it would be really nice
if the jQueryUI CSS would create the default skin.

Regards,
Josh

On Jan 14, 8:56am, vivalite_wei vival...@gmail.com wrote:
  
  
Hi,

I am really missing JQuery UI theme support in superfish. Could you
consider to implement it in next version?

Have a great day!

Wei

  
  
  





Re: [jQuery] get the element that called the function...

2010-01-15 Thread Charlie

lots of easy ways to do this depending on your markup.

assuming that the 2 links share the  a parent container as in:
div class=vendors
   aOther Link/a
   agood Link/a
/div

then using .siblings() would be easy method

$('.vendors a').click(function(){
   //ajax
   $(this).siblings('a').hide();
   return false;
});

without an example of markup hard to give a definitive answer

John Corry wrote:
I am a pretty experienced PHP programmer with a little bit of 
javascript experience and am LOVING jQuery.


I'm working on a tool that will allow users of my app to merge vendors 
on their vendor edit page.


Basically, if vendor names are similar, I display both vendors with a 
link for each. Depending on which link you click, you can keep one 
vendor and discard the other.


This is all done by a function that:
- presents a confirmation to the user
- calls $.ajax to do the data processing

I have it all working (sorry, it's not a public site I can show) the 
way I want except for one detail.


I want the ajax method to .hide() the link that WASN'T clicked on success.

How do I know, inside the scope of the function, which element's 
onclick event triggered the function.


If I knew that, it would be easy to hide the other one...

--
John Corry
PHP developer - 3by400, Inc
http://www.3by400.com



Re: [jQuery] Superfish: 2nd dropdown positioning

2010-01-13 Thread Charlie




link doesn't work

mcpilot wrote:

  I have Superfish installed on a website and have a 3-tier dropdown. li/
li/li. The 3rd tier is not positioned correctly, it's behind the
second  tier. (http://208.84.152.20/~loveland1)

Lookiung for the CSS line to tweak to move that out.

Pat

  





Re: [jQuery] Sceptic about JQuery

2010-01-13 Thread Charlie Griefer
On Wed, Jan 13, 2010 at 9:11 AM, olliewebster ollie@googlemail.comwrote:

 Hi,
 I recently came across JQuery, but I'm not sure weather I should use
 it. Even though I already know JavaScript, would I have to learn a new
 language specific to JQuery? What would the advantages of using JQuery
 be? Finally, would it be hard to install?
 Thanks


I like to think I'm fairly competent ant JavaScript, and for the longest
time, I put off learning jQuery because really... why invest the time to
learn a different way to write stuff I already know how to write?

Then I saw this:

$('#element').toggle();

That right there is the same as:

if (document.getElementById('element').style.display == none) {
 document.getElementById('element').style.display = block;
} else {
 document.getElementById('element').style.display = none;
}

As you can see, that's code to toggle the display of an element.  If it's
hidden, show it.  If it's visible, hide it.

Let's say you wanted to trigger that based on a button click.

Normally, you'd have input type=button id=myButton
onclick=toggleElement(); /

In jQuery, your script is completely unobtrusive and should never show up in
the HTML itself.

In jQuery, that same click would be up int he script area:

script
 $('#myButton').click(function() {
  $('#element').toggle();
 });
/script

So, as you can see... yes, it's taking the time to learn a new way to do
what you already know how to do... but it's a way that will save you a ton
of time.  I've changed the behaviors of HTML pages entirely without ever
touching the .html file (all done in the .js).

If it takes you a week to grok the basics (because you'll probably always be
learning)... you'll make up that week in no time just by virtue of never
having to type document.getElementById() again :)

Installing jQuery is simply a link to the jQuery.js file.

If you're storing it locally, it's script
src=my/path/to/jQuery.js/script.

You can also point to google's repository where they host the jQuery file
(as well as other libraries).

script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
/script

Add the line above, and jQuery is installed.  Go nuts :)

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Superfish - any way to change the color?

2010-01-11 Thread Charlie




modify the superfish.css to accomodate design

zeebaah wrote:

  Hello.
Ive just got the Superfish mod for my site but the blue color dosnt
look good with the design on my page and makes it impossible to read
the text in the menu, any way to change the color of the menu to red
like the old menu at (http://medielinjen.pgu.dk/joomla)
youll be able to see how the menu look at the menu point
(Arrangementslisten - http://medielinjen.pgu.dk/joomla/index.php?option=com_contentview=articleid=122Itemid=63)



Best regards
Zeebaah

  





Re: [jQuery] Superfish Move sub items

2010-01-11 Thread Charlie




The sub menu ul's are absolute positioned at {left:-999} when not
visible, then at {left:0} when visible.

To adjust position you need to modify the {left:0} 

NetReach Australia wrote:

  Hi,
I'm using Superfish menu system on my website and I am attempting to
move the sub items across, but when I put a margin-left on it, it
moves both the sub items and the sub sub items. How can I have only
the sub items move?

  





Re: [jQuery] Re: Superfish IE6 dies with opacity CSS attribute

2010-01-11 Thread Charlie




UL LI LI will still work as CSS selector. The second LI is still a
descendant of the first one, regradless of it's parent and the css is
written that way. 

ime Vidas wrote:

  You mean UL LI UL LI, instead of UL LI LI?
Because you're not supposed to put LIs inside LIs...

  





Re: [jQuery] Re: Superfish IE6 dies with opacity CSS attribute

2010-01-11 Thread Charlie




my point is to not confuse someone with a css problem by having to
change css selectors that work, and is the basis for structure of the
css in superfish

jQuery would work also with same selector $("ul li li"). The html
needs to be vaild for sure but OP was css

ime Vidas wrote:

  It violates the standard and you should avoid such practice.

Proper nesting:

ul
liFirst
ul
liOne/li
liTwo/li
/ul
/li
liSecond/li
/ul

Please, put a demo of the problem online...

  





Re: [jQuery] background-color always returns transparent

2010-01-11 Thread Charlie




appears you are using 2 different css attributes. 'background' and
'background-color'

try changing style to:

.content .division .category.selected {
background-color: red;
}
or see what happens in jQuery with 
.css
("background");

John wrote:

  Hi,

I used jQuery 1.3.2 and Firefox for the following html

html
head
style type="text/css"
.content .division .category.selected {
background: red;
}

/style
/head
body

div class="categories"
div class="content"
div class="body"
   ul id="category-list"
   li class="division"
   ul
   li class="category selected"
   div class="title"
   a href="" class="category-
suv"SUVs (6)/a
   /div

   /li

   li class="category category_69564"
   div class="title"
   a href="" class="category-
general"4x4 (6)/a
   /div

   /li
   li class="category category_73293"
   div class="title"
   a href=""
class="category-hybrid"Hybrid/a
   /div
   /li
  /ul
   /li
/ul
/div
/div
/div

/body
/html

I used the following css command to get back the background color:

$("#category-list  li.division:eq(0) ul  li:eq(0) a").css
("background-color");

but it always returned the value "transparent" instead of the "red"
color rgb(255,0,0).
I also tried "backgroundColor" and it did not work either
("transparent"). How to get back
the correct background color?

Thanks in advance,

John

  





Re: [jQuery] can anchor tag be used in jquery to define areas

2010-01-11 Thread Charlie




"...how do you trigger your click function to work? or can the anchor
tag be used ?"

question isn't very clear about what you are trying to do. You can over
ride the href with a click function by using  " return false; "
which over rides browser default action of opening the link, or you can
work with the href property to reconstruct it if the hash fragment
"#top" isn't there.

be easier to help with better defintiion of objective



Oliur wrote:

  What I mean is, in normal HTML if you have a link to go to the top of
the page you write

a name="top" id="top"/a
.
..

a href=""go top/a

When you type in your browser

http://localhost/lab2/class2.html#top

it takes you to the top of the page. This way you can also go to the
specific area in other pages too.

In jquery if you have such areas that are in a different page, how do
you trigger your click function to work? or can the anchor tag be
used ?

Thanks


  





Re: [jQuery] Re: Problem with jquery tabs on live site

2010-01-11 Thread Charlie




when you put an actual url into tabs href it treats them as ajax tabs.
If you aren't using AJAX in them remove the url within the href and
replace with href=""



Coxy wrote:

  No I'm not, and in my static mock-up everything was ok. It does this
on the live site, and I want to find out why. Do you know how to stop
it?

  





Re: [jQuery] superfish navbar submenu

2010-01-09 Thread Charlie




a link would help. There are likely some simple css solutions to your
problem

Anne wrote:

  Hi all,

I am brand new to this.  I have downloaded the sample files.  I added
the navbar css to the example.html file.  Everything works.  My
problem is that the submenu is visible when I first load the page
before I have hovered over anything.  Before I get into this any
further, is there a way to fix that?

Thanks for your help.

Anne.

  





Re: [jQuery] Download jQuery API docs

2010-01-09 Thread Charlie




not a full set of docs but this cheatsheet is pdf and can be very
helpful
http://www._javascript_toolbox.com/jquery/cheatsheet/JQueryCheatSheet-1.3.2.pdf

MISS_DUKE wrote:

  Is it possible to download the jQuery API documentation to my local
hard-drive? If so, I don't need to connect the Internet every time
when I want to refer the API docs.

  






Re: [jQuery] Jquery UI tabs lockable ?

2010-01-09 Thread Charlie




one method to consider is hide the tab(s), then show when conditions
are correct

URBY wrote:

  Hi i was wondering if it would be possible to lock out other tabs so
the user is stuck on one ..until a user hits a button.

For example an Admin is adding someone to a database- the Admin is on
the add user tab but after enacting this add process(by input) they
cannot leave this tab until either cancelled or accomplished (both
done by a user input button). so again would it be possible to Lock
out other mobility to tabs locking on just one?

  





Re: [jQuery] SUPERFISH - submenus not

2010-01-08 Thread Charlie




site isn't loading jquery , or superfish css and script files. Suggest
removing one version of jQuery and only loading one. 

Check the paths to all these files. If they are avaialbel at the
correct path you should be able to open them in a browser.

Example:
http://www.assured-it.com/modules/mod_superfishmenu/tmpl/js/jquery.js

Doesn't exist at this URL

assur3 wrote:

  Joel,

Thanks for a great module. Everything seems to work well except I
can't get the submenus to "hide" with the Suckerfish effects. All
submenus are displayed with no mouseover. I must be doing something
terribly stupid because no one else seems to have this problem!

Forgive my dumb question, but I've tried various settings, checked out
my template.css file, etc. but everything seems kosher.

My site is www.assured-it.com. The template I'm using is the new
Dominion template from Rockettheme with the Gantry architecture. In
case you need administrator, you can use the "brock" login with
"susukuu" as the password.

Any advice you can give me what I'm doing wrong? Thanks.

Brock Hotaling


  





Re: [jQuery] hidden values associated with options of dropdown

2010-01-08 Thread Charlie




you'd likely find this a lot easier by either using a database or
array search

here's an example using JSON. All of the information is stored in JSON
until needed and can be searched easily with $.each

http://jsbin.com/ohulu/edit

CreativeMind wrote:

  Hi,
I need the ways to solve the problem.
scenario is: I have a dropdown and 4 textboxes, which are filled
through a callback function.
dropdown has multiple values. on selected index change of dropdown i
want to fill the text boxes with associated values. e.g
dropdown has list of countries.
when i select country, the four textboxes are filled with country's
four city names.
like if india  is selected , then textboxes should have delhi,
banglore,mumbai,hyderabad
if uk is selected, textboxes be filled with
london,bermingham,scotland.manchester.
if usa is selected then newyork,washington,pentagon,texas be in four
textboxes.

what i'm currently doing is:
-- in code below i'm appending the new dropdown options retrieved from
callback function, and also appending the associated cities in hidden
input types.

  var sourcedropdown = $(e.target).parent().parent().children(":nth-
child(7)").children().eq(0);

 $(sourcedropdown).append($('option/option').val(val).html
(sourcename).addClass('selectedval'+val));

var cityval=text[1];

$.each(cityval,function(leftval,rightval){
$(sourcedropdown).append("input type=hidden id=hid"+leftval+"
value="+rightval+" ");

});

bydefault [select country] is added in dropdown with no associated
cities,
--
$(sourcedropdown).change(function(){
// how can i get cities in textboxes
});

generated code of my above code is:

select name="source" id="source0"
  option value="-1"Select country/option

option value="0" england/optioninput
type="hidden" value="london" id="hid1"/input type="hidden"
value="birmingham" id="hid2"/input type="hidden" value="liverpool"
id="hid3"/input type="hidden" value="leeds" id="hid4"/

/select
---
this is ok for one country but not ok for more than one country.. any
different way to associate cities with countries?

thanx

  





Re: [jQuery] click event is not working

2010-01-07 Thread Charlie Griefer
http://docs.jquery.com/Events/live

On Thu, Jan 7, 2010 at 2:01 PM, CreativeMind aftab.pu...@gmail.com wrote:

 hi,
 i'm appending a child div in a parent div. parent div has already
 child div's which have classes ws_c1 and plus.

 $('div/div').addClass('ws_c1').addClass('plus').appendTo($
 ('#'+'parentdiv'+counter));

 but when i try to do this
  $(.ws_c1.plus).click(function() {alert('test');});
 It works on other child div's but not on the appended div's. I've also
 tried with Id's.
 can you plz help me.

 regards,




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] How to gain reference to hyperlink that is clicked

2010-01-05 Thread Charlie Griefer
input type=button id=addButton1 class=myButton /
input type=button id=addButton2 class=myButton /

script type=text/javascript
 $(document).ready(function() {
  $('.myButton').click(function() {
   alert($(this).attr('id'));
   // alert(this.id) -- should also work
  }
 });
/script

Notice that I added a class=myButton to each button element, and set the
listener for $('.myButton').click(), which listens for a click event on any
element that matches that selector.

Within the function triggered by the click event, $(this) or this are both
references to the element that triggered the click.

On Tue, Jan 5, 2010 at 12:35 PM, CoffeeAddict dschin...@gmail.com wrote:


 I understand that I can use the .click() method on a hyperlink element.
  But
 how do I know which element was clicked?  First I have to gain reference to
 the hyperlink's ID.

 So lets say I have a page of hyperlinks like this in view source:

 ...someurl  somebutton
 ...someurl  somebutton
 ...someurl  somebutton
 ...someurl  somebutton

 when a user clicks addButton1, how do I know it's addButton1 that was
 referenced so that I can now apply a .click() event on it?
 --
 View this message in context:
 http://old.nabble.com/How-to-gain-reference-to-hyperlink-that-is-clicked-tp27026713s27240p27026713.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: How to gain reference to hyperlink that is clicked

2010-01-05 Thread Charlie Griefer
On Tue, Jan 5, 2010 at 1:10 PM, Scott Sauyet scott.sau...@gmail.com wrote:

 On Jan 5, 3:43 pm, Charlie Griefer charlie.grie...@gmail.com wrote:
  Within the function triggered by the click event, $(this) or this are
 both
  references to the element that triggered the click.

 More precisely, this is a reference the to element.  $(this) is a
 reference to a jQuery wrapper object containing only that element.


Aye.  Thanks for the clarification.

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Superfish - Which files to edit (Simple question) ?

2010-01-03 Thread Charlie




joomla extension will take care of inserting the head code needed as
well as provide various options in the admin for setting up menu.
Follow the extension instructions. Superfish website isn't really set
up for CMS extension installs, like Joomla, however the css tricks will
likely be useful

MiguelGarcia wrote:

  Hello to all...

I was looking to user comments at joomla extentions for Superfish and
it seams to be very interesting Suckerfish solution.

Before start with, I will need to put a question:

When I go to http://users.tpg.com.au/j_birch/plugins/superfish/#examples
, looking at basic style tab, in the box named "The Code" I can see:

1-

//link to the CSS files for this menu type
link rel="stylesheet" type="text/css" media="screen"
href="" /

2-

// link to the _javascript_ files (hoverIntent is optional)
script type="text/_javascript_" src=""/script
script type="text/_javascript_" src=""/script

3-

// initialise Superfish
script type="text/_javascript_"

$(document).ready(function(){
$("ul.sf-menu").superfish();
});

/script



My questions are very simple ones:

a)

Into which files must I put this code ( from points 1 , 2 and 3) ?

template css?  index.php  ?   any other ???

b)

after this, if I create sub menu items in my top menu (thourhg joomla
administrator), will they show up when I put the mouse over them or
will I need to code something else?

If yes, what ?

Lots of thanks in advance,

Miguel Garcia

  





Re: [jQuery] superfish: disable arrows in first list

2009-12-30 Thread Charlie




simple solution is use css to hide them, or use jquery to remove them

Thies wrote:

  Hi,

is it possible to "disable" the arrows at superfish only at the first
list, so that the arrow will only be shown in the sublists?

Thanx a lot

Frank, Germany

  





Re: [jQuery] superfish menu issues

2009-12-28 Thread Charlie




can't tell what the problem is when you use default styling. Would be
much easier to help if the problem was visible, not theoretical 

watchbill wrote:

  I searched and tried implementing some suggestions regarding the
desire for transparent first level navigation so it will show the
sites nav bar gradient image.

I am using a php include for the navigation so if i need to make
changes or additions to the sites navigation I can do it in one
place.  My site utilizes a css stylesheet for the overall site layout
so I'm adding the sf-menu class tag and then calling the php include
navtop1.php.


I put up a test page at http://isltcforme.com/indexa.php

div class="topnavigationArea"
			div class="container"
div class="topnavigationgroup"

ul class="sf-menu"
		?php include "navtop1.php";?
	/ul
/div

My issue is I would like to know how to make the superfish menu look
more like my site.  I reverted back to the original superfish.css and
sf-nav.css since the changes didn't show the desired changes in ie7 or
firefox 3.5.6

what am i doing wrong or what is the fix?

  





Re: [jQuery] Ajax values are lost between 2 operations

2009-12-27 Thread Charlie




lots of possibilities here...a link would help.

1) are the correct values being sent in post? Firebug can be very
helpful for determining this using the "Show XMLHttpRequests" option. 
2)getScript may be getting called prior to notes.php having finished
processing (AJAX is asynchronous), could try putting the getScript as a
callback to $Post
3) is the php doing what it is supposed to? withing the callback you
could look a the values it generates also to see what is happening

Tristan wrote:

  Hi, i've got a little problem and i need your help please :

my script does :
1- post a value in "notes.php" to update values according to what is
send.
2- reload the script which calls an flash chart to update it

the problem is :

the datas are correctly updated in /notes.php when calling again the
script to update the chart it's working BUT the values in notes.php
are reset to initial value (which is 0) so the chart is showed empty
(because the charts fils its data with notes.php)


$(document).ready(function(){
	$("#nomGSP").change(function () {
 var hebergeur1 =  $('#nomGSP').val();
 $.post("/graphiques/notes.php", { hebergeur1:
hebergeur1 } );
 $.getScript("graphique3.js");

  });
});

Thanks.


  





Re: [jQuery] Re: Ajax values are lost between 2 operations

2009-12-27 Thread Charlie




I don't do much with flash but this param looks strange to me
and is what is being written into DOM by your getScript

param name="flashvars"
value="data-file=../graphiques/notes.phploading=Gamer Certified,
chargement des donn?es..."/



Tristan wrote:

  if it can help, here's the link :
http://www.gamer-certified.fr/statistiques/par-hebergeur.php


1) yeap they are correct
2) i tryed that but it still not works
3) php is doing his part, datas are correctly updated with the help of
the POST value



$("#nomGSP").change(function () {

 //get the username
 var hebergeur1 =  $('#nomGSP').val();
 //use ajax to run the check
 $.post("/graphiques/notes.php", { hebergeur1: hebergeur1 } ,
  function(data){
$.getScript("graphique3.js");
  },"script");
  });

thanks

  





Re: [jQuery] I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Charlie Griefer
You just want the value of the one that's checked?

$(':checkbox[name=number]').click(function() {
 if ($(this).is(':checked')) alert($(this).val());
});

if you want the total of all checked boxes when one is clicked:
script type=text/javascript
$(document).ready(function() {
$(':checkbox[name=number]').click(function() {
var total = 0;
$(':checkbox[name=number]:checked').each(function() {
total += parseFloat($(this).val());
});
alert(total);
});
});
/script

On Sun, Dec 27, 2009 at 1:08 PM, dziobacz aaabbbcccda...@gmail.com wrote:

 I have:

 input type=checkbox checked=checked value=2 name=number/
 input type=checkbox value=7 name=number/
 input type=checkbox value=34 name=number/

 I would like to get value each time when one of these checkboxes will
 change status, how can I do that ? For example when first checkbox
 will be unchecked or second will be checked. Could You help me ?





-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: I would like to get value each time when one of these checkboxes will change status, how can I do that ?

2009-12-27 Thread Charlie Griefer
Wow.  Never even thought about that, but it makes perfect sense.

Thanks for pointing that out :)

On Sun, Dec 27, 2009 at 5:52 PM, Ami aminad...@gmail.com wrote:

 I recommend to use change event and not click event, becuase users
 can change the checkbox without clicking (by using the keyboard).

 On Dec 28, 1:17 am, Charlie Griefer charlie.grie...@gmail.com wrote:
  You just want the value of the one that's checked?
 
  $(':checkbox[name=number]').click(function() {
   if ($(this).is(':checked')) alert($(this).val());
 
  });
 
  if you want the total of all checked boxes when one is clicked:
  script type=text/javascript
  $(document).ready(function() {
  $(':checkbox[name=number]').click(function() {
  var total = 0;
  $(':checkbox[name=number]:checked').each(function() {
  total += parseFloat($(this).val());
  });
  alert(total);
  });
  });
  /script
 
  On Sun, Dec 27, 2009 at 1:08 PM, dziobacz aaabbbcccda...@gmail.com
 wrote:
   I have:
 
   input type=checkbox checked=checked value=2 name=number/
   input type=checkbox value=7 name=number/
   input type=checkbox value=34 name=number/
 
   I would like to get value each time when one of these checkboxes will
   change status, how can I do that ? For example when first checkbox
   will be unchecked or second will be checked. Could You help me ?
 
  --
  Charlie Grieferhttp://charlie.griefer.com/
 
  I have failed as much as I have succeeded. But I love my life. I love my
  wife. And I wish you my kind of success.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] menu hover question

2009-12-26 Thread Charlie




very hard to guess what the issue might be .can you post a link or
create a test page on jsbin.com?



slava wrote:

  Hi,
I am trying to create a vertical menu with jquery.
I select the cells (divs) which have sub-menues and call .hover
function to show sub-menues on hover in and hide on hover out. That
works, but the problem is its impossible to select a sub-menu sinse
they are hidden as soon as you hover out from the parent menu cell. I
tried adding sub-menues to the hover function, but that did not make a
difference. Any ideas on how to make this work please.

thanks. Slava

  





Re: [jQuery] Slideshow Question

2009-12-26 Thread Charlie




to answer question "is this doable in jQuery"...yes it certainly is.

I would suggest using the cycle plugin due to it's robust API. The
right tabs can be managed the same as any of the pager examples, just
adjust your css accordingly. The text is handled by creating absolute
positioned container over the top of the slides with appropriate
z-index.

Cycle plugin has 2 event options that make the changes of text and css
of things like the tabs quite easy.

The "before" and "after" callback options provide the index of the
slide which can be used to animate the corresponding text overlays
using straightforward jQuery functions and make css changes to the
"tabs"

using the before and after options you can do something like:
$("#mySlideShow").cycle(

// other cycle options such as pager to connect to tabs
before: function(){ 
 $('. mySlideTextClass)'.hide();
 $('activeTabClass').removeClass('activeTabClass');
},
after: function(slideIndex){ 
  $(. mySlideTextClass).eq(slideIndex).show();
  $(. myTabsClass).eq(slideIndex).addClass('activeTabClass')// do
any sort of animation or whatever to tabs or text here

});

Ammar Rayess wrote:

  Greetings,

Take a look at this website please:
http://new.music.yahoo.com/

You can see in the middle the flash slideshow that shows pix in
middle, overlayed with text and on the right column a title, ofcourse
clicking on different titles activate the related image with text.

I looked at the plugins available, didn't see something to do the
same, i saw many slide show plugins but i need to do a block that is
exactly like the one in the mentioned site.

Is there a plugin for it that i did not notice? is this doable in
JQuery or must it be done using flash (not a flash expert here)?

Any help is most appreciated.
Thank you

  





Re: [jQuery] Simple jQuery Ajax - Using PHP Variables

2009-12-26 Thread Charlie




lots of examples in the AJAX section of
jQuery.com.http://docs.jquery.com/Ajax/jQuery.get#urldatacallbacktype
For your case following should work:
var valueIwantToSend="1223";
$.get("scriptname.php", { variable: valueIwantToSend},function(data){
 $("#results").html(data)
});


egressor wrote:

  I have consulted numerous books, and have searched online in vain to
find an answer to this simple question.

Here is a case:

I have a simple PHP script that I can run either in the browser or in
the shell by typing something something similar to this:
scriptname.php?variable=value

Now let's assume that the variable is a simple string, and not
something complicated as an array. Let's also assume that the output
of the PHP script, is plain xHTML and the jQuery Ajax will insert it
into a div or span id="results".

Can someone provide an idiots guide to this, and also some code?

Thank you,
Chris

  





Re: [jQuery] Problem with a search form in a loaded php file??

2009-12-24 Thread Charlie




http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

123gotoandplay wrote:

  hi,

have simple search form which works in list.php

Now i am 'loading' list.php in #content and now the search function
doesn't work.

what i have done
- change the type from submit to button
- in index.php i added

$("#content #search_button").click(function() {
		alert("click");
		var search_word = $("#searchTerm").val();
		var dataString = 'search_word='+ search_word;

		if(search_word=='')
		{
		alert("no searchterm");
		return false;
		}
		else
		{
		alert("search");
		}
	});

But the search_button isn't triggered??? How do i fix this??

  






Re: [jQuery] Re: jQuery Cycle Multiple Pagers

2009-12-24 Thread Charlie




for the arrows you can create absolute positioned containers over top
of the slides that fadeIn, show or whatever when hover over slide. 

use the "next" and "prev" options to assign selector to your arrows
within the overlay containers

$("mySlideContainer").cycle({
 //other options already used
next: '# myNextArrow',
prev: ''# myPrevArrow'

});

pmAgony wrote:

  Update, I was able to successfully complete #2 and #3.  My challenge
right now is being able to get two synchronized pagers on the same
cycle.

If anyone can chime in to assist, I'd greatly appreciate it.  Here's a
link to take a look: http://www.cuisinteractive.com/staging/etc/index.php

Thanks!

On Dec 23, 11:41am, pmAgony fnc...@gmail.com wrote:
  
  
Hello Experts,

I'm looking for some guidance on implementing multiple pagers on a
jQuery Cycle plugin. My goal is as follows:

1. On hover of #slideshow, reveal left and right arrows so the user
can navigate previous/next. Exactly like the lightbox feature.

2. Thumbnails of the images below the slideshow to allow the user to
navigate visually and identify which image they are currently on.
This is completed and successful.

3. In the lower-left region of the slideshow, I'd like to show text
description of the image iteself. It should be synchronized with the
slideshow. This isn't really a paging question.

So to recap, the user will have two methods of paging, one on the
slideshow when they hover, the other via the thumbnails, and lastly a
text description of each slide in the lower-left quadrant of the mast.

I'm not sure how to define 2 different pagers. Any help or reference
to an existing/working model would be great. All the best!

Here is my current code:

#
 xHTML
#
div id="mast"

div class="slideshow"
!-- Would like for these controls to appear on mouseOver --
div class="pager" style="display:none;"
span id="controlLeft"a href="" class="pref"
title="Previous"!-- Hi --/a/span
span id="controlRight"a href="" class="next"
title="Next"!-- Hi --/a/span
  /div

!-- The slideshow itself --
  div id="slides"
   a href=""img src=""
width="1000" height="421" alt="Automated Controls"/a
   a href=""img src=""
width="1000" height="421" alt="Bedroom Theater"/a
   a href=""img src="" width="1000"
height="421" alt="Home Theater"/a
   a href=""img src=""
width="1000" height="421" alt="Home Theater"/a
   a href=""img src="" width="1000"
height="421" alt="Home Surveillance"/a
   a href=""img src=""
width="1000" height="421" alt="Automated Controls"/a
   a href=""img src="" width="1000"
height="421" alt="Touch Sensor Controls"/a
   a href=""img src=""
width="1000" height="421" alt="Touch Control"/a
  /div
/div

!-- Predula of thumbnails --
div id="predula"
ul id="nav"
lia href=""img src="" width="44"
height="44" alt="Automated Controls" //a/li
lia href=""img src="" width="44"
height="44" alt="Bedroom Theater" //a/li
lia href=""img src="" width="44"
height="44" alt="Home Theater" //a/li
lia href=""img src="" width="44"
height="44" alt="Home Theater" //a/li
lia href=""img src="" width="44"
height="44" alt="Home Surveillance" //a/li
lia href=""img src="" width="44"
height="44" alt="Automated Controls" //a/li
lia href=""img src="" width="44"
height="44" alt="Touch Sensor Controls" //a/li
lia href=""img src="" width="44"
height="44" alt="Touch Control" //a/li
/ul
  br class="clear" /
/div

!-- The text-friendly description that transitions with each slide
transition --
   div id="description"/div

/div!-- #mast --

#
_javascript_
#

script type="text/_javascript_"
// redefine Cycle's updateActivePagerLink function
$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) {
  $(pager).find('li').removeClass('activeLI')
.filter('li:eq('+currSlideIndex+')').addClass('activeLI');

};

$(document).ready(function() {
  $('#slides').cycle({
fx: 'scrollLeft',// choose your transition type, ex: fade,
scrollUp, shuffle, etc...
speed:  4500, // milliseconds between each slide transition
timeout: 6000, // milliseconds between slide transitions (0 to
disable auto advance)
pause: true,  // pause on mouseover
resume: true,
delay: 1500,  // delay start onload
cleartype: 1,
easing:null, // easing method for both in and out
transitions
easeIn:null, // easing for "in" transition
easeOut:null, // easing for "out" transition
pager: '#nav',
prev: 'a.prev',
next: 'a.next',
pagerAnchorBuilder: function(idx, scrollLeft) {
// return selector string for existing anchor
return '#nav li:eq(' + idx + ') a';
}
});});

function pagerFactory(idx, scrollLeft) {
var s = idx  2 ? ' style="display:none"' : '';
return 'li'+s+'a href=""'+(idx+1)+'/a/li';
};

/script

  
  
  





Re: [jQuery] Latest JQuery File

2009-12-23 Thread Charlie Griefer
I'd wager this is an issue with Dreamweaver's parsing of the code.

You should -not- be modifying the core jQuery files, unless you really
-really- know what you're doing.  And if that's the case, you still really
should -not- be modifying the core jQuery files.

On Tue, Dec 22, 2009 at 11:34 PM, David Matchoulian 
davidmatchoul...@gmail.com wrote:

 Dear jQuery Guys,
 I downloaded the latest file, and when i opened it in dreamweaver and
 scrolled through the code i noticed that half the code is colored
 blue, that is half the code is considered string, i tryed to fix it
 myself but i didn't since i was afraid that i might ruin the code.
 What is the solution for this problem?
 Thank you




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Targeting/selecting via the title atribute of a link?

2009-12-23 Thread Charlie Griefer
$('a[title=blog]')

On Wed, Dec 23, 2009 at 8:30 AM, Janmansilver jan.poul...@gmail.com wrote:

 I have to add som jquery magic to a link where the only unique
 identifier is the title-atribute?

 my code:

 a title=Blog href=/blog

 How do I target this via Jquery?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Sending all checked checkboxes

2009-12-23 Thread Charlie Griefer
If I'm understanding you properly...

$('input:checkbox.filter:checked') would give you an array of checked
checkboxes with class=filter

How you send them via AJAX depends on what the file on the server is
expecting.

On Wed, Dec 23, 2009 at 9:46 AM, spiraldev spiral...@gmail.com wrote:

 How would I go about send all of my checked checkboxes with the class
 of filter via ajax?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] .add()

2009-12-23 Thread Charlie Griefer
As per the docs (http://docs.jquery.com/Traversing/add),

$(div).css(border, 2px solid red)
.add(p)
.css(background, yellow);

That will add a 2px red border around any 'div' element.

Then add in a new selector and grab all of the p elements.  Add a yellow
background to the previously selected div elements, as well as the newly
selected p elements.

Does that clarify add()?

I'm not sure I understand what it is you're trying to accomplish.  Can you
explain what you need to do?

On Wed, Dec 23, 2009 at 10:45 AM, Scott polyp...@gmail.com wrote:

 Maybe I'm not understanding the point of .add() but it doesn't really
 do what I'd expect nor can I figure out how to do what I thought would
 be simple.

 I want to combine 2 jquery objects.

 var $obj1 = $(.stuff);
 var $obj2 = $(.morestuff);
 $obj1.add($obj2);
 alert($obj1.length);

 This doesn't do anything, it looks like .add() only accepts selection
 strings which in my example would work but in what I really need to do
 I have no selection string which would find the specific jquery
 objects.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: .add()

2009-12-23 Thread Charlie Griefer
Sorry, misunderstood.

I wasn't clear on what you were trying to do, but saw the Maybe I'm not
understanding the point of .add(), so was trying to clarify that.

Glad MorningZ got you sorted :)

On Wed, Dec 23, 2009 at 10:59 AM, Scott polyp...@gmail.com wrote:

 Uh, that's not what I'm asking at all.

 In the documentation example you're passing .add() the p selector
 which is a string. I want the end result to be the same except instead
 of passing a selector string like p I want to pass an existing
 jquery object. It doesn't seem to work this way and the only time more
 elements get added to to jquery object is if you use a selector.

 Sso I want to do more like :
 $(div).css(border, 2px solid red)
 .add($(this).children()) //see how this line is different
.css(background, yellow);


 On Dec 23, 12:50 pm, Charlie Griefer charlie.grie...@gmail.com
 wrote:
  As per the docs (http://docs.jquery.com/Traversing/add),
 
  $(div).css(border, 2px solid red)
  .add(p)
  .css(background, yellow);
 
  That will add a 2px red border around any 'div' element.
 
  Then add in a new selector and grab all of the p elements.  Add a
 yellow
  background to the previously selected div elements, as well as the
 newly
  selected p elements.
 
  Does that clarify add()?
 
  I'm not sure I understand what it is you're trying to accomplish.  Can
 you
  explain what you need to do?
 
 
 
  On Wed, Dec 23, 2009 at 10:45 AM, Scott polyp...@gmail.com wrote:
   Maybe I'm not understanding the point of .add() but it doesn't really
   do what I'd expect nor can I figure out how to do what I thought would
   be simple.
 
   I want to combine 2 jquery objects.
 
   var $obj1 = $(.stuff);
   var $obj2 = $(.morestuff);
   $obj1.add($obj2);
   alert($obj1.length);
 
   This doesn't do anything, it looks like .add() only accepts selection
   strings which in my example would work but in what I really need to do
   I have no selection string which would find the specific jquery
   objects.
 
  --
  Charlie Grieferhttp://charlie.griefer.com/
 
  I have failed as much as I have succeeded. But I love my life. I love my
  wife. And I wish you my kind of success.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: jQuery Selector Help

2009-12-22 Thread Charlie Griefer
2009/12/22 Å ime Vidas sime.vi...@gmail.com

 Well, you selected BR elements, which are empty elements, so it's no
 mystery why this.innerHTML returns undefined...

 Also, DIVs shouldn't appear inside SPANs...


He did state that he's using generated HTML.  He has no control over it.

Mike - this isn't really a jQuery problem per se.  You're jQuery selectors
match DOM elements.  Not so much the contents of those elements.

What you can do is search for the containing element (in this case, you can
look for a span with a class of event), and replace all instances of br
/* with just the br /.

$(document).ready(function() {
var newHTML = $('span.event').html().replace(/(br.*)\s*\*/g, '$1');
$('span.event').html(newHTML);
});

The expression is looking for a br / (or br or br/) followed by any
white space (including tabs), followed by an asterisk.  It replaces that
pattern with the br / alone (removing the asterisk).

Disclaimer: I'm no regex guru, so if anyone sees a way to clean up that
expression, please feel free.

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: jQuery Selector Help

2009-12-22 Thread Charlie Griefer
On Tue, Dec 22, 2009 at 10:34 AM, Mike Walsh mike_wa...@mindspring.comwrote:


 [ ... snipped ... ]

 Thanks for pointing me in the right direction.  This is what I ended
 up getting to work:

jQuery(span.event, .calendar-table).each(function(){
var html = this.innerHTML.replace(/(br\s*\/*)\s*\*/
 g, \'$1\');
jQuery(this).html(html) ;
}) ;

 I changed the regular expression slightly to eliminate the .* portion
 and changed .html() to .innerHTML.  I don't know enough jQuery to know
 why I had to do that but had seen it elsewhere so tried it and it
 worked.

 Thanks,

 Mike


.html() retrieves the innerHTML.

Really no functional difference, but for the sake of consistency, since
you're leveraging jQuery, I'd prefer to see consistent jQuery code (unless
there's a compelling reason not to).

And yeah... just a preference.  Not saying wrong or right.  But I am saying
you shouldn't have -had- to do that :)

Anyway, glad you got it working.  That's the important bit :)

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: jQuery Selector Help

2009-12-22 Thread Charlie Griefer
On Tue, Dec 22, 2009 at 10:40 AM, Charlie Griefer charlie.grie...@gmail.com
 wrote:

 On Tue, Dec 22, 2009 at 10:34 AM, Mike Walsh mike_wa...@mindspring.comwrote:


 [ ... snipped ... ]

 Thanks for pointing me in the right direction.  This is what I ended
 up getting to work:

jQuery(span.event, .calendar-table).each(function(){
var html = this.innerHTML.replace(/(br\s*\/*)\s*\*/
 g, \'$1\');
jQuery(this).html(html) ;
}) ;

 I changed the regular expression slightly to eliminate the .* portion
 and changed .html() to .innerHTML.  I don't know enough jQuery to know
 why I had to do that but had seen it elsewhere so tried it and it
 worked.

 Thanks,

 Mike


 .html() retrieves the innerHTML.

 Really no functional difference, but for the sake of consistency, since
 you're leveraging jQuery, I'd prefer to see consistent jQuery code (unless
 there's a compelling reason not to).

 And yeah... just a preference.  Not saying wrong or right.  But I am saying
 you shouldn't have -had- to do that :)

 Anyway, glad you got it working.  That's the important bit :)


... and after looking at your code (which always helps), I see you're
referencing this (as opposed to jQuery's $(this)), which is why html()
wouldn't have worked.

In that case, sure.  It's been said that this is more efficient than
creating a jQuery reference to it via $(this).

So to clarify... this.innerHTML is the functional equivalent of
$(this).html(), but without the cost of creating a new jQuery object for
each iteration of your each().

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Superfish and Wordpress

2009-12-21 Thread Charlie




you have a bunch of issues going on. First take the $(document).ready
superfish constructor out of the internal functions of the plugin.
Calling the plugin itself from within the plugin code is asking for
problems( and it is throwing an error in Firebug)

since you have multiple script libraries you'll likely need to use
jQuery.noConflict 
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

remove multiple loads of same script in head ( example Hoverintent.js),
this is asking for problems

the selector you use to construct superfish isn't referencing the menu

".sf-menu" within a selector refers to element(s) with class name
"sf-menu" and you don't have any

you can use any selector that applies to the main menu ul as long as it
will reference that ul. Script won't work if you don't tell it where to
do the magic
http://docs.jquery.com/Selectors



Rob wrote:

  I am having trouble getting my wordpress theme to use the Superfish in
the nav menu. My problem is I have subcategories that go 3 tabs deep
and currently it is very tough to navigate through the drop down menu
so I wanted to get Superfish to work since I have used it with other
non-Wordpress sites in the past.

a link to the site I am working on is http://robgivans.com/hssportszone/

I have called these files.

//link to the CSS files for this menu type
link rel="stylesheet" type="text/css" media="screen"
href="" /

// link to the _javascript_ files (hoverIntent is optional)
script type="text/_javascript_" src=""/script
script type="text/_javascript_" src=""/script
script type="text/_javascript_" src=""/script

Then right above my Navbar I have called the script file for super
fish, this is exactly how it is in my file.

script type="text/_javascript_"

$(document).ready(function(){
$("ul.sf-menu").supersubs({
minWidth:12,   // minimum width of sub-menus in em
units
maxWidth:27,   // maximum width of sub-menus in em
units
extraWidth:  1 // extra width can ensure lines don't
sometimes turn over
   // due to slight rounding differences
and font-family
}).superfish();  // call supersubs first, then superfish, so
that subs are
 // not display:none when measuring. Call
before initialising
 // containing tabs for same reason.
});

/script
div id="navbar"

div id="navbarleft"

ul id="nav"

lia href=""Home/a/li

?php wp_list_pages('title_li=depth=4sort_column=menu_order'); ?
/ul
/div

/div


I have changed the DIV Navbar to sf-menu but it makes no difference.
If you have any idea what I could be doing wrong please let me know, I
have been messing with this way too long, maybe I am missing something
stupid. Thanks.

  





Re: [jQuery] simple code not working

2009-12-21 Thread Charlie Griefer
couple of debugging steps I'd take:

1) remove the .getJSON() call and just alert('foo'), to ensure that the
change event is being triggered as you expect
2) install Firebug in Firefox and check whether or not there are errors in
the php document.

On Mon, Dec 21, 2009 at 8:16 AM, kikloo tbha...@gmail.com wrote:

 hi

 i have this simple code:

 $(function() {
$(select#ctlByName).change(function() {

cid = $(this).val();
$.getJSON(ajax.php,{cid:cid}, function(json) {
alert(Data Loaded:  + json);
})
})
 })

 and its not working. Its set to work when a select is changed by
 user and it should then get data back from ajax.php which is sending
 the data fine. But no alert is coming up and it seems its not working.

 Please help.

 Thanks.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Superfish - current sublevel visible

2009-12-21 Thread Charlie




question is clear ..solution however would take some custom coding of
the 2 main hide/show functions within plugin

if you manage to create a solution please post it here, others have had
same request

tominou50 wrote:

  Hello,

I'd like to know if it's possible that the current sublevel ul is
always visible except when i rollover other main items and when i roll
out other main items the current sublevel ul go back to visible
status... am i clear ???

Many Thanks
Thomas

  





Re: [jQuery] Load Superfish menu with AJAX

2009-12-20 Thread Charlie




following assumes superfish.js is loaded with initial page

$("#mymenuContainer").load("mymenufile.xxx", function() { 
  $(".sf-menu").superfish( {//my superfish options});
});

callback function will fire after the html loaded. 

Another method is to put the superfish constructor code at bottom of
your html in the file to be loaded and skip the callback function above

if you want error capability use full $.ajax() to load the menu in
success option and do whatever you might want in error option. 

Greg-J wrote:

  I am using Superfish for a 4 tiered menu which, when complete, will
consist of several hundred individual links. As to not be penalized by
the big G, I want to load this menu via AJAX. My question then is, how
would I go about doing this so that the menu is loaded into it's
container div and then superfish() is applied?

  





Re: [jQuery] huge drop down

2009-12-20 Thread Charlie




IE gives limited support to what you can do to style selects. As
suggested use a plugin, of which there are many, that convert select's
to alternate html yet retain similar functionality

fachhoch wrote:

  that did not help me , I triedgoogle search but none of them worked for
me , please, jquery experts tell me how to CONTROL WIDTH of dropdown IN IE ,




Scott Sauyet-2 wrote:
  
  
You might look at a plug-in like:

http://code.google.com/p/dropdown-check-list/

Good luck,

  -- Scott



  
  
  





Re: [jQuery] Superfish, menu out of screen

2009-12-17 Thread Charlie




this thread should help
http://groups.google.com/group/jquery-en/browse_thread/thread/255652615420722c/093dd27ff7f2e7b3?lnk=gstq=superfish+onbeforeshow#093dd27ff7f2e7b3

jonas wrote:

  Hi!

Is is possible to check if a new UL is rendered outside the browser
window?

When using Superfish with default settings, UL's can get rendered
outside the browser window if we have manu child levels, which just
enables the browser scroll. We would for example like the UL to be
rendered to the left, instead of on the right.

Any thoughts?

Regards
Jonas

  





Re: [jQuery] Superfish dropdown shows only inside containing li

2009-12-17 Thread Charlie




have you tried disabling the superfish.js and let menu operate in css
only mode? not sure how anyone can help without a link

Eelco wrote:

  Hi,

I am using superfish in a Joomla template, and it works fine in all
browsers including IE6 and IE8, not in IE7 however. I do not have any
positioned elements, its just that it seems as if the containing li's,
have overflow:hidden, which they don't have. I can see that it works
in IE7 because I have applied small negative margins, so a small piece
of the dropdown actually appears inside the containing li

I would provide you with a link, however I prefer to do so privately
if needed.

My code:
div id="menu"
  ul class="menu sf-menu sf-js-enabled sf-shadow"
li class="parent item10"
  a class="sf-with-ul" href=""
spanVisie/span
span class="sf-sub-indicator" /span
  /a
  ul style="display: none; visibility: hidden;"
li class="item19"
  a href=""
spanStrategie/span
  /a
/li
  /ul
/li
  /ul
/div

CSS:
#menu ul {
list-style-type: none;
	padding-left:15px;
}

#menu li {
display:block;
float:left;
padding:2px 0;
height:23px;
}

/* Opacity, exclude IE6 */
htmlbody #menu ul li {
filter:alpha(opacity=70);
	opacity: 0.7;
}

/* Firefox children inherit transparency, IE children don't */
htmlbody #menu ul li li, x:-moz-any-link {
filter:alpha(opacity=100);
opacity: 1;
}

htmlbody #menu ul li#current li {
filter:alpha(opacity=70);
	opacity: 0.7;
}

#menu li#current {
filter:alpha(opacity=100);
opacity:1;
	font-weight:bold;
}

#menu ul li ul {
width:150px;
}

#menu ul li li {
padding-left:10px;
}


/* This output is overriden for all except IE6 */
#menu ul li li {
width:150px;
}

htmlbody #menu ul li li {
width:inherit;
}

/* IE6 Hack */
#menu ul li { width:42px; }
htmlbody #menu ul li {
width:auto;
}

htmlbody .separator {
margin-right:13px;
}

#menu ul li ul {
padding: 0;
margin-top: -10px;
margin-left: -17px;
}

#menu a {
text-decoration:none;
color: white;
	font-size:10pt;
}

span.separator {
display:block;
margin-top:-2px;
margin-left:18px;
height: 27px;
border-left:1px solid white;
}

Last but not least, Superfish CSS: (I have only disabled two padding
styles)

/*** ESSENTIAL STYLES ***/
.sf-menu, .sf-menu * {
	margin:			0;
	padding:		0;
	list-style:		none;
}
/*.sf-menu {
	line-height:	1.0;
}*/
.sf-menu ul {
	position:		absolute;
	top:			-999em;
	/*width:			10em; /* left offset of submenus need to match (see below)
*/
	list-style:		none;
}
.sf-menu ul li {
	width:			100%;
	list-style:		none;
}
.sf-menu li:hover {
	visibility:		inherit; /* fixes IE7 'sticky bug' */
}
.sf-menu li {
	float:			left;
	position:		relative;
	height:			23px;
}
.sf-menu a {
	display:		block;
	position:		relative;
}
.sf-menu li:hover ul, .sf-menu li#parent:hover ul,
.sf-menu li.sfHover ul {
	left:			0;
	top:			2.5em; /* match top ul list item height */
	z-index:		99;
}
ul.sf-menu li:hover li ul, .sf-menu li#parent:hover ul,
ul.sf-menu li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li:hover ul,
ul.sf-menu li li.sfHover ul {
	/*left:			10em; /* match ul width */
	top:			0;
}
ul.sf-menu li li:hover li ul,
ul.sf-menu li li.sfHover li ul {
	top:			-999em;
}
ul.sf-menu li li li:hover ul,
ul.sf-menu li li li.sfHover ul {
	/*left:			10em; /* match ul width */
	top:			0;
}

/*** DEMO SKIN ***/
.sf-menu {
	float:			left;
	margin-bottom:	1em;
}
.sf-menu a {
	/*border-left:	1px solid #fff;*/
	/*border-top:		1px solid #CFDEFF;*/
	height:			23px;
	xpadding: 		0 1em; /* ET: DISABLED, IE6 DID NOT LINE OUT PROPERLY
14-12-2009 */
}
.sf-menu a, .sf-menu a:visited  { /* visited pseudo selector so IE6
applies text colour*/
	color:			#13a;
}
.sf-menu li {
	/*background:		#BDD2FF;*/
}
.sf-menu li li {
	background:		#2ea2da;
	filter:			alpha(opacity=70);
	opacity:		0.7;
}
.sf-menu li li li {
	background:		#9AAEDB;
}
.sf-menu li:hover, .sf-menu li.sfHover,
.sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
	/*background:		#CFDEFF;*/
	outline:		0;
}

/*** arrows **/
.sf-menu a.sf-with-ul {
	xpadding-right: 	2.25em; /* ET: DISABLED, IE6 DID NOT LINE OUT
PROPERLY 14-12-2009 */
	min-width:		1px; /* trigger IE7 hasLayout so spans position
accurately */
}
.sf-sub-indicator {
	position:		absolute;
	display:		block;
	right:			.75em;
	top:			1.05em; /* IE6 only */
	width:			10px;
	height:			10px;
	text-indent: 	-999em;
	overflow:		hidden;
	background:		url('../images/arrows-ff.png') no-repeat -10px
-100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a  .sf-sub-indicator {  /* give all except IE6 the correct values */
	top:			.8em;
	background-position: 0 -100px; /* use translucent arrow for modern
browsers*/
}
/* apply hovers to modern browsers */
a:focus  .sf-sub-indicator,
a:hover  .sf-sub-indicator,
a:active  .sf-sub-indicator,
li:hover  a  .sf-sub-indicator,
li.sfHover  a  .sf-sub-indicator {
	

Re: [jQuery] What is the canonical way of seeing if a selector returns an empty list?

2009-12-17 Thread Charlie Griefer
On Thu, Dec 17, 2009 at 7:32 AM, Joe Grossberg
joegrossberg@gmail.comwrote:

 Instead, I do it like this (since zero is false-y in JavaScript):

 if ( $('.foo').length ) {
  alert('at least one matching element');
 } else {
  alert('nothing matches');
 }

 But is that the preferred way of doing this?


As far as I am aware, yes... checking the length property is the way that
I've seen it done.

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Changing colspan with jQuery

2009-12-17 Thread Charlie Griefer
I see where you're changing background colors, but where are you trying to
change colspans?

untested, but

 $('myTDelement').attr('colspan', x);

... where 'x' is the numeric value, should work.

also, it's criminal to use document.getElementById() within jQuery.
$('#element') is so much more elegant :)

script type=text/javascript
$(document).ready(function() {
$('#plusSign').click(function() {
$('.ba_toggle').toggle();

   if $('#plusSign').html() == +) {
   $('#plusSign').html('-');
$('th.ba_colspan, td.ba_colspan').each(function() {
$(this).attr('bgColor','red');
});
   } else {
   $('#plusSign').html('+');
$('th.ba_colspan, td.ba_colspan').each(function() {
$(this).attr('bgColor','green');
});
   }

   });
});
/script


On Thu, Dec 17, 2009 at 11:23 AM, davec dcah...@hyphensolutions.com wrote:

 I am trying to change the colspan attribute on some table cells when
 the user clicks on a button but it is not affecting the table. Perhaps
 someone can tell me what I am doing wrong. Here is my jQuery code:

 script type=text/javascript
 $(document).ready(function() {
   $('#plusSign').click(function(){
  $('.ba_toggle').toggle();
if(document.getElementById('plusSign').innerHTML=='+')
{
   document.getElementById('plusSign').innerHTML='-';
   $('th.ba_colspan, td.ba_colspan').each(function(){
$(this).attr('bgColor','red');
   });
}
else
{
document.getElementById('plusSign').innerHTML='+';
$('th.ba_colspan, td.ba_colspan').each(function(){
$(this).attr('bgColor','green');
});
}
 });
  });
 /script




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] superfish transparent PNG problem IE (8) when dropdown opens

2009-12-16 Thread Charlie




there is nothing in script or css that does anything with images.
Example doesn't have images in menu. 

troop wrote:

  Hi Everyone!

I encountered a really strange behavior of the superfish menu. It
works like a charm an FF etc. but on IE 8 (couldn't test it with a
lower one yet) the already transparent background of the content DIV
gets a gradient transparency when the dropdown gets visible...

i couldnt find the part where the PNG alpha chanel is manipulated in
superfish, but would be fine with just turning this functionality off,
since its not needed anyway...

you can look at a example at http://goleon.de/wordp/

just hover over one of the menuentries and youll see what i mean...

any help is highly appreciated.

Thx,
Troop

  





Re: [jQuery] How do I select all elements whose id's begin with ... ?

2009-12-15 Thread Charlie Griefer
$('input[id^=DatePref]')

On Tue, Dec 15, 2009 at 8:10 AM, laredotorn...@zipmail.com 
laredotorn...@zipmail.com wrote:

 Hi,

 I'm using JQuery 1.3.  How do I write an expression to select all
 elements whose id's begin with DatePref?  These are all input
 type=text elements if that matters.

 Thanks, - Dave




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: Superfish sub-menus not working in IE

2009-12-15 Thread Charlie




a link would help

have you tried the z-index fix suggested in faq's on superfish site?

slflinders wrote:

  I was told this was the place to get support for the Superfish module.
Can anybody help me with the problem below?

Thanks.

On Dec 14, 6:42pm, slflinders slflind...@gmail.com wrote:
  
  
Hi.

I just installed Superfish Dropdown Menu for Joomla 1.5 today from
extensions.joomla.org and have a couple of questions.

First, the version on extensions.joomla.org is 1.2. Is this the best
version to be using or is there something more recent? If so, how do I
get it?

Second, I configured my menu with a Menu Style of Accordian List and
Animation as Fade In. It works great in FireFox and Chrome. However,
in Internet Explorer (version 7), the sub-menu doesn't appear when I
hover over the parent menu item. What do I need to do to fix this?

Thanks.

  
  
  





Re: [jQuery] Superfish - Question about how submenu can be displayed

2009-12-15 Thread Charlie




No simple solution. With some work you can setup an auto scrolling div
inside a dropdown. Markup would use one LI and custom styled div
container that you would put your links into and adapt a scroll system
to. There are quite a few auto scrollers, once you get one working in a
stand alone container system, then insert it into menu

jacleee wrote:

  Hi ! thanks for this menu, its great

I am having trouble finding a way to adjust the sub-menus
eg. when the submenu list gets pretty long, the list will sometime go
off the window size limit in which I would have to scroll downwards to
see the rest of the submenu list.
Is there a way so that the submenu can adjust itself so it wont
require scrolling?
hope you know what I mean.

Thank you in advance.

  





Re: [jQuery] Superfish Joomla module: all subs with the same top-value

2009-12-15 Thread Charlie




this can be accomplished with the onBeforeShow option. "This" within
onBeforeShow refers to the UL about to be shown. Using jQuery
$.offset() function to locate the offset of the UL within the menu you
can then use $.css() to make adjustments. 

joge wrote:

  hello,

I am using the superfish module for Joomla!

Now I want to align all sub and sub-sub- and so on-menus on the same
vertical position, so they all appear directly underneath the main
menu. How can I do that? The top-values in the css are absolute to
their parent, so entereing a fix value there shouldn't do it...

thanks, Joerg

  





Re: [jQuery] Code to remove div when h3 is empty

2009-12-14 Thread Charlie




if the empty h3 tag exists in the DOM you can test the length of text
within it. 

using theoretical class of "postDiv" loop through all the postDiv h3's:

$(".postDiv h3").each(function() { // "each" loops through all
matching selectors one at a time
   if( $(this).text().length==0 ){ // "this" refers to the
individual h3 that is currently within the "each"
$(this).closest(".postDiv").hide() // 'closest" looks up
through parents to find match
   }
});



mockaccino wrote:

  Hi, I'm a newbie to the concepts of programming let alone query and I
was wondering if this was possible.

I've got a Wordpress site that has a h3 tag nested inside a div. The
problem is that a post is removed everyday which leaves the h3 empty
but the div is still there taking up real estate making the columns
uneven. So im thinking that there must be something like "if h3 is
empty, hide div.class"whatever"...

My embarrassing lame attempts don't work and i was wondering if
someone can a tleast point me to the right function to try write
something around.

Thanks for taking the time to read this post.

  





Re: [jQuery] Re: detecting edge cases when swapping divs

2009-12-14 Thread Charlie




any tests on .arrowdown will not be of benefit , you need to check for
position of it's parent .pane

since you are inserting after "p" tags in this case try this:

$(".pane .arrowdown").click(function() {
 $(this).parents(".pane").slideUp("slow",function(){
   $(this).insertAfter($(this).next()).slideDown("slow");
   if($(this).next("p").length==0) { 
$(this).find(".arrowdown").css("visibility","hidden");
   }
 });
 return false;
});

Abbey wrote:

  @Robert The code didn't work for me.

@Charlie I tried length=0 and length=1 and the pane always goes past
the footer div.

$(".pane .arrowdown").click(function() {
if($(this).next().length==1) { // charlie: will return true if at
bottom, would have to test after the animation, or use length==1 if
test before animation
		$(this).css("visibility","hidden");
		return;
	} else {

$(this).parents(".pane").slideUp("slow",function(){
			$(this).insertAfter($(this).next()).slideDown("slow");
});
return false;
	}

});

  





Re: [jQuery] Re: detecting edge cases when swapping divs

2009-12-14 Thread Charlie




you'll have to do some more to reset the visibility to visible on the
up move of course. Was just steering you into one possible way to find
the limits

Charlie wrote:
any tests on
.arrowdown will not be of benefit , you need to check for
position of it's parent .pane
  
since you are inserting after "p" tags in this case try this:
  
$(".pane .arrowdown").click(function() {
 $(this).parents(".pane").slideUp("slow",function(){
   $(this).insertAfter($(this).next()).slideDown("slow");
   if($(this).next("p").length==0) { 
$(this).find(".arrowdown").css("visibility","hidden");
   }
 });
 return false;
});
  
Abbey wrote:
  
@Robert The code didn't work for me.

@Charlie I tried length=0 and length=1 and the pane always goes past
the footer div.

$(".pane .arrowdown").click(function() {
if($(this).next().length==1) { // charlie: will return true if at
bottom, would have to test after the animation, or use length==1 if
test before animation
		$(this).css("visibility","hidden");
		return;
	} else {

$(this).parents(".pane").slideUp("slow",function(){
			$(this).insertAfter($(this).next()).slideDown("slow");
});
return false;
	}

});

  
  





[jQuery] Re: TreePlugin with Checkbox and some functions..

2009-12-12 Thread Charlie
Hi,

I've found the perfect JQuery-Plugin for my needs:
http://www.redcarrot.co.uk/2009/11/11/collapsible-checkbox-tree-jquery-plugin/

Maybe one is also interested in my solution, because it seems that my
question was to hard or maybe to much information for those who are
reading these emails?

cheers
Charlie

On 11 Dez., 20:44, Charlie occur...@gmail.com wrote:
 Hi,

 I'm a newbie in JQuery, but know JS and have allready used some JQuery-
 Plugins.

 But now I'm searching for a cool plugin which can handle the following
 stuff:
  - Tree where defined elements are folders and have no checkbox
  - some child elements have a checkbox, some not
  - I can make as much levels as I want, so no restriction
  - possiblity to submit these checkboxes, that I can save which ones
 were checked
  - possiblity to check some of them when loaded, because If my users
 come back to this page, then the allready checked checkboxes should be
 checked again ( it's a website were users have their own logged in
 area ) best would be to expand the tree then to the allready checked
 elements
  - for some of the elements I want to have a button next to the
 elements text, that if one has clicked this button I can then call
 another function e.g. with the id of this element write a text to
 another div

 I hope I didn't wrote too much and one can give me a good tip :-)

 cheers
 Charlie


Re: [jQuery] how can i do this selection in jquery

2009-12-12 Thread Charlie




this tutorial on event delegation should help

http://www.learningjquery.com/2008/03/working-with-events-part-1

if you follow tutorial you'll likely end up with some statement like:

if($tgt.is("#search_form")){
// do nothing
}else{
// do something
}

daft01 wrote:

  i want to select the div with id headerimg, so this is:
Code:

 jQuery("div#headerimg").click(function () {

   document.location="http://google.com/";
});

but at the same time i want to omit a table with id=search_form from
the selection.
thanks

  





Re: [jQuery] how to disallow a div's 'left' property from exceeding a specified number

2009-12-12 Thread Charlie




you may want to consider the jQueryUI draggable. It has containment
option

http://jqueryui.com/demos/draggable/

you also benefit from a big support group for UI

exodusnicholas wrote:

  I'm using  http://dev.iceburg.net/jquery/jqDnR/ this  tiny drag plugin to
drag div.slider horizontally across it's div.container.
I do not want div.slider to be able to go past the bounds(don't want it to
exit) div.container.
so when div.slider reaches the very right side of it's container
div.container, i want it to not allow the user to drag it any further right,
so that it stays inside of it's container.

here's my jquery:

		$(".slider").mouseup(function() {
			var leftStyleValue = $('div.slider').css('left');
			$('.display_value').html(leftStyleValue);

		if (parseInt($('.slider').css('left'))  100) {
$('#completion').text("YOU DID IT!");
			}
			else {
$(".slider").animate({left: 0
}, 500);
			}
 	   
		});

end of Jquery.

If i change "mouseup" to mousemove, then it wont allow you to even drag it
since it's checking on every pixel move. right now, i can drag div.slider
outside of div.container and when i let go of the mousebutton, since i'm not
doing a mouseup on div.container, it does nothing.

If you want to see the plugin code, go to the site above, copy the
compressed plugin code, then go to  http://jsbeautifier.org/
http://jsbeautifier.org/  and see the uncompressed version.

Thank you SO much!!!


  





Re: [jQuery] Problem with Jquery Superfish in IE7

2009-12-11 Thread Charlie




did you try this fix from link on superfish site?

http://webdemar.com/webdesign/superfish-jquery-menu-ie-z-index-bug/

Zanfe wrote:

  Hi all,
only in IE7 the submenu appear under my page's content.
I use bgframe plugin.

Here my code:
$("ul.sf-menu").superfish({
  speed:   'fast',
  autoArrows:  false // disable generation of arrow mark-up
}).find('ul').bgIframe({opacity:false});

Do you have any ideas?

Thank you very much.
Bye
Z

  





Re: [jQuery] Need help with superfish dropdown menu

2009-12-11 Thread Charlie




2 ways to approach the color

use the onBeforeSHow option withing superfish constructor to add a
class to your a hovered tags, or add some li:hover a rules
to change in css

you have to watch for the #navlinks a:link rules you have that will
superseded the superfish rules. Usually easiest to work with one css
system for a menu rather than 2 as you've done, just for that reason. 

Yvan wrote:

  I'm having some difficulty finalizing my suckerfish dropdown menu on
this page (ie: "Resources" button / link):

http://www.alliedcash.com/comparison/

Here are the 3 problems that I'm trying to correct:

1) I want to eliminate the right border for each of my sublinks -- I
can't seem to access / override that css property

2) When I mouseover the sublinks -- I'd like for the "Resources" link
text to remain white (instead of turning blue)

3) In IE -- when I mouseover the sublinks -- the widths of each of teh
sublinks varies on hover -- I want them to all be the same width (like
the way it displays in Firefox)

4)  In IE -- the left edge of the subnav list doens't line up wih the
left edge of the Resources button (like the way it displays in
Firefox)

Any help would be appreciated.

Thanks!
- Yvan

  





Re: [jQuery] superfish - nav-bar style menu conflict with mootools

2009-12-11 Thread Charlie




Possibly a js conflict with mooTools, have you tried jQuery noConflict?
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

It sounds more like a css problem but without a link is hard to guess

sop wrote:

  Hi

came across a situation where i am using the nav-bar style menu in
conjunction with "Slideshow 2" with mootools.(http://
www.electricprism.com/aeron/slideshow/). I noticed that the "current"
style isn't behaving properly, and also rolling over to ul li for
another main header, the ul li overlap each other.

Appreciate your insights.


  





[jQuery] TreePlugin with Checkbox and some functions..

2009-12-11 Thread Charlie
Hi,

I'm a newbie in JQuery, but know JS and have allready used some JQuery-
Plugins.

But now I'm searching for a cool plugin which can handle the following
stuff:
 - Tree where defined elements are folders and have no checkbox
 - some child elements have a checkbox, some not
 - I can make as much levels as I want, so no restriction
 - possiblity to submit these checkboxes, that I can save which ones
were checked
 - possiblity to check some of them when loaded, because If my users
come back to this page, then the allready checked checkboxes should be
checked again ( it's a website were users have their own logged in
area ) best would be to expand the tree then to the allready checked
elements
 - for some of the elements I want to have a button next to the
elements text, that if one has clicked this button I can then call
another function e.g. with the id of this element write a text to
another div

I hope I didn't wrote too much and one can give me a good tip :-)

cheers
Charlie


Re: [jQuery] ajax

2009-12-11 Thread Charlie




page that gets loaded doesn't include head

have you tried $.getScript? or you can insert script in body of page
being loaded

http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback

Jojje wrote:

  Hi!

I have a question regarding ajax.

In my script i have a lot of css rules set with jquery. And when i use
the .load ajax function the page gets loaded but the css rules from
the script doesnt, or the script does not get loaded, so i have to
refresh the page. Is there a way to get the script loaded as well
without putting a link to the script in the page that is to get
loaded? Or is that how you are supposed to do it?

Regards

George

  





Re: [jQuery] detecting edge cases when swapping divs

2009-12-11 Thread Charlie




next() is a sibling selector. Since it is contained within content div
it will only interact with elements within content

testing for length is a very handy method. 

if( $(this).next().length==0) { // will return true if at bottom,
would have to test after the animation, or use length==1 if test before
animation
// $("yourDownArrow").hide()
} 

Abbey wrote:

  Hello,

I have basic js knowledge, and just started playing with jQuery.

I am doing an experiment where when you click an UP/DOWN ARROW link,
the box will slide up/down throughout the page.

I found a generic swap function online and modified it for jQuery use.
Now I want to refine it more.

I'd like to:
1) When the box is under the HEADER make the UP ARROW disappear,
because we don't want this box to go farther than  that.
2) Same when the box is above the FOOTER, make the DOWN ARROW
disappear so it won't go down anymore on the page.

Here is my test page: http://bit.ly/7uN0ly

The jQuery code is at the bottom if you view the source.

Additional Notes:
I know I can make the ARROW disappear if I add $(this).css
("visibility","hidden");

How come I can't do $(this).parents().prev("div").is("#footer") to
detect the footer div?

The header will always be the first div inside the body, the footer
will always be the last div inside the body.

Thanks for any help! I'm just stuck trying to detect these edge divs.
~Abbey

  





Re: [jQuery] AJAX POST listener

2009-12-11 Thread Charlie




when in doubt the jQuery docs are your best friend

copy/paste straight from Ajax examples:

$.ajax({
   type: "POST",
   url: "some.php",
   data: "name=Johnlocation=Boston",
   success: function(msg){
 alert( "Data Saved: " + msg );
   }
 });

success callbacks fire when return data is received, do whatever you
need to do within the success callback 

http://docs.jquery.com/Ajax/jQuery.ajax#options


Justin wrote:

  Hi all,

I'm trying to implement a way to execute a jquery function (i created)
only when an AJAX POST request has status of complete.  The AJAX
itself is out of my reach (controlled by the application) but I want
to be able to listen to the event.

If I'm not mistaken, the AJAX in jQuery mainly uses the GET method?

If any one can provide any insight as to how I can have an event
trigger on AJAX POST method that would be fantastic.

Regards,
Justin

  





[jQuery] Unexpected append behavior

2009-12-10 Thread Charlie




Creating a set of dropdowns for US states as follows:

$.getJSON("../js/stateListJSON.txt",function(data){
  $(data.statelist).each( function(i) {
var stateAbbr = data.statelist[i].state;
var stateName = data.statelist[i].name;
$("#job_state").append("option value=" +stateName +
"" +stateAbbr + "/option");
  });
});

JSON excerpt
{"state":"MT","name":"Montana"},{"state":"NC","name":"North Carolina"}

HTML Output:
Single word states all append fine but 2 word states get inserted as:

option carolina="" value="North"NC/option

Using more efficient method of creating one string in the $.each and
appending the whole string once after $each, or using
$("#job_state").html(completeOptionString) resulted in same problem.
Only solution I found was append the option tags with no value and add
the value using $("#job_state option:last").val(stateName)

What would cause the split of the 2 words and an attribute
carolina="" to be created?




Re: [jQuery] Unexpected append behavior

2009-12-10 Thread Charlie




thanks,
no idea how I missed that, I certainly know better

Lukas Pitschl | Dressy Vagabonds wrote:

  Hi Charlie,

If you check your code, you'll see that you're not quoting your stateName value,
hence the html code for your North Carolina option looks like this.

option value=North CarolinaNC/option

what you want though, is to use quotes with the value so the output looks like this

option value="North Carolina"NC/option

You have to change your js code to this

$("#job_state").append("option value=\"" +stateName + "\"" +stateAbbr + "/option");

Best regards,

Lukas

Am 10.12.2009 um 13:55 schrieb Charlie:

  
  
Creating a set of dropdowns for US states as follows:

$.getJSON("../js/stateListJSON.txt",function(data){
$(data.statelist).each( function(i) {
var stateAbbr = data.statelist[i].state;
var stateName = data.statelist[i].name;
$("#job_state").append("option value=" +stateName + "" +stateAbbr + "/option");
});
});

JSON excerpt
{"state":"MT","name":"Montana"},{"state":"NC","name":"North Carolina"}

HTML Output:
Single word states all append fine but 2 word states get inserted as:

option carolina="" value="North"NC/option

Using more efficient method of creating one string in the $.each and appending the whole string once after $each, or using $("#job_state").html(completeOptionString)  resulted in same problem.
Only solution I found was append the option tags with no value and add the value using $("#job_state option:last").val(stateName)

What would cause the split of the 2 words and an attribute   carolina=""  to be created?

  
  

  





Re: [jQuery] fading

2009-12-10 Thread Charlie Griefer
Show us yours, first :)

On Thu, Dec 10, 2009 at 6:32 AM, jnf555 johnfrearson...@btinternet.comwrote:

 hi
 i am trying to ceate a page where one image fades in over another int
 the same position

 can anyone show me the code
 thanks
 jnf555




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Problem with assigning events to ajax generated content.

2009-12-09 Thread Charlie Griefer
Take a gander at the live() method:

http://docs.jquery.com/Events/live

On Tue, Dec 8, 2009 at 4:20 PM, Jeff Berry crazedprim...@gmail.com wrote:

 I am populating an unordered list with items from an ajax query, after
 which I want to attach click events to each list item.   Using either load
 or $.get I'm able to retrieve the data and post it to the UL correctly.
 However, when I then try to immediately retrieve all the list items in that
 newly populated UL, I get zero items returned and thus can't attach click
 events to them.  The UL is not actually being populated until after all of
 the scripting runs.  If I then rerun the operation I can retreive the items
 in the list from the first ajax query, but this is too late because the list
 is out of date and does not reflect the new data retrieved from the second
 query.  So, obviously I don't understand something about the basic order of
 operations here.


   function populateCategories() {
   //This loads the categories UL.  Once the script runs the items are
 listed correctly.
   $(#categories).load(
 http://localhost/my_account/return_categories.php);

  //But when I try to immediately retreive the list items from that UL
 before scripting has run it's course, the items are not available.
  //This returns a count of zero items in the list.
  var count = $(categories li).size();
  alert(count);

   }

 What can I do to get that list of items and attach click events to them
 immediately after the load has returned data and I've populated the UL?  Is
 there a different way to approach this? The point of this is to be able to
 click a button to create a new item, have that written to the database,
 update the list of items to reflect the addition, and then attach a click
 event to the list items allowing the user to select and edit the items.

 Is there a way to attach events to any list item in the UL without having
 to explicitly apply it to each item?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Superfish question

2009-12-09 Thread Charlie




no reason it won't, not sure what to spell
out other than follow the markup used in examples, make sure to include
css file(s) and script file for plugin

vertical version has a vertical css file in addition to standard
superfish.css

LTimmers wrote:

  Need to know if this jQuery will work for a site I'm working on.
Link...

http://www.millnerheritage.com

I need a vertical drop down menu. I'm very green so I pretty much need
it spelled out for me. Maybe even in crayon.

Thanks,
Liza

  





Re: [jQuery] drop down error

2009-12-09 Thread Charlie




a link would help a lot, guessing vs actual DOM inspection is futile



test11 wrote:

  hi
 when i am using superfish, during the page load beore the image/flash
gets loaded all the drop down list are getting displayed at a time .can u
suggest me how to hide those dropdown untill the image has been loaded

  





Re: [jQuery] Re: Superfish - Auto Arrows on sub menus only?

2009-12-09 Thread Charlie




easier solution is to turn off the insertion of the arrows within
superfish options

$("ul.sf-menu").superfish({autoArrows: false}); 


mikeromana wrote:

  Sorry to be a newb, but I am trying to do the same thing where there
are no arrows in the main menu:

"Well, just delete the markup for the arrows then:
$('#nav  li  a span').remove(); "

Where do I put that code?

Thank you.



On Nov 13, 9:25am, discern cap...@gmail.com wrote:
  
  
Perfect. Thank you!

  
  
  





Re: [jQuery] learn

2009-12-08 Thread Charlie Griefer
read http://docs.jquery.com

search amazon for jQuery.  there are a few books.

On Tue, Dec 8, 2009 at 2:24 AM, police atharikmoha...@gmail.com wrote:

 hi guys, i am interested learn j query, how to learn, can u send any
 easy way to learn site?




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] unsub

2009-12-08 Thread Charlie Griefer
Here's a link.

http://groups.google.com/group/jquery-en

On Tue, Dec 8, 2009 at 1:26 PM, Lucas Deaver luk...@gmail.com wrote:

 I need to unsubscribe from your incessant emails but you put no link in the
 email for this. It is common practice since the stone age of emails to do
 that, you are very frustrating to work with and I don't like you now.

 PLEASE UNSUBSCRIBE ME!!




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Superfish - leave current path open?

2009-12-07 Thread Charlie




open and hide are controlled by 2
functions. You would need to rewrite the
function hideSuperfishUl() which is at bottom of the js file

t.hinze wrote:

  I am using Superfish and I think this menu is a nice think.
But now I have a problem: I want to say Superfish "Please let the
current Path open and dont close it at leave the menu/item."

How can I do this?

Regards,
T.Hinze

  





Re: [jQuery] Re: google map with jquery and php(please help me)

2009-12-07 Thread Charlie




This set of many tutorials is one of the best Google map resources you
can find:
http://econym.org.uk/gmap/

StephenJacob wrote:

  I'd suggest checking out the Google API documentation for examples.
You can also look into some jquery google map examples at
ajaxrain.com ... but i think you'll find more things useful at the
google api site.

http://code.google.com/apis/maps/documentation/index.html

http://www.ajaxrain.com/search

On Dec 7, 1:30pm, hamed7 63hosse...@gmail.com wrote:
  
  
hi

i need some code like google map with jquery and php

i dont want use api,i want create some page with some map for user can
click on map
and save some information on map and show like google map.

  
  
  





Re: [jQuery] Jquery unique ID

2009-12-05 Thread Charlie Griefer
script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
/script

script type=text/javascript
$(document).ready(function() {
$('div.testClass').each(function(i) {
$(this).attr('id', 'test' + i)
});
});
/script

div class=testClassA/div
div class=testClassB/div
div class=testClassC/div

$('div.testClass').each(function(i) -- will loop over each instance of a
div with the class testClass.

For each iteration of the loop, 'i' is the loop index (e.g. for 1st
iteration its value is 1, second iteration, 2, etc).

So for each loop, you set the id attribute of the div being looped over to
testi (where i represents a number).

You'll end up with the first div having an ID of test1, the second an id
of test2, etc.

If you run the code above in Firefox using Firebug, you should be able to
see the attributes in the code.

On Sat, Dec 5, 2009 at 4:42 AM, kbuntu i...@teevotee.com wrote:

 I'm a designer and totally lost when it comes to php or java script.
 Perhaps somebody can help me.

 I have several images when hover over it will display a DIV called
 testing. The content is dynamically generated by wordpress. My problem
 is when I hover over an image it displays all the div's with the class
 testing. What I need to do is somehow generate a random id by
 Jquery.


 script type=text/javascript
$(document).ready(function() {
var hide = false;
$(.rss-link).hover(function(){
if (hide) clearTimeout(hide);
$(.testing).fadeIn();
}, function() {
hide = setTimeout(function() {$(.testing).fadeOut
 (slow);}, 500);
});
$(.testing).hover(function(){
if (hide) clearTimeout(hide);
}, function() {
hide = setTimeout(function() {$(.testing).fadeOut
 (slow);}, 500);
});
});
 /script


 div class=testing style=display: none;this is my dynamic created
 content /div

 Thank you in advance.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] How do I trigger an event when a user presses a key within a text field?

2009-12-05 Thread Charlie Griefer
On Sat, Dec 5, 2009 at 1:16 PM, laredotorn...@zipmail.com 
laredotorn...@gmail.com wrote:

 Hi,

 What is the event that I trigger if a user enters (or deletes) a
 character within a textfield with id = username?

 Thanks,  - Dave


Bet you can find it in here: http://docs.jquery.com/Events

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] [Superfish] Left side dropdown menu

2009-12-05 Thread Charlie




the subs are absolute positioned , 

to have them open on left side you can change:
.sf-menu li:hover ul,.sf-menu li.sfHover ul {
 left:   0;
}

to:
.sf-menu li:hover ul,.sf-menu li.sfHover ul {
 right: 0;
}

another convenience of the API is being able to use the onBeforeShow
option.

Have used it before to make adjustments to only certain sub elements
this way:
  $(".sf-menu").superfish({ 
 onBeforeShow: function() {
 $(".last_menu").css("left",-130); // in this case
shifts the last sub menu to avoid extending beyond main container 
}
 });


Sam wrote:

  Hi,
I have 3 level menu.
I want the sub menus to be open in left direction instead of right.
Because the menu is in top right corner of the website, and when
submenu are displayed.
They goes outside the website window and browser shows the scroll bar,
which doesnt look nice.

I hope, u guys understand what i m trying to say.

Please take a look at the screenshot to get the exact idea.
http://i48.tinypic.com/2sa1dv9.jpg

Thanks

  






[jQuery] Basic Bind Question

2009-12-04 Thread Charlie Griefer
Hi All:

I've read over the docs, but don't quite understand what the bind() event
provides versus just assigning a particular event handler to a selected
element (or set of elements).

For example, consider the code below.  What's the difference between the
interaction with the p elements of class first, and the p elements of
class second?  Isn't the second bit effectively binding a click event
handler to a specific batch of p elements just as the first one is?

Just not grokking it.  Would appreciate if anybody could enlighten me.

script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
/script

script type=text/javascript
$(document).ready(function() {
$('p.first').bind('click', function() {
alert($(this).text());
});

$('p.second').click(function() {
alert($(this).text());
});
});
/script

p class=firstA/p
p class=firstB/p
p class=firstC/p
p class=firstD/p
p class=firstE/p

hr /

p class=secondF/p
p class=secondG/p
p class=secondH/p
p class=secondI/p
p class=secondJ/p

-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Basic Bind Question

2009-12-04 Thread Charlie Griefer
Hi Karl:

Awesome!  Got it :)

Thanks for the explanation and examples.

Charlie

On Fri, Dec 4, 2009 at 9:01 AM, Karl Swedberg k...@englishrules.com wrote:

 Hey Charlie,

 methods such as .click() and .mouseover() are just convenience methods.
 They all use .bind() internally. One nice thing about .bind() is that you
 can use multiple event types with it. For example, instead of doing this:

 $('a')
   .mouseover(function() {
 var $link = $(this);
 // do something with $link
   })
   .mouseout(function() {
 var $link = $(this);
 // do something with $link
   });

 You can combine them and avoid some repetition:

 $('a')
   .bind('mouseover mouseout', function(event) {
 var $link = $(this);
 if (event.type == 'mouseover') {
   // do something with $link on mouseover
 } else {
   // do something with $link on mouseout
 }
   });

 --Karl

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




 On Dec 4, 2009, at 11:46 AM, Charlie Griefer wrote:

 Hi All:

 I've read over the docs, but don't quite understand what the bind() event
 provides versus just assigning a particular event handler to a selected
 element (or set of elements).

 For example, consider the code below.  What's the difference between the
 interaction with the p elements of class first, and the p elements of
 class second?  Isn't the second bit effectively binding a click event
 handler to a specific batch of p elements just as the first one is?

 Just not grokking it.  Would appreciate if anybody could enlighten me.

 script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
 /script

 script type=text/javascript
 $(document).ready(function() {
 $('p.first').bind('click', function() {
 alert($(this).text());
 });

 $('p.second').click(function() {
 alert($(this).text());
 });
 });
 /script

 p class=firstA/p
 p class=firstB/p
 p class=firstC/p
 p class=firstD/p
 p class=firstE/p

 hr /

 p class=secondF/p
 p class=secondG/p
 p class=secondH/p
 p class=secondI/p
 p class=secondJ/p

 --
 Charlie Griefer
 http://charlie.griefer.com/

 I have failed as much as I have succeeded. But I love my life. I love my
 wife. And I wish you my kind of success.





-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] Re: Basic Bind Question

2009-12-04 Thread Charlie Griefer
Thanks all.  I appreciate all the responses and examples.  Really helps out
a lot.

Charlie

On Fri, Dec 4, 2009 at 11:34 AM, seasoup seas...@gmail.com wrote:

 Got two more uses for ya.  Namespacing of events:

 // set two click events with different namespaces
 $('.button').bind('click.namespace1', function () {

 }).bind('click.namespace2', function () {

 });

 //remove just one of them
 $('.button').unbind('click.namespace1', function () {

 });

 and passing of data:

 $('.button').bind('click', {'name': 'value'}, function (e) {
  console.log(e.data.name);  // logs value
 });





 On Dec 4, 10:41 am, Rey Bango r...@reybango.com wrote:
  Yep Karl's explanation was great. Also, you can leverage bind() to work
  with your own custom events in the case where you want to define
  something that needs to be triggered based on another action. Using the
  code from the docs, you can see what I'm talking about:
 
  $(p).bind(myCustomEvent, function(e, myName, myValue){
 $(this).text(myName + , hi there!);
 $(span).stop().css(opacity, 1)
  .text(myName =  + myName)
  .fadeIn(30).fadeOut(1000);
   });
  $(button).click(function () {
 $(p).trigger(myCustomEvent, [ John ]);
   });
 
  Rey...
 
  Charlie Griefer wrote:
   Hi Karl:
 
   Awesome!  Got it :)
 
   Thanks for the explanation and examples.
 
   Charlie
 
   On Fri, Dec 4, 2009 at 9:01 AM, Karl Swedberg k...@englishrules.com
   mailto:k...@englishrules.com wrote:
 
   Hey Charlie,
 
   methods such as .click() and .mouseover() are just convenience
   methods. They all use .bind() internally. One nice thing about
   .bind() is that you can use multiple event types with it. For
   example, instead of doing this:
 
   $('a')
 .mouseover(function() {
   var $link = $(this);
   // do something with $link
 })
 .mouseout(function() {
   var $link = $(this);
   // do something with $link
 });
 
   You can combine them and avoid some repetition:
 
   $('a')
 .bind('mouseover mouseout', function(event) {
   var $link = $(this);
   if (event.type == 'mouseover') {
 // do something with $link on mouseover
   } else {
 // do something with $link on mouseout
   }
 });
 
   --Karl
 
   
   Karl Swedberg
  www.englishrules.comhttp://www.englishrules.com
  www.learningjquery.comhttp://www.learningjquery.com
 
   On Dec 4, 2009, at 11:46 AM, Charlie Griefer wrote:
 
   Hi All:
 
   I've read over the docs, but don't quite understand what the
   bind() event provides versus just assigning a particular event
   handler to a selected element (or set of elements).
 
   For example, consider the code below.  What's the difference
   between the interaction with the p elements of class first,
   and the p elements of class second?  Isn't the second bit
   effectively binding a click event handler to a specific batch of
   p elements just as the first one is?
 
   Just not grokking it.  Would appreciate if anybody could enlighten
 me.
 
   script
   src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js
 /script
 
   script type=text/javascript
   $(document).ready(function() {
   $('p.first').bind('click', function() {
   alert($(this).text());
   });
 
   $('p.second').click(function() {
   alert($(this).text());
   });
   });
   /script
 
   p class=firstA/p
   p class=firstB/p
   p class=firstC/p
   p class=firstD/p
   p class=firstE/p
 
   hr /
 
   p class=secondF/p
   p class=secondG/p
   p class=secondH/p
   p class=secondI/p
   p class=secondJ/p
 
   --
   Charlie Griefer
  http://charlie.griefer.com/
 
   I have failed as much as I have succeeded. But I love my life. I
   love my wife. And I wish you my kind of success.
 
   --
   Charlie Griefer
  http://charlie.griefer.com/
 
   I have failed as much as I have succeeded. But I love my life. I love
 my
   wife. And I wish you my kind of success.




-- 
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


Re: [jQuery] SuperFish Menu

2009-12-04 Thread Charlie




I looked and I don't see any superfish css or script. 

Alvin wrote:

  I used Superfish on other website (www.dapuri.com) and it works well.
When I try to integrate it to this website, it doesn't work.

Please click the link below and take a look (this is a testing page,
ignore the standard menu on the left)
http://www.avplannersinc.com/index.php/privacy-a-policy

As you can see, only the title "Superfish menu" is shown, while the
menu (MAIN MENU  its SUBMENU) is not shown. I try to disable the
Standard menu, disable the banner, etc but DIDN"T work.

Any advice?

Alvin Ooi

  






Re: [jQuery] Superfish: width of top level links - great with js off - too wide with js on

2009-12-04 Thread Charlie




autoarrows: true 

this appends the link with a span with an arrow image to show links
with subs and is adding addiitonal width, set to false

Dasher wrote:

  Hello,

I am setting up my first superfish menu and having an issue with the
width of the top level link tabs.

When _javascript_ is off, the width of the top level links look exactly
how I want them - with flexible width to accomodate the link text and
7px padding either side.

When _javascript_ is on, extra width seems to be added to the top level
links - I am not sure what is causing it. It does get it right for the
active state (which is wierd because there is no width for that in the
css either).

Here is a visual:
http://www.gocreate.com.au/superfish-menu-spacing.jpg

So what I am wanting to do is stop jquery / superfish adding extra
width to the menu so that it looks the same with js on or off.

The only widths mentioned in the css are as follows but changing these
to "auto" does not have any effect on the width of the links:
.sf-menu ul { position: absolute; top: -999em; width: 12em; }
.sf-menu ul li { width: 100%; }

My _javascript_ knowledge is very limited (I am a css'er) - with a bit
of googling and the more user friendly nature of jquery, I found some
tricks that I could try but as yet have been unable to solve it.

My base code is as follows:

$("ul.sf-menu").supersubs({
minWidth:8,
maxWidth:13,
extraWidth:  1
}).superfish();

$('ul.sf-menu').superfish({
delay:   1000,
animation:   {opacity:'show',height:'show'},
speed:   100,
autoArrows:  true,
dropShadows: true
			});

	 	  $('ul.sf-menu  li  a span').remove(); // remove arrows from
top level links

The same thing happens with or without using the supersubs plugin.

Adding this does reduce the width of each link but it makes all top
level links the same width - so that's not suitable:
$(".sf-menu li").css("width","100px");

Adding any of these variations do not seem to do anything (the idea
being to reduce any width setting that jquery may 'secretly' be
adding):
$('ul.sf-menu li').css('width', '');
or
$("ul.sf-menu li").css("width","");
or
$('ul.sf-menu li')[0].style.width = '';
or
$('ul.sf-menu li').style.removeAttribute("width", false);

Then I thought maybe I could add a class to the top level links with
jquery and set width:auto in the css for the class but that does not
seem to solve it either:
$("ul.sf-menu li").addClass("jq-wfix");

So now I am scratching my head...

Any ideas?

Thanks in advance.

  






Re: [jQuery] Can't get the js of superfish to work

2009-12-04 Thread Charlie




jQuery undefined is typically caused by a path problem to jQuery.js, or
you may be making calls to jquery before it is loaded ( jquery needs to
load before any plugin files)

also check that you only hae one copy of jquery loading

webstudiolund wrote:

  I get these faults:

jQuery is not defined
hoverIntent.js()hoverIntent.js (rad 84)
[Break on this error] })(jQuery);hoverIntent.js (rad 84)
jQuery is not defined
superfish.js()superfish.js (rad 121)
[Break on this error] })(jQuery);\nsuperfish.js (rad 121)
$("ul.sf-menu").superfish is not a function
anonymous()halvskarp.html (rad 16)
anonymous()jquery-1...6.minb.js (rad 27)
anonymous()jquery-1...6.minb.js (rad 27)
anonymous([function()], function(), Object name=args)
jquery-1...6.minb.js (rad 21)
anonymous()jquery-1...6.minb.js (rad 27)
[Break on this error] $('ul.sf-menu').superfish(); \n

  






Re: [jQuery] drop down error

2009-12-04 Thread Charlie




sounds like you aren't including superfish.css, modified it or this is
a Joomla or other type of template that has preexisting menu css. The
superfish css for all sub UL's is positioned offscreen

not much anyone can do to help without a link

test11 wrote:

  I am using  superfish for dropdown menu.But during the page load before the
image has been loaded all the drop down menus are getting visible.Can this
be hide.please give me reply ASAP. 

Thanks in Advance
  






Re: [jQuery] Re: Superfish vertical/arrow question

2009-12-02 Thread Charlie




snippets of html won't do much to troubleshoot.  95% likelihood the
problem is css related and css needs to be viewed in the DOM to work
with effectively.

The majority of posts regarding superfish on this board are Joomla
related . You can try searching. The original css gets left in when the
menu gets installed, try commenting out all the old menu css from
template

MozreplGuy wrote:

  Thanks for your response and your time! I apologize, I still have
everything on localhost. This following is what I could see with
firebug

li class="parent active item1"
a class="sf-with-ul" href="" class="moz-txt-link-rfc2396E" href="http://localhost/testsite/">"http://localhost/testsite/"
spanHome/span
span class="sf-sub-indicator" /span
/a

Does this help a bit?

It doesn't seem to be a width problem, because there is plenty of
space in the accordion list (horizontally). If the  character were
in the same span as home, then it would be in the same line.

What do you think?


On Dec 1, 6:22pm, Charlie charlie...@gmail.com wrote:
  
  
likely a width setting on "LI" or "A" tags, likely from old css as superfish default css doesn't set widths. If text was just fitting before then you are now adding a new element that doesn't fit without wrapping to next line
Can see a lot if you provide link, easy to see what's happening with a DOM inspector
MozreplGuy wrote:Hi all, I successfully included superfish into a joomla site (still on localhost). I use it in vertical mode. It works fine. But there is one thing that doesn't look very nice. Every menu with a sub menu has a sub-indicator '' (character 187, enabled by autoarrow flag). The indicator itself is fine. However the indicator doesn't appear on the same line as the menu text. For example it looks like: Menu1But I would like it to like: Menu1  Does anybody have an idea how I could achieve that. I looked at the code (e.g. superfish), but my skill level doesn't allow me to find a solution :-) I would appreciate any help. Thanks, Mozrepl

  
  
  






Re: [jQuery] Superfish vertical/arrow question

2009-12-01 Thread Charlie




likely a width setting on "LI" or "A" tags, likely from old css as
superfish default css doesn't set widths. If text was just fitting
before then you are now adding a new element that doesn't fit without
wrapping to next line

Can see a lot if you provide link, easy to see what's happening with a
DOM inspector

MozreplGuy wrote:

  Hi all,

I successfully included superfish into a joomla site (still on
localhost). I use it in vertical mode. It works fine. But there is one
thing that doesn't look very nice.

Every menu with a sub menu has a sub-indicator '' (character 187,
enabled by autoarrow flag). The indicator itself is fine. However the
indicator doesn't appear on the same line as the menu text.

For example it looks like:

Menu1
  
  
But I would like it to like:

Menu1 



Does anybody have an idea how I could achieve that. I looked at the
code (e.g. superfish), but my skill level doesn't allow me to find a
solution :-)

I would appreciate any help.


Thanks, Mozrepl

  






Re: [jQuery] superfish

2009-12-01 Thread Charlie




a simple css rule you can add is 

.sf-menu li.sfHover  a {color:}

superfish adds the sfHover class to active LI's ( parent and children)
. Using "" only affects immediate child links of the sfHover class.
IE 6 doesn't support this I believe

jq wrote:

  does anyone know how to make the text link color of a superfish menu
remain highlighted when navigating to its submenus?

I have a menu where you see the link text only (not the background).

I can only get the list item background to remain onhover, but not the
enclosed link color.

Maybe this is a css question: can I change the color of a link inside
a list item by hovering over the list item but not the link.

any pointers would be helpful

thanks

jq

  






Re: [jQuery] Looking for Plugin

2009-12-01 Thread Charlie




shouldn't really need a plugin for this effect. Is a fairly simple
animation of containers positioned and z-indexed over top of slides
with a hover function.

KevinM2k wrote:

  Hi,

I'm looking for a jQuery plugin that can do the same thing as this
site:

http://www.totalpropertyservices.co.uk/services.php

you'll see near the top there are 4 images which when rollover an
overlay pops up, but the image can (if wanted) also fade to others
similar to the cycle plugin for jQuery.

Does anyone know of a plugin that can already do this behaviour? It
seems like it is the cycle plugin mixed with some kind of overlay one.

Thanks

Kev

  






Re: [jQuery] pixture reloaded / superfish / special menu items

2009-12-01 Thread Charlie




there are likely several solutions but modifying the _javascript_ in
superfish is not likely one of them. "break" doesn't tell anyone much.
A lot can be determined by viewing in a browser and looking at the css,
html etc. Posting a link would be your best bet for assistance

rotnme wrote:

  Having a tough time with this.  I am a beginner with all of this.
That being said, I am using the pixture reloaded theme and have
enabled superfish.  The previous theme I was using did not have drop
down menus so i installed nice menus and special menu item because I
have primary links that have links below them, this allowed the
primary menu item not to be a link.  Hopefully that makes sense.
Since switching to pixture and using superfish all is great except
that if I enable special menu item to make the primary not a link the
whole theme breaks.  Apparently the superfish js needs to be modified,
the module is removing the anchor tag.  This is what was told to me.
I don't have a clue as to how, etc.  Any help would be so
appreciated.  I really like the theme and superfish, I just have to
find a way to make it work.  Thanks in advance.

  






Re: [jQuery] get random record?

2009-11-30 Thread Charlie




link to different random functions depending on db
http://www.petefreitag.com/item/466.cfm

$getJSON and volia!

Dave Maharaj :: WidePixels.com wrote:

  Has anyone come across a simple function
that will get a random record from the db?
  
  I just need to send a request every min or
so to get new content from the db and change the content. Pretty much
like a banner rotator but used for random content.
  
  thanks,
  
  Dave






Re: [jQuery] Superfish How-to?

2009-11-30 Thread Charlie




there's a Joomla plugin that will install superfish css, script, a
substitute for supersubs and also i believe hover intent. The biggest
issue that comes up on this board regarding superfish is from Joomla
installs. The install works fine, but the existing menu css can
conflict with superfish css. It doesn't usually cause any dramatic
failure, it just makes tracing css rules difficult for many as one
element may be governed by a superfish css rule, and another by
existing template menu css

If you have any familiarity with Firebug or other DOM inspector's it's
easy to see hierarchy. personally i find commenting out old menu
easiest , however often these rules have the backgrounds you need to
match template

flashwood59 wrote:

  Hi,
I would like to try superfish in a joomla template.
I am new to this list.  I need somebody to guide me through the
procedures to get it working.
a. Where do you create or copy files to in the site structure, root or
template folder?
b. When using hoverIntent, where do those files go?
c. What changes are necessary in the index.php file?
d. Which CSS files affect the styling and operation of superfish
plugin?
e. Is it necessary to install anything via the administrator backend.



I have been using joomla for about a year, I am comfortable working
with CSS and html.

Sincerely,

Jeff

  






  1   2   3   4   5   6   7   8   >