Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
jQuery Mobile
dsdsdsdsd1
select menu ... options not working when I bind to pageinit
in
jQuery Mobile
•
10 years ago
hello;
I am new so please be patient. I have a select menu that I am using jquery mobile to turn into a dropdown.
when I do:
<select ... data-SOME_OPTION = 'SOME_VALUE' >
it behaves as expected.
but if I add that same option/value to:
$(document).bind('pageinit', function () { $('select').selectmenu({ corners: false });});
it does not work.
EDIT:
$(document).bind('pageinit', alert('hello') );
does work
see it here:
jsfiddle
thanks,
Shannon
1
Replies(7)
digaoddc
Re: select menu ... options not working when I bind to pageinit
10 years ago
Please take a look at
http://stackoverflow.com/questions/14580372/android-cordova2-3-jquery-ajax-support-cors-true-not-workingsame-request/14581333
Just answered the same thing about mobileinit not working
Leave a comment on digaoddc's reply
dsdsdsdsd1
Re: select menu ... options not working when I bind to pageinit
10 years ago
digaoddc ... thanks for responding ... please see my edit.
thanks,
Shannon
Leave a comment on dsdsdsdsd1's reply
digaoddc
Re: select menu ... options not working when I bind to pageinit
10 years ago
Hum, The only way to do it without the data attribute, is prototype the default configs .
Put this code into your mobileinit event:
$(document).bind('pageinit', function () {
$.mobile.selectmenu.prototype.options.corners = false;
});
Leave a comment on digaoddc's reply
dsdsdsdsd1
Re: select menu ... options not working when I bind to pageinit
10 years ago
ooh, now I'm confused .... I thought that the point of code like this:
$('select').selectmenu(
{ corners: false }
);
was to put it into the pageinit phase and that it should work normally??
Is that
code supposed to be used in a different way?
- thanks
digaoddc
Re: Re: select menu ... options not working when I bind to pageinit
10 years ago
You cannot change the corners with that code of yours, look at the answer below(it is well explained) .
Using my solution, all select menus in your project will have corners set to false.
If you want only that specific select menu to have corners set to false, use the data attribute.
Leave a comment on dsdsdsdsd1's reply
John Chac..
Re: select menu ... options not working when I bind to pageinit
10 years ago
what are you trying to achieve by calling '$('select').selectmenu()'?
$('select') is already enhanced by jQM and you cannot change corners like that...
if its all about changing corners then directly set data-corners attribute in markup
or set data-role=none and do as in this jsfiddle
http://jsfiddle.net/johnchacko/pYbTG/28/
or change css specific to corner from script
I don't know how exactly do it using refresh method..
http://jquerymobile.com/demos/1.2.0/docs/forms/selects/methods.html
Leave a comment on John Chacko's reply
dsdsdsdsd1
Re: select menu ... options not working when I bind to pageinit
10 years ago
thanks everyone ... I got that code from:
jqm docs
I was using it just to get me started, as a beginner exercise.
Leave a comment on dsdsdsdsd1's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to dsdsdsdsd1's question
Top
Reply
{"z20925509":[14737000003929052,14737000003929073,14737000003929075,14737000003929079],"z2070601":[14737000003929077],"z22943541":[14737000003928241,14737000003928255,14737000003928265]}
Statistics
7
Replies
3851
Views
1
Followers
Tags
Cancel
options
mobile
jquery
select
selectmenu
Actions
Permalink