bootstrap popover

boot strap popover on postback keep adding commas on postback.  here is the bootstrap.js file.

Bootstrap: popover.js v3.3.4
 * http://getbootstrap.com/javascript/#popovers
 * ========================================================================
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * ======================================================================== */

function ($) {
  'use strict';

  // POPOVER PUBLIC CLASS DEFINITION
  // ===============================

  var Popover = function (element, options) {
      this.init('popover', element, options)
      //  alert();
  }

  if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')

  Popover.VERSION  = '3.3.4'

  Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
    placement: 'right',
    trigger: 'click',
    content: '',
    template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
  })


  // NOTE: POPOVER EXTENDS tooltip.js
  // ================================

  Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)

  Popover.prototype.constructor = Popover

  Popover.prototype.getDefaults = function () {
    return Popover.DEFAULTS
  }

  Popover.prototype.setContent = function () {
    var $tip    = this.tip()
    var title   = this.getTitle()
    var content = this.getContent()
    alert("alert1");
    $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
    $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
      this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
    ](content.replace(",", ""))
  
    $tip.removeClass('fade top bottom left right in')

    // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
    // this manually by checking the contents.
    if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
  }

  Popover.prototype.hasContent = function () {
    return this.getTitle() || this.getContent()
  }

  Popover.prototype.getContent = function () {
    var $e = this.$element
    var o  = this.options

    return $e.attr('data-content')
      || (typeof o.content === 'function' ?
            o.content.call($e[0]) :
            o.content.replace(",", ""))
    alert("alert2");
  }

  Popover.prototype.arrow = function () {
    return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
  }


  // POPOVER PLUGIN DEFINITION
  // =========================

  function Plugin(option) {
    return this.each(function () {
      var $this   = $(this)
      var data    = $this.data('bs.popover')
      var options = typeof option == 'object' && option

      if (!data && /destroy|hide/.test(option)) return
      if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
      alert(options);
      if (typeof option == 'string') data[option]()
    })
  }

  var old = $.fn.popover

  $.fn.popover             = Plugin
  $.fn.popover.Constructor = Popover


  // POPOVER NO CONFLICT
  // ===================

  $.fn.popover.noConflict = function () {
    $.fn.popover = old
    return this
  }

}(jQuery);

Open in new window

LVL 9
Seven priceFull StackAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Do you have a link to a page that demonstrates the problem?
0
Seven priceFull StackAuthor Commented:
No but I can great one. Give me a houror2
0
Seven priceFull StackAuthor Commented:
well. this is a asp.net textbox  but a regular text box it does the same thing. when the page postback weather it is a button or a checkbox on auto postback it add these commas.
boot.jpg
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Julian HansenCommented:
We would need to see your code to see how you are using this.
0
Seven priceFull StackAuthor Commented:
  $(document).ready(function () {
             $('.c-markup>.trigger').popover({
                 html: true,
                 title: function () {
                   //  e.preventDefault();
                     $('.contactCIK-markup>.trigger').not(this).popover('hide');
                     return $(this).parent().find('.head').html();
                 },
                 content: function () {
                  //   e.preventDefault();
                     $('.contactCIK-markup>.trigger').not(this).popover('hide');
                     return $(this).parent().find('.content').html();
                 }
             });

           
             $('.s-markup>.trigger').popover({
                 html: true,
                 title: function () {
                     return $(this).parent().find('.head').html();
                 },
                 content: function () {
                     return $(this).parent().find('.content').html();
                 }
             });
             $('.ss-markup>.trigger').popover({
                 html: true,
                 title: function () {
                     return $(this).parent().find('.head').html();
                 },
                 content: function () {
                     return $(this).parent().find('.content').html();
                 }
             });
            
         });

Open in new window

<a href="#" class="trigger btn btn-default" id="btnSeriesSection" >Add Contact</a> 

Open in new window

basically a button trigger.
0
Seven priceFull StackAuthor Commented:
a better way that can help me. I wrapped it in a ajax panel I need to just trigger my code using the onclick functionlity.

<a href="#" class="trigger btn btn-default"  onclick="openDiv()" >Add Contact</a> 



  $(document).ready(function () {

$('.contact-markup>.trigger').popover({
                 html: true,
                 title: function () {
                     return $(this).parent().find('.head').html();
                 },
                 content: function () {
                     return $(this).parent().find('.content').html();
                 }
             });

 });

   function openDiv() {
             alert("you click me");
$(".contact-markup>").trigger("trigger");
         }

Open in new window

0
Seven priceFull StackAuthor Commented:
yes lenamtl I seen that post but that is php and for wordpress. Does not look like that in the bootstrap.js file.
0
Julian HansenCommented:
return $(this).parent().find('.head').html();

Open in new window

What does this markup look like - you gave us the trigger element but not its parent? Where is the popover getting the actual text from?

I need to just trigger my code using the onclick functionlity.

What do you want to trigger? An AJAX callback or the popover code - can you explain a bit more?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Seven priceFull StackAuthor Commented:
tks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.