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
Related
all. As you know that, CKEditor starts with an empty editable body tag like that:
<body contenteditable="true" class="someclasses">
</body>
I am trying to start CKEditor with an empty editable div in this body tag and wrap all content of editor by this div like that:
<body class="someclasses">
<div contenteditable="true">
</div>
</body>
So far, I customized ckeditor.js and achieved to do this when I add a template from the editor but this is not a proper solution because any other event can refresh editor's source code and place an empty body tag again. Also, I have to customize nearly all functions to wrap HTML content by this div tag.
Is there any way to define a default wrapper other than body tag of CKEditor? Thank you.
Edit: To be more clear, I want to define a div inside body section of CKEditor and any content must be placed into this automaticaly like added templates, text, images etc...
There is no easy solution. If you need editable wrapped by some other element maybe consider using inline editor?
On my homepage, index.html, I have a div for a rating system like this
<div class="srtgs" id="rt_??"></div>
Then in my javascript I have a function that generates modal content for each feature in an array, within this I need each modal to have the div above like this
<div class="srtgs" id="rt_<feature.properties.name>"></div>
I tried to change the id in javascript which works but then on page refresh when it loads the modal it is back to rt_?? so it does not get the correct ratings from the DB
Any help is appreciated cheers
Create a JS function with your code for a div id.
Then Use:
<body onload="javascriptFn()">
Change "javascriptFn()" to your function name.
There's a snippet of Javascript serving up ads on my website at http://digitl.co.nz
I want to format the space around the ad so it looks more separate from the main material. To do this I've wrapped the code in a div:
<div id="ad-break-out">
<script type='text/javascript'>
GA_googleFillSlot("digitl_Super-Rectangle");
</script>
</div>
My problem is when I try to add CSS for the div in my WordPress child theme, it doesn't appear to get picked up.
#ad-break-out {}
I've tried it with the class and id selectors, but get the same effect with both - I suspect there's a problem with the end .
The same thing happens if I try to add CSS for the divs generated by the Javascript.
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>
I have a js function that shows some content in a div. So I create this div in my html panel and when calling js function from my gwt code the function works fine...(JNSI)
The problem is when I want to show this content in a dialogBox. So what I do is this: I create the dialogBox using uibinder and I create a div inside as follows:
<g:HTMLPanel ui:field="hmtl_panel">
<div ui:field="show_to_this_div">
</div>
</g:HTMLPanel>
and in the js I use "document.getElementById('show_to_this_div')" as when the div was in the html panel...But nothing happens :-(!
I think you should be using $wnd.document