[jQuery] Re: Jquery does not work in IE8

2009-12-17 Thread blueshift
Dear Karl,

Thank you for your reply. I tried moving the jquery scripts before
everything else, but it seems to have no effect in IE.
I moved it back, and this is what it looks like now. (This all works
fine in Safari 4.0.4). Do you have any other suggestions?! Sorry, but
as you can tell, I find this stuff very hard to understand! Jurgen :-)

htmlhead
titleDreams Gallery/title
base target=detail
script language=JavaScript


// Checks the browser and adds classes to the body to reflect it.

$(document).ready(function(){

var userAgent = navigator.userAgent.toLowerCase();
$.browser.chrome = /chrome/.test(navigator.userAgent.toLowerCase
());

// Is this a version of IE?
if($.browser.msie){
$('body').addClass('browserIE');

// Add the version number
$('body').addClass('browserIE' + $.browser.version.substring
(0,1));
}


// Is this a version of Chrome?
if($.browser.chrome){

$('body').addClass('browserChrome');

//Add the version number
userAgent = userAgent.substring(userAgent.indexOf('chrome/')
+7);
userAgent = userAgent.substring(0,1);
$('body').addClass('browserChrome' + userAgent);

// If it is chrome then jQuery thinks it's safari so we have
to tell it it isn't
$.browser.safari = false;
}

// Is this a version of Safari?
if($.browser.safari){
$('body').addClass('browserSafari');

// Add the version number
userAgent = userAgent.substring(userAgent.indexOf('version/')
+8);
userAgent = userAgent.substring(0,1);
$('body').addClass('browserSafari' + userAgent);
}

// Is this a version of Mozilla?
if($.browser.mozilla){

//Is it Firefox?
if(navigator.userAgent.toLowerCase().indexOf('firefox') != -1)
{
$('body').addClass('browserFirefox');

// Add the version number
userAgent = userAgent.substring(userAgent.indexOf
('firefox/') +8);
userAgent = userAgent.substring(0,1);
$('body').addClass('browserFirefox' + userAgent);
}
// If not then it must be another Mozilla
else{
$('body').addClass('browserMozilla');
}
}

// Is this a version of Opera?
if($.browser.opera){
$('body').addClass('browserOpera');
}


});

!--
function na_preload_img()
{
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null)
document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i  img_list.length; i++) {
document.preloadlist[top+i] = new Image;
document.preloadlist[top+i].src = img_list[i+1];
  }
}

function na_change_img_src(name, nsdoc, rpath, preload)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ?
nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
return;
  if (img) {
img.altsrc = img.src;
img.src= rpath;
  }
}

function na_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ?
nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
return;
  if (img  img.altsrc) {
img.src= img.altsrc;
img.altsrc = null;
  }
}

// --
/script
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1style type=text/css
!--
body {
background-color: #00;
}
--
/style/head

titlejCarousel/title

link rel=stylesheet type=text/css href=Scripts/style.css /
script type=text/javascript src=Scripts/js/jquery-1.3.2.min.js/
script
script type=text/javascript src=Scripts/js/
jcarousellite_1.0.1.pack.js/script
script type=text/javascript src=Scripts/js/captify.tiny.js/
script
script type=text/javascript
//jCarouselLite
$(function() {
$(.slider).jCarouselLite({
btnNext: .next,
btnPrev: .prev,
visible: 8
});
});

//Captify
$(document).ready(function(){
$('img.captify').captify({
// all of these options are... optional
// speed of the mouseover effect
speedOver: 'fast',
// speed of the mouseout effect
speedOut: 'normal',
// how long to delay the hiding of the caption after mouseout (ms)
hideDelay: 500,
// 'fade', 'slide', 'always-on'
animation: 'slide',
// text/html to be placed at the beginning of every caption
prefix: '',
// opacity of the caption on mouse over
opacity: '0.7',
// the name of the CSS class to apply to the caption box
className: 'caption-bottom',
// position of the caption (top or bottom)
position: 'bottom',
// caption span % of the image
spanWidth: '100%'
});
});
/script

/head

body

div id=list
div class=previmg src=Scripts/images/prev.jpg alt=prev //
div

  div class=slider
ul



lia href=Gallery%20Dreams/Perchance%20Desc.htm title=Perchance
to Dream target=detailimg src=Gallery Dreams/Perchance to Dream
Thumb.jpg alt=Perchance to Dream class=captify //a/li

lia 

[jQuery] Re: Jquery does not work in IE8

2009-12-17 Thread MorningZ
Your HTML is totally screwed

you've got multiple closing /head tags... you aren't including the
jQuery file before you try to do jQuery stuff first as Karl
suggests and don't confuse works in safari as jQuery must be
horked in IE, that's totally not the case... one browser handles poor
HTML differently/better/worse than another


[jQuery] Re: Jquery does not work in IE8

2009-12-17 Thread MorningZ
here is what i was talking about:

- no jQuery first before you are doing the $.browser stuff
- duplicate title tags, although that shouldn't do anything but
confuse the browser, no break it
- rouge /head tag, that would DEFINITELY be an issue, especially for
IE

html

head

titleDreams Gallery/title
base target=detail

script language=JavaScript
   //jQuery in here
/script

meta http-equiv=Content-Type content=text/html

style type=text/css
/style

/head

titlejCarousel/title
link rel=stylesheet type=text/css href=style.css /
script src=jquery-1.3.2.min.js/script
script src=jcarousellite_1.0.1.pack.js/script
script src=captify.tiny.js/script
script type=text/javascript
 //jQuery code
/script

/head

body
   the html
/body

/html


Re: [jQuery] Re: Jquery does not work in IE8

2009-12-17 Thread Alex Beston
Heres the html I'm using.

!doctype html
html lang=en
head
titledrag  drop/title
link type=text/css href=themes/base/ui.all.css rel=stylesheet /
script type=text/javascript src=js/jquery-1.3.2.js/script
script type=text/javascript src=ui/ui.core.js/script
script type=text/javascript src=ui/ui.draggable.js/script
script type=text/javascript src=ui/ui.droppable.js/script
script type=text/javascript src=script.js/script
link type=text/css href=css/demos.css rel=stylesheet /
style type=text/css
#droppable { background: black; width: 150px; height: 150px; padding: 0.5em;
float: left; margin: 10px; }
/style
script type=text/javascript
 $(document).ready( initialise);
/script
/head
body
div id=droppable/div
/body
/html

// js

var these = [ 'white', 'black', 'orange, 'etc' ];

function makeButtons() {
 for (i in these)
makeWord(these[i]);
}

function makeWord(s) {
var e = $(document.createElement('div'));
e.attr('id', s);
e.append(s);
e.draggable( );
$('body').append(e);
}

function initialise(){
makeButtons();
$(function(){
$(#droppable).droppable({
drop: function( ) { alert('dropped'); }
  });
});
}


Re: [jQuery] Re: Jquery does not work in IE8

2009-12-17 Thread Alex Beston
doh, wrong thread.