Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Problem with Actionbar and solution #103

Open
CarpeTempus opened this issue Feb 11, 2013 · 3 comments
Open

Problem with Actionbar and solution #103

CarpeTempus opened this issue Feb 11, 2013 · 3 comments

Comments

@CarpeTempus
Copy link

Hi,

the actionbar_sample.html does not work in my app (I've tested it with ripple). Precisely, when I click on a tab (e.g. Options 2), the $mobile.changePage.. in

$('[data-role="tab"]').bind("vclick", function() {
                        //Change page on tab click
                    if($(this).data("href")) {
                        $.mobile.changePage( $(this).data("href"), { transition: "slide"} );
                    }
                });

does not work, I get this error on the console:

Uncaught TypeError: Object  has no method 'addClass' BlackBerry-JQM-all.js:17460
(anonymous function) BlackBerry-JQM-all.js:17460
(anonymous function) BlackBerry-JQM-all.js:5874
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
jQuery.fn.extend.html BlackBerry-JQM-all.js:5871
$.widget.setButtonText BlackBerry-JQM-all.js:17449
(anonymous function) BlackBerry-JQM-all.js:9743
$.widget._create BlackBerry-JQM-all.js:17356
(anonymous function) BlackBerry-JQM-all.js:9743
$.Widget._createWidget BlackBerry-JQM-all.js:9893
$.widget._createWidget BlackBerry-JQM-all.js:10166
(anonymous function) BlackBerry-JQM-all.js:9743
$.(anonymous function).(anonymous function) BlackBerry-JQM-all.js:9707
(anonymous function) BlackBerry-JQM-all.js:9843
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
$.fn.(anonymous function) BlackBerry-JQM-all.js:9838
$.widget.enhance BlackBerry-JQM-all.js:10212
(anonymous function) BlackBerry-JQM-all.js:9743
$.widget.enhanceWithin BlackBerry-JQM-all.js:10191
(anonymous function) BlackBerry-JQM-all.js:9743
(anonymous function) BlackBerry-JQM-all.js:17497
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
jQuery.event.trigger BlackBerry-JQM-all.js:3144
(anonymous function) BlackBerry-JQM-all.js:3781
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
jQuery.fn.extend.trigger BlackBerry-JQM-all.js:3780
$.widget._create BlackBerry-JQM-all.js:19518
(anonymous function) BlackBerry-JQM-all.js:9743
$.Widget._createWidget BlackBerry-JQM-all.js:9893
$.widget._createWidget BlackBerry-JQM-all.js:10166
(anonymous function) BlackBerry-JQM-all.js:9743
$.(anonymous function).(anonymous function) BlackBerry-JQM-all.js:9707
(anonymous function) BlackBerry-JQM-all.js:9843
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
$.fn.(anonymous function) BlackBerry-JQM-all.js:9838
(anonymous function) BlackBerry-JQM-all.js:19554
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
jQuery.event.trigger BlackBerry-JQM-all.js:3144
(anonymous function) BlackBerry-JQM-all.js:3781
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
jQuery.fn.extend.trigger BlackBerry-JQM-all.js:3780
$.Widget._trigger BlackBerry-JQM-all.js:10105
$.widget._create BlackBerry-JQM-all.js:17325
(anonymous function) BlackBerry-JQM-all.js:9743
$.Widget._createWidget BlackBerry-JQM-all.js:9893
$.widget._createWidget BlackBerry-JQM-all.js:10166
(anonymous function) BlackBerry-JQM-all.js:9743
$.(anonymous function).(anonymous function) BlackBerry-JQM-all.js:9707
(anonymous function) BlackBerry-JQM-all.js:9843
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
$.fn.(anonymous function) BlackBerry-JQM-all.js:9838
$.widget.enhance BlackBerry-JQM-all.js:10212
(anonymous function) BlackBerry-JQM-all.js:9743
$.widget.enhanceWithin BlackBerry-JQM-all.js:10191
(anonymous function) BlackBerry-JQM-all.js:9743
(anonymous function) BlackBerry-JQM-all.js:17497
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
jQuery.event.trigger BlackBerry-JQM-all.js:3144
(anonymous function) BlackBerry-JQM-all.js:3781
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
jQuery.fn.extend.trigger BlackBerry-JQM-all.js:3780
$.widget._create BlackBerry-JQM-all.js:19518
(anonymous function) BlackBerry-JQM-all.js:9743
$.Widget._createWidget BlackBerry-JQM-all.js:9893
$.widget._createWidget BlackBerry-JQM-all.js:10166
(anonymous function) BlackBerry-JQM-all.js:9743
$.(anonymous function).(anonymous function) BlackBerry-JQM-all.js:9707
(anonymous function) BlackBerry-JQM-all.js:9843
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
$.fn.(anonymous function) BlackBerry-JQM-all.js:9838
(anonymous function) BlackBerry-JQM-all.js:19554
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
jQuery.event.trigger BlackBerry-JQM-all.js:3144
(anonymous function) BlackBerry-JQM-all.js:3781
 jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
 jQuery.fn.extend.trigger BlackBerry-JQM-all.js:3780
$.Widget._trigger BlackBerry-JQM-all.js:10105
$.widget._create BlackBerry-JQM-all.js:17325
(anonymous function) BlackBerry-JQM-all.js:9743
$.Widget._createWidget BlackBerry-JQM-all.js:9893
 $.widget._createWidget BlackBerry-JQM-all.js:10166
(anonymous function) BlackBerry-JQM-all.js:9743
 $.(anonymous function).(anonymous function) BlackBerry-JQM-all.js:9707
 (anonymous function) BlackBerry-JQM-all.js:9843
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
$.fn.(anonymous function) BlackBerry-JQM-all.js:9838
$.widget.enhance BlackBerry-JQM-all.js:10212
(anonymous function) BlackBerry-JQM-all.js:9743
$.widget.enhanceWithin BlackBerry-JQM-all.js:10191
(anonymous function) BlackBerry-JQM-all.js:9743
(anonymous function) BlackBerry-JQM-all.js:17497
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
jQuery.event.trigger BlackBerry-JQM-all.js:3144
(anonymous function) BlackBerry-JQM-all.js:3781
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
jQuery.fn.extend.trigger BlackBerry-JQM-all.js:3780
 $.Widget._trigger BlackBerry-JQM-all.js:10105
$.Widget._createWidget BlackBerry-JQM-all.js:9894
$.widget._createWidget BlackBerry-JQM-all.js:10166
(anonymous function) BlackBerry-JQM-all.js:9743
$.(anonymous function).(anonymous function) BlackBerry-JQM-all.js:9707
(anonymous function) BlackBerry-JQM-all.js:9843
 jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
$.fn.(anonymous function) BlackBerry-JQM-all.js:9838
enhancePage BlackBerry-JQM-all.js:12706
$.mobile.loadPage BlackBerry-JQM-all.js:12868
$.mobile.changePage BlackBerry-JQM-all.js:13119
(anonymous function) app.js:390
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
jQuery.event.trigger BlackBerry-JQM-all.js:3144
(anonymous function) BlackBerry-JQM-all.js:3781
jQuery.extend.each BlackBerry-JQM-all.js:658
jQuery.fn.jQuery.each BlackBerry-JQM-all.js:271
jQuery.fn.extend.trigger BlackBerry-JQM-all.js:3780
triggerVirtualEvent BlackBerry-JQM-all.js:10579
handleTouchEnd BlackBerry-JQM-all.js:10682
jQuery.event.dispatch BlackBerry-JQM-all.js:3256
elemData.handle.eventHandle BlackBerry-JQM-all.js:2875
_simulateTouchEvent ripple.js:45
_translateMouseEvent ripple.js:45

I resolved this problem by removing line 17460 and 17461 in BlackBerry-JQM-all.js:

        // TODO possibly aggregate multiple select option classes
        return span.text( text )
        //  .addClass( self.select.attr( "class" ) )
        //  .addClass( selected.attr( "class" ) );  

Kind regards

@jasondscott
Copy link
Contributor

Can you create a jsbin or jsfiddle showing showing the issue?

Thanks for the post!

@CarpeTempus
Copy link
Author

Sure - but how can I include the css and js (sorry, I'm jsfiddle-beginner)? I tried to add it via "Add sources" but it doesn't seem to work: http://jsfiddle.net/CarpeTempus/YEMC2/4/

@jasondscott
Copy link
Contributor

Try working off this one http://jsbin.com/afecom/1/edit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants