Bug Tracker

Ticket #2913 (closed bug: invalid)

Opened 7 years ago

Last modified 7 years ago

function attr() was Ineffective in opera

Reported by: Rory Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: attr Cc:
Blocking: Blocked by:

Description

code: <iframe id="test_frame" src="test.php"></iframe>

use jquery: $(function() {

$('#test_frame').attr('src', $('#test_frame').attr('src'));

});

i want that test_frame will reload (like window.location.reload()), but in opera it was Ineffective , please help me! thanks.

Change History

comment:1 Changed 7 years ago by flesler

  • Status changed from new to closed
  • Resolution set to invalid

It's kind of expected that re-setting the same src could not actually reload. try

 $('#test_frame').attr('src','').attr('src', $('#test_frame').attr('src')); 

If it doesn't work, you'll need to access the location object or something like that.

comment:2 Changed 7 years ago by flesler

Sorry, that code was wrong. Try this instead.

var oldsrc = $('#test_frame').attr('src');
$('#test_frame').attr( 'src','' ).attr( 'src', oldsrc );
Note: See TracTickets for help on using tickets.