5 Replies - 1874 Views - Last Post: 21 June 2009 - 05:50 PM

#1 hrvoje89   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 05-February 09

jQuery working in FF3 but not in IE

Post icon  Posted 21 June 2009 - 02:18 PM

Hello,

I have jQuery code which is not working in IE,and working in FF3 :(

What it needs to do:
- I have 10 articles from DB
- each article has got details
- when i click on details i need jquery to open a DIV "detalji" over everything else

Problem:
- in FF3 working
- in IE not workin.. in IE i click on detail link but i get redirected like it was a normal link,and not a jQuery event :(

jQuery Code:
$(function(){
 $('a.artikal-detalji').click(function()
 {
	var width = $(this).width();
	var height = $(this).height();
	var top = $(this).offset().top;
	var left = $(this).offset().left;
	var partnum = $(this).attr('href');
   
$.post("inc/artikli-detalji.php", { var: partnum }, function(data){
 alert(data);
 $("#detalji").html(data);
 } );
   
	$('#detalji').css({ "top":top, "left":left, "position":"absolute" });
	$('#detalji').fadeIn(600);
   return false;
 });
}); 


Link for details:
<a href="384XH8,Elkotech" class="artikal-detalji" title="View article details">XFX GPU something</a>


artikli-detalji.php
<?php echo 'test'; ?> 


Please help :)

Ty!

Is This A Good Question/Topic? 0
  • +

Replies To: jQuery working in FF3 but not in IE

#2 crazyjugglerdrummer   User is offline

  • GAME OVER. NERD WINS.
  • member icon

Reputation: 124
  • View blog
  • Posts: 690
  • Joined: 07-January 09

Re: jQuery working in FF3 but not in IE

Posted 21 June 2009 - 03:23 PM

hmm interesting. Jquery is supposed to be completely cross browser as its a library that's interpreted by the browser before anything else is.

Try
$('a.artikal-detalji').click(function(evt)
 {
	var width = $(this).width();
	var height = $(this).height();
	var top = $(this).offset().top;
	var left = $(this).offset().left;
	var partnum = $(this).attr('href');
   
$.post("inc/artikli-detalji.php", { var: partnum }, function(data){
 alert(data);
 $("#detalji").html(data);
 } );
   
	$('#detalji').css({ "top":top, "left":left, "position":"absolute" });
	$('#detalji').fadeIn(600);
   evt.preventDefault(); ////////////////////////////////////////////////////
 });


Was This Post Helpful? 0
  • +
  • -

#3 hrvoje89   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 05-February 09

Re: jQuery working in FF3 but not in IE

Posted 21 June 2009 - 03:30 PM

still not working :(

I am using this link to trigger jquery:

<a href="38487HX83/Elko" class="artikal-detalji" title="view details">Article Name</a>

Was This Post Helpful? 0
  • +
  • -

#4 BetaWar   User is offline

  • #include "soul.h"
  • member icon

Reputation: 1647
  • View blog
  • Posts: 8,510
  • Joined: 07-September 06

Re: jQuery working in FF3 but not in IE

Posted 21 June 2009 - 04:14 PM

If it is okay I am going to move this to the jQuery section, you may find more help there.
Was This Post Helpful? 0
  • +
  • -

#5 hrvoje89   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 05-February 09

Re: jQuery working in FF3 but not in IE

Posted 21 June 2009 - 04:15 PM

sure, ok :)
Was This Post Helpful? 0
  • +
  • -

#6 hrvoje89   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 63
  • Joined: 05-February 09

Re: jQuery working in FF3 but not in IE

Posted 21 June 2009 - 05:50 PM

OMG! :) i have fixed the error...

problem:
....
$.post("inc/artikli-detalji.php", { var: partnum }, function(data){
....



to
fix:
....
$.post("inc/artikli-detalji.php", { varijable: partnum }, function(data){
....



BuT!

I have now other problem :(

This code does not work:
	$("a.zatvori").click(
	 function () {
	  $('#detalji').hide();
	  return false;
	  }
	 );


that is for closeing the displayed div by clicking on a link:
<a href="zatvori" class="zatvori" style="color:#FFF;">zatvori me</a>


please help
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1