Rabu, 24 Juli 2013

PHP Indonesia - Facebook: Ma af mau nanya nih gan :) yang udah biasa pake bo...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
Ma af mau nanya nih gan :) yang udah biasa pake bo...
Jul 24th 2013, 23:11, by Nugraha Al-Farisi

Nugraha Al-Farisi 11:11pm Jul 24
Ma af mau nanya nih gan :)
yang udah biasa pake bootstrap bantu ane gan pleasee

ane pengen masuk ke specific tab dengan hash URL
sama kayak kasus ini
https://github.com/twitter/bootstrap/issues/2415#issuecomment-4450768

masalahnya:
di console gini terus ---> Object [object Object] has no method 'tab'

script ane :
var hash = window.location.hash;
if (hash !=false) {
console.log(hash);
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
}

klo emang function tabnya g kebaca knapa jalan yah tab2nya
mohon bantuannya udah stuck ini

Eko Prasetyo 11:22pm Jul 24
itu scriptnya jalan dimana? udah di document load? $(function(){
//script
})
coba kalo gak bisa di jalanin scriptnya di window load:
$(window).load(function(){
//script
})

Nugraha Al-Farisi 11:22pm Jul 24
penampakannya.... :) salahnya dimana y?

Eko Prasetyo 11:27pm Jul 24
ganti document ready dengan window load bisa ga?
saya sih biasanya masalahnya gitu :p

Eko Prasetyo 11:28pm Jul 24
oh yah, setelah page render, coba jalanin script mu, copas ke web console. Dia jalan gak scriptnya?

Nugraha Al-Farisi 11:29pm Jul 24
g ngaruh keknya dan udah ane coba nggak ngaruh :D
$(window).load(function(){ atau $(function(){

scriptnya jalan gan... bisa klo di klik tab, cuman klo ane set manual yg aktif misalnya gini aja

//harusnya yg default muncul setting foto kan
$('#myTab a[href="#setting-photo"]').tab('show');

muncul
Uncaught TypeError: Object [object Object] has no method 'tab'

ini listnya
<ul class="nav nav-tabs" id="myTab">
<li><a href="#accordion2" data-toggle="tab">Info</a></li>
<li><a href="#setting-photo" data-toggle="tab">Photo</a></li>
<li><a href="#setting-video" data-toggle="tab">Videos</a></li>
</ul>

Eko Prasetyo 11:33pm Jul 24
bisa post script tab-nya di jsfiddle? biar bisa saya test di browser

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar