[jQuery] Re: jQuery Cycle - Get Current Slide Number

2009-08-05 Thread Charlie Tomlinson





sorry , your next and prev ID's will need to be unique, change them
iin new constructor

Ed F. wrote:

  

I figured out a way to make the "current slide number" work for multiple
slideshows on the same page, but i have to repeat the function declarations
for each instance of a slideshow, like so:

code
// init for the cycle js
$(document).ready(function(){ 
	$('#s1').cycle({
	fx:'fade', 
	speed:'2000', 
	timeout: 0, 
	next:'#next1, #s1',
	prev:'#prev1',
	after: onAfter1
	});
});

function onAfter1(curr,next,opts) {
	var caption1 = (opts.currSlide + 1) + '/' + opts.slideCount;
	$('#caption1').html(caption1);
}
/code

I don't have the jscript superpowers to rewrite these functions to accept
multiple slideshows. anyone have any advice?




Ed F. wrote:
  
  

hi Mike,

thank you for replying. your plugin is awesome.

On thing, in your example, you only have one slideshow on the page, I have
multiple slideshows on the page with the updating count. and I can get the
updated count to work for the firat instance of the slideshow but it
breaks for the rest. any ideas?

thanks,

// Ed


malsup wrote:


  
  
  
Hi, I'm working on the same issue with Cycle. I have multiple slideshows
on
a page, each with current/total slide counter, example: "2 of 5 images"
(oddly, there are no examples of this particular implementation on Mike
Alsup's otherwise ridiculously varied and helpful cycle demo pages).

  
  There is an example of this:

http://www.malsup.com/jquery/cycle/count.html


  



  
  
  






[jQuery] Re: Check if element is shown with show()

2009-08-04 Thread Charlie Tomlinson





or add an "acitve" class when one is opened, then do
$("active").hide().removeClass("active") when click another one. Only
"active" will be visible

rupak mandal wrote:
If youassignsame class to all the paragraph. so on
clicking on menu you have to hide to the class element and show
theparticularparagraph.
  
  
  
  lia
href="" id=home" class="changepara" Home/a/li
lia href="" id="about""
class="changepara"About/a/li
  lia
href="" id=contact""
class="changepara"Contact/a/li
  lia
href="" id="gallery""
class="changepara"Gallery/a/li
  
  
  p id="parahome"class="showhide"/p
  p id="paraabout" class="showhide"/p
  :  : :   :
  :  : :   :
  p id="paragallery"class="showhide"/p
  
  
  
  
  
  $(document).ready(function{
  flag=0;   //initiallyall are hidden
  $(.changepara).click(function(){
  
  if(flag==0)
  
$("#para"+this.id).show("slow");
  else
  {
  
  $(.showhide).hide("slow",function(){$("#para"+this.id).show()});
  }
  
  })
  
  
  
  
  
  On Tue, Aug 4, 2009 at 2:25 PM, StefanCandan
  onlyo...@live.nl wrote:
  
What I meant was

I have a little menu, and a paragraph for each menu item.

Once one of the links is clicked, it should do a check if the
paragraphs of the other links are hidden, and if one is not, hide it
using the hide("slow") animation to hide it. Then if all are hidden,
use show("slow") to show the paragraph the link belongs to.

I was thinking more of an if else statement?
  
  
  
  
  






[jQuery] Re: Handling html with javascript in .html()

2009-04-15 Thread Charlie Tomlinson





simple solution using your example that works 

Create a js file "test.js" containing :

$('#freediv').html('h1 id="test"test/h1');
   $("#test").click(function(){
alert("Bla");
   
});

I used an a tag in html to click to call the test.js file as
follows:

script type="text/_javascript_"
$(document).ready(function() {
$('a').click(function(){
   $.getScript("test.js");
  });

});
/script
/head
body
a href=""Click Here/a
div id="freediv"/div
/body
/html









Snef wrote:

  The 'problem' using .live() is that i need to have all the scripts
loaded even when they are not used. I just wanted to have only the
scripts related to that form.

The check is either in 'view generated source' in FF and the dom
inspector.

I'm not sure about eval, sounds like evil ;)
A simple alert is executed, but can not be seen in the source (and i
think that;s why jQuery code doesn;t work).

Also tried it to use the $(document).ready, without success.

Jake schreef:
  
  
I'd suggest .live() still. Or maybe you could try eval() those
_javascript_ code after Ajax fetch and DOM manipulation complete
manually? btw, do you check the page source using `view page source'
or firebug's dom inspector? latter recommended.

On Apr 15, 3:56pm, Snef sne...@gmail.com wrote:


  When using $.ajax() i encounter some problems.

With the ajax I'm calling a script that will return some html. When
echoing the returned data, I can see that everything is returned
including the _javascript_ tags.

When 'inserting' the returned data into a div on the screen, the
_javascript_ seems to be executed but i can't see it in the generated
source!

I cut it all down to some simple insertion of html into a div like
this:

$("#freediv").html('h1 id="test"test/h1script
language="_javascript_" type="text/_javascript_"alert("Bla");/
scriptpBla bla/p');

The html is inserted in #freediv but i can't see the script tags
(although alert("Bla") did get executed).

The real problem is when i try to use some jQuery in the html:

$("#freediv").html('h1 id="test"test/h1script
language="_javascript_" type="text/_javascript_"$("#test").click(function
(){ alert("Bla"});/scriptpBla bla/p');

Isn't this possible at all?

I'm using this to create some 'popup' forms (maybe with SimpleModal)
and I want to include some _javascript_ into the response that is
specific for that form (like validation and other actions). I know i
can use liveQuery or even jQuery's live() but then i need to have all
the _javascript_ for every used form already in the main document.

I hope you understand my problem ;)
  

  
  
  






[jQuery] Re: Need Help with changing css on an object

2009-03-08 Thread Charlie Tomlinson





good case of trying to add a bunch of script when simple css works.
Spriting the menu images into one (with or without the text included on
each part of image), adding a :hover in css avoids an unnecessary
server request for another image and works if scripting disabled




junk.mail...@gmail.com wrote:

  Hi Chris

My suggestion to your problem will involve a few changes to your
structure, but I don't think they should be too bad for you to pull
off.

Since the texts in your nav don't change on rollover, I would make
them a separate image all together. Then you could make just 2
different background images of the light bulb. One for the on state
and one for the off state. This way you can set up 2 classes in your
css, something like:

.navBulb{background-image: url(/images/bulb_off.gif);}
.navBulbOn{background-image: url(/images/bulb_on.gif);}

That way you can assign the .navBulb class to all 4 of them to start
with, and then just addClass('navBulbOn') and removeClass('navBulb')
as needed on hover and click events.

The other thing I've done that might work even easier for you would be
oonce again to separate out the text into a different image, and then
make one background image that includes both states (bulb on and bulb
off) and then on hover or click events you would just need to change
the position of the background to show/hide the right portion of the
background image.

I hope this helps.
Marty

On Mar 7, 11:27pm, zeckdude zeckd...@gmail.com wrote:
  
  
Hi,

I am having some issues with my site. I have a main Nav with four links that
load in 4 different sections.

You can see the page I am working on here:http://idea-palette.com/official/newofficialsite4.htmlhttp://idea-palette.com/official/newofficialsite4.html

What I am trying to do is, when a user clicks on another Main Nav button,
such as 'Web Projects', the background-image changes to another image that
shows the lightbulb being on. I also want it to change back the
background-image for any link that currently has the light on, so that it
seems the light is on for whatever page the user visits.

Here is my basic html layout that pertains:

body
 div id="container"
  div id="header"
   div id="nav"
li
 anchor tag
  span tag

Each of the links are called 'printsectbtn', 'websectbtn', and so on. Each
of the default background-images is called 'print_off.png', 'web_off.png',
and so on. Each of the background images that show up when a user clicks
that link are called 'print_on.png', 'web_on.png', and so on.

I have started all their names with either 'print', 'web', 'mot', or 'int'
so that I could make it dynamic and simply erase some letters from the
clicked div's name and then add some others at the end.

Here is my jquery that pertains to this issue:

$(function(){
$('#nav li a').click(function(){
  var clickedLinkId = $(this).attr('id'); //This is the ID of the
Main Nav Link that was clicked
  var picOnLocation = 'images/' + clickedLinkId - 'sectbtn' + '_on' +
'.png'; //This is the location of the new background image once the user
clicks a button
  var picOnUrl = 'url(' + picOnLocation + ')'; //This combines the
background image location and URL Line

  $('#' + clickedLinkId + '
span').css({"background-image":picOnUrl}); //This changes the background
image of the span of the currently clicked link.

  return false;
 });

}); 

Basically, what I am trying to do above is to:
1) Get the ID of the clicked link. I called this var ClickedLinkId.
2) Erase the word 'sectbtn' from the end of the ID, so that it just reads as
'print' or 'web' for example
3) Add 'images/' before the word and '_on.png' after the word, so that it is
the location of the new background Image that shows up after the user clicks
on a link. I called this var picOnLocation.
4) Combine the new background Image location(picOnLocation) and URL line. I
called this var picOnUrl.
5) Change the css of the clicked Link's span to show up as the new
background image as specified by picOnUrl.

What I am using does work as I can see the current background disappear, but
no new background loads in. Also, when I try this: var picOnUrl =
"url('images/web_on.png')"; ,it works fine, so I think I may have an issue
with it not being able to find the background image file or perhaps my
concatenation is incorrect.

Here's my folder structure if it helps:

newofficialdesign4.html
IMAGES
  - print_on.png
  - web_on.png
  - mot_on.png
  - int_on.png

I know this is a really long post, but I am really hoping someone can help
me, so I included all the specifics. Please let me know if there are any
other questions that I can answer to help you help me.

Thanks in advance!

-Chris

--
View this message in context:http://www.nabble.com/Need-Help-with-changing-css-on-an-object-tp2239...
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

  
  
  






[jQuery] Re: Superfish menu, IE7 bug - menu expands in a flash when changing page

2009-03-08 Thread Charlie Tomlinson





multilevel.css has an unclosed comment mark might be causing a problem


/*.nav li:hover ul,ul.nav li.sfHover ul {left:0px;top:2em;}






jonasnorlin wrote:

  Hey all !

I have created a superfish menu for my modx website, based on the
exsisting menu: wayfinder.jmultilevel.

Note: the problem i'm having is related to internet explorer 7, the
menu works flawless in firefox.

When you click on an menu item and get directed to the new page, the
menu suddenly appears fully expanded for a split second, and then
returns to normal. I'am not sure if the problem appears the first time
you click a link, you might have to try again before the bug springs.
Also, you need to click on an menu item, the problem dosent come if
you just press F5 for update.

My website: http://www.norlins.dk/uchihaproject/

Files im using in my menu:

JQUERY.JS:
http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/jquery.js
HOVERINTET.JS
http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/hoverintent.js
STYLE.CSS
http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.css
SUPERFISH.JS
http://www.norlins.dk/uchihaproject/assets/snippets/wayfinder/configs/jmultilevel/style.css

Thanks!! =)

  






[jQuery] Re: How to use the plugins into our project

2009-03-07 Thread Charlie Tomlinson





download plug in, include the script on page, follow plugin API


bharani kumar wrote:

Assum for example i want this plugin 
  
  http://plugins.jquery.com/project/Plugins/category/20
  
Add to list,
  
How to customize this into my work area, 
  
  
Can some one share your ideas,
  
  
thanks
-- 
  
  
  
Regards
B.S.Bharanikumar
  
POST YOUR OPINION 
  http://bharanikumariyerphp.site88.net/bharanikumar/






[jQuery] Re: Trying to change CSS values for .ui-tabs but....

2009-03-05 Thread Charlie Tomlinson







.ui-state-active a {}

this works in firebug on current version of tabs on themeroller page


webspee...@gmail.com wrote:

  I can change the properties that I need to change except the a color
of the clicked tab. I've tried many combos, here is what I have.

/* Tabs
--*/
.ui-tabs {padding: .2em;}
.ui-tabs .ui-tabs-nav { padding: .2em .2em 0 .2em;  position:
relative;background-image: url(/images/blackgradient.jpg);}
.ui-tabs .ui-tabs-nav li
{
float: left;
border-bottom: 0 !important;
margin: 0 .2em -1px 0;
padding: 0;
list-style: none;
background-image: url(/images/blackgradient.jpg);
}
.ui-tabs .ui-tabs-nav li a { display:block; text-decoration: none;
padding: .5em 1em;color: white; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected
{
padding-bottom: .1em;
border-bottom: 0;
background-image: none;
border: red solid thin;
}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected li.ui-tabs-selected
{
padding-bottom: .1em;
border-bottom: 0;
background-image: none;
}
.ui-tabs-selected {color: black;}
.ui-tabs .ui-tabs-panel { padding: 1em 1.4em;  display: block; border:
0; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }

Any ideas?

  






[jQuery] Re: Trying to add/remove a class when....

2009-03-05 Thread Charlie Tomlinson





input isn't a css "class",, it's a tag with css attributes

have you tried ("input").css ()?


webspee...@gmail.com wrote:

  Hey all.

I'm trying to add/remove a class and am having trouble. When I add the
new class, the color takes hold, but not the changing of the
background image.

The original CSS is defined as input[type="button"]{background-
image:}

How do I remove a class that is defined like the one above? I tried
removeClass("input"), but that didn't work.


  






[jQuery] Re: Adding additional callbacks to image slides

2009-03-02 Thread Charlie Tomlinson






S3Slider Plugin(JQuery) does what you
want,http://www.serie3.info/s3slider/

sharp looking demos too


 HM-User wrote:

  I have a number of image slides which are fading in and out and I am
also using the pager option (jQuery Cycle). What I want to know
however is, is it possible to invoke a created headline for the image
as well as the image's alt?

So:
function onAfter() {
jQuery('#caption').html(this.alt);
}

displays the current slide's alt. What if I also wanted to display a
special title for each slide along with the above alt? Would you
somehow have to create an array for the title headings?

For example:
Image 1: img src="" alt=description" / with title: STORY 1
Image 2: img src="" alt="descripton" / with title: STORY 2








  






[jQuery] create table ID's from index

2009-03-01 Thread Charlie Tomlinson





have about 150 html
tables ( all same format, headings etc). Trying to assign ID's based on
fact they all carry appropriate name in same td index in table.

not heavily versed in JS and closest I've come is 

$("table").each(function(i){
var country_name= $("this tr:eq(1) td:eq(1)
").html();   
this.id = country_name +this.id + i;
  });

I can get the country_name to write to an alert however am having
trouble getting it to work with index. Tried a variety of things ( swap
html() fo rval(), tried $.merge etc

my outputs to the ID's are working but I either get "undefined with
index# or put various bracket on the var and it come out as text
instead of it's value



I don't have the server side experience to do this through php/sql etc
and am really close now with it

any help greatly appreciated







[jQuery] Re: create table ID's from index

2009-03-01 Thread Charlie Tomlinson





where it stands now, tables have no id's however if i put the variable
I'm taking from a td and write it as "country_name" + this.id +i it
produces the variable name (not value) with index and tables get
id's country_name1, country_name2, etc

if i remove brackets from country name I get undefined1, undefined2 etc
for the ID's

the this.id is working fine, problem is getting my text out of the td
to work , the index is working fine

mkmanning wrote:

  If I read you right, you're trying to assign an ID to the table and it
doesn't already have one? If that's the case, you reference the
table's id in:

 this.id = country_name +this.id + i;

so unless the table already has an id, the second this.id will be
undefined.

On Mar 1, 10:04pm, Charlie Tomlinson charlie...@gmail.com wrote:
  
  
have about 150 html tables ( all same format, headings etc). Trying to assign ID's based on fact they all carry appropriate name in same td index in table.
not heavily versed in JS and closest I've come is
$("table").each(function(i){
var country_name= $("this tr:eq(1) td:eq(1) ").html();  
this.id = country_name +this.id + i;
  });
I can get the country_name to write to an alert however am having trouble getting it to work with index. Tried a variety of things ( swap html() fo rval(), tried $.merge etc
my outputs to the ID's are working but I either get "undefined with index# or put various bracket on the var and it come out as text instead of it's value
I don't have the server side experience to do this through php/sql etc and am really close now with it
any help greatly appreciated

  
  
  






[jQuery] Re: create table ID's from index

2009-03-01 Thread Charlie Tomlinson





oddly enough that is the one option that doesn't produce anything ...no firebug errors and no output

with selector ending in html() i can print alerts with the cell contents, just can't get the variable and the index to create one output

selector tried ...tr alone... then tr td, tr td text  tried them all with .val(), .text() and .html()


tried the this function with a variety of configs also

i seem to be close but my strengths are not in scripting



mkmanning wrote:

  Sorry, didn't look closely enough. Your selector is wrong; try this:
var country_name= $("td:first",this).text();

On Mar 1, 10:49pm, Charlie Tomlinson charlie...@gmail.com wrote:
  
  
where it stands now, tables have no id's however if i put the variable I'm taking from a td and write it as "country_name" + this.id +i it produces the variable name (not value) with index and tables get id's country_name1, country_name2, etc
if i remove brackets from country name I get undefined1, undefined2 etc for the ID's
the this.id is working fine, problem is getting my text out of the td to work , the index is working fine
mkmanning wrote:If I read you right, you're trying to assign an ID to the table and it doesn't already have one? If that's the case, you reference the table's id in: this.id = country_name +this.id + i; so unless the table already has an id, the second this.id will be undefined. On Mar 1, 10:04pm, Charlie Tomlinsoncharlie...@gmail.comwrote:have about 150 html tables ( all same format, headings etc). Trying to assign ID's based on fact they all carry appropriate name in same td index in table. not heavily versed in JS and closest I've come is $("table").each(function(i){ var country_name= $("this tr:eq(1) td:eq(1) ").html();   this.id = country_name +this.id + i;   }); I 
can get the country_name to write to an alert however am having trouble getting it to work with index. Tried a variety of things ( swap html() fo rval(), tried $.merge etc my outputs to the ID's are working but I either get "undefined with index# or put various bracket on the var and it come out as text instead of it's value I don't have the server side experience to do this through php/sql etc and am really close now with it any help greatly appreciated

  
  
  






[jQuery] Re: jcarousel lite plug in help needed

2009-02-28 Thread Charlie Tomlinson





the problem you are having is CSS . There should be a file of CSS to
hold all the components of the carousel together. I looked and didn't
see one on site for Lite version

read up on CSS. html generates the content but it needs to be
displalyed in proper location, color etc with CSS.

The full blown JCarousel incldes the file needed, not sure why Lite
doesn't


Can tell you are new at doing this,, look in your browser and see how
other pages are structured. In Internet Explorer, right click / view
source will pull window up of code for any page.


surreal5335 wrote:

  I am creating this carousel with jcarousel lite plug in but instead of
getting a carousel I am just getting a vertical static list of images
when loading it into a table cell with firefox. I have read that IE is
notroious for having this problem as well.
 Upon pressing the next and prev buttons the list just hides and shows
itself.

I know that plug in is being called properly bc without the call for
the script, the toggling of the list with the buttons doesnt work.

I have gone over my code and several times and checked install notes
and other demo scripts, but still have same problem.

Here is my link to the page at issue

http://royalvillicus.com/photo_site/photo.html

I appreciate any help in solving this matter

  






[jQuery] Re: [tooltip] help please

2009-02-28 Thread Charlie Tomlinson





just went through that download today to implement. I ended up grabbing
screen.css from project demo site and found some of the tooltip
components on there and all works well



paulmo wrote:

  am not getting the stylized popup window (generic yellow box instead).
all files in my server root folder. please help this newbie; this in
head:

script type="text/_javascript_" src=""/script
script src="" type="text/_javascript_"/script
script src="" type="text/_javascript_"/script
script type="text/_javascript_" src=""/script
script type="text/_javascript_" src=""/script
link rel="stylesheet" href="" /

script type="text/_javascript_"
$(function() {
$('#set1 *').tooltip();
}
/script

this in body:

fieldset id="set1"
		label title="A label with a title and default settings, no href
here" for=""Write something./label
		br/
		input title="Your input generates a database driven, interactive
response based on subject key words." type="text" value="Test"
name="action" id="text1"/

	/fieldset

  






[jQuery] Re:help to develop my Jquery Accordion

2009-02-22 Thread Charlie Tomlinson





you haven't explained what the problem is

have you a link to look at?

lock2007 wrote:

  Hi,
I tried for a few days to have a code "JQuery Accordion" for my menu
as it is used in the Apple site. But I still have problems. So I found
another nice code in the address:
http://berndmatzner.de/jquery/hoveraccordion/index.php
I tried to put the code to work on three levels:
Menu1
Sub menu 1
Link 1
Instead of:
Menu1
Link1
But always failed
Any help please ! I need it for my site ! all codes works nice for
2 levels but not well for 3 levels