Skip to main content

Bug Tracker

Side navigation

#10252 closed bug (worksforme)

Opened September 12, 2011 09:52AM UTC

Closed September 12, 2011 12:46PM UTC

.val()

Reported by: TheBuzzer@videotron.ca Owned by:
Priority: low Milestone: None
Component: attributes Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Not a bug, but it seems to have to way to use .val()!

Variable as a link

var sVar = $('#Item').val(); Will set a link to Item value

$('#Item').val('Text'); sVar will take the value 'Text'

Independant Variable should be set like this

var sVar;

sVar = $('#Item').val();

$('#Item').val('Text'); Now sVar will keep the old value

Tested on Firefox

Attachments (0)
Change History (1)

Changed September 12, 2011 12:46PM UTC by timmywil comment:1

component: unfiledattributes
priority: undecidedlow
resolution: → worksforme
status: newclosed

I'm not able to reproduce this. http://jsfiddle.net/timmywil/kfckE/

I don't think it's possible that it could be pass by reference.