I am using, thickbox in Joomla, have included jquery and thickbox files, and when I use iframe or ajax then every thing shows fine while if I try to show inline content in thickbox, it doesnot show any thing. Following is my code:
Show hidden modal content.
<div style="display:none" id="hiddenModalContent">This is the div that I want to show</div>
So where the problem is? I am using it in Joomla. It shows popup but nothing inside it, and it is really strange that this is not working in my code while working on thick box demo with same code, so please tell whatever you know.
thanks
This will work for you;
you have to warp content into another HTML element within the hiddin div:
Show hidden modal content.
<div style="display:none" id="hiddenModalContent">
<div>This is the div that I want to show</div>
</div>
did you try wrapping your content ("This is the div that I want to show") inside a blank div?
eg:
<div style="display:none" id="hiddenModalContent"><div>This is the div that I want to show</div></div>
Related
i have a website in opencart, the homepage is default where it shows a code like
<div id="content"> <?php echo $content_top; ?></div>
I added my own HTML code inside it like below:
<div class="created">
this is some content
</div>
now the content I created is coming in the footer, am not able to find the default code for the page, I want the content to be placed below the slider in the page, so I created a parent div main-div for both the slider and my content, but as I don't have the code to the homepage i am not able to place the slider and my content inside the main div, I only know the class of the slider slider-wrap, is there anyway to force the two classes inside the main-div using css or javascript. please help. thanks in advance
I work on my Angularjs project. I use iframe in my project to display some page.
here is iframe
<iframe frameborder="0" ng-`src="../playground/#/sitesDamages" ></iframe>:`
Here is div that I want to display in template displayed in Iframe:
<div id="frameArea">
//some content
</div>
The problem that I want the page to be displayed from specific div where Id="frameArea".
As an alternative, you could just use a simple and use the jQuery "load" function to load the whole page and pluck out just the section you want:
$('#target-div').load('http://www.mywebsite.com/portfolio.php #portfolio-sports');
I am having trouble making link.
I have a slide in a Magento store. Theme is responsive and slider is javascript.
This is the code i have:
<div id="camera_wrap" class="camera_wrap camera_orange_skin">
<div data-thumb="{{skin url='images/camera/slides/thumbs/slide1-thumb.png'}}" data-src {{skin url='images/camera/slides/b1.jpg'}}"></div>
</div>
Slider is showing picture and assosiated thumbnail. I want to make slider clickable but i cant get it working. Any ideas?
If i place
onclick="location.href='newurl.html';"
inside div, image is not showing :(
Any suggestions?
Don't use inline onclicks... Assign your div a class and a custom data attribute. Example:
<div class="onclick-link" data-href="mylink.html">Some content here...</div>
And then:
$('.onclick-link').unbind('click').click(function() {
window.location.href = $(this).attr('data-href');
});
This can be used for all div's you want to turn into a link, bu assigning the class and the data-href attribute.
My link
The easiest (and most semantic) way to make a link, is to use the <a> element.
If you REALLY want to go the javascript way, you can bind a handler using jQuery
$('#camera_wrap').on('click', function(){
// your code
});
The issue: I have text fields that are extremely long, and I'm truncating them and putting the full text into a jQuery Mobile popup that will appear when the '[more]' link is clicked. However, I'm having trouble finding the right hook to initialize the popup after replacing the text with the popup markup. I bound it to pageinit, but when I click, nothing happens. Not binding the replacement code at all gives me the message: "Function called on popup that has not been initialized", so I know that some initialization is necessary - but if not at pageinit, I don't know how early in the stack it needs to be called.
JSFiddle: http://jsfiddle.net/KSFyn/1/ - note: since the built-in jQuery Mobile for JSFiddle is 1.1.1, the pageinit isn't performing as expected, but that gives you an idea of what I'm trying to accomplish.
Does something like this work?
http://jsfiddle.net/RyNFc/1/
UPDATED: need to recreate the jQM Markup as you are dynamically adding the popup text after the page is created (using the 'create' event in JQM ~ beh)
http://jsfiddle.net/RyNFc/4/
HTML
<div data-role="page" class="type-home">
<div data-role="content">
This is an exceptionally long span ...
<div data-role="popup" id="popupInfo" class="ui-content" data-theme="e" style="max-width:350px;">
<p>This is an exceptionally long span that I will attempt to break up with JS and present the full text as a popup. This is an exceptionally long span that I will attempt to break up with JS and present the full text as a popup.</p>
</div>
</div>
</div>
I have two divs, one inside the other, and i want block the inside div (div2) for guest users, so they can't interactuate with that div, I want they only can see the image that generates the javascript.
This is the code:
<DIV id="div1" style="overflow:hidden; position:fixed; top:80px; left:0px; height:52; width:177; " onClick="location.href='login.php'">
<div id="div2">
<script type="text/javascript" src="/chat/livehelp_js.php?eo=1&relative=Y&department=1&serversession=0&pingtimes=60&filter=Y&"></script>
</div>
</DIV>
I tried with z-index and it don't works
What can i do for lock the div2? Thanks
Try to make another transparent div over the one, you need to block.
Try this: Create a Modal Dialog
Just make overlay div visible, if not logged in, and hidden, if logged in.
Bear in mind that if you 'block' div2 using css (or embedded style tags) they can be easily undone. A couple of clicks in FireBug and the div would be 'unblocked'. Also 'manually' issuing a request against the url would bypass any 'blocking'.
Would it not be better for the service at /chat/livehelp... or similar to return and empty div when the user is not logged in?
I'm not sure i could help you, but with plugins like jQuery-UI (or maybe Kendo-UI?) u can easily manage dialog forms
es. Dialog demo
otherwise i think u have to hack with some js + css + html tricks...