Re: [jQuery] Re: slideDown trouble in Safari/Chrome

2010-01-04 Thread Liam Potter

On 04/01/2010 15:35, Paul Hutson wrote:
   

Any ideas? Many thanks in advance.
 

Without looking into it too much I can't see the cause of the
problem...

... however, site design wise, would it not be better to have the
buttons expand an area on the page to show the information?  You could
have the divs all created prior to the page loading (much like you do
now [as a side note here, hiding the divs in the definition would be a
good idea as when it loads up slowly it shows them before hiding
them]) then just using the $("#divid").show("slow"); when clicking on
them (and hiding the currently open one).

I know that isn't exactly the answer you were looking for - but it
should help out.  For reference, you can change CSS type properties
directly with a call like this :

document.getElementById("NAMEOFDIV").style.width = 10;

I can't remember how to do it in a more jquery like way at the moment.

HTHs,
Paul Hutson
   

that would be $("#NAMEOFDIV").width('10');


Re: [jQuery] Need jQuery expert to slightly modify plugin

2010-01-04 Thread Liam Potter

http://groups.google.com/group/jquery-en/browse_thread/thread/f550b94914d10065

On 04/01/2010 15:12, MikeTheVike wrote:

I'm using the newest version of jQuery(http://www.jquery.com) and the
jCarousel Lite plugin (http://www.gmarwaha.com/jquery/jcarousellite/).
It is a "content slider" that rotates content "slides". It is setup to
auto rotate on a set time, and you can also hit the previous/next
buttons to move through the slides. This has been working great.

Now I have the need for a pause button that will stop the auto rotate.
I think this should be fairly easy for someone familiar with
javascript and jQuery. Please email me at mike (at) moxiedisplays
(dot) com. This is a paid job if we can find someone to do it
correctly and in a timely manner. Thanks!
   




Re: [jQuery] Re: Change all CSS background images url

2009-11-16 Thread Liam Potter
I know it's possible, but it's a really poor way to do this as it will 
break the cache.
You should do it with server side code then, can you not edit the html 
helper of cakePHP to add the sub directory for you?


nomen wrote:

Hi:

   Liam: My client needs to have the posibility to change itself  the
image path and he is not a programmer, The maximun complication should
be to change a text by another text. Anyway I know it is a posibility
and I have it in mind.
   Michel:  I try to use the base tag but I´m using CakePHP and it
automatically puts in the links generathed by the HTML helper, the
subdirectory name. So it does not work correctly with those links
because the created links should be "www.domain.com/subdir/subdir/img/
one.jpg".

Thank you anyway for your help.



On 16 nov, 18:03, Michel Belleville 
wrote:
  

First idea that comes to mind is to let your client define another site
base, you then don't even have to change your css as the apparent site base
would be the client's sub-directory.
You do that using the  tag as shown here 
:http://www.w3schools.com/TAGS/tag_base.asp

Hope it helps.

Michel Belleville

2009/11/16 nomen 



Hi all:
  
   I have a website. All my images are in "/img" directory.

   Now, my client needs to put the site in a subdirectory, so, my
images are now in "/subdir/img".
   In the future, maybe we have to change the site to another
subdirectory.
   I don´t want to change all my CSS anytime the client changes the
subdirectory.
   So my question is:
   Is there a simple way to change all CSS background-image
property with the next logic:
  
  "Change all the existing CSS background-image

properties in this way:
  if the url starts with "/img" change to "/subdir/
img" else do nothing"
  
  Thank you for your help in advance.
  




Re: [jQuery] Change all CSS background images url

2009-11-16 Thread Liam Potter

it would be a bad idea to do this with javascript.
I'd recommend simply using find and replace all in your css.

find url(/img
replace url(/subdir/img

nomen wrote:

Hi all:

I have a website. All my images are in "/img" directory.
Now, my client needs to put the site in a subdirectory, so, my
images are now in "/subdir/img".
In the future, maybe we have to change the site to another
subdirectory.
I don´t want to change all my CSS anytime the client changes the
subdirectory.
So my question is:
Is there a simple way to change all CSS background-image
property with the next logic:

   "Change all the existing CSS background-image
properties in this way:
   if the url starts with "/img" change to "/subdir/
img" else do nothing"

   Thank you for your help in advance.

  




Re: [jQuery] Attempting to "hide" a div using jquery but div displays for a split second and then disappears

2009-11-16 Thread Liam Potter

This should help you
http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content

Newbie wrote:

I am working on an accordian side navigation jquery piece and I am
unable to get it to operate exactly how I want.

The menu was originally designed by Roshan Bhattarai and can be viewed
at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html

The original design does not degrade well since the div containing the
drop down menu information is set to display:none using CSS- but
another forum poster suggested that the css selector be removed and
the hiding function be set in the jquery.

This is the code that was added to perform this function:

$("div.menu_body").hide();

The code works to some extent, however the div does appear on the page
for a split second on refresh or on page load and then diseappears.

I am thinking I either did something wrong, am missing something, or
could put that bit of code somewhere else in the script for the div to
truly be hidden until the visible header is clicked.

The whole point of adding this code is so the accordian menu degrades
gracefully- if there is another way for the entire menu to be viewable
with javascript turned off, please detail the steps.

I have downloaded the newest version of jquery.

Here is the entire script for the menu.