Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

popover #3484

Closed
alonshoshani opened this Issue May 14, 2012 · 26 comments

Comments

Projects
None yet
4 participants

after i include the all JS files and im calling the popover fuctions i got an alert that

"Microsoft JScript runtime error: Unable to get value of the property 'Constructor': object is null or undefined"

and it point to those lines in bootstrap-popover.js

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

constructor: Popover

, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()

  $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
  $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)

  $tip.removeClass('fade top bottom left right in')
}

, hasContent: function () {
return this.getTitle() || this.getContent()
}

, getContent: function () {
var content
, $e = this.$element
, o = this.options

..."

When you say 'the all JS files' do you mean to say that you're including all Bootstrap JS files (or at least the one that contains all of the plugins?) Popover requires Tooltip so you must include Tooltip before Popover when you list your script tags in the head. Are you including both, or just Popover?

I include the all js files including the tooltips and the. Tooltips should
be before phisically?
On May 14, 2012 8:28 PM, "Michael Chiocca" <
reply@reply.github.com>
wrote:

When you say 'the all JS files' do you mean to say that you're including
all Bootstrap JS files (or at least the one that contains all of the
plugins?) Popover requires Tooltip so you must include Tooltip before
Popover when you list your script tags in the head. Are you including both,
or just Popover?


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

Yes. I believe that if you're including the individual JS files instead of the all-inclusive one, Tooltips needs to appear before Popovers in your head section. That's how I do it and everything works fine for me. Try it and see if that resolves your problem.

I include the tooltips before the popover...and i include the all inclusive
one as well.....is it a problem?
On May 14, 2012 8:45 PM, "Michael Chiocca" <
reply@reply.github.com>
wrote:

Yes. I believe that if you're including the individual JS files instead of
the all-inclusive one, Tooltips needs to appear before Popovers in your
head section. That's how I do it and everything works fine for me. Try it
and see if that resolves your problem.


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

Yes. That's a problem. Either include JUST the all-inclusive one, or include JUST the ones for the plugins you want to use. If you include the all-inclusive one (bootstrap.min.js) then you don't need to include the individual files. If you just want to include the JS for the plugins that you're using, then include just those files only (bootstrap-tooltip.js, bootstrap-popover.js.)

i include only the all- inlusive JS. this is the list i include...
maybe there is crush in the css?

<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/bootstrap.js" type="text/javascript"></script>
<script src="Scripts/bootstrap.min.js" type="text/javascript"></script>
<asp:ContentPlaceHolder ID="HeadContent" runat="server">

On Mon, May 14, 2012 at 8:51 PM, alon shoshani alon.shoshani@gmail.comwrote:

I include the tooltips before the popover...and i include the all
inclusive one as well.....is it a problem?
On May 14, 2012 8:45 PM, "Michael Chiocca" <
reply@reply.github.com>
wrote:

Yes. I believe that if you're including the individual JS files instead
of the all-inclusive one, Tooltips needs to appear before Popovers in your
head section. That's how I do it and everything works fine for me. Try it
and see if that resolves your problem.


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

You're including everything twice which is really causing you problems. You only need one .css, either the minified or the non-minified, for both the responsive and non-responsive .css. And you need just one of the .js files, either the minified one or the non-minified one. Also, you need to upgrade your jQuery to at least 1.7.1. The plugins probably won't work with the older 1.4.1 version.

thx a lot...now i have no erros but still it doesnt work.
i wrote this code.

<script> $("#pop1").popover( { title: getPopTitle(), content: getPopContent() } ); function getPopTitle() { return "Title 1"; }; function getPopContent() { return "Content 1"; } </script>

<asp:Label ID="pop1" runat="server" Text="Label">/asp:Label

and im not seeing the tooltip box popover...why?

On Mon, May 14, 2012 at 8:59 PM, Michael Chiocca <
reply@reply.github.com

wrote:

You're including everything twice which is really causing you problems.
You only need one .css, either the minified or the non-minified, for both
the responsive and non-responsive .css. And you need just one of the .js
files, either the minified one or the non-minified one. Also, you need to
upgrade your jQuery to at least 1.7.1. The plugins probably won't work with
the older 1.4.1 version.


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

i have red it. i dont understand..how could i do a tooltip like in the
exmaple? i have a tiny tooltip!!
[image: Inline image 1]

On Mon, May 14, 2012 at 9:08 PM, Michael Chiocca <
reply@reply.github.com

wrote:

Try the documentation
http://twitter.github.com/bootstrap/javascript.html#popovers


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

hi michael,
i will appeciate if you culd help me.
i red the examples and its still doesnt work..
this is the code i write...

$('#keren').popover({
placement : 'right'
});

<asp:Label id="keren" class="label-with-popover" data-content="popover
content" data-title="popover title" runat="server">alon/asp:Label

whats wrong in my code?

On Mon, May 14, 2012 at 9:24 PM, alon shoshani alon.shoshani@gmail.comwrote:

i have red it. i dont understand..how could i do a tooltip like in the
exmaple? i have a tiny tooltip!!
[image: Inline image 1]

On Mon, May 14, 2012 at 9:08 PM, Michael Chiocca <
reply@reply.github.com

wrote:

Try the documentation
http://twitter.github.com/bootstrap/javascript.html#popovers


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

I'm not familiar with using ASP. Try changing data-title to data-original-title and adding rel="popover" to see if that helps. Also, you're using jQuery so try coding your popover like this.

$(document).ready(function() {
$('#keren').popover({placement: 'right'});
});

its just not working...
is it right?

<script src="Scripts/jquery_min.js" type="text/javascript"></script>
<script src="Scripts/bootstrap-tooltip.js"

type="text/javascript"></script>
<script src="Scripts/bootstrap-popover.js" type="text/javascript"></script>

do i missing something?

On Tue, May 15, 2012 at 12:49 AM, Michael Chiocca <
reply@reply.github.com

wrote:

I'm not familiar with using ASP. Try changing data-title to
data-original-title and adding rel="popover" to see if that helps. Also,
you're using jQuery so try coding your popover like this.

$(document).ready(function() {
$('#keren').popover({placement: 'right'});
});


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

The first link tag looks suspicious. Why do you have "~/Styles/" instead of "Styles" ? Are you sure that the first are being loaded? Do you have Firebug installed? Does Firebug flag anything as erroneous? Looking at the above I really can't tell what's wrong.

The options you provide to the .popover() constructor must be a valid JSON object. I'm not entirely sure, but I don't think you can use function calls to provide the values of the constructor properties. So instead, try providing the options in this JSON format.

{title: 'My Title', content: 'My Content'}

Have you been successful at installing Firebug (for Firefox) and using it to see if it provides any useful debugging information? Other browsers have similar developer tools (e.g. Chrome.)

hi michael....
i have those problems.
this is my code:

<script src="js/bootstrap.js"></script>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"

type="text/javascript"></script>

<script language="javascript" type="text/javascript"> $(document).ready(function() { $('#keren').popover({placement: 'right'}); }); </script>

hover for
popover

[image: Inline image 1]

On Tue, May 15, 2012 at 6:20 PM, Michael Chiocca <
reply@reply.github.com

wrote:

The options you provide to the .popover() constructor must be a valid JSON
object. I'm not entirely sure, but I don't think you can use function calls
to provide the values of the constructor properties. So instead, try
providing the options in this JSON format.

{title: 'My Title', content: 'My Content'}

Have you been successful at installing Firebug (for Firefox) and using it
to see if it provides any useful debugging information? Other browsers have
similar developer tools (e.g. Chrome.)


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

All of the Bootstrap JS plugins require a later version of jQuery, 1.7.1 at least, or the latest, 1.7.2. Your 1.3.2 jQuery is too out of date. Please update it.

i have included the latest one...and still..
please take a look im desperate..

[image: Inline image 1]

On Tue, May 15, 2012 at 7:15 PM, Michael Chiocca <
reply@reply.github.com

wrote:

All of the Bootstrap JS plugins require a later version of jQuery, 1.7.1
at least, or the latest, 1.7.2. Your 1.3.2 jQuery is too out of date.
Please update it.


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

I'm sorry, but I can't help you any further. The documentation is quite clear. It provides more than adequate instructions, information, and lots of examples. If you can't figure out how to get things to work based on the voluminous amount of information, etc. that's available, I can't really help you. Everyone that uses Bootstrap has been able to get by using just what's provided on the Bootstrap web site. Popovers is a simple plugin that is well documented and very easy to get working. I don't know why you're having so much difficulty getting something so simple to work.

about the first two errors..it may occur because of crush between to
Jqueries?
why it write $ is not defined?
why it recgonized ("keren") is a function?

can you send me a simple code which is working?
[image: Inline image 1]

On Tue, May 15, 2012 at 7:43 PM, Michael Chiocca <
reply@reply.github.com

wrote:

I'm sorry, but I can't help you any further. The documentation is quite
clear. It provides more than adequate instructions, information, and lots
of examples. If you can't figure out how to get things to work based on the
voluminous amount of information, etc. that's available, I can't really
help you. Everyone that uses Bootstrap has been able to get by using just
what's provided on the Bootstrap web site. Popovers is a simple plugin that
is well documented and very easy to get working. I don't know why you're
having so much difficulty getting something so simple to work.


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

The Bootstrap web site has complete documentation and working examples. They should be more than sufficient to help you get going. Please don't rely on me or any other one single person to help you. Use the Bootstrap documentation and examples. They should provide more than enough information.

i dont know what si your job or role.
if you here to support you are not good enough if you cant solve ..as you
say very simple issue.
in this case you failed...
i have red the instructions a lot of times...look for example and on.
i have alrfeady implemented something else with jqueries..not from
bootstrap and its worked fine.
very insulted sentence "don't rely on me or any other one single person to
help you".

On Tue, May 15, 2012 at 8:02 PM, Michael Chiocca <
reply@reply.github.com

wrote:

The Bootstrap web site has complete documentation and working examples.
They should be more than sufficient to help you get going. Please don't
rely on me or any other one single person to help you. Use the Bootstrap
documentation and examples. They should provide more than enough
information.


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

You need to include the jQuery JS before you include any Bootstrap JS via script tags in your head section. I apologize if you don't think I'm being helpful. Frankly, I just don't understand why you haven't been able to debug your issues using the documentation and examples that abound on the Bootstrap web site.

envex commented May 15, 2012

@alonshoshani: I think his problem is that no matter how he tries to help, you're just not getting it.

Either you dont fully understand how to use js/html/css, or whatever. You're not going to learn anything if someone just gives you the code.

Here is a working example taken right from the docs: http://jsfiddle.net/Byc47/

If you can't get it working in your application, I'd suggest doing some tutorials on using JS and HTML

i wrote an new file and its worked.
no idea what happend.

On Tue, May 15, 2012 at 8:37 PM, Matt Vickers <
reply@reply.github.com

wrote:

@alonshoshani: I think his problem is that no matter how he tries to help,
you're just not getting it.

Either you dont fully understand how to use js/html/css, or whatever.
You're not going to learn anything if someone just gives you the code.

Here is a working example taken right from the docs:
http://jsfiddle.net/Byc47/

If you can't get it working in your application, I'd suggest doing some
tutorials on using JS and HTML


Reply to this email directly or view it on GitHub:
twitter#3484 (comment)

Owner

fat commented May 20, 2012

hm... glad you got that sorted, in the future please use the mailing list for support related questions - thanks! :)

@fat fat closed this May 20, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment