Drukowana wersja tematu

Kliknij tu, aby zobaczyć temat w orginalnym formacie

Forum PHP.pl _ XML _ bootstrap i fp share wersje jquery

Napisany przez: Lord 10.12.2015, 12:42:30

Mam taki kod do buttona fb share i on działa

  1.  
  2. <http://december.com/html/4/element/script.html src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></http://december.com/html/4/element/script.html>
  3.  
  4. <http://december.com/html/4/element/div.html id="fb-root"></http://december.com/html/4/element/div.html>
  5. <http://december.com/html/4/element/script.html>
  6. window.fbAsyncInit = function() {
  7. FB.init({appId: '11111111111111', status: true, cookie: true,
  8. xfbml: true});
  9. };
  10. (function() {
  11. var e = document.createElement('script'); e.async = true;
  12. e.src = document.location.protocol +
  13. '//connect.facebook.net/en_US/all.js';
  14. document.getElementById('fb-root').appendChild(e);
  15. }());
  16. </http://december.com/html/4/element/script.html>
  17.  
  18.  
  19. <http://december.com/html/4/element/script.html type="text/javascript">
  20. $(document).ready(function(){
  21. $('#share_button').click(function(e){
  22. e.preventDefault();
  23. FB.ui(
  24. {
  25. method: 'feed',
  26. name: 'This is the content of the "name" field.',
  27. link: 'http://www.groupstudy.in/articlePost.php?id=A_111213073144',
  28. picture: 'http://www.groupstudy.in/img/logo3.jpeg',
  29. caption: 'Top 3 reasons why you should care about your finance',
  30. description: 'What happens when you don',
  31. message: ''
  32. });
  33. });
  34. });
  35. </http://december.com/html/4/element/script.html>
  36. <http://december.com/html/4/element/button.html id="share_button">sad</http://december.com/html/4/element/button.html>
  37.  


Mam template na bootstrap (dark admin)
  1. <http://december.com/html/4/element/script.html type="text/javascript" src="js/jquery-1.10.2.min.js"></http://december.com/html/4/element/script.html>
  2. <http://december.com/html/4/element/script.html type="text/javascript" src="bootstrap/js/bootstrap.min.js"></http://december.com/html/4/element/script.html>



Mam taki kod do wywoływanie modal z AJAX

  1. <http://december.com/html/4/element/script.html type="text/javascript">
  2.  
  3. $(window).load(function(){
  4. showHint();
  5. });
  6.  
  7. function showHint(p) {
  8. var xmlhttp = new XMLHttpRequest();
  9. $('#msg').modal('show');
  10. //document.getElementById("txtHint").innerHTML = '';
  11. xmlhttp.onreadystatechange = function() {
  12. if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
  13. document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
  14. }
  15. };
  16.  
  17. if(p == 'add'){
  18. var fname = document.getElementById("fname").value;
  19. var ftext = document.getElementById("ftext").value;
  20. p = p + '&fname=' + fname + '&ftext=' + ftext;
  21. }
  22.  
  23. xmlhttp.open("GET", "gethint.php?q=" + p, true);
  24. xmlhttp.send();
  25. }
  26.  
  27. </http://december.com/html/4/element/script.html>


i teraz probelm pewnie jest z wersja biblioteki jquery i moim kodem, który jest każdy z innej parafi. bo albo działa mi wywoływanie modal (onclick="showHint()") albo button share sad.gif jak to naprawić bo znalezienie błedu zajeło mi kilka godzin ale jak to naprawić serio nie wiem. Jestem początkujący.


Wybrałem złe miejsce na forum, jakiś missclick. Proszę admina o przeniesienie do dopowiedniego działu ;]

Działa ;] nie wiem co robiłem nie tak ale działa teraz mimo ze nic nie zmieniałem wink.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)