Need jQuery Content Slider - javascript

I am unable to get the correct title for this, please change the title if you get appropriate one :)
This is what i am having
<div class="container">
<div class="innerContainer">
<div>
Div content Here [ always either embed or object or image ]
</div>
xtra noise
</div>
<div class="innerContainer">
<div>
Div content Here
</div>
xtra noise
</div>
<div class="innerContainer">
<div>
Div content Here
</div>
xtra noise
</div>
</div>
Now, what i need is this
http://sketchfu.com/drawing/876520-what-do-i-need-
Note sketchfu is pathetic for drawing.
Is there any jQuery plugin which can do this?

Here is a list of content sliders: http://visionwidget.com/inspiration/web/295-jquery-content-sliders.html
I have used and like: http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider

Related

Image Not Appearing in JQuery Script

I'm having trouble getting an image to show up that has been written within in a body. The specific image being the <img src="Images/Attachments/Shining.gif">
Not too sure if the script needs to be altered or if I would have to put it inside its own class. When I tried to append, the image showed up in both emails instead of the one I wrote it in. I'm coding this using Twine, Sugarcube btw!
<div class="header">
<div class="hamburgerWrapper">
<div class="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
<div class="EmailsWrapper">
<div class="ExtendMsg">
<p>Extended Messages will be placed under here.</p>
</div>
</div>
<div class="Email">
<div class="ImgWrapper">
<img src="Images/Phone Icons/User.png>
</div>
<div class=" EmailTitle">
<p class="EmailTime">9:31 PM</p>
<h1>Sender</h1>
<h2>Subject Title</h2>
<p class="EmailPreview">Email content to be filled out here.</p>
</div>
</div>
<div class="Email">
<div class="ImgWrapper">
<img src="Images/Phone Icons/User2.png">
</div>
<div class="EmailTitle">
<p class="EmailTime">9:29 PM</p>
<h1>Sender2</h1>
<h2>Subject Title</h2>
<p class="EmailPreview">Here is a gif for your memeing pleasure. <img src="Images/Attachments/Shining.gif"></p>
</div>
</div>
<<done>>
<<script>>
$(".Email").on("click", function() {
$(this).addClass("active");
$(".Email").not(".active").addClass("deactive");
$(".ExtendMsg").addClass("active");
$(".ExtendMsg").html($('
<div />').html($(".EmailPreview", this).text()));
$(".headerLabel h1").text("MESSAGES");
});
$(".hamburgerWrapper").on("click", function() {
$(".Email.active").removeClass("active");
$(".Email.deactive").removeClass("deactive");
$(".ExtendMsg").removeClass("active");
$(".headerLabel h1").text("MESSAGES");
});
<</script>>
<</done>>
I'm not totally sure what you are trying to achieve.
But I'd guess that you want to show and image, when ever you click something above?
If that is so, the classes are not met to handled that kind of jobs in Javascript. You might do so, if you assign the image to a Class property background-image: url("heregoesyourimages.png") but there are better ways to handle that kind of behavior.
If you have to use JQuery, you can use simply the method: "Show" or "Hide" that will display in and out an element:
First assign an identifier to your element to toggle (class or id):
<div class="ImgWrapper">
<img class="User2Image" src="Images/Phone Icons/User2.png">
</div>
Then, use the method $(".User2Image").Hide(); to make the image appear or disappear (what this do actually is that adds the property Display:none, to the element (correct me if I'm wrong its been a while since I used JQuery) or $(".User2Image").Show(); to show again the image.

Change content according to which item is selected

I want to build a page where there are two main items on the top of the page, and according to whichever is clicked the content of the page changes to that products content.
For example, I have
<div class='item1'>
<img>
</div>
<div class='item2'>
<img>
</div>
<div class='contentItem1'>
</div>
<div class='contentItem1'>
</div>
<div class='contentItem1'>
</div>
<div class='contentItem2'>
</div>
<div class='contentItem2'>
</div>
<div class='contentItem2'>
</div>
I tried to give each item a key, so that I can target it with the data-id tag, however, that does not seem to work at all, or I am doing something wrong.
Any help would be much appreciated
Edit:
I should have added more info about how the structure looks like exactly:
#foreach($items as $key => $item)
<div data-id="{{$key}}" class="mainItem item{{key}}">
<img>
</div>
#endforeach
Afterwards a several content blocks will be generated for each of the main item:
#foreach($items as $key => $item)
<div class="contentBlock{{key}}" id="contentBlock">
<p>Content</p>
</div>
<div class="contentBlock{{key}}" id="contentBlock">
<p>Content</p>
</div>
<div class="contentBlock{{key}}" id="contentBlock">
<p>Content</p>
</div>
#endforeach
I hope it makes sense. What I would like to do here, once the page is opened, only the content for item 1 is visible, however, once item2 is clicked, its content becomes visible but the item1's hides.

If specific div is in viewport fade in audio, if div is out of viewport fade out

I have a one page scrolling website, and what I would like to do is fade in and out ambient sounds per section. I have found a few libs that fade sound in and out on pixels but being that this site scales I cant get them to trigger properly.
Basically it would be for each section:
<div class="section_content" id="1"> /// this is the section that would need to trigger audio file 1
<div class="main_image">
</div>
<div class="main_content">
Text content and information here
</div>
</div>
<div class="section_content" id="2"> /// this is the section that would need to trigger audio file 2
<div class="main_image">
</div>
<div class="main_content">
Text content and information here
</div>
</div>
https://github.com/kamblack/AudioFade/blob/master/README.md
This was the library I tied but since its based off of pixels it wont quite work.

Add Links to descrition of Bqs Slider Pro - force links to be clickable preventDefaul

i have implemented the great "feature" Slider Pro from this side:
https://github.com/bqworks/slider-pro
Now i want to add "Links" to the description. This is easily possible by just adding the links in the html
Link
Unfortunately this link is not clickable. I think this is caused by the surrounding "area" - a link on this area triggers the slide to load...
is there a way to force links to be clickable?
How can i tell the browser that the link with the class "sp-thumbnail-description" should be always clickable?
Here is the source file:
Js File of SliderPro
My HTML looks like this:
<div id="example5" class="slider-pro">
<div class="sp-slides">
<div class="sp-slide">
<img class="sp-image" src="../src/css/images/blank.gif"
data-src="http://bqworks.com/slider-pro/images/image1_medium.jpg"
data-retina="http://bqworks.com/slider-pro/images/image1_large.jpg"/>
</div>
</div>
<div class="sp-thumbnail">
<div class="sp-thumbnail-image-container">
</div>
<div class="sp-thumbnail-text">
<div class="sp-thumbnail-title">Sie benötigen ein<br />Schadengutachten?</div>
<div class="sp-thumbnail-description"><a class="unbind" href="http://www.google.de">Hier finden Sie Informationen</a></div>
</div>
</div>
</div>
</div>
</div>

Issues implementing simple 'toggle' / (show/hide) on div, on mouseclick, using JavaScript

So I'm trying to make a div class element toggle/ or show hide an set of id elements upon mouse click. So on click on the 'result_location id' I'm trying to display all the divs under result_menu class beneath it.
Am I going the right way about this? Hope you can help! Here's my HTML and JS code:
HTML:
<div id="result_location">
<h3>MainText Here</h3>
</div>
<div class="result_menu">
<div id="a_column">
<h4>text</h4>
</div>
<div id="b_column">
<h4>text</h4>
</div>
<div id="c_column">
<h4>text</h4>
</div>
<div id="d_column">
<h4>text</h4>
</div>
</div>
</div>
</div>
JS:
$(document).ready(function() {
$('#result_location').click(function() {
$('.result_menu').slideToggle("fast");
});
});
It appears to be working fine for me, I threw up a quick html page without a problem. Only thing I can think of is that you must load jquery before the JS that you mentioned. Other than that it should be working!

Categories